Skip to content

Commit 0595e36

Browse files
Add CVC and AVS check on Transaction object, exemptions 3DS2 and date of birth on customer
1 parent da2eafe commit 0595e36

File tree

4 files changed

+73
-2
lines changed

4 files changed

+73
-2
lines changed

processout/customer.py

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ def __init__(self, client, prefill = None):
4343
self._sandbox = None
4444
self._created_at = None
4545
self._registered_at = None
46+
self._date_of_birth = None
4647
if prefill != None:
4748
self.fill_with_data(prefill)
4849

@@ -465,6 +466,19 @@ def registered_at(self, val):
465466
self._registered_at = val
466467
return self
467468

469+
@property
470+
def date_of_birth(self):
471+
"""Get date_of_birth"""
472+
return self._date_of_birth
473+
474+
@date_of_birth.setter
475+
def date_of_birth(self, val):
476+
"""Set date_of_birth
477+
Keyword argument:
478+
val -- New date_of_birth value"""
479+
self._date_of_birth = val
480+
return self
481+
468482

469483
def fill_with_data(self, data):
470484
"""Fill the current object with the new values pulled from data
@@ -526,6 +540,8 @@ def fill_with_data(self, data):
526540
self.created_at = data["created_at"]
527541
if "registered_at" in data.keys():
528542
self.registered_at = data["registered_at"]
543+
if "date_of_birth" in data.keys():
544+
self.date_of_birth = data["date_of_birth"]
529545

530546
return self
531547

@@ -559,6 +575,7 @@ def to_json(self):
559575
"sandbox": self.sandbox,
560576
"created_at": self.created_at,
561577
"registered_at": self.registered_at,
578+
"date_of_birth": self.date_of_birth,
562579
}
563580

564581
def fetch_subscriptions(self, options = {}):
@@ -746,6 +763,7 @@ def create(self, options = {}):
746763
'ip_address': self.ip_address,
747764
'phone_number': self.phone_number,
748765
'legal_document': self.legal_document,
766+
'date_of_birth': self.date_of_birth,
749767
'is_business': self.is_business,
750768
'sex': self.sex,
751769
'metadata': self.metadata,
@@ -817,6 +835,7 @@ def save(self, options = {}):
817835
'ip_address': self.ip_address,
818836
'phone_number': self.phone_number,
819837
'legal_document': self.legal_document,
838+
'date_of_birth': self.date_of_birth,
820839
'is_business': self.is_business,
821840
'sex': self.sex,
822841
'metadata': self.metadata,

processout/invoice.py

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ def __init__(self, client, prefill = None):
4949
self._shipping = None
5050
self._device = None
5151
self._external_fraud_tools = None
52+
self._exemption_reason_3ds2 = None
5253
if prefill != None:
5354
self.fill_with_data(prefill)
5455

@@ -588,6 +589,19 @@ def external_fraud_tools(self, val):
588589
self._external_fraud_tools = val
589590
return self
590591

592+
@property
593+
def exemption_reason_3ds2(self):
594+
"""Get exemption_reason_3ds2"""
595+
return self._exemption_reason_3ds2
596+
597+
@exemption_reason_3ds2.setter
598+
def exemption_reason_3ds2(self, val):
599+
"""Set exemption_reason_3ds2
600+
Keyword argument:
601+
val -- New exemption_reason_3ds2 value"""
602+
self._exemption_reason_3ds2 = val
603+
return self
604+
591605

592606
def fill_with_data(self, data):
593607
"""Fill the current object with the new values pulled from data
@@ -661,6 +675,8 @@ def fill_with_data(self, data):
661675
self.device = data["device"]
662676
if "external_fraud_tools" in data.keys():
663677
self.external_fraud_tools = data["external_fraud_tools"]
678+
if "exemption_reason_3ds2" in data.keys():
679+
self.exemption_reason_3ds2 = data["exemption_reason_3ds2"]
664680

665681
return self
666682

@@ -700,6 +716,7 @@ def to_json(self):
700716
"shipping": self.shipping,
701717
"device": self.device,
702718
"external_fraud_tools": self.external_fraud_tools,
719+
"exemption_reason_3ds2": self.exemption_reason_3ds2,
703720
}
704721

705722
def authorize(self, source, options = {}):
@@ -929,6 +946,7 @@ def create(self, options = {}):
929946
'currency': self.currency,
930947
'metadata': self.metadata,
931948
'details': self.details,
949+
'exemption_reason_3ds2': self.exemption_reason_3ds2,
932950
'gateway_data': self.gateway_data,
933951
'merchant_initiator_type': self.merchant_initiator_type,
934952
'statement_descriptor': self.statement_descriptor,

processout/transaction.py

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,8 @@ def __init__(self, client, prefill = None):
6767
self._chargedback_at = None
6868
self._refunded_at = None
6969
self._three_d_s = None
70+
self._cvc_check = None
71+
self._avs_check = None
7072
if prefill != None:
7173
self.fill_with_data(prefill)
7274

@@ -843,6 +845,32 @@ def three_d_s(self, val):
843845
self._three_d_s = val
844846
return self
845847

848+
@property
849+
def cvc_check(self):
850+
"""Get cvc_check"""
851+
return self._cvc_check
852+
853+
@cvc_check.setter
854+
def cvc_check(self, val):
855+
"""Set cvc_check
856+
Keyword argument:
857+
val -- New cvc_check value"""
858+
self._cvc_check = val
859+
return self
860+
861+
@property
862+
def avs_check(self):
863+
"""Get avs_check"""
864+
return self._avs_check
865+
866+
@avs_check.setter
867+
def avs_check(self, val):
868+
"""Set avs_check
869+
Keyword argument:
870+
val -- New avs_check value"""
871+
self._avs_check = val
872+
return self
873+
846874

847875
def fill_with_data(self, data):
848876
"""Fill the current object with the new values pulled from data
@@ -952,6 +980,10 @@ def fill_with_data(self, data):
952980
self.refunded_at = data["refunded_at"]
953981
if "three_d_s" in data.keys():
954982
self.three_d_s = data["three_d_s"]
983+
if "cvc_check" in data.keys():
984+
self.cvc_check = data["cvc_check"]
985+
if "avs_check" in data.keys():
986+
self.avs_check = data["avs_check"]
955987

956988
return self
957989

@@ -1009,6 +1041,8 @@ def to_json(self):
10091041
"chargedback_at": self.chargedback_at,
10101042
"refunded_at": self.refunded_at,
10111043
"three_d_s": self.three_d_s,
1044+
"cvc_check": self.cvc_check,
1045+
"avs_check": self.avs_check,
10121046
}
10131047

10141048
def fetch_refunds(self, options = {}):

setup.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@
33
setup(
44
name = 'processout',
55
packages = ['processout', 'processout.errors', 'processout.networking'],
6-
version = '6.18.4',
6+
version = '6.18.5',
77
description = 'ProcessOut API bindings.',
88
author = 'ProcessOut',
99
author_email = '[email protected]',
1010
url = 'https://github.com/processout/processout-python',
11-
download_url = 'https://github.com/processout/processout-python/tarball/6.18.4',
11+
download_url = 'https://github.com/processout/processout-python/tarball/6.18.5',
1212
keywords = ['ProcessOut', 'api', 'bindings'],
1313
classifiers = [],
1414
)

0 commit comments

Comments
 (0)