Skip to content

Commit e21b653

Browse files
Manuel HuezManuel Huez
authored andcommitted
Add RefundedAmount and AvailableAmount to Transaction struct
1 parent 83e4f6f commit e21b653

11 files changed

+358
-14
lines changed

processout/__init__.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,9 @@
2828
from processout.refund import Refund
2929
from processout.subscription import Subscription
3030
from processout.transaction import Transaction
31+
from processout.paymentdatathreedsrequest import PaymentDataThreeDSRequest
32+
from processout.paymentdatanetworkauthentication import PaymentDataNetworkAuthentication
33+
from processout.paymentdatathreedsauthentication import PaymentDataThreeDSAuthentication
3134
from processout.transactionoperation import TransactionOperation
3235
from processout.webhook import Webhook
3336
from processout.webhookendpoint import WebhookEndpoint

processout/card.py

Lines changed: 27 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,9 @@ def __init__(self, client, prefill = None):
3333
self._address2 = None
3434
self._city = None
3535
self._state = None
36-
self._country_code = None
3736
self._zip = None
37+
self._country_code = None
38+
self._ip_address = None
3839
self._metadata = None
3940
self._expires_soon = None
4041
self._sandbox = None
@@ -308,6 +309,19 @@ def state(self, val):
308309
self._state = val
309310
return self
310311

312+
@property
313+
def zip(self):
314+
"""Get zip"""
315+
return self._zip
316+
317+
@zip.setter
318+
def zip(self, val):
319+
"""Set zip
320+
Keyword argument:
321+
val -- New zip value"""
322+
self._zip = val
323+
return self
324+
311325
@property
312326
def country_code(self):
313327
"""Get country_code"""
@@ -322,16 +336,16 @@ def country_code(self, val):
322336
return self
323337

324338
@property
325-
def zip(self):
326-
"""Get zip"""
327-
return self._zip
339+
def ip_address(self):
340+
"""Get ip_address"""
341+
return self._ip_address
328342

329-
@zip.setter
330-
def zip(self, val):
331-
"""Set zip
343+
@ip_address.setter
344+
def ip_address(self, val):
345+
"""Set ip_address
332346
Keyword argument:
333-
val -- New zip value"""
334-
self._zip = val
347+
val -- New ip_address value"""
348+
self._ip_address = val
335349
return self
336350

337351
@property
@@ -429,10 +443,12 @@ def fill_with_data(self, data):
429443
self.city = data["city"]
430444
if "state" in data.keys():
431445
self.state = data["state"]
432-
if "country_code" in data.keys():
433-
self.country_code = data["country_code"]
434446
if "zip" in data.keys():
435447
self.zip = data["zip"]
448+
if "country_code" in data.keys():
449+
self.country_code = data["country_code"]
450+
if "ip_address" in data.keys():
451+
self.ip_address = data["ip_address"]
436452
if "metadata" in data.keys():
437453
self.metadata = data["metadata"]
438454
if "expires_soon" in data.keys():

processout/client.py

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -187,6 +187,24 @@ def new_transaction(self, prefill = None):
187187
prefill -- Data used to prefill the object (optional)"""
188188
return processout.Transaction(self, prefill)
189189

190+
def new_payment_data_three_ds_request(self, prefill = None):
191+
"""Create a new PaymentDataThreeDSRequest instance
192+
Keyword argument:
193+
prefill -- Data used to prefill the object (optional)"""
194+
return processout.PaymentDataThreeDSRequest(self, prefill)
195+
196+
def new_payment_data_network_authentication(self, prefill = None):
197+
"""Create a new PaymentDataNetworkAuthentication instance
198+
Keyword argument:
199+
prefill -- Data used to prefill the object (optional)"""
200+
return processout.PaymentDataNetworkAuthentication(self, prefill)
201+
202+
def new_payment_data_three_ds_authentication(self, prefill = None):
203+
"""Create a new PaymentDataThreeDSAuthentication instance
204+
Keyword argument:
205+
prefill -- Data used to prefill the object (optional)"""
206+
return processout.PaymentDataThreeDSAuthentication(self, prefill)
207+
190208
def new_transaction_operation(self, prefill = None):
191209
"""Create a new TransactionOperation instance
192210
Keyword argument:

processout/customer.py

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ def __init__(self, client, prefill = None):
3333
self._state = None
3434
self._zip = None
3535
self._country_code = None
36+
self._ip_address = None
3637
self._transactions_count = None
3738
self._subscriptions_count = None
3839
self._mrr_local = None
@@ -345,6 +346,19 @@ def country_code(self, val):
345346
self._country_code = val
346347
return self
347348

349+
@property
350+
def ip_address(self):
351+
"""Get ip_address"""
352+
return self._ip_address
353+
354+
@ip_address.setter
355+
def ip_address(self, val):
356+
"""Set ip_address
357+
Keyword argument:
358+
val -- New ip_address value"""
359+
self._ip_address = val
360+
return self
361+
348362
@property
349363
def transactions_count(self):
350364
"""Get transactions_count"""
@@ -479,6 +493,8 @@ def fill_with_data(self, data):
479493
self.zip = data["zip"]
480494
if "country_code" in data.keys():
481495
self.country_code = data["country_code"]
496+
if "ip_address" in data.keys():
497+
self.ip_address = data["ip_address"]
482498
if "transactions_count" in data.keys():
483499
self.transactions_count = data["transactions_count"]
484500
if "subscriptions_count" in data.keys():
@@ -678,6 +694,7 @@ def create(self, options = {}):
678694
'state': self.state,
679695
'zip': self.zip,
680696
'country_code': self.country_code,
697+
'ip_address': self.ip_address,
681698
'metadata': self.metadata
682699
}
683700

@@ -742,6 +759,7 @@ def save(self, options = {}):
742759
'state': self.state,
743760
'zip': self.zip,
744761
'country_code': self.country_code,
762+
'ip_address': self.ip_address,
745763
'metadata': self.metadata
746764
}
747765

processout/invoice.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -537,7 +537,6 @@ def capture(self, source, options = {}):
537537
data = {
538538
'authorize_only': options.get("authorize_only"),
539539
'synchronous': options.get("synchronous"),
540-
'prioritized_gateway_configuration_id': options.get("prioritized_gateway_configuration_id"),
541540
'source': source
542541
}
543542

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
try:
2+
from urllib.parse import quote_plus
3+
except ImportError:
4+
from urllib import quote_plus
5+
6+
import processout
7+
8+
from processout.networking.request import Request
9+
from processout.networking.response import Response
10+
11+
# The content of this file was automatically generated
12+
13+
class PaymentDataNetworkAuthentication(object):
14+
def __init__(self, client, prefill = None):
15+
self._client = client
16+
17+
self._cavv = None
18+
if prefill != None:
19+
self.fill_with_data(prefill)
20+
21+
22+
@property
23+
def cavv(self):
24+
"""Get cavv"""
25+
return self._cavv
26+
27+
@cavv.setter
28+
def cavv(self, val):
29+
"""Set cavv
30+
Keyword argument:
31+
val -- New cavv value"""
32+
self._cavv = val
33+
return self
34+
35+
36+
def fill_with_data(self, data):
37+
"""Fill the current object with the new values pulled from data
38+
Keyword argument:
39+
data -- The data from which to pull the new values"""
40+
if "cavv" in data.keys():
41+
self.cavv = data["cavv"]
42+
43+
return self
44+
45+
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
try:
2+
from urllib.parse import quote_plus
3+
except ImportError:
4+
from urllib import quote_plus
5+
6+
import processout
7+
8+
from processout.networking.request import Request
9+
from processout.networking.response import Response
10+
11+
# The content of this file was automatically generated
12+
13+
class PaymentDataThreeDSAuthentication(object):
14+
def __init__(self, client, prefill = None):
15+
self._client = client
16+
17+
self._xid = None
18+
if prefill != None:
19+
self.fill_with_data(prefill)
20+
21+
22+
@property
23+
def xid(self):
24+
"""Get xid"""
25+
return self._xid
26+
27+
@xid.setter
28+
def xid(self, val):
29+
"""Set xid
30+
Keyword argument:
31+
val -- New xid value"""
32+
self._xid = val
33+
return self
34+
35+
36+
def fill_with_data(self, data):
37+
"""Fill the current object with the new values pulled from data
38+
Keyword argument:
39+
data -- The data from which to pull the new values"""
40+
if "XID" in data.keys():
41+
self.xid = data["XID"]
42+
43+
return self
44+
45+
Lines changed: 93 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,93 @@
1+
try:
2+
from urllib.parse import quote_plus
3+
except ImportError:
4+
from urllib import quote_plus
5+
6+
import processout
7+
8+
from processout.networking.request import Request
9+
from processout.networking.response import Response
10+
11+
# The content of this file was automatically generated
12+
13+
class PaymentDataThreeDSRequest(object):
14+
def __init__(self, client, prefill = None):
15+
self._client = client
16+
17+
self._acs_url = None
18+
self._pareq = None
19+
self._md = None
20+
self._term_url = None
21+
if prefill != None:
22+
self.fill_with_data(prefill)
23+
24+
25+
@property
26+
def acs_url(self):
27+
"""Get acs_url"""
28+
return self._acs_url
29+
30+
@acs_url.setter
31+
def acs_url(self, val):
32+
"""Set acs_url
33+
Keyword argument:
34+
val -- New acs_url value"""
35+
self._acs_url = val
36+
return self
37+
38+
@property
39+
def pareq(self):
40+
"""Get pareq"""
41+
return self._pareq
42+
43+
@pareq.setter
44+
def pareq(self, val):
45+
"""Set pareq
46+
Keyword argument:
47+
val -- New pareq value"""
48+
self._pareq = val
49+
return self
50+
51+
@property
52+
def md(self):
53+
"""Get md"""
54+
return self._md
55+
56+
@md.setter
57+
def md(self, val):
58+
"""Set md
59+
Keyword argument:
60+
val -- New md value"""
61+
self._md = val
62+
return self
63+
64+
@property
65+
def term_url(self):
66+
"""Get term_url"""
67+
return self._term_url
68+
69+
@term_url.setter
70+
def term_url(self, val):
71+
"""Set term_url
72+
Keyword argument:
73+
val -- New term_url value"""
74+
self._term_url = val
75+
return self
76+
77+
78+
def fill_with_data(self, data):
79+
"""Fill the current object with the new values pulled from data
80+
Keyword argument:
81+
data -- The data from which to pull the new values"""
82+
if "acs_url" in data.keys():
83+
self.acs_url = data["acs_url"]
84+
if "pareq" in data.keys():
85+
self.pareq = data["pareq"]
86+
if "md" in data.keys():
87+
self.md = data["md"]
88+
if "term_url" in data.keys():
89+
self.term_url = data["term_url"]
90+
91+
return self
92+
93+

0 commit comments

Comments
 (0)