Skip to content
Open
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
5 changes: 5 additions & 0 deletions processout/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@
from processout.invoiceshippingphone import InvoiceShippingPhone
from processout.invoicebilling import InvoiceBilling
from processout.unsupportedfeaturebypass import UnsupportedFeatureBypass
from processout.paymentprocessingconfiguration import PaymentProcessingConfiguration
from processout.apmpaymentprocessingconfiguration import APMPaymentProcessingConfiguration
from processout.invoicedetail import InvoiceDetail
from processout.invoicesubmerchant import InvoiceSubmerchant
from processout.submerchantphonenumber import SubmerchantPhoneNumber
Expand All @@ -50,6 +52,8 @@
from processout.projectsftpsettings import ProjectSFTPSettings
from processout.projectsftpsettingspublic import ProjectSFTPSettingsPublic
from processout.refund import Refund
from processout.submerchant import Submerchant
from processout.submerchantmapping import SubmerchantMapping
from processout.transaction import Transaction
from processout.nativeapmresponse import NativeAPMResponse
from processout.nativeapmparameterdefinition import NativeAPMParameterDefinition
Expand All @@ -63,6 +67,7 @@
from processout.webhookendpoint import WebhookEndpoint
from processout.cardupdaterequest import CardUpdateRequest
from processout.cardcreaterequest import CardCreateRequest
from processout.cardschemedetails import CardSchemeDetails
from processout.device import Device
from processout.cardcontact import CardContact
from processout.cardshipping import CardShipping
Expand Down
65 changes: 65 additions & 0 deletions processout/apmpaymentprocessingconfiguration.py
Original file line number Diff line number Diff line change
@@ -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 APMPaymentProcessingConfiguration(object):
def __init__(self, client, prefill=None):
self._client = client

self._return_redirect_type = None
self._preferred_finalization_mode = None
if prefill is not None:
self.fill_with_data(prefill)

@property
def return_redirect_type(self):
"""Get return_redirect_type"""
return self._return_redirect_type

@return_redirect_type.setter
def return_redirect_type(self, val):
"""Set return_redirect_type
Keyword argument:
val -- New return_redirect_type value"""
self._return_redirect_type = val
return self

@property
def preferred_finalization_mode(self):
"""Get preferred_finalization_mode"""
return self._preferred_finalization_mode

@preferred_finalization_mode.setter
def preferred_finalization_mode(self, val):
"""Set preferred_finalization_mode
Keyword argument:
val -- New preferred_finalization_mode value"""
self._preferred_finalization_mode = 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 "return_redirect_type" in data.keys():
self.return_redirect_type = data["return_redirect_type"]
if "preferred_finalization_mode" in data.keys():
self.preferred_finalization_mode = data["preferred_finalization_mode"]

return self

def to_json(self):
return {
"return_redirect_type": self.return_redirect_type,
"preferred_finalization_mode": self.preferred_finalization_mode,
}
58 changes: 46 additions & 12 deletions processout/card.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ def __init__(self, client, prefill=None):
self._state = None
self._zip = None
self._country_code = None
self._billing_country_code = None
self._ip_address = None
self._fingerprint = None
self._token_type = None
Expand All @@ -50,7 +51,8 @@ def __init__(self, client, prefill=None):
self._sandbox = None
self._created_at = None
self._preferred_card_type = None
self._vault_id = None
self._initial_scheme_transaction_id = None
self._payment_account_reference = None
if prefill is not None:
self.fill_with_data(prefill)

Expand Down Expand Up @@ -384,6 +386,19 @@ def country_code(self, val):
self._country_code = val
return self

@property
def billing_country_code(self):
"""Get billing_country_code"""
return self._billing_country_code

@billing_country_code.setter
def billing_country_code(self, val):
"""Set billing_country_code
Keyword argument:
val -- New billing_country_code value"""
self._billing_country_code = val
return self

@property
def ip_address(self):
"""Get ip_address"""
Expand Down Expand Up @@ -515,16 +530,29 @@ def preferred_card_type(self, val):
return self

@property
def vault_id(self):
"""Get vault_id"""
return self._vault_id
def initial_scheme_transaction_id(self):
"""Get initial_scheme_transaction_id"""
return self._initial_scheme_transaction_id

@initial_scheme_transaction_id.setter
def initial_scheme_transaction_id(self, val):
"""Set initial_scheme_transaction_id
Keyword argument:
val -- New initial_scheme_transaction_id value"""
self._initial_scheme_transaction_id = val
return self

@property
def payment_account_reference(self):
"""Get payment_account_reference"""
return self._payment_account_reference

@vault_id.setter
def vault_id(self, val):
"""Set vault_id
@payment_account_reference.setter
def payment_account_reference(self, val):
"""Set payment_account_reference
Keyword argument:
val -- New vault_id value"""
self._vault_id = val
val -- New payment_account_reference value"""
self._payment_account_reference = val
return self

def fill_with_data(self, data):
Expand Down Expand Up @@ -579,6 +607,8 @@ def fill_with_data(self, data):
self.zip = data["zip"]
if "country_code" in data.keys():
self.country_code = data["country_code"]
if "billing_country_code" in data.keys():
self.billing_country_code = data["billing_country_code"]
if "ip_address" in data.keys():
self.ip_address = data["ip_address"]
if "fingerprint" in data.keys():
Expand All @@ -599,8 +629,10 @@ def fill_with_data(self, data):
self.created_at = data["created_at"]
if "preferred_card_type" in data.keys():
self.preferred_card_type = data["preferred_card_type"]
if "vault_id" in data.keys():
self.vault_id = data["vault_id"]
if "initial_scheme_transaction_id" in data.keys():
self.initial_scheme_transaction_id = data["initial_scheme_transaction_id"]
if "payment_account_reference" in data.keys():
self.payment_account_reference = data["payment_account_reference"]

return self

Expand Down Expand Up @@ -630,6 +662,7 @@ def to_json(self):
"state": self.state,
"zip": self.zip,
"country_code": self.country_code,
"billing_country_code": self.billing_country_code,
"ip_address": self.ip_address,
"fingerprint": self.fingerprint,
"token_type": self.token_type,
Expand All @@ -640,7 +673,8 @@ def to_json(self):
"sandbox": self.sandbox,
"created_at": self.created_at,
"preferred_card_type": self.preferred_card_type,
"vault_id": self.vault_id,
"initial_scheme_transaction_id": self.initial_scheme_transaction_id,
"payment_account_reference": self.payment_account_reference,
}

def all(self, options={}):
Expand Down
17 changes: 17 additions & 0 deletions processout/cardcontact.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ def __init__(self, client, prefill=None):
self._city = None
self._state = None
self._country_code = None
self._billing_country_code = None
self._zip = None
if prefill is not None:
self.fill_with_data(prefill)
Expand Down Expand Up @@ -90,6 +91,19 @@ def country_code(self, val):
self._country_code = val
return self

@property
def billing_country_code(self):
"""Get billing_country_code"""
return self._billing_country_code

@billing_country_code.setter
def billing_country_code(self, val):
"""Set billing_country_code
Keyword argument:
val -- New billing_country_code value"""
self._billing_country_code = val
return self

@property
def zip(self):
"""Get zip"""
Expand Down Expand Up @@ -117,6 +131,8 @@ def fill_with_data(self, data):
self.state = data["state"]
if "country_code" in data.keys():
self.country_code = data["country_code"]
if "billing_country_code" in data.keys():
self.billing_country_code = data["billing_country_code"]
if "zip" in data.keys():
self.zip = data["zip"]

Expand All @@ -129,5 +145,6 @@ def to_json(self):
"city": self.city,
"state": self.state,
"country_code": self.country_code,
"billing_country_code": self.billing_country_code,
"zip": self.zip,
}
28 changes: 27 additions & 1 deletion processout/cardcreaterequest.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ def __init__(self, client, prefill=None):
self._payment_token = None
self._contact = None
self._shipping = None
self._scheme_details = None
if prefill is not None:
self.fill_with_data(prefill)

Expand Down Expand Up @@ -298,6 +299,28 @@ def shipping(self, val):
self._shipping = val
return self

@property
def scheme_details(self):
"""Get scheme_details"""
return self._scheme_details

@scheme_details.setter
def scheme_details(self, val):
"""Set scheme_details
Keyword argument:
val -- New scheme_details value"""
if val is None:
self._scheme_details = val
return self

if isinstance(val, dict):
obj = processout.CardSchemeDetails(self._client)
obj.fill_with_data(val)
self._scheme_details = obj
else:
self._scheme_details = val
return self

def fill_with_data(self, data):
"""Fill the current object with the new values pulled from data
Keyword argument:
Expand Down Expand Up @@ -338,6 +361,8 @@ def fill_with_data(self, data):
self.contact = data["contact"]
if "shipping" in data.keys():
self.shipping = data["shipping"]
if "scheme_details" in data.keys():
self.scheme_details = data["scheme_details"]

return self

Expand All @@ -361,6 +386,7 @@ def to_json(self):
"payment_token": self.payment_token,
"contact": self.contact,
"shipping": self.shipping,
"scheme_details": self.scheme_details,
}

def create(self, options={}):
Expand Down Expand Up @@ -391,7 +417,7 @@ def create(self, options={}):
'payment_token': self.payment_token,
'contact': self.contact,
'shipping': self.shipping,
'scheme_transaction': self.scheme_transaction
'scheme_details': self.scheme_details
}

response = Response(request.post(path, data, options))
Expand Down
65 changes: 65 additions & 0 deletions processout/cardschemedetails.py
Original file line number Diff line number Diff line change
@@ -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 CardSchemeDetails(object):
def __init__(self, client, prefill=None):
self._client = client

self._transaction_id = None
self._transaction_link_id = None
if prefill is not None:
self.fill_with_data(prefill)

@property
def transaction_id(self):
"""Get transaction_id"""
return self._transaction_id

@transaction_id.setter
def transaction_id(self, val):
"""Set transaction_id
Keyword argument:
val -- New transaction_id value"""
self._transaction_id = val
return self

@property
def transaction_link_id(self):
"""Get transaction_link_id"""
return self._transaction_link_id

@transaction_link_id.setter
def transaction_link_id(self, val):
"""Set transaction_link_id
Keyword argument:
val -- New transaction_link_id value"""
self._transaction_link_id = 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 "transaction_id" in data.keys():
self.transaction_id = data["transaction_id"]
if "transaction_link_id" in data.keys():
self.transaction_link_id = data["transaction_link_id"]

return self

def to_json(self):
return {
"transaction_id": self.transaction_id,
"transaction_link_id": self.transaction_link_id,
}
Loading
Loading