This repository has been archived by the owner on Mar 19, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
881f870
commit 37116b2
Showing
12 changed files
with
409 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
144 changes: 144 additions & 0 deletions
144
ingenico/connect/sdk/domain/payment/definitions/account_funding_recipient.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
54 changes: 54 additions & 0 deletions
54
ingenico/connect/sdk/domain/payment/definitions/afr_name.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.