Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions processout/activity.py
Original file line number Diff line number Diff line change
Expand Up @@ -202,9 +202,11 @@ def find(self, activity_id, options={}):
return_values = []

body = response.body
body = body["activity"]
body = body.get("activity")

obj = processout.Activity(self._client)
return_values.append(obj.fill_with_data(body))
if body is not None:

obj = processout.Activity(self._client)
return_values.append(obj.fill_with_data(body))

return return_values[0]
20 changes: 13 additions & 7 deletions processout/addon.py
Original file line number Diff line number Diff line change
Expand Up @@ -347,9 +347,11 @@ def create(self, options={}):
return_values = []

body = response.body
body = body["addon"]
body = body.get("addon")

return_values.append(self.fill_with_data(body))
if body is not None:

return_values.append(self.fill_with_data(body))

return return_values[0]

Expand All @@ -372,10 +374,12 @@ def find(self, subscription_id, addon_id, options={}):
return_values = []

body = response.body
body = body["addon"]
body = body.get("addon")

if body is not None:

obj = processout.Addon(self._client)
return_values.append(obj.fill_with_data(body))
obj = processout.Addon(self._client)
return_values.append(obj.fill_with_data(body))

return return_values[0]

Expand Down Expand Up @@ -406,9 +410,11 @@ def save(self, options={}):
return_values = []

body = response.body
body = body["addon"]
body = body.get("addon")

if body is not None:

return_values.append(self.fill_with_data(body))
return_values.append(self.fill_with_data(body))

return return_values[0]

Expand Down
11 changes: 6 additions & 5 deletions processout/alternativemerchantcertificate.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,11 +64,12 @@ def save(self, options={}):
return_values = []

body = response.body
body = body["alternative_merchant_certificate"]
alternativeMerchantCertificate = processout.AlternativeMerchantCertificate(
self._client)
return_values.append(
alternativeMerchantCertificate.fill_with_data(body))
body = body.get("alternative_merchant_certificate")
if body is not None:
alternativeMerchantCertificate = processout.AlternativeMerchantCertificate(
self._client)
return_values.append(
alternativeMerchantCertificate.fill_with_data(body))

return return_values[0]

Expand Down
11 changes: 6 additions & 5 deletions processout/applepayalternativemerchantcertificates.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,10 +94,11 @@ def fetch(self, options={}):
return_values = []

body = response.body
body = body["applepay_certificates"]
applePayAlternativeMerchantCertificates = processout.ApplePayAlternativeMerchantCertificates(
self._client)
return_values.append(
applePayAlternativeMerchantCertificates.fill_with_data(body))
body = body.get("applepay_certificates")
if body is not None:
applePayAlternativeMerchantCertificates = processout.ApplePayAlternativeMerchantCertificates(
self._client)
return_values.append(
applePayAlternativeMerchantCertificates.fill_with_data(body))

return return_values[0]
7 changes: 4 additions & 3 deletions processout/balances.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,8 +128,9 @@ def find(self, token_id, options={}):
return_values = []

body = response.body
body = body["balances"]
balances = processout.Balances(self._client)
return_values.append(balances.fill_with_data(body))
body = body.get("balances")
if body is not None:
balances = processout.Balances(self._client)
return_values.append(balances.fill_with_data(body))

return return_values[0]
8 changes: 5 additions & 3 deletions processout/card.py
Original file line number Diff line number Diff line change
Expand Up @@ -653,10 +653,12 @@ def find(self, card_id, options={}):
return_values = []

body = response.body
body = body["card"]
body = body.get("card")

obj = processout.Card(self._client)
return_values.append(obj.fill_with_data(body))
if body is not None:

obj = processout.Card(self._client)
return_values.append(obj.fill_with_data(body))

return return_values[0]

Expand Down
6 changes: 4 additions & 2 deletions processout/cardcreaterequest.py
Original file line number Diff line number Diff line change
Expand Up @@ -379,8 +379,10 @@ def create(self, options={}):
return_values = []

body = response.body
body = body["card"]
body = body.get("card")

return_values.append(self.fill_with_data(body))
if body is not None:

return_values.append(self.fill_with_data(body))

return return_values[0]
8 changes: 5 additions & 3 deletions processout/cardinformation.py
Original file line number Diff line number Diff line change
Expand Up @@ -166,9 +166,11 @@ def fetch(self, iin, options={}):
return_values = []

body = response.body
body = body["card_information"]
body = body.get("card_information")

obj = processout.CardInformation(self._client)
return_values.append(obj.fill_with_data(body))
if body is not None:

obj = processout.CardInformation(self._client)
return_values.append(obj.fill_with_data(body))

return return_values[0]
6 changes: 4 additions & 2 deletions processout/cardupdaterequest.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,10 @@ def update(self, card_id, options={}):
return_values = []

body = response.body
body = body["card"]
body = body.get("card")

return_values.append(self.fill_with_data(body))
if body is not None:

return_values.append(self.fill_with_data(body))

return return_values[0]
20 changes: 13 additions & 7 deletions processout/coupon.py
Original file line number Diff line number Diff line change
Expand Up @@ -311,9 +311,11 @@ def create(self, options={}):
return_values = []

body = response.body
body = body["coupon"]
body = body.get("coupon")

return_values.append(self.fill_with_data(body))
if body is not None:

return_values.append(self.fill_with_data(body))

return return_values[0]

Expand All @@ -334,10 +336,12 @@ def find(self, coupon_id, options={}):
return_values = []

body = response.body
body = body["coupon"]
body = body.get("coupon")

if body is not None:

obj = processout.Coupon(self._client)
return_values.append(obj.fill_with_data(body))
obj = processout.Coupon(self._client)
return_values.append(obj.fill_with_data(body))

return return_values[0]

Expand All @@ -358,9 +362,11 @@ def save(self, options={}):
return_values = []

body = response.body
body = body["coupon"]
body = body.get("coupon")

if body is not None:

return_values.append(self.fill_with_data(body))
return_values.append(self.fill_with_data(body))

return return_values[0]

Expand Down
27 changes: 17 additions & 10 deletions processout/customer.py
Original file line number Diff line number Diff line change
Expand Up @@ -709,9 +709,10 @@ def find_token(self, token_id, options={}):
return_values = []

body = response.body
body = body["token"]
token = processout.Token(self._client)
return_values.append(token.fill_with_data(body))
body = body.get("token")
if body is not None:
token = processout.Token(self._client)
return_values.append(token.fill_with_data(body))

return return_values[0]

Expand Down Expand Up @@ -829,9 +830,11 @@ def create(self, options={}):
return_values = []

body = response.body
body = body["customer"]
body = body.get("customer")

return_values.append(self.fill_with_data(body))
if body is not None:

return_values.append(self.fill_with_data(body))

return return_values[0]

Expand All @@ -852,10 +855,12 @@ def find(self, customer_id, options={}):
return_values = []

body = response.body
body = body["customer"]
body = body.get("customer")

if body is not None:

obj = processout.Customer(self._client)
return_values.append(obj.fill_with_data(body))
obj = processout.Customer(self._client)
return_values.append(obj.fill_with_data(body))

return return_values[0]

Expand Down Expand Up @@ -896,9 +901,11 @@ def save(self, options={}):
return_values = []

body = response.body
body = body["customer"]
body = body.get("customer")

if body is not None:

return_values.append(self.fill_with_data(body))
return_values.append(self.fill_with_data(body))

return return_values[0]

Expand Down
14 changes: 9 additions & 5 deletions processout/discount.py
Original file line number Diff line number Diff line change
Expand Up @@ -344,9 +344,11 @@ def create(self, options={}):
return_values = []

body = response.body
body = body["discount"]
body = body.get("discount")

return_values.append(self.fill_with_data(body))
if body is not None:

return_values.append(self.fill_with_data(body))

return return_values[0]

Expand All @@ -369,10 +371,12 @@ def find(self, subscription_id, discount_id, options={}):
return_values = []

body = response.body
body = body["discount"]
body = body.get("discount")

if body is not None:

obj = processout.Discount(self._client)
return_values.append(obj.fill_with_data(body))
obj = processout.Discount(self._client)
return_values.append(obj.fill_with_data(body))

return return_values[0]

Expand Down
5 changes: 3 additions & 2 deletions processout/errorcodes.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,9 @@ def all(self, options={}):
return_values = []

body = response.body
if body is not None:

obj = processout.ErrorCodes(self._client)
return_values.append(obj.fill_with_data(body))
obj = processout.ErrorCodes(self._client)
return_values.append(obj.fill_with_data(body))

return return_values[0]
8 changes: 5 additions & 3 deletions processout/event.py
Original file line number Diff line number Diff line change
Expand Up @@ -229,9 +229,11 @@ def find(self, event_id, options={}):
return_values = []

body = response.body
body = body["event"]
body = body.get("event")

obj = processout.Event(self._client)
return_values.append(obj.fill_with_data(body))
if body is not None:

obj = processout.Event(self._client)
return_values.append(obj.fill_with_data(body))

return return_values[0]
28 changes: 18 additions & 10 deletions processout/exportlayout.py
Original file line number Diff line number Diff line change
Expand Up @@ -228,10 +228,12 @@ def find(self, export_layout_id, options={}):
return_values = []

body = response.body
body = body["export_layout"]
body = body.get("export_layout")

obj = processout.ExportLayout(self._client)
return_values.append(obj.fill_with_data(body))
if body is not None:

obj = processout.ExportLayout(self._client)
return_values.append(obj.fill_with_data(body))

return return_values[0]

Expand All @@ -252,10 +254,12 @@ def find_default(self, export_type, options={}):
return_values = []

body = response.body
body = body["export_layout"]
body = body.get("export_layout")

if body is not None:

obj = processout.ExportLayout(self._client)
return_values.append(obj.fill_with_data(body))
obj = processout.ExportLayout(self._client)
return_values.append(obj.fill_with_data(body))

return return_values[0]

Expand All @@ -279,9 +283,11 @@ def create(self, options={}):
return_values = []

body = response.body
body = body["export_layout"]
body = body.get("export_layout")

return_values.append(self.fill_with_data(body))
if body is not None:

return_values.append(self.fill_with_data(body))

return return_values[0]

Expand All @@ -304,9 +310,11 @@ def update(self, export_layout_id, options={}):
return_values = []

body = response.body
body = body["export_layout"]
body = body.get("export_layout")

if body is not None:

return_values.append(self.fill_with_data(body))
return_values.append(self.fill_with_data(body))

return return_values[0]

Expand Down
8 changes: 5 additions & 3 deletions processout/exportlayoutconfigurationoptions.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,9 +118,11 @@ def fetch(self, export_type, options={}):
return_values = []

body = response.body
body = body["export_layout_configuration_options"]
body = body.get("export_layout_configuration_options")

obj = processout.ExportLayoutConfigurationOptions(self._client)
return_values.append(obj.fill_with_data(body))
if body is not None:

obj = processout.ExportLayoutConfigurationOptions(self._client)
return_values.append(obj.fill_with_data(body))

return return_values[0]
Loading