Skip to content

Commit 1e65dd9

Browse files
feat!: add device 3DS2 fields and remove unsupported features
1 parent 842db13 commit 1e65dd9

16 files changed

Lines changed: 621 additions & 59 deletions

processout/__init__.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,8 @@
3636
from processout.invoiceshippingphone import InvoiceShippingPhone
3737
from processout.invoicebilling import InvoiceBilling
3838
from processout.unsupportedfeaturebypass import UnsupportedFeatureBypass
39+
from processout.paymentprocessingconfiguration import PaymentProcessingConfiguration
40+
from processout.apmpaymentprocessingconfiguration import APMPaymentProcessingConfiguration
3941
from processout.invoicedetail import InvoiceDetail
4042
from processout.invoicesubmerchant import InvoiceSubmerchant
4143
from processout.submerchantphonenumber import SubmerchantPhoneNumber
@@ -50,6 +52,8 @@
5052
from processout.projectsftpsettings import ProjectSFTPSettings
5153
from processout.projectsftpsettingspublic import ProjectSFTPSettingsPublic
5254
from processout.refund import Refund
55+
from processout.submerchant import Submerchant
56+
from processout.submerchantmapping import SubmerchantMapping
5357
from processout.transaction import Transaction
5458
from processout.nativeapmresponse import NativeAPMResponse
5559
from processout.nativeapmparameterdefinition import NativeAPMParameterDefinition
@@ -63,6 +67,7 @@
6367
from processout.webhookendpoint import WebhookEndpoint
6468
from processout.cardupdaterequest import CardUpdateRequest
6569
from processout.cardcreaterequest import CardCreateRequest
70+
from processout.cardschemedetails import CardSchemeDetails
6671
from processout.device import Device
6772
from processout.cardcontact import CardContact
6873
from processout.cardshipping import CardShipping
Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
try:
2+
from urllib.parse import quote_plus
3+
except ImportError:
4+
from urllib import quote_plus
5+
6+
import processout
7+
import json
8+
9+
from processout.networking.request import Request
10+
from processout.networking.response import Response
11+
12+
# The content of this file was automatically generated
13+
14+
15+
class APMPaymentProcessingConfiguration(object):
16+
def __init__(self, client, prefill=None):
17+
self._client = client
18+
19+
self._return_redirect_type = None
20+
self._preferred_finalization_mode = None
21+
if prefill is not None:
22+
self.fill_with_data(prefill)
23+
24+
@property
25+
def return_redirect_type(self):
26+
"""Get return_redirect_type"""
27+
return self._return_redirect_type
28+
29+
@return_redirect_type.setter
30+
def return_redirect_type(self, val):
31+
"""Set return_redirect_type
32+
Keyword argument:
33+
val -- New return_redirect_type value"""
34+
self._return_redirect_type = val
35+
return self
36+
37+
@property
38+
def preferred_finalization_mode(self):
39+
"""Get preferred_finalization_mode"""
40+
return self._preferred_finalization_mode
41+
42+
@preferred_finalization_mode.setter
43+
def preferred_finalization_mode(self, val):
44+
"""Set preferred_finalization_mode
45+
Keyword argument:
46+
val -- New preferred_finalization_mode value"""
47+
self._preferred_finalization_mode = val
48+
return self
49+
50+
def fill_with_data(self, data):
51+
"""Fill the current object with the new values pulled from data
52+
Keyword argument:
53+
data -- The data from which to pull the new values"""
54+
if "return_redirect_type" in data.keys():
55+
self.return_redirect_type = data["return_redirect_type"]
56+
if "preferred_finalization_mode" in data.keys():
57+
self.preferred_finalization_mode = data["preferred_finalization_mode"]
58+
59+
return self
60+
61+
def to_json(self):
62+
return {
63+
"return_redirect_type": self.return_redirect_type,
64+
"preferred_finalization_mode": self.preferred_finalization_mode,
65+
}

processout/card.py

Lines changed: 46 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ def __init__(self, client, prefill=None):
4040
self._state = None
4141
self._zip = None
4242
self._country_code = None
43+
self._billing_country_code = None
4344
self._ip_address = None
4445
self._fingerprint = None
4546
self._token_type = None
@@ -50,7 +51,8 @@ def __init__(self, client, prefill=None):
5051
self._sandbox = None
5152
self._created_at = None
5253
self._preferred_card_type = None
53-
self._vault_id = None
54+
self._initial_scheme_transaction_id = None
55+
self._payment_account_reference = None
5456
if prefill is not None:
5557
self.fill_with_data(prefill)
5658

@@ -384,6 +386,19 @@ def country_code(self, val):
384386
self._country_code = val
385387
return self
386388

389+
@property
390+
def billing_country_code(self):
391+
"""Get billing_country_code"""
392+
return self._billing_country_code
393+
394+
@billing_country_code.setter
395+
def billing_country_code(self, val):
396+
"""Set billing_country_code
397+
Keyword argument:
398+
val -- New billing_country_code value"""
399+
self._billing_country_code = val
400+
return self
401+
387402
@property
388403
def ip_address(self):
389404
"""Get ip_address"""
@@ -515,16 +530,29 @@ def preferred_card_type(self, val):
515530
return self
516531

517532
@property
518-
def vault_id(self):
519-
"""Get vault_id"""
520-
return self._vault_id
533+
def initial_scheme_transaction_id(self):
534+
"""Get initial_scheme_transaction_id"""
535+
return self._initial_scheme_transaction_id
536+
537+
@initial_scheme_transaction_id.setter
538+
def initial_scheme_transaction_id(self, val):
539+
"""Set initial_scheme_transaction_id
540+
Keyword argument:
541+
val -- New initial_scheme_transaction_id value"""
542+
self._initial_scheme_transaction_id = val
543+
return self
544+
545+
@property
546+
def payment_account_reference(self):
547+
"""Get payment_account_reference"""
548+
return self._payment_account_reference
521549

522-
@vault_id.setter
523-
def vault_id(self, val):
524-
"""Set vault_id
550+
@payment_account_reference.setter
551+
def payment_account_reference(self, val):
552+
"""Set payment_account_reference
525553
Keyword argument:
526-
val -- New vault_id value"""
527-
self._vault_id = val
554+
val -- New payment_account_reference value"""
555+
self._payment_account_reference = val
528556
return self
529557

530558
def fill_with_data(self, data):
@@ -579,6 +607,8 @@ def fill_with_data(self, data):
579607
self.zip = data["zip"]
580608
if "country_code" in data.keys():
581609
self.country_code = data["country_code"]
610+
if "billing_country_code" in data.keys():
611+
self.billing_country_code = data["billing_country_code"]
582612
if "ip_address" in data.keys():
583613
self.ip_address = data["ip_address"]
584614
if "fingerprint" in data.keys():
@@ -599,8 +629,10 @@ def fill_with_data(self, data):
599629
self.created_at = data["created_at"]
600630
if "preferred_card_type" in data.keys():
601631
self.preferred_card_type = data["preferred_card_type"]
602-
if "vault_id" in data.keys():
603-
self.vault_id = data["vault_id"]
632+
if "initial_scheme_transaction_id" in data.keys():
633+
self.initial_scheme_transaction_id = data["initial_scheme_transaction_id"]
634+
if "payment_account_reference" in data.keys():
635+
self.payment_account_reference = data["payment_account_reference"]
604636

605637
return self
606638

@@ -630,6 +662,7 @@ def to_json(self):
630662
"state": self.state,
631663
"zip": self.zip,
632664
"country_code": self.country_code,
665+
"billing_country_code": self.billing_country_code,
633666
"ip_address": self.ip_address,
634667
"fingerprint": self.fingerprint,
635668
"token_type": self.token_type,
@@ -640,7 +673,8 @@ def to_json(self):
640673
"sandbox": self.sandbox,
641674
"created_at": self.created_at,
642675
"preferred_card_type": self.preferred_card_type,
643-
"vault_id": self.vault_id,
676+
"initial_scheme_transaction_id": self.initial_scheme_transaction_id,
677+
"payment_account_reference": self.payment_account_reference,
644678
}
645679

646680
def all(self, options={}):

processout/cardcontact.py

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ def __init__(self, client, prefill=None):
2121
self._city = None
2222
self._state = None
2323
self._country_code = None
24+
self._billing_country_code = None
2425
self._zip = None
2526
if prefill is not None:
2627
self.fill_with_data(prefill)
@@ -90,6 +91,19 @@ def country_code(self, val):
9091
self._country_code = val
9192
return self
9293

94+
@property
95+
def billing_country_code(self):
96+
"""Get billing_country_code"""
97+
return self._billing_country_code
98+
99+
@billing_country_code.setter
100+
def billing_country_code(self, val):
101+
"""Set billing_country_code
102+
Keyword argument:
103+
val -- New billing_country_code value"""
104+
self._billing_country_code = val
105+
return self
106+
93107
@property
94108
def zip(self):
95109
"""Get zip"""
@@ -117,6 +131,8 @@ def fill_with_data(self, data):
117131
self.state = data["state"]
118132
if "country_code" in data.keys():
119133
self.country_code = data["country_code"]
134+
if "billing_country_code" in data.keys():
135+
self.billing_country_code = data["billing_country_code"]
120136
if "zip" in data.keys():
121137
self.zip = data["zip"]
122138

@@ -129,5 +145,6 @@ def to_json(self):
129145
"city": self.city,
130146
"state": self.state,
131147
"country_code": self.country_code,
148+
"billing_country_code": self.billing_country_code,
132149
"zip": self.zip,
133150
}

processout/cardcreaterequest.py

Lines changed: 27 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ def __init__(self, client, prefill=None):
3434
self._payment_token = None
3535
self._contact = None
3636
self._shipping = None
37+
self._scheme_details = None
3738
if prefill is not None:
3839
self.fill_with_data(prefill)
3940

@@ -298,6 +299,28 @@ def shipping(self, val):
298299
self._shipping = val
299300
return self
300301

302+
@property
303+
def scheme_details(self):
304+
"""Get scheme_details"""
305+
return self._scheme_details
306+
307+
@scheme_details.setter
308+
def scheme_details(self, val):
309+
"""Set scheme_details
310+
Keyword argument:
311+
val -- New scheme_details value"""
312+
if val is None:
313+
self._scheme_details = val
314+
return self
315+
316+
if isinstance(val, dict):
317+
obj = processout.CardSchemeDetails(self._client)
318+
obj.fill_with_data(val)
319+
self._scheme_details = obj
320+
else:
321+
self._scheme_details = val
322+
return self
323+
301324
def fill_with_data(self, data):
302325
"""Fill the current object with the new values pulled from data
303326
Keyword argument:
@@ -338,6 +361,8 @@ def fill_with_data(self, data):
338361
self.contact = data["contact"]
339362
if "shipping" in data.keys():
340363
self.shipping = data["shipping"]
364+
if "scheme_details" in data.keys():
365+
self.scheme_details = data["scheme_details"]
341366

342367
return self
343368

@@ -361,6 +386,7 @@ def to_json(self):
361386
"payment_token": self.payment_token,
362387
"contact": self.contact,
363388
"shipping": self.shipping,
389+
"scheme_details": self.scheme_details,
364390
}
365391

366392
def create(self, options={}):
@@ -391,7 +417,7 @@ def create(self, options={}):
391417
'payment_token': self.payment_token,
392418
'contact': self.contact,
393419
'shipping': self.shipping,
394-
'scheme_transaction': self.scheme_transaction
420+
'scheme_details': self.scheme_details
395421
}
396422

397423
response = Response(request.post(path, data, options))

processout/cardschemedetails.py

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
try:
2+
from urllib.parse import quote_plus
3+
except ImportError:
4+
from urllib import quote_plus
5+
6+
import processout
7+
import json
8+
9+
from processout.networking.request import Request
10+
from processout.networking.response import Response
11+
12+
# The content of this file was automatically generated
13+
14+
15+
class CardSchemeDetails(object):
16+
def __init__(self, client, prefill=None):
17+
self._client = client
18+
19+
self._transaction_id = None
20+
self._transaction_link_id = None
21+
if prefill is not None:
22+
self.fill_with_data(prefill)
23+
24+
@property
25+
def transaction_id(self):
26+
"""Get transaction_id"""
27+
return self._transaction_id
28+
29+
@transaction_id.setter
30+
def transaction_id(self, val):
31+
"""Set transaction_id
32+
Keyword argument:
33+
val -- New transaction_id value"""
34+
self._transaction_id = val
35+
return self
36+
37+
@property
38+
def transaction_link_id(self):
39+
"""Get transaction_link_id"""
40+
return self._transaction_link_id
41+
42+
@transaction_link_id.setter
43+
def transaction_link_id(self, val):
44+
"""Set transaction_link_id
45+
Keyword argument:
46+
val -- New transaction_link_id value"""
47+
self._transaction_link_id = val
48+
return self
49+
50+
def fill_with_data(self, data):
51+
"""Fill the current object with the new values pulled from data
52+
Keyword argument:
53+
data -- The data from which to pull the new values"""
54+
if "transaction_id" in data.keys():
55+
self.transaction_id = data["transaction_id"]
56+
if "transaction_link_id" in data.keys():
57+
self.transaction_link_id = data["transaction_link_id"]
58+
59+
return self
60+
61+
def to_json(self):
62+
return {
63+
"transaction_id": self.transaction_id,
64+
"transaction_link_id": self.transaction_link_id,
65+
}

0 commit comments

Comments
 (0)