diff --git a/conf.py b/conf.py index 0ad440f7..38364a41 100644 --- a/conf.py +++ b/conf.py @@ -62,9 +62,9 @@ # built documents. # # The short X.Y version. -version = '3.43.0' +version = '3.44.0' # The full version, including alpha/beta/rc tags. -release = '3.43.0' +release = '3.44.0' # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. @@ -138,7 +138,7 @@ # The name for this set of Sphinx documents. # " v documentation" by default. # -# html_title = 'Python SDK v3.43.0' +# html_title = 'Python SDK v3.44.0' # A shorter title for the navigation bar. Default is the same as html_title. # diff --git a/index.rst b/index.rst index a2a5174d..770603de 100644 --- a/index.rst +++ b/index.rst @@ -1108,6 +1108,13 @@ API Reference :special-members: :exclude-members: __dict__,__weakref__,__module__,__get__ +.. automodule:: ingenico.connect.sdk.domain.payment.definitions.account_funding_recipient + :members: + :show-inheritance: + :undoc-members: + :special-members: + :exclude-members: __dict__,__weakref__,__module__,__get__ + .. automodule:: ingenico.connect.sdk.domain.payment.definitions.additional_order_input :members: :show-inheritance: @@ -1122,6 +1129,13 @@ API Reference :special-members: :exclude-members: __dict__,__weakref__,__module__,__get__ +.. automodule:: ingenico.connect.sdk.domain.payment.definitions.afr_name + :members: + :show-inheritance: + :undoc-members: + :special-members: + :exclude-members: __dict__,__weakref__,__module__,__get__ + .. automodule:: ingenico.connect.sdk.domain.payment.definitions.amount_breakdown :members: :show-inheritance: @@ -1752,6 +1766,13 @@ API Reference :special-members: :exclude-members: __dict__,__weakref__,__module__,__get__ +.. automodule:: ingenico.connect.sdk.domain.payment.definitions.personal_identification + :members: + :show-inheritance: + :undoc-members: + :special-members: + :exclude-members: __dict__,__weakref__,__module__,__get__ + .. automodule:: ingenico.connect.sdk.domain.payment.definitions.personal_information :members: :show-inheritance: diff --git a/ingenico/connect/sdk/domain/payment/definitions/account_funding_recipient.py b/ingenico/connect/sdk/domain/payment/definitions/account_funding_recipient.py new file mode 100644 index 00000000..6ef8b7f2 --- /dev/null +++ b/ingenico/connect/sdk/domain/payment/definitions/account_funding_recipient.py @@ -0,0 +1,144 @@ +# -*- coding: utf-8 -*- +# +# This class was auto-generated from the API references found at +# https://epayments-api.developer-ingenico.com/s2sapi/v1/ +# +from ingenico.connect.sdk.data_object import DataObject +from ingenico.connect.sdk.domain.definitions.address import Address +from ingenico.connect.sdk.domain.payment.definitions.afr_name import AfrName + + +class AccountFundingRecipient(DataObject): + """ + | Object containing specific data regarding the recipient of an account funding transaction + """ + + __account_number = None + __account_number_type = None + __address = None + __date_of_birth = None + __name = None + __partial_pan = None + + @property + def account_number(self): + """ + | Should be populated with the value of the corresponding accountNumberType of the recipient. + + Type: str + """ + return self.__account_number + + @account_number.setter + def account_number(self, value): + self.__account_number = value + + @property + def account_number_type(self): + """ + | Defines the account number type of the recipient. Possible values are: + + * cash = Mode of payment is cash to the recipient. + * walletId = Digital wallet ID. + * routingNumber = Routing Transit Number is a code used by financial institutions to identify other financial institutions. + * iban = International Bank Account Number, is a standard international numbering system for identifying bank accounts. + * bicNumber = Bank Identification Code is a number that is used to identify a specific bank. + + Type: str + """ + return self.__account_number_type + + @account_number_type.setter + def account_number_type(self, value): + self.__account_number_type = value + + @property + def address(self): + """ + | Object containing the address details of the recipient of an account funding transaction. + + Type: :class:`ingenico.connect.sdk.domain.definitions.address.Address` + """ + return self.__address + + @address.setter + def address(self, value): + self.__address = value + + @property + def date_of_birth(self): + """ + | The date of birth of the recipient + | Format: YYYYMMDD + + Type: str + """ + return self.__date_of_birth + + @date_of_birth.setter + def date_of_birth(self, value): + self.__date_of_birth = value + + @property + def name(self): + """ + | Object containing the name details of the recipient of an account funding transaction. + + Type: :class:`ingenico.connect.sdk.domain.payment.definitions.afr_name.AfrName` + """ + return self.__name + + @name.setter + def name(self, value): + self.__name = value + + @property + def partial_pan(self): + """ + | Either partialPan or accountnumber is required for merchants that use Merchant Category Code (MCC) 6012 for transactions involving UK costumers. + + Type: str + """ + return self.__partial_pan + + @partial_pan.setter + def partial_pan(self, value): + self.__partial_pan = value + + def to_dictionary(self): + dictionary = super(AccountFundingRecipient, self).to_dictionary() + if self.account_number is not None: + dictionary['accountNumber'] = self.account_number + if self.account_number_type is not None: + dictionary['accountNumberType'] = self.account_number_type + if self.address is not None: + dictionary['address'] = self.address.to_dictionary() + if self.date_of_birth is not None: + dictionary['dateOfBirth'] = self.date_of_birth + if self.name is not None: + dictionary['name'] = self.name.to_dictionary() + if self.partial_pan is not None: + dictionary['partialPan'] = self.partial_pan + return dictionary + + def from_dictionary(self, dictionary): + super(AccountFundingRecipient, self).from_dictionary(dictionary) + if 'accountNumber' in dictionary: + self.account_number = dictionary['accountNumber'] + if 'accountNumberType' in dictionary: + self.account_number_type = dictionary['accountNumberType'] + if 'address' in dictionary: + if not isinstance(dictionary['address'], dict): + raise TypeError('value \'{}\' is not a dictionary'.format(dictionary['address'])) + value = Address() + self.address = value.from_dictionary(dictionary['address']) + if 'dateOfBirth' in dictionary: + self.date_of_birth = dictionary['dateOfBirth'] + if 'name' in dictionary: + if not isinstance(dictionary['name'], dict): + raise TypeError('value \'{}\' is not a dictionary'.format(dictionary['name'])) + value = AfrName() + self.name = value.from_dictionary(dictionary['name']) + if 'partialPan' in dictionary: + self.partial_pan = dictionary['partialPan'] + return self diff --git a/ingenico/connect/sdk/domain/payment/definitions/additional_order_input.py b/ingenico/connect/sdk/domain/payment/definitions/additional_order_input.py index e14fc7d4..bcf7f4d6 100644 --- a/ingenico/connect/sdk/domain/payment/definitions/additional_order_input.py +++ b/ingenico/connect/sdk/domain/payment/definitions/additional_order_input.py @@ -6,6 +6,7 @@ from ingenico.connect.sdk.data_object import DataObject from ingenico.connect.sdk.domain.definitions.airline_data import AirlineData from ingenico.connect.sdk.domain.definitions.lodging_data import LodgingData +from ingenico.connect.sdk.domain.payment.definitions.account_funding_recipient import AccountFundingRecipient from ingenico.connect.sdk.domain.payment.definitions.installments import Installments from ingenico.connect.sdk.domain.payment.definitions.level3_summary_data import Level3SummaryData from ingenico.connect.sdk.domain.payment.definitions.loan_recipient import LoanRecipient @@ -14,6 +15,7 @@ class AdditionalOrderInput(DataObject): + __account_funding_recipient = None __airline_data = None __installments = None __level3_summary_data = None @@ -23,6 +25,19 @@ class AdditionalOrderInput(DataObject): __order_date = None __type_information = None + @property + def account_funding_recipient(self): + """ + | Object containing specific data regarding the recipient of an account funding transaction + + Type: :class:`ingenico.connect.sdk.domain.payment.definitions.account_funding_recipient.AccountFundingRecipient` + """ + return self.__account_funding_recipient + + @account_funding_recipient.setter + def account_funding_recipient(self, value): + self.__account_funding_recipient = value + @property def airline_data(self): """ @@ -70,6 +85,8 @@ def loan_recipient(self): | Object containing specific data regarding the recipient of a loan in the UK Type: :class:`ingenico.connect.sdk.domain.payment.definitions.loan_recipient.LoanRecipient` + + Deprecated; No replacement """ return self.__loan_recipient @@ -134,6 +151,8 @@ def type_information(self, value): def to_dictionary(self): dictionary = super(AdditionalOrderInput, self).to_dictionary() + if self.account_funding_recipient is not None: + dictionary['accountFundingRecipient'] = self.account_funding_recipient.to_dictionary() if self.airline_data is not None: dictionary['airlineData'] = self.airline_data.to_dictionary() if self.installments is not None: @@ -154,6 +173,11 @@ def to_dictionary(self): def from_dictionary(self, dictionary): super(AdditionalOrderInput, self).from_dictionary(dictionary) + if 'accountFundingRecipient' in dictionary: + if not isinstance(dictionary['accountFundingRecipient'], dict): + raise TypeError('value \'{}\' is not a dictionary'.format(dictionary['accountFundingRecipient'])) + value = AccountFundingRecipient() + self.account_funding_recipient = value.from_dictionary(dictionary['accountFundingRecipient']) if 'airlineData' in dictionary: if not isinstance(dictionary['airlineData'], dict): raise TypeError('value \'{}\' is not a dictionary'.format(dictionary['airlineData'])) diff --git a/ingenico/connect/sdk/domain/payment/definitions/afr_name.py b/ingenico/connect/sdk/domain/payment/definitions/afr_name.py new file mode 100644 index 00000000..ffd9b0df --- /dev/null +++ b/ingenico/connect/sdk/domain/payment/definitions/afr_name.py @@ -0,0 +1,54 @@ +# -*- coding: utf-8 -*- +# +# This class was auto-generated from the API references found at +# https://epayments-api.developer-ingenico.com/s2sapi/v1/ +# +from ingenico.connect.sdk.data_object import DataObject + + +class AfrName(DataObject): + + __first_name = None + __surname = None + + @property + def first_name(self): + """ + | Given name(s) or first name(s) of the recipient of an account funding transaction. + + Type: str + """ + return self.__first_name + + @first_name.setter + def first_name(self, value): + self.__first_name = value + + @property + def surname(self): + """ + | Surname(s) or last name(s) of the customer + + Type: str + """ + return self.__surname + + @surname.setter + def surname(self, value): + self.__surname = value + + def to_dictionary(self): + dictionary = super(AfrName, self).to_dictionary() + if self.first_name is not None: + dictionary['firstName'] = self.first_name + if self.surname is not None: + dictionary['surname'] = self.surname + return dictionary + + def from_dictionary(self, dictionary): + super(AfrName, self).from_dictionary(dictionary) + if 'firstName' in dictionary: + self.first_name = dictionary['firstName'] + if 'surname' in dictionary: + self.surname = dictionary['surname'] + return self diff --git a/ingenico/connect/sdk/domain/payment/definitions/customer.py b/ingenico/connect/sdk/domain/payment/definitions/customer.py index ba9065e7..38e7c614 100644 --- a/ingenico/connect/sdk/domain/payment/definitions/customer.py +++ b/ingenico/connect/sdk/domain/payment/definitions/customer.py @@ -23,6 +23,7 @@ class Customer(CustomerBase): __contact_details = None __device = None __fiscal_number = None + __is_company = None __is_previous_customer = None __locale = None __personal_information = None @@ -129,6 +130,22 @@ def fiscal_number(self): def fiscal_number(self, value): self.__fiscal_number = value + @property + def is_company(self): + """ + | Indicates if the payer is a company or an individual + + * true = This is a company + * false = This is an individual + + Type: bool + """ + return self.__is_company + + @is_company.setter + def is_company(self, value): + self.__is_company = value + @property def is_previous_customer(self): """ @@ -200,6 +217,8 @@ def to_dictionary(self): dictionary['device'] = self.device.to_dictionary() if self.fiscal_number is not None: dictionary['fiscalNumber'] = self.fiscal_number + if self.is_company is not None: + dictionary['isCompany'] = self.is_company if self.is_previous_customer is not None: dictionary['isPreviousCustomer'] = self.is_previous_customer if self.locale is not None: @@ -236,6 +255,8 @@ def from_dictionary(self, dictionary): self.device = value.from_dictionary(dictionary['device']) if 'fiscalNumber' in dictionary: self.fiscal_number = dictionary['fiscalNumber'] + if 'isCompany' in dictionary: + self.is_company = dictionary['isCompany'] if 'isPreviousCustomer' in dictionary: self.is_previous_customer = dictionary['isPreviousCustomer'] if 'locale' in dictionary: diff --git a/ingenico/connect/sdk/domain/payment/definitions/loan_recipient.py b/ingenico/connect/sdk/domain/payment/definitions/loan_recipient.py index 04e9522c..c54d2e4f 100644 --- a/ingenico/connect/sdk/domain/payment/definitions/loan_recipient.py +++ b/ingenico/connect/sdk/domain/payment/definitions/loan_recipient.py @@ -7,6 +7,9 @@ class LoanRecipient(DataObject): + """ + Deprecated; No replacement + """ __account_number = None __date_of_birth = None @@ -20,6 +23,8 @@ def account_number(self): | Should be filled with the last 10 digits of the bank account number of the recipient of the loan. Type: str + + Deprecated; No replacement """ return self.__account_number @@ -34,6 +39,8 @@ def date_of_birth(self): | Format: YYYYMMDD Type: str + + Deprecated; No replacement """ return self.__date_of_birth @@ -47,6 +54,8 @@ def partial_pan(self): | Should be filled with the first 6 and last 4 digits of the PAN number of the recipient of the loan. Type: str + + Deprecated; No replacement """ return self.__partial_pan @@ -60,6 +69,8 @@ def surname(self): | Surname of the recipient of the loan. Type: str + + Deprecated; No replacement """ return self.__surname @@ -73,6 +84,8 @@ def zip(self): | Zip code of the recipient of the loan Type: str + + Deprecated; No replacement """ return self.__zip diff --git a/ingenico/connect/sdk/domain/payment/definitions/order_type_information.py b/ingenico/connect/sdk/domain/payment/definitions/order_type_information.py index ba7dd7ea..b4ae08c2 100644 --- a/ingenico/connect/sdk/domain/payment/definitions/order_type_information.py +++ b/ingenico/connect/sdk/domain/payment/definitions/order_type_information.py @@ -8,10 +8,30 @@ class OrderTypeInformation(DataObject): + __funding_type = None __purchase_type = None __transaction_type = None __usage_type = None + @property + def funding_type(self): + """ + | Identifies the funding type being authenticated. Possible values are: + + * personToPerson = When it is person to person funding (P2P) + * agentCashOut = When fund is being paid out to final recipient in Cash by company's agent. + * businessToConsumer = When fund is being transferred from business to consumer (B2C) + * businessToBusiness = When fund is being transferred from business to business (B2B) + * prefundingStagedWallet = When funding is being used to load the funds into the wallet account. + + Type: str + """ + return self.__funding_type + + @funding_type.setter + def funding_type(self, value): + self.__funding_type = value + @property def purchase_type(self): """ @@ -65,6 +85,8 @@ def usage_type(self, value): def to_dictionary(self): dictionary = super(OrderTypeInformation, self).to_dictionary() + if self.funding_type is not None: + dictionary['fundingType'] = self.funding_type if self.purchase_type is not None: dictionary['purchaseType'] = self.purchase_type if self.transaction_type is not None: @@ -75,6 +97,8 @@ def to_dictionary(self): def from_dictionary(self, dictionary): super(OrderTypeInformation, self).from_dictionary(dictionary) + if 'fundingType' in dictionary: + self.funding_type = dictionary['fundingType'] if 'purchaseType' in dictionary: self.purchase_type = dictionary['purchaseType'] if 'transactionType' in dictionary: diff --git a/ingenico/connect/sdk/domain/payment/definitions/personal_identification.py b/ingenico/connect/sdk/domain/payment/definitions/personal_identification.py new file mode 100644 index 00000000..ce2aafc2 --- /dev/null +++ b/ingenico/connect/sdk/domain/payment/definitions/personal_identification.py @@ -0,0 +1,81 @@ +# -*- coding: utf-8 -*- +# +# This class was auto-generated from the API references found at +# https://epayments-api.developer-ingenico.com/s2sapi/v1/ +# +from ingenico.connect.sdk.data_object import DataObject + + +class PersonalIdentification(DataObject): + + __id_issuing_country_code = None + __id_type = None + __id_value = None + + @property + def id_issuing_country_code(self): + """ + | ISO 3166-1 alpha-2 country code of the country that issued the identification document + + Type: str + """ + return self.__id_issuing_country_code + + @id_issuing_country_code.setter + def id_issuing_country_code(self, value): + self.__id_issuing_country_code = value + + @property + def id_type(self): + """ + | Indicates the type of identification + + * nationalIdentification = The provided idValue is a national identification number. + * passportNumber = The provided idValue is a passport number. + * driverLicense = The provided idValue is driving License of the individual. + * companyRegistrationNumber = The provided idValue is a company identifier. It verifies its legal existence as an incorporated entity. + * socialSecurityNumber =n The provided idValue is a social security number, issued to an individual by the individual's government. + * alienRegistrationNumber = The provided idValue is an alien registration number, provided by immigration services of a country. + * lawEnforcementIdentification = The provided idValue is an alien registration number, provided by immigration services of a country. + * militaryIdentification = The provided idValue is an identification issued to military personnel of a country. + + Type: str + """ + return self.__id_type + + @id_type.setter + def id_type(self, value): + self.__id_type = value + + @property + def id_value(self): + """ + | The value of the identification + + Type: str + """ + return self.__id_value + + @id_value.setter + def id_value(self, value): + self.__id_value = value + + def to_dictionary(self): + dictionary = super(PersonalIdentification, self).to_dictionary() + if self.id_issuing_country_code is not None: + dictionary['idIssuingCountryCode'] = self.id_issuing_country_code + if self.id_type is not None: + dictionary['idType'] = self.id_type + if self.id_value is not None: + dictionary['idValue'] = self.id_value + return dictionary + + def from_dictionary(self, dictionary): + super(PersonalIdentification, self).from_dictionary(dictionary) + if 'idIssuingCountryCode' in dictionary: + self.id_issuing_country_code = dictionary['idIssuingCountryCode'] + if 'idType' in dictionary: + self.id_type = dictionary['idType'] + if 'idValue' in dictionary: + self.id_value = dictionary['idValue'] + return self diff --git a/ingenico/connect/sdk/domain/payment/definitions/personal_information.py b/ingenico/connect/sdk/domain/payment/definitions/personal_information.py index dafa4f6f..26525026 100644 --- a/ingenico/connect/sdk/domain/payment/definitions/personal_information.py +++ b/ingenico/connect/sdk/domain/payment/definitions/personal_information.py @@ -4,6 +4,7 @@ # https://epayments-api.developer-ingenico.com/s2sapi/v1/ # from ingenico.connect.sdk.data_object import DataObject +from ingenico.connect.sdk.domain.payment.definitions.personal_identification import PersonalIdentification from ingenico.connect.sdk.domain.payment.definitions.personal_name import PersonalName @@ -11,6 +12,7 @@ class PersonalInformation(DataObject): __date_of_birth = None __gender = None + __identification = None __name = None @property @@ -44,6 +46,19 @@ def gender(self): def gender(self, value): self.__gender = value + @property + def identification(self): + """ + | Object containing identification documents information + + Type: :class:`ingenico.connect.sdk.domain.payment.definitions.personal_identification.PersonalIdentification` + """ + return self.__identification + + @identification.setter + def identification(self, value): + self.__identification = value + @property def name(self): """ @@ -63,6 +78,8 @@ def to_dictionary(self): dictionary['dateOfBirth'] = self.date_of_birth if self.gender is not None: dictionary['gender'] = self.gender + if self.identification is not None: + dictionary['identification'] = self.identification.to_dictionary() if self.name is not None: dictionary['name'] = self.name.to_dictionary() return dictionary @@ -73,6 +90,11 @@ def from_dictionary(self, dictionary): self.date_of_birth = dictionary['dateOfBirth'] if 'gender' in dictionary: self.gender = dictionary['gender'] + if 'identification' in dictionary: + if not isinstance(dictionary['identification'], dict): + raise TypeError('value \'{}\' is not a dictionary'.format(dictionary['identification'])) + value = PersonalIdentification() + self.identification = value.from_dictionary(dictionary['identification']) if 'name' in dictionary: if not isinstance(dictionary['name'], dict): raise TypeError('value \'{}\' is not a dictionary'.format(dictionary['name'])) diff --git a/ingenico/connect/sdk/meta_data_provider.py b/ingenico/connect/sdk/meta_data_provider.py index 2a2809fd..df626409 100644 --- a/ingenico/connect/sdk/meta_data_provider.py +++ b/ingenico/connect/sdk/meta_data_provider.py @@ -21,7 +21,7 @@ class MetaDataProvider: """ Provides meta info about the server. """ - __SDK_VERSION = "3.43.0" + __SDK_VERSION = "3.44.0" __SERVER_META_INFO_HEADER = "X-GCS-ServerMetaInfo" __prohibited_headers = [__SERVER_META_INFO_HEADER, "X-GCS-Idempotence-Key", "Date", "Content-Type", "Authorization"] diff --git a/setup.py b/setup.py index e4595c6a..7825387a 100644 --- a/setup.py +++ b/setup.py @@ -21,7 +21,7 @@ def test_collector(): setup( name="connect-sdk-python3", - version="3.43.0", + version="3.44.0", author="Ingenico ePayments", author_email="github@epay.ingenico.com", description="SDK to communicate with the Ingenico ePayments platform using the Ingenico Connect Server API",