Skip to content

Commit 2f667b5

Browse files
feat: added invoice_return_url on tokens
1 parent e086852 commit 2f667b5

File tree

11 files changed

+360
-7
lines changed

11 files changed

+360
-7
lines changed

processout/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
from processout.invoicerisk import InvoiceRisk
2626
from processout.invoicedevice import InvoiceDevice
2727
from processout.invoiceshipping import InvoiceShipping
28+
from processout.invoicebilling import InvoiceBilling
2829
from processout.invoicedetail import InvoiceDetail
2930
from processout.customeraction import CustomerAction
3031
from processout.dunningaction import DunningAction

processout/client.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -171,6 +171,12 @@ def new_invoice_shipping(self, prefill=None):
171171
prefill -- Data used to prefill the object (optional)"""
172172
return processout.InvoiceShipping(self, prefill)
173173

174+
def new_invoice_billing(self, prefill=None):
175+
"""Create a new InvoiceBilling instance
176+
Keyword argument:
177+
prefill -- Data used to prefill the object (optional)"""
178+
return processout.InvoiceBilling(self, prefill)
179+
174180
def new_invoice_detail(self, prefill=None):
175181
"""Create a new InvoiceDetail instance
176182
Keyword argument:

processout/customeraction.py

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ def __init__(self, client, prefill=None):
1818

1919
self._type = None
2020
self._value = None
21+
self._metadata = None
2122
if prefill is not None:
2223
self.fill_with_data(prefill)
2324

@@ -47,6 +48,19 @@ def value(self, val):
4748
self._value = val
4849
return self
4950

51+
@property
52+
def metadata(self):
53+
"""Get metadata"""
54+
return self._metadata
55+
56+
@metadata.setter
57+
def metadata(self, val):
58+
"""Set metadata
59+
Keyword argument:
60+
val -- New metadata value"""
61+
self._metadata = val
62+
return self
63+
5064
def fill_with_data(self, data):
5165
"""Fill the current object with the new values pulled from data
5266
Keyword argument:
@@ -55,11 +69,14 @@ def fill_with_data(self, data):
5569
self.type = data["type"]
5670
if "value" in data.keys():
5771
self.value = data["value"]
72+
if "metadata" in data.keys():
73+
self.metadata = data["metadata"]
5874

5975
return self
6076

6177
def to_json(self):
6278
return {
6379
"type": self.type,
6480
"value": self.value,
81+
"metadata": self.metadata,
6582
}

processout/gatewayconfiguration.py

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ def __init__(self, client, prefill=None):
2727
self._public_keys = None
2828
self._created_at = None
2929
self._enabled_at = None
30+
self._processing_region = None
3031
if prefill is not None:
3132
self.fill_with_data(prefill)
3233

@@ -191,6 +192,19 @@ def enabled_at(self, val):
191192
self._enabled_at = val
192193
return self
193194

195+
@property
196+
def processing_region(self):
197+
"""Get processing_region"""
198+
return self._processing_region
199+
200+
@processing_region.setter
201+
def processing_region(self, val):
202+
"""Set processing_region
203+
Keyword argument:
204+
val -- New processing_region value"""
205+
self._processing_region = val
206+
return self
207+
194208
def fill_with_data(self, data):
195209
"""Fill the current object with the new values pulled from data
196210
Keyword argument:
@@ -217,6 +231,8 @@ def fill_with_data(self, data):
217231
self.created_at = data["created_at"]
218232
if "enabled_at" in data.keys():
219233
self.enabled_at = data["enabled_at"]
234+
if "processing_region" in data.keys():
235+
self.processing_region = data["processing_region"]
220236

221237
return self
222238

@@ -233,6 +249,7 @@ def to_json(self):
233249
"public_keys": self.public_keys,
234250
"created_at": self.created_at,
235251
"enabled_at": self.enabled_at,
252+
"processing_region": self.processing_region,
236253
}
237254

238255
def all(self, options={}):
@@ -300,6 +317,7 @@ def save(self, options={}):
300317
'name': self.name,
301318
'enabled': self.enabled,
302319
'default_currency': self.default_currency,
320+
'processing_region': self.processing_region,
303321
'settings': options.get("settings"),
304322
'sub_accounts_enabled': options.get("sub_accounts_enabled")
305323
}
@@ -349,6 +367,7 @@ def create(self, gateway_name, options={}):
349367
'name': self.name,
350368
'enabled': self.enabled,
351369
'default_currency': self.default_currency,
370+
'processing_region': self.processing_region,
352371
'settings': options.get("settings"),
353372
'sub_accounts_enabled': options.get("sub_accounts_enabled")
354373
}

processout/invoice.py

Lines changed: 30 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ def __init__(self, client, prefill=None):
5858
self._payment_type = None
5959
self._initiation_type = None
6060
self._payment_intent = None
61+
self._billing = None
6162
if prefill is not None:
6263
self.fill_with_data(prefill)
6364

@@ -709,6 +710,28 @@ def payment_intent(self, val):
709710
self._payment_intent = val
710711
return self
711712

713+
@property
714+
def billing(self):
715+
"""Get billing"""
716+
return self._billing
717+
718+
@billing.setter
719+
def billing(self, val):
720+
"""Set billing
721+
Keyword argument:
722+
val -- New billing value"""
723+
if val is None:
724+
self._billing = val
725+
return self
726+
727+
if isinstance(val, dict):
728+
obj = processout.InvoiceBilling(self._client)
729+
obj.fill_with_data(val)
730+
self._billing = obj
731+
else:
732+
self._billing = val
733+
return self
734+
712735
def fill_with_data(self, data):
713736
"""Fill the current object with the new values pulled from data
714737
Keyword argument:
@@ -797,6 +820,8 @@ def fill_with_data(self, data):
797820
self.initiation_type = data["initiation_type"]
798821
if "payment_intent" in data.keys():
799822
self.payment_intent = data["payment_intent"]
823+
if "billing" in data.keys():
824+
self.billing = data["billing"]
800825

801826
return self
802827

@@ -844,6 +869,7 @@ def to_json(self):
844869
"payment_type": self.payment_type,
845870
"initiation_type": self.initiation_type,
846871
"payment_intent": self.payment_intent,
872+
"billing": self.billing,
847873
}
848874

849875
def increment_authorization(self, amount, options={}):
@@ -889,6 +915,7 @@ def authorize(self, source, options={}):
889915
'allow_fallback_to_sale': options.get("allow_fallback_to_sale"),
890916
'auto_capture_at': options.get("auto_capture_at"),
891917
'metadata': options.get("metadata"),
918+
'override_mac_blocking': options.get("override_mac_blocking"),
892919
'source': source}
893920

894921
response = Response(request.post(path, data, options))
@@ -921,6 +948,7 @@ def capture(self, source, options={}):
921948
'enable_three_d_s_2': options.get("enable_three_d_s_2"),
922949
'metadata': options.get("metadata"),
923950
'capture_statement_descriptor': options.get("capture_statement_descriptor"),
951+
'override_mac_blocking': options.get("override_mac_blocking"),
924952
'source': source}
925953

926954
response = Response(request.post(path, data, options))
@@ -1113,7 +1141,8 @@ def create(self, options={}):
11131141
'require_backend_capture': self.require_backend_capture,
11141142
'external_fraud_tools': self.external_fraud_tools,
11151143
'tax': self.tax,
1116-
'payment_type': self.payment_type
1144+
'payment_type': self.payment_type,
1145+
'billing': self.billing
11171146
}
11181147

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

processout/invoicebilling.py

Lines changed: 133 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,133 @@
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 InvoiceBilling(object):
16+
def __init__(self, client, prefill=None):
17+
self._client = client
18+
19+
self._address1 = None
20+
self._address2 = None
21+
self._city = None
22+
self._state = None
23+
self._country_code = None
24+
self._zip = None
25+
if prefill is not None:
26+
self.fill_with_data(prefill)
27+
28+
@property
29+
def address1(self):
30+
"""Get address1"""
31+
return self._address1
32+
33+
@address1.setter
34+
def address1(self, val):
35+
"""Set address1
36+
Keyword argument:
37+
val -- New address1 value"""
38+
self._address1 = val
39+
return self
40+
41+
@property
42+
def address2(self):
43+
"""Get address2"""
44+
return self._address2
45+
46+
@address2.setter
47+
def address2(self, val):
48+
"""Set address2
49+
Keyword argument:
50+
val -- New address2 value"""
51+
self._address2 = val
52+
return self
53+
54+
@property
55+
def city(self):
56+
"""Get city"""
57+
return self._city
58+
59+
@city.setter
60+
def city(self, val):
61+
"""Set city
62+
Keyword argument:
63+
val -- New city value"""
64+
self._city = val
65+
return self
66+
67+
@property
68+
def state(self):
69+
"""Get state"""
70+
return self._state
71+
72+
@state.setter
73+
def state(self, val):
74+
"""Set state
75+
Keyword argument:
76+
val -- New state value"""
77+
self._state = val
78+
return self
79+
80+
@property
81+
def country_code(self):
82+
"""Get country_code"""
83+
return self._country_code
84+
85+
@country_code.setter
86+
def country_code(self, val):
87+
"""Set country_code
88+
Keyword argument:
89+
val -- New country_code value"""
90+
self._country_code = val
91+
return self
92+
93+
@property
94+
def zip(self):
95+
"""Get zip"""
96+
return self._zip
97+
98+
@zip.setter
99+
def zip(self, val):
100+
"""Set zip
101+
Keyword argument:
102+
val -- New zip value"""
103+
self._zip = val
104+
return self
105+
106+
def fill_with_data(self, data):
107+
"""Fill the current object with the new values pulled from data
108+
Keyword argument:
109+
data -- The data from which to pull the new values"""
110+
if "address1" in data.keys():
111+
self.address1 = data["address1"]
112+
if "address2" in data.keys():
113+
self.address2 = data["address2"]
114+
if "city" in data.keys():
115+
self.city = data["city"]
116+
if "state" in data.keys():
117+
self.state = data["state"]
118+
if "country_code" in data.keys():
119+
self.country_code = data["country_code"]
120+
if "zip" in data.keys():
121+
self.zip = data["zip"]
122+
123+
return self
124+
125+
def to_json(self):
126+
return {
127+
"address1": self.address1,
128+
"address2": self.address2,
129+
"city": self.city,
130+
"state": self.state,
131+
"country_code": self.country_code,
132+
"zip": self.zip,
133+
}

processout/invoiceexternalfraudtools.py

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ def __init__(self, client, prefill=None):
1717
self._client = client
1818

1919
self._forter = None
20+
self._signifyd = None
2021
if prefill is not None:
2122
self.fill_with_data(prefill)
2223

@@ -33,16 +34,32 @@ def forter(self, val):
3334
self._forter = val
3435
return self
3536

37+
@property
38+
def signifyd(self):
39+
"""Get signifyd"""
40+
return self._signifyd
41+
42+
@signifyd.setter
43+
def signifyd(self, val):
44+
"""Set signifyd
45+
Keyword argument:
46+
val -- New signifyd value"""
47+
self._signifyd = val
48+
return self
49+
3650
def fill_with_data(self, data):
3751
"""Fill the current object with the new values pulled from data
3852
Keyword argument:
3953
data -- The data from which to pull the new values"""
4054
if "forter" in data.keys():
4155
self.forter = data["forter"]
56+
if "signifyd" in data.keys():
57+
self.signifyd = data["signifyd"]
4258

4359
return self
4460

4561
def to_json(self):
4662
return {
4763
"forter": self.forter,
64+
"signifyd": self.signifyd,
4865
}

0 commit comments

Comments
 (0)