diff --git a/processout/__init__.py b/processout/__init__.py index b5661b8..54458a3 100644 --- a/processout/__init__.py +++ b/processout/__init__.py @@ -11,6 +11,7 @@ from processout.balance import Balance from processout.card import Card from processout.cardinformation import CardInformation +from processout.phone import Phone from processout.coupon import Coupon from processout.customer import Customer from processout.customerphone import CustomerPhone @@ -35,6 +36,7 @@ from processout.dunningaction import DunningAction from processout.payout import Payout from processout.payoutitem import PayoutItem +from processout.payoutitemamountbreakdowns import PayoutItemAmountBreakdowns from processout.plan import Plan from processout.product import Product from processout.project import Project @@ -52,6 +54,11 @@ from processout.transactionoperation import TransactionOperation from processout.webhook import Webhook from processout.webhookendpoint import WebhookEndpoint +from processout.cardcreaterequest import CardCreateRequest +from processout.device import Device +from processout.cardcontact import CardContact +from processout.cardshipping import CardShipping +from processout.cardupdaterequest import CardUpdateRequest from processout.errorcodes import ErrorCodes from processout.categoryerrorcodes import CategoryErrorCodes from processout.nativeapmtransactiondetailsgateway import NativeAPMTransactionDetailsGateway diff --git a/processout/cardcontact.py b/processout/cardcontact.py new file mode 100755 index 0000000..224e45e --- /dev/null +++ b/processout/cardcontact.py @@ -0,0 +1,133 @@ +try: + from urllib.parse import quote_plus +except ImportError: + from urllib import quote_plus + +import processout +import json + +from processout.networking.request import Request +from processout.networking.response import Response + +# The content of this file was automatically generated + + +class CardContact(object): + def __init__(self, client, prefill=None): + self._client = client + + self._address1 = None + self._address2 = None + self._city = None + self._state = None + self._country_code = None + self._zip = None + if prefill is not None: + self.fill_with_data(prefill) + + @property + def address1(self): + """Get address1""" + return self._address1 + + @address1.setter + def address1(self, val): + """Set address1 + Keyword argument: + val -- New address1 value""" + self._address1 = val + return self + + @property + def address2(self): + """Get address2""" + return self._address2 + + @address2.setter + def address2(self, val): + """Set address2 + Keyword argument: + val -- New address2 value""" + self._address2 = val + return self + + @property + def city(self): + """Get city""" + return self._city + + @city.setter + def city(self, val): + """Set city + Keyword argument: + val -- New city value""" + self._city = val + return self + + @property + def state(self): + """Get state""" + return self._state + + @state.setter + def state(self, val): + """Set state + Keyword argument: + val -- New state value""" + self._state = val + return self + + @property + def country_code(self): + """Get country_code""" + return self._country_code + + @country_code.setter + def country_code(self, val): + """Set country_code + Keyword argument: + val -- New country_code value""" + self._country_code = val + return self + + @property + def zip(self): + """Get zip""" + return self._zip + + @zip.setter + def zip(self, val): + """Set zip + Keyword argument: + val -- New zip value""" + self._zip = val + return self + + def fill_with_data(self, data): + """Fill the current object with the new values pulled from data + Keyword argument: + data -- The data from which to pull the new values""" + if "address1" in data.keys(): + self.address1 = data["address1"] + if "address2" in data.keys(): + self.address2 = data["address2"] + if "city" in data.keys(): + self.city = data["city"] + if "state" in data.keys(): + self.state = data["state"] + if "country_code" in data.keys(): + self.country_code = data["country_code"] + if "zip" in data.keys(): + self.zip = data["zip"] + + return self + + def to_json(self): + return { + "address1": self.address1, + "address2": self.address2, + "city": self.city, + "state": self.state, + "country_code": self.country_code, + "zip": self.zip, + } diff --git a/processout/cardcreaterequest.py b/processout/cardcreaterequest.py new file mode 100755 index 0000000..683f076 --- /dev/null +++ b/processout/cardcreaterequest.py @@ -0,0 +1,371 @@ +try: + from urllib.parse import quote_plus +except ImportError: + from urllib import quote_plus + +import processout +import json + +from processout.networking.request import Request +from processout.networking.response import Response + +# The content of this file was automatically generated + + +class CardCreateRequest(object): + def __init__(self, client, prefill=None): + self._client = client + + self._device = None + self._name = None + self._number = None + self._exp_day = None + self._exp_month = None + self._exp_year = None + self._cvc2 = None + self._preferred_scheme = None + self._metadata = None + self._token_type = None + self._eci = None + self._cryptogram = None + self._applepay_response = None + self._applepay_mid = None + self._payment_token = None + self._contact = None + self._shipping = None + if prefill is not None: + self.fill_with_data(prefill) + + @property + def device(self): + """Get device""" + return self._device + + @device.setter + def device(self, val): + """Set device + Keyword argument: + val -- New device value""" + if val is None: + self._device = val + return self + + if isinstance(val, dict): + obj = processout.Device(self._client) + obj.fill_with_data(val) + self._device = obj + else: + self._device = val + return self + + @property + def name(self): + """Get name""" + return self._name + + @name.setter + def name(self, val): + """Set name + Keyword argument: + val -- New name value""" + self._name = val + return self + + @property + def number(self): + """Get number""" + return self._number + + @number.setter + def number(self, val): + """Set number + Keyword argument: + val -- New number value""" + self._number = val + return self + + @property + def exp_day(self): + """Get exp_day""" + return self._exp_day + + @exp_day.setter + def exp_day(self, val): + """Set exp_day + Keyword argument: + val -- New exp_day value""" + self._exp_day = val + return self + + @property + def exp_month(self): + """Get exp_month""" + return self._exp_month + + @exp_month.setter + def exp_month(self, val): + """Set exp_month + Keyword argument: + val -- New exp_month value""" + self._exp_month = val + return self + + @property + def exp_year(self): + """Get exp_year""" + return self._exp_year + + @exp_year.setter + def exp_year(self, val): + """Set exp_year + Keyword argument: + val -- New exp_year value""" + self._exp_year = val + return self + + @property + def cvc2(self): + """Get cvc2""" + return self._cvc2 + + @cvc2.setter + def cvc2(self, val): + """Set cvc2 + Keyword argument: + val -- New cvc2 value""" + self._cvc2 = val + return self + + @property + def preferred_scheme(self): + """Get preferred_scheme""" + return self._preferred_scheme + + @preferred_scheme.setter + def preferred_scheme(self, val): + """Set preferred_scheme + Keyword argument: + val -- New preferred_scheme value""" + self._preferred_scheme = val + return self + + @property + def metadata(self): + """Get metadata""" + return self._metadata + + @metadata.setter + def metadata(self, val): + """Set metadata + Keyword argument: + val -- New metadata value""" + self._metadata = val + return self + + @property + def token_type(self): + """Get token_type""" + return self._token_type + + @token_type.setter + def token_type(self, val): + """Set token_type + Keyword argument: + val -- New token_type value""" + self._token_type = val + return self + + @property + def eci(self): + """Get eci""" + return self._eci + + @eci.setter + def eci(self, val): + """Set eci + Keyword argument: + val -- New eci value""" + self._eci = val + return self + + @property + def cryptogram(self): + """Get cryptogram""" + return self._cryptogram + + @cryptogram.setter + def cryptogram(self, val): + """Set cryptogram + Keyword argument: + val -- New cryptogram value""" + self._cryptogram = val + return self + + @property + def applepay_response(self): + """Get applepay_response""" + return self._applepay_response + + @applepay_response.setter + def applepay_response(self, val): + """Set applepay_response + Keyword argument: + val -- New applepay_response value""" + self._applepay_response = val + return self + + @property + def applepay_mid(self): + """Get applepay_mid""" + return self._applepay_mid + + @applepay_mid.setter + def applepay_mid(self, val): + """Set applepay_mid + Keyword argument: + val -- New applepay_mid value""" + self._applepay_mid = val + return self + + @property + def payment_token(self): + """Get payment_token""" + return self._payment_token + + @payment_token.setter + def payment_token(self, val): + """Set payment_token + Keyword argument: + val -- New payment_token value""" + self._payment_token = val + return self + + @property + def contact(self): + """Get contact""" + return self._contact + + @contact.setter + def contact(self, val): + """Set contact + Keyword argument: + val -- New contact value""" + if val is None: + self._contact = val + return self + + if isinstance(val, dict): + obj = processout.CardContact(self._client) + obj.fill_with_data(val) + self._contact = obj + else: + self._contact = val + return self + + @property + def shipping(self): + """Get shipping""" + return self._shipping + + @shipping.setter + def shipping(self, val): + """Set shipping + Keyword argument: + val -- New shipping value""" + if val is None: + self._shipping = val + return self + + if isinstance(val, dict): + obj = processout.CardShipping(self._client) + obj.fill_with_data(val) + self._shipping = obj + else: + self._shipping = val + return self + + def fill_with_data(self, data): + """Fill the current object with the new values pulled from data + Keyword argument: + data -- The data from which to pull the new values""" + if "device" in data.keys(): + self.device = data["device"] + if "name" in data.keys(): + self.name = data["name"] + if "number" in data.keys(): + self.number = data["number"] + if "exp_day" in data.keys(): + self.exp_day = data["exp_day"] + if "exp_month" in data.keys(): + self.exp_month = data["exp_month"] + if "exp_year" in data.keys(): + self.exp_year = data["exp_year"] + if "cvc2" in data.keys(): + self.cvc2 = data["cvc2"] + if "preferred_scheme" in data.keys(): + self.preferred_scheme = data["preferred_scheme"] + if "metadata" in data.keys(): + self.metadata = data["metadata"] + if "token_type" in data.keys(): + self.token_type = data["token_type"] + if "eci" in data.keys(): + self.eci = data["eci"] + if "cryptogram" in data.keys(): + self.cryptogram = data["cryptogram"] + if "applepay_response" in data.keys(): + self.applepay_response = data["applepay_response"] + if "applepay_mid" in data.keys(): + self.applepay_mid = data["applepay_mid"] + if "payment_token" in data.keys(): + self.payment_token = data["payment_token"] + if "contact" in data.keys(): + self.contact = data["contact"] + if "shipping" in data.keys(): + self.shipping = data["shipping"] + + return self + + def to_json(self): + return { + "device": self.device, + "name": self.name, + "number": self.number, + "exp_day": self.exp_day, + "exp_month": self.exp_month, + "exp_year": self.exp_year, + "cvc2": self.cvc2, + "preferred_scheme": self.preferred_scheme, + "metadata": self.metadata, + "token_type": self.token_type, + "eci": self.eci, + "cryptogram": self.cryptogram, + "applepay_response": self.applepay_response, + "applepay_mid": self.applepay_mid, + "payment_token": self.payment_token, + "contact": self.contact, + "shipping": self.shipping, + } + + def create(self, options={}): + """Create a new card. + Keyword argument: + + options -- Options for the request""" + self.fill_with_data(options) + + request = Request(self._client) + path = "/cards" + data = { + + } + + response = Response(request.post(path, data, options)) + return_values = [] + + body = response.body + body = body["card"] + + obj = processout.CardCreateRequest(self._client) + return_values.append(obj.fill_with_data(body)) + + return return_values[0] diff --git a/processout/cardshipping.py b/processout/cardshipping.py new file mode 100755 index 0000000..ed9dea6 --- /dev/null +++ b/processout/cardshipping.py @@ -0,0 +1,159 @@ +try: + from urllib.parse import quote_plus +except ImportError: + from urllib import quote_plus + +import processout +import json + +from processout.networking.request import Request +from processout.networking.response import Response + +# The content of this file was automatically generated + + +class CardShipping(object): + def __init__(self, client, prefill=None): + self._client = client + + self._address1 = None + self._address2 = None + self._city = None + self._state = None + self._country_code = None + self._zip = None + self._phone = None + if prefill is not None: + self.fill_with_data(prefill) + + @property + def address1(self): + """Get address1""" + return self._address1 + + @address1.setter + def address1(self, val): + """Set address1 + Keyword argument: + val -- New address1 value""" + self._address1 = val + return self + + @property + def address2(self): + """Get address2""" + return self._address2 + + @address2.setter + def address2(self, val): + """Set address2 + Keyword argument: + val -- New address2 value""" + self._address2 = val + return self + + @property + def city(self): + """Get city""" + return self._city + + @city.setter + def city(self, val): + """Set city + Keyword argument: + val -- New city value""" + self._city = val + return self + + @property + def state(self): + """Get state""" + return self._state + + @state.setter + def state(self, val): + """Set state + Keyword argument: + val -- New state value""" + self._state = val + return self + + @property + def country_code(self): + """Get country_code""" + return self._country_code + + @country_code.setter + def country_code(self, val): + """Set country_code + Keyword argument: + val -- New country_code value""" + self._country_code = val + return self + + @property + def zip(self): + """Get zip""" + return self._zip + + @zip.setter + def zip(self, val): + """Set zip + Keyword argument: + val -- New zip value""" + self._zip = val + return self + + @property + def phone(self): + """Get phone""" + return self._phone + + @phone.setter + def phone(self, val): + """Set phone + Keyword argument: + val -- New phone value""" + if val is None: + self._phone = val + return self + + if isinstance(val, dict): + obj = processout.Phone(self._client) + obj.fill_with_data(val) + self._phone = obj + else: + self._phone = val + return self + + def fill_with_data(self, data): + """Fill the current object with the new values pulled from data + Keyword argument: + data -- The data from which to pull the new values""" + if "address1" in data.keys(): + self.address1 = data["address1"] + if "address2" in data.keys(): + self.address2 = data["address2"] + if "city" in data.keys(): + self.city = data["city"] + if "state" in data.keys(): + self.state = data["state"] + if "country_code" in data.keys(): + self.country_code = data["country_code"] + if "zip" in data.keys(): + self.zip = data["zip"] + if "phone" in data.keys(): + self.phone = data["phone"] + + return self + + def to_json(self): + return { + "address1": self.address1, + "address2": self.address2, + "city": self.city, + "state": self.state, + "country_code": self.country_code, + "zip": self.zip, + "phone": self.phone, + } diff --git a/processout/cardupdaterequest.py b/processout/cardupdaterequest.py new file mode 100755 index 0000000..a47c7ac --- /dev/null +++ b/processout/cardupdaterequest.py @@ -0,0 +1,106 @@ +try: + from urllib.parse import quote_plus +except ImportError: + from urllib import quote_plus + +import processout +import json + +from processout.networking.request import Request +from processout.networking.response import Response + +# The content of this file was automatically generated + + +class CardUpdateRequest(object): + def __init__(self, client, prefill=None): + self._client = client + + self._update_type = None + self._update_reason = None + self._preferred_scheme = None + if prefill is not None: + self.fill_with_data(prefill) + + @property + def update_type(self): + """Get update_type""" + return self._update_type + + @update_type.setter + def update_type(self, val): + """Set update_type + Keyword argument: + val -- New update_type value""" + self._update_type = val + return self + + @property + def update_reason(self): + """Get update_reason""" + return self._update_reason + + @update_reason.setter + def update_reason(self, val): + """Set update_reason + Keyword argument: + val -- New update_reason value""" + self._update_reason = val + return self + + @property + def preferred_scheme(self): + """Get preferred_scheme""" + return self._preferred_scheme + + @preferred_scheme.setter + def preferred_scheme(self, val): + """Set preferred_scheme + Keyword argument: + val -- New preferred_scheme value""" + self._preferred_scheme = val + return self + + def fill_with_data(self, data): + """Fill the current object with the new values pulled from data + Keyword argument: + data -- The data from which to pull the new values""" + if "update_type" in data.keys(): + self.update_type = data["update_type"] + if "update_reason" in data.keys(): + self.update_reason = data["update_reason"] + if "preferred_scheme" in data.keys(): + self.preferred_scheme = data["preferred_scheme"] + + return self + + def to_json(self): + return { + "update_type": self.update_type, + "update_reason": self.update_reason, + "preferred_scheme": self.preferred_scheme, + } + + def update(self, card_id, options={}): + """Update a card by its ID. + Keyword argument: + card_id -- ID of the card + options -- Options for the request""" + self.fill_with_data(options) + + request = Request(self._client) + path = "/cards/" + quote_plus(card_id) + "" + data = { + + } + + response = Response(request.put(path, data, options)) + return_values = [] + + body = response.body + body = body["card"] + + obj = processout.CardUpdateRequest(self._client) + return_values.append(obj.fill_with_data(body)) + + return return_values[0] diff --git a/processout/client.py b/processout/client.py index 6202376..6540044 100644 --- a/processout/client.py +++ b/processout/client.py @@ -87,6 +87,12 @@ def new_card_information(self, prefill=None): prefill -- Data used to prefill the object (optional)""" return processout.CardInformation(self, prefill) + def new_phone(self, prefill=None): + """Create a new Phone instance + Keyword argument: + prefill -- Data used to prefill the object (optional)""" + return processout.Phone(self, prefill) + def new_coupon(self, prefill=None): """Create a new Coupon instance Keyword argument: @@ -231,6 +237,12 @@ def new_payout_item(self, prefill=None): prefill -- Data used to prefill the object (optional)""" return processout.PayoutItem(self, prefill) + def new_payout_item_amount_breakdowns(self, prefill=None): + """Create a new PayoutItemAmountBreakdowns instance + Keyword argument: + prefill -- Data used to prefill the object (optional)""" + return processout.PayoutItemAmountBreakdowns(self, prefill) + def new_plan(self, prefill=None): """Create a new Plan instance Keyword argument: @@ -333,6 +345,36 @@ def new_webhook_endpoint(self, prefill=None): prefill -- Data used to prefill the object (optional)""" return processout.WebhookEndpoint(self, prefill) + def new_card_create_request(self, prefill=None): + """Create a new CardCreateRequest instance + Keyword argument: + prefill -- Data used to prefill the object (optional)""" + return processout.CardCreateRequest(self, prefill) + + def new_device(self, prefill=None): + """Create a new Device instance + Keyword argument: + prefill -- Data used to prefill the object (optional)""" + return processout.Device(self, prefill) + + def new_card_contact(self, prefill=None): + """Create a new CardContact instance + Keyword argument: + prefill -- Data used to prefill the object (optional)""" + return processout.CardContact(self, prefill) + + def new_card_shipping(self, prefill=None): + """Create a new CardShipping instance + Keyword argument: + prefill -- Data used to prefill the object (optional)""" + return processout.CardShipping(self, prefill) + + def new_card_update_request(self, prefill=None): + """Create a new CardUpdateRequest instance + Keyword argument: + prefill -- Data used to prefill the object (optional)""" + return processout.CardUpdateRequest(self, prefill) + def new_error_codes(self, prefill=None): """Create a new ErrorCodes instance Keyword argument: diff --git a/processout/device.py b/processout/device.py new file mode 100755 index 0000000..501efe2 --- /dev/null +++ b/processout/device.py @@ -0,0 +1,252 @@ +try: + from urllib.parse import quote_plus +except ImportError: + from urllib import quote_plus + +import processout +import json + +from processout.networking.request import Request +from processout.networking.response import Response + +# The content of this file was automatically generated + + +class Device(object): + def __init__(self, client, prefill=None): + self._client = client + + self._request_origin = None + self._id = None + self._channel = None + self._ip_address = None + self._user_agent = None + self._header_accept = None + self._header_referer = None + self._app_color_depth = None + self._app_java_enabled = None + self._app_language = None + self._app_screen_height = None + self._app_screen_width = None + self._app_timezone_offset = None + if prefill is not None: + self.fill_with_data(prefill) + + @property + def request_origin(self): + """Get request_origin""" + return self._request_origin + + @request_origin.setter + def request_origin(self, val): + """Set request_origin + Keyword argument: + val -- New request_origin value""" + self._request_origin = val + return self + + @property + def id(self): + """Get id""" + return self._id + + @id.setter + def id(self, val): + """Set id + Keyword argument: + val -- New id value""" + self._id = val + return self + + @property + def channel(self): + """Get channel""" + return self._channel + + @channel.setter + def channel(self, val): + """Set channel + Keyword argument: + val -- New channel value""" + self._channel = val + return self + + @property + def ip_address(self): + """Get ip_address""" + return self._ip_address + + @ip_address.setter + def ip_address(self, val): + """Set ip_address + Keyword argument: + val -- New ip_address value""" + self._ip_address = val + return self + + @property + def user_agent(self): + """Get user_agent""" + return self._user_agent + + @user_agent.setter + def user_agent(self, val): + """Set user_agent + Keyword argument: + val -- New user_agent value""" + self._user_agent = val + return self + + @property + def header_accept(self): + """Get header_accept""" + return self._header_accept + + @header_accept.setter + def header_accept(self, val): + """Set header_accept + Keyword argument: + val -- New header_accept value""" + self._header_accept = val + return self + + @property + def header_referer(self): + """Get header_referer""" + return self._header_referer + + @header_referer.setter + def header_referer(self, val): + """Set header_referer + Keyword argument: + val -- New header_referer value""" + self._header_referer = val + return self + + @property + def app_color_depth(self): + """Get app_color_depth""" + return self._app_color_depth + + @app_color_depth.setter + def app_color_depth(self, val): + """Set app_color_depth + Keyword argument: + val -- New app_color_depth value""" + self._app_color_depth = val + return self + + @property + def app_java_enabled(self): + """Get app_java_enabled""" + return self._app_java_enabled + + @app_java_enabled.setter + def app_java_enabled(self, val): + """Set app_java_enabled + Keyword argument: + val -- New app_java_enabled value""" + self._app_java_enabled = val + return self + + @property + def app_language(self): + """Get app_language""" + return self._app_language + + @app_language.setter + def app_language(self, val): + """Set app_language + Keyword argument: + val -- New app_language value""" + self._app_language = val + return self + + @property + def app_screen_height(self): + """Get app_screen_height""" + return self._app_screen_height + + @app_screen_height.setter + def app_screen_height(self, val): + """Set app_screen_height + Keyword argument: + val -- New app_screen_height value""" + self._app_screen_height = val + return self + + @property + def app_screen_width(self): + """Get app_screen_width""" + return self._app_screen_width + + @app_screen_width.setter + def app_screen_width(self, val): + """Set app_screen_width + Keyword argument: + val -- New app_screen_width value""" + self._app_screen_width = val + return self + + @property + def app_timezone_offset(self): + """Get app_timezone_offset""" + return self._app_timezone_offset + + @app_timezone_offset.setter + def app_timezone_offset(self, val): + """Set app_timezone_offset + Keyword argument: + val -- New app_timezone_offset value""" + self._app_timezone_offset = val + return self + + def fill_with_data(self, data): + """Fill the current object with the new values pulled from data + Keyword argument: + data -- The data from which to pull the new values""" + if "request_origin" in data.keys(): + self.request_origin = data["request_origin"] + if "id" in data.keys(): + self.id = data["id"] + if "channel" in data.keys(): + self.channel = data["channel"] + if "ip_address" in data.keys(): + self.ip_address = data["ip_address"] + if "user_agent" in data.keys(): + self.user_agent = data["user_agent"] + if "header_accept" in data.keys(): + self.header_accept = data["header_accept"] + if "header_referer" in data.keys(): + self.header_referer = data["header_referer"] + if "app_color_depth" in data.keys(): + self.app_color_depth = data["app_color_depth"] + if "app_java_enabled" in data.keys(): + self.app_java_enabled = data["app_java_enabled"] + if "app_language" in data.keys(): + self.app_language = data["app_language"] + if "app_screen_height" in data.keys(): + self.app_screen_height = data["app_screen_height"] + if "app_screen_width" in data.keys(): + self.app_screen_width = data["app_screen_width"] + if "app_timezone_offset" in data.keys(): + self.app_timezone_offset = data["app_timezone_offset"] + + return self + + def to_json(self): + return { + "request_origin": self.request_origin, + "id": self.id, + "channel": self.channel, + "ip_address": self.ip_address, + "user_agent": self.user_agent, + "header_accept": self.header_accept, + "header_referer": self.header_referer, + "app_color_depth": self.app_color_depth, + "app_java_enabled": self.app_java_enabled, + "app_language": self.app_language, + "app_screen_height": self.app_screen_height, + "app_screen_width": self.app_screen_width, + "app_timezone_offset": self.app_timezone_offset, + } diff --git a/processout/payoutitem.py b/processout/payoutitem.py index 410f571..f5a0fd3 100755 --- a/processout/payoutitem.py +++ b/processout/payoutitem.py @@ -29,6 +29,7 @@ def __init__(self, client, prefill=None): self._fees = None self._metadata = None self._created_at = None + self._breakdown = None if prefill is not None: self.fill_with_data(prefill) @@ -228,6 +229,28 @@ def created_at(self, val): self._created_at = val return self + @property + def breakdown(self): + """Get breakdown""" + return self._breakdown + + @breakdown.setter + def breakdown(self, val): + """Set breakdown + Keyword argument: + val -- New breakdown value""" + if val is None: + self._breakdown = val + return self + + if isinstance(val, dict): + obj = processout.PayoutItemAmountBreakdowns(self._client) + obj.fill_with_data(val) + self._breakdown = obj + else: + self._breakdown = val + return self + def fill_with_data(self, data): """Fill the current object with the new values pulled from data Keyword argument: @@ -258,6 +281,8 @@ def fill_with_data(self, data): self.metadata = data["metadata"] if "created_at" in data.keys(): self.created_at = data["created_at"] + if "breakdown" in data.keys(): + self.breakdown = data["breakdown"] return self @@ -276,4 +301,5 @@ def to_json(self): "fees": self.fees, "metadata": self.metadata, "created_at": self.created_at, + "breakdown": self.breakdown, } diff --git a/processout/payoutitemamountbreakdowns.py b/processout/payoutitemamountbreakdowns.py new file mode 100755 index 0000000..ae3337c --- /dev/null +++ b/processout/payoutitemamountbreakdowns.py @@ -0,0 +1,133 @@ +try: + from urllib.parse import quote_plus +except ImportError: + from urllib import quote_plus + +import processout +import json + +from processout.networking.request import Request +from processout.networking.response import Response + +# The content of this file was automatically generated + + +class PayoutItemAmountBreakdowns(object): + def __init__(self, client, prefill=None): + self._client = client + + self._scheme_fee = None + self._interchange_fee = None + self._gateway_fee = None + self._markup_fee = None + self._acquirer_fee = None + self._other_fee = None + if prefill is not None: + self.fill_with_data(prefill) + + @property + def scheme_fee(self): + """Get scheme_fee""" + return self._scheme_fee + + @scheme_fee.setter + def scheme_fee(self, val): + """Set scheme_fee + Keyword argument: + val -- New scheme_fee value""" + self._scheme_fee = val + return self + + @property + def interchange_fee(self): + """Get interchange_fee""" + return self._interchange_fee + + @interchange_fee.setter + def interchange_fee(self, val): + """Set interchange_fee + Keyword argument: + val -- New interchange_fee value""" + self._interchange_fee = val + return self + + @property + def gateway_fee(self): + """Get gateway_fee""" + return self._gateway_fee + + @gateway_fee.setter + def gateway_fee(self, val): + """Set gateway_fee + Keyword argument: + val -- New gateway_fee value""" + self._gateway_fee = val + return self + + @property + def markup_fee(self): + """Get markup_fee""" + return self._markup_fee + + @markup_fee.setter + def markup_fee(self, val): + """Set markup_fee + Keyword argument: + val -- New markup_fee value""" + self._markup_fee = val + return self + + @property + def acquirer_fee(self): + """Get acquirer_fee""" + return self._acquirer_fee + + @acquirer_fee.setter + def acquirer_fee(self, val): + """Set acquirer_fee + Keyword argument: + val -- New acquirer_fee value""" + self._acquirer_fee = val + return self + + @property + def other_fee(self): + """Get other_fee""" + return self._other_fee + + @other_fee.setter + def other_fee(self, val): + """Set other_fee + Keyword argument: + val -- New other_fee value""" + self._other_fee = val + return self + + def fill_with_data(self, data): + """Fill the current object with the new values pulled from data + Keyword argument: + data -- The data from which to pull the new values""" + if "scheme_fee" in data.keys(): + self.scheme_fee = data["scheme_fee"] + if "interchange_fee" in data.keys(): + self.interchange_fee = data["interchange_fee"] + if "gateway_fee" in data.keys(): + self.gateway_fee = data["gateway_fee"] + if "markup_fee" in data.keys(): + self.markup_fee = data["markup_fee"] + if "acquirer_fee" in data.keys(): + self.acquirer_fee = data["acquirer_fee"] + if "other_fee" in data.keys(): + self.other_fee = data["other_fee"] + + return self + + def to_json(self): + return { + "scheme_fee": self.scheme_fee, + "interchange_fee": self.interchange_fee, + "gateway_fee": self.gateway_fee, + "markup_fee": self.markup_fee, + "acquirer_fee": self.acquirer_fee, + "other_fee": self.other_fee, + } diff --git a/processout/phone.py b/processout/phone.py new file mode 100755 index 0000000..2904bf8 --- /dev/null +++ b/processout/phone.py @@ -0,0 +1,65 @@ +try: + from urllib.parse import quote_plus +except ImportError: + from urllib import quote_plus + +import processout +import json + +from processout.networking.request import Request +from processout.networking.response import Response + +# The content of this file was automatically generated + + +class Phone(object): + def __init__(self, client, prefill=None): + self._client = client + + self._number = None + self._dialing_code = None + if prefill is not None: + self.fill_with_data(prefill) + + @property + def number(self): + """Get number""" + return self._number + + @number.setter + def number(self, val): + """Set number + Keyword argument: + val -- New number value""" + self._number = val + return self + + @property + def dialing_code(self): + """Get dialing_code""" + return self._dialing_code + + @dialing_code.setter + def dialing_code(self, val): + """Set dialing_code + Keyword argument: + val -- New dialing_code value""" + self._dialing_code = val + return self + + def fill_with_data(self, data): + """Fill the current object with the new values pulled from data + Keyword argument: + data -- The data from which to pull the new values""" + if "number" in data.keys(): + self.number = data["number"] + if "dialing_code" in data.keys(): + self.dialing_code = data["dialing_code"] + + return self + + def to_json(self): + return { + "number": self.number, + "dialing_code": self.dialing_code, + } diff --git a/setup.py b/setup.py index 7f2763f..25cb3bd 100644 --- a/setup.py +++ b/setup.py @@ -3,12 +3,12 @@ setup( name = 'processout', packages = ['processout', 'processout.errors', 'processout.networking'], - version = '6.32.0', + version = '6.33.0', description = 'ProcessOut API bindings.', author = 'ProcessOut', author_email = 'hi@processout.com', url = 'https://github.com/processout/processout-python', - download_url = 'https://github.com/processout/processout-python/tarball/6.32.0', + download_url = 'https://github.com/processout/processout-python/tarball/6.33.0', keywords = ['ProcessOut', 'api', 'bindings'], classifiers = [], )