Skip to content

Commit 15aaa88

Browse files
Manuel HuezManuel Huez
authored andcommitted
Improve put requests handling
1 parent bcc3183 commit 15aaa88

20 files changed

Lines changed: 191 additions & 221 deletions

processout/activity.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,12 @@ class Activity(object):
1414
def __init__(self, client, prefill = None):
1515
self._client = client
1616

17-
self._id = ""
17+
self._id = None
1818
self._project = None
19-
self._title = ""
20-
self._content = ""
21-
self._level = 0
22-
self._createdAt = ""
19+
self._title = None
20+
self._content = None
21+
self._level = None
22+
self._createdAt = None
2323
if prefill != None:
2424
self.fillWithData(prefill)
2525

processout/authorizationrequest.py

Lines changed: 9 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -14,19 +14,18 @@ class AuthorizationRequest(object):
1414
def __init__(self, client, prefill = None):
1515
self._client = client
1616

17-
self._id = ""
17+
self._id = None
1818
self._project = None
1919
self._customer = None
2020
self._token = None
21-
self._url = ""
22-
self._authorized = False
23-
self._name = ""
24-
self._currency = ""
25-
self._returnUrl = ""
26-
self._cancelUrl = ""
27-
self._custom = ""
28-
self._sandbox = False
29-
self._createdAt = ""
21+
self._url = None
22+
self._authorized = None
23+
self._name = None
24+
self._currency = None
25+
self._returnUrl = None
26+
self._cancelUrl = None
27+
self._sandbox = None
28+
self._createdAt = None
3029
if prefill != None:
3130
self.fillWithData(prefill)
3231

@@ -176,19 +175,6 @@ def cancelUrl(self, val):
176175
self._cancelUrl = val
177176
return self
178177

179-
@property
180-
def custom(self):
181-
"""Get custom"""
182-
return self._custom
183-
184-
@custom.setter
185-
def custom(self, val):
186-
"""Set custom
187-
Keyword argument:
188-
val -- New custom value"""
189-
self._custom = val
190-
return self
191-
192178
@property
193179
def sandbox(self):
194180
"""Get sandbox"""
@@ -240,8 +226,6 @@ def fillWithData(self, data):
240226
self.returnUrl = data["return_url"]
241227
if "cancel_url" in data.keys():
242228
self.cancelUrl = data["cancel_url"]
243-
if "custom" in data.keys():
244-
self.custom = data["custom"]
245229
if "sandbox" in data.keys():
246230
self.sandbox = data["sandbox"]
247231
if "created_at" in data.keys():
@@ -283,7 +267,6 @@ def create(self, customerId, options = None):
283267
'currency': self.currency,
284268
'return_url': self.returnUrl,
285269
'cancel_url': self.cancelUrl,
286-
'custom': self.custom,
287270
'customer_id': customerId
288271
}
289272

processout/card.py

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -14,19 +14,19 @@ class Card(object):
1414
def __init__(self, client, prefill = None):
1515
self._client = client
1616

17-
self._id = ""
17+
self._id = None
1818
self._project = None
19-
self._scheme = ""
20-
self._type = ""
21-
self._bankName = ""
22-
self._brand = ""
23-
self._iin = ""
24-
self._last4Digits = ""
25-
self._expMonth = 0
26-
self._expYear = 0
27-
self._metadata = {}
28-
self._sandbox = False
29-
self._createdAt = ""
19+
self._scheme = None
20+
self._type = None
21+
self._bankName = None
22+
self._brand = None
23+
self._iin = None
24+
self._last4Digits = None
25+
self._expMonth = None
26+
self._expYear = None
27+
self._metadata = None
28+
self._sandbox = None
29+
self._createdAt = None
3030
if prefill != None:
3131
self.fillWithData(prefill)
3232

processout/coupon.py

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -14,19 +14,19 @@ class Coupon(object):
1414
def __init__(self, client, prefill = None):
1515
self._client = client
1616

17-
self._id = ""
17+
self._id = None
1818
self._project = None
19-
self._name = ""
20-
self._amountOff = ""
21-
self._percentOff = 0
22-
self._currency = ""
23-
self._maxRedemptions = 0
24-
self._expiresAt = ""
25-
self._metadata = {}
26-
self._iterationCount = 0
27-
self._redeemedNumber = 0
28-
self._sandbox = False
29-
self._createdAt = ""
19+
self._name = None
20+
self._amountOff = None
21+
self._percentOff = None
22+
self._currency = None
23+
self._maxRedemptions = None
24+
self._expiresAt = None
25+
self._metadata = None
26+
self._iterationCount = None
27+
self._redeemedNumber = None
28+
self._sandbox = None
29+
self._createdAt = None
3030
if prefill != None:
3131
self.fillWithData(prefill)
3232

processout/customer.py

Lines changed: 15 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -14,23 +14,22 @@ class Customer(object):
1414
def __init__(self, client, prefill = None):
1515
self._client = client
1616

17-
self._id = ""
17+
self._id = None
1818
self._project = None
19-
self._email = ""
20-
self._firstName = ""
21-
self._lastName = ""
22-
self._address1 = ""
23-
self._address2 = ""
24-
self._city = ""
25-
self._state = ""
26-
self._zip = ""
27-
self._countryCode = ""
28-
self._balance = "0"
29-
self._currency = ""
30-
self._metadata = {}
31-
self._hasPin = False
32-
self._sandbox = False
33-
self._createdAt = ""
19+
self._email = None
20+
self._firstName = None
21+
self._lastName = None
22+
self._address1 = None
23+
self._address2 = None
24+
self._city = None
25+
self._state = None
26+
self._zip = None
27+
self._countryCode = None
28+
self._balance = None
29+
self._currency = None
30+
self._metadata = None
31+
self._sandbox = None
32+
self._createdAt = None
3433
if prefill != None:
3534
self.fillWithData(prefill)
3635

@@ -222,19 +221,6 @@ def metadata(self, val):
222221
self._metadata = val
223222
return self
224223

225-
@property
226-
def hasPin(self):
227-
"""Get hasPin"""
228-
return self._hasPin
229-
230-
@hasPin.setter
231-
def hasPin(self, val):
232-
"""Set hasPin
233-
Keyword argument:
234-
val -- New hasPin value"""
235-
self._hasPin = val
236-
return self
237-
238224
@property
239225
def sandbox(self):
240226
"""Get sandbox"""
@@ -294,8 +280,6 @@ def fillWithData(self, data):
294280
self.currency = data["currency"]
295281
if "metadata" in data.keys():
296282
self.metadata = data["metadata"]
297-
if "has_pin" in data.keys():
298-
self.hasPin = data["has_pin"]
299283
if "sandbox" in data.keys():
300284
self.sandbox = data["sandbox"]
301285
if "created_at" in data.keys():

processout/customeraction.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ class CustomerAction(object):
1414
def __init__(self, client, prefill = None):
1515
self._client = client
1616

17-
self._type = ""
18-
self._value = ""
17+
self._type = None
18+
self._value = None
1919
if prefill != None:
2020
self.fillWithData(prefill)
2121

processout/discount.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,15 @@ class Discount(object):
1414
def __init__(self, client, prefill = None):
1515
self._client = client
1616

17-
self._id = ""
17+
self._id = None
1818
self._project = None
1919
self._subscription = None
2020
self._coupon = None
21-
self._amount = ""
22-
self._expiresAt = ""
23-
self._metadata = {}
24-
self._sandbox = False
25-
self._createdAt = ""
21+
self._amount = None
22+
self._expiresAt = None
23+
self._metadata = None
24+
self._sandbox = None
25+
self._createdAt = None
2626
if prefill != None:
2727
self.fillWithData(prefill)
2828

processout/event.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,12 @@ class Event(object):
1414
def __init__(self, client, prefill = None):
1515
self._client = client
1616

17-
self._id = ""
17+
self._id = None
1818
self._project = None
19-
self._name = ""
19+
self._name = None
2020
self._data = None
21-
self._sandbox = False
22-
self._firedAt = ""
21+
self._sandbox = None
22+
self._firedAt = None
2323
if prefill != None:
2424
self.fillWithData(prefill)
2525

processout/gateway.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,14 @@ class Gateway(object):
1414
def __init__(self, client, prefill = None):
1515
self._client = client
1616

17-
self._id = ""
18-
self._name = ""
19-
self._displayName = ""
20-
self._logoUrl = ""
21-
self._url = ""
22-
self._flows = []
23-
self._tags = []
24-
self._description = ""
17+
self._id = None
18+
self._name = None
19+
self._displayName = None
20+
self._logoUrl = None
21+
self._url = None
22+
self._flows = None
23+
self._tags = None
24+
self._description = None
2525
if prefill != None:
2626
self.fillWithData(prefill)
2727

processout/gatewayconfiguration.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,11 @@ class GatewayConfiguration(object):
1414
def __init__(self, client, prefill = None):
1515
self._client = client
1616

17-
self._id = ""
17+
self._id = None
1818
self._project = None
1919
self._gateway = None
20-
self._enabled = False
21-
self._publicKeys = {}
20+
self._enabled = None
21+
self._publicKeys = None
2222
if prefill != None:
2323
self.fillWithData(prefill)
2424

0 commit comments

Comments
 (0)