Skip to content
This repository has been archived by the owner on Mar 19, 2024. It is now read-only.

Commit

Permalink
Release 3.41.0.
Browse files Browse the repository at this point in the history
  • Loading branch information
IngenicoEPayments committed Jul 14, 2023
1 parent 369d2c9 commit f660d65
Show file tree
Hide file tree
Showing 10 changed files with 189 additions and 56 deletions.
6 changes: 3 additions & 3 deletions conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,9 @@
# built documents.
#
# The short X.Y version.
version = '3.40.0'
version = '3.41.0'
# The full version, including alpha/beta/rc tags.
release = '3.40.0'
release = '3.41.0'

# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
Expand Down Expand Up @@ -138,7 +138,7 @@
# The name for this set of Sphinx documents.
# "<project> v<release> documentation" by default.
#
# html_title = 'Python SDK v3.40.0'
# html_title = 'Python SDK v3.41.0'

# A shorter title for the navigation bar. Default is the same as html_title.
#
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,44 @@
# https://epayments-api.developer-ingenico.com/s2sapi/v1/
#
from ingenico.connect.sdk.data_object import DataObject
from ingenico.connect.sdk.domain.definitions.key_value_pair import KeyValuePair


class CaptureStatusOutput(DataObject):

__is_retriable = None
__provider_raw_output = None
__status_code = None

@property
def is_retriable(self):
"""
| Flag indicating whether a rejected payment may be retried by the merchant without incurring a fee
* true
* false
Type: bool
"""
return self.__is_retriable

@is_retriable.setter
def is_retriable(self, value):
self.__is_retriable = value

@property
def provider_raw_output(self):
"""
| This is the raw response returned by the acquirer. This property contains unprocessed data directly returned by the acquirer. It's recommended for data analysis only due to its dynamic nature, which may undergo future changes.
Type: list[:class:`ingenico.connect.sdk.domain.definitions.key_value_pair.KeyValuePair`]
"""
return self.__provider_raw_output

@provider_raw_output.setter
def provider_raw_output(self, value):
self.__provider_raw_output = value

@property
def status_code(self):
"""
Expand All @@ -25,12 +57,28 @@ def status_code(self, value):

def to_dictionary(self):
dictionary = super(CaptureStatusOutput, self).to_dictionary()
if self.is_retriable is not None:
dictionary['isRetriable'] = self.is_retriable
if self.provider_raw_output is not None:
dictionary['providerRawOutput'] = []
for element in self.provider_raw_output:
if element is not None:
dictionary['providerRawOutput'].append(element.to_dictionary())
if self.status_code is not None:
dictionary['statusCode'] = self.status_code
return dictionary

def from_dictionary(self, dictionary):
super(CaptureStatusOutput, self).from_dictionary(dictionary)
if 'isRetriable' in dictionary:
self.is_retriable = dictionary['isRetriable']
if 'providerRawOutput' in dictionary:
if not isinstance(dictionary['providerRawOutput'], list):
raise TypeError('value \'{}\' is not a list'.format(dictionary['providerRawOutput']))
self.provider_raw_output = []
for element in dictionary['providerRawOutput']:
value = KeyValuePair()
self.provider_raw_output.append(value.from_dictionary(element))
if 'statusCode' in dictionary:
self.status_code = dictionary['statusCode']
return self
48 changes: 48 additions & 0 deletions ingenico/connect/sdk/domain/definitions/order_status_output.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,16 @@
# https://epayments-api.developer-ingenico.com/s2sapi/v1/
#
from ingenico.connect.sdk.data_object import DataObject
from ingenico.connect.sdk.domain.definitions.key_value_pair import KeyValuePair
from ingenico.connect.sdk.domain.errors.definitions.api_error import APIError


class OrderStatusOutput(DataObject):

__errors = None
__is_cancellable = None
__is_retriable = None
__provider_raw_output = None
__status_category = None
__status_code = None
__status_code_change_date_time = None
Expand Down Expand Up @@ -44,6 +47,35 @@ def is_cancellable(self):
def is_cancellable(self, value):
self.__is_cancellable = value

@property
def is_retriable(self):
"""
| Flag indicating whether a rejected payment may be retried by the merchant without incurring a fee
* true
* false
Type: bool
"""
return self.__is_retriable

@is_retriable.setter
def is_retriable(self, value):
self.__is_retriable = value

@property
def provider_raw_output(self):
"""
| This is the raw response returned by the acquirer. This property contains unprocessed data directly returned by the acquirer. It's recommended for data analysis only due to its dynamic nature, which may undergo future changes.
Type: list[:class:`ingenico.connect.sdk.domain.definitions.key_value_pair.KeyValuePair`]
"""
return self.__provider_raw_output

@provider_raw_output.setter
def provider_raw_output(self, value):
self.__provider_raw_output = value

@property
def status_category(self):
"""
Expand Down Expand Up @@ -156,6 +188,13 @@ def to_dictionary(self):
dictionary['errors'].append(element.to_dictionary())
if self.is_cancellable is not None:
dictionary['isCancellable'] = self.is_cancellable
if self.is_retriable is not None:
dictionary['isRetriable'] = self.is_retriable
if self.provider_raw_output is not None:
dictionary['providerRawOutput'] = []
for element in self.provider_raw_output:
if element is not None:
dictionary['providerRawOutput'].append(element.to_dictionary())
if self.status_category is not None:
dictionary['statusCategory'] = self.status_category
if self.status_code is not None:
Expand All @@ -175,6 +214,15 @@ def from_dictionary(self, dictionary):
self.errors.append(value.from_dictionary(element))
if 'isCancellable' in dictionary:
self.is_cancellable = dictionary['isCancellable']
if 'isRetriable' in dictionary:
self.is_retriable = dictionary['isRetriable']
if 'providerRawOutput' in dictionary:
if not isinstance(dictionary['providerRawOutput'], list):
raise TypeError('value \'{}\' is not a list'.format(dictionary['providerRawOutput']))
self.provider_raw_output = []
for element in dictionary['providerRawOutput']:
value = KeyValuePair()
self.provider_raw_output.append(value.from_dictionary(element))
if 'statusCategory' in dictionary:
self.status_category = dictionary['statusCategory']
if 'statusCode' in dictionary:
Expand Down
15 changes: 13 additions & 2 deletions ingenico/connect/sdk/domain/payment/definitions/customer.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,15 +100,26 @@ def device(self, value):
@property
def fiscal_number(self):
"""
| Fiscal registration number of the customer or the tax registration number of the company for a business customer. Please find below specifics per country:
| The fiscal registration number of the customer or the tax registration number of the company in case of a business customer. Please find below specifics per country:
* Argentina - Consumer (DNI) with a length of 7 or 8 digits
* Argentina - Company (CUIT) with a length of 11 digits
* Brazil - Consumer (CPF) with a length of 11 digits
* Brazil - Company (CNPJ) with a length of 14 digits
* Chile - Consumer (RUT) with a length of 9 digits
* Colombia - Consumer (NIT) with a length of 8, 9 or 10 digits
* Denmark - Consumer (CPR-nummer or personnummer) with a length of 10 digits
* Finland - Consumer (Finnish: henkilötunnus (abbreviated as HETU), Swedish: personbeteckning) with a length of 11 characters
* Dominican Republic - Consumer (RNC) with a length of 11 digits
* Finland - Consumer (Finnish: henkilötunnus (abbreviated as HETU)) with a length of 11 characters
* India - Consumer (PAN) with a length of 10 characters
* Mexico - Consumer (RFC) with a length of 13 digits
* Mexico - Company (RFC) with a length of 12 digits
* Norway - Consumer (fødselsnummer) with a length of 11 digits
* Peru - Consumer (RUC) with a length of 11 digits
* Sweden - Consumer (personnummer) with a length of 10 or 12 digits
* Uruguay - Consumer (CI) with a length of 8 digits
* Uruguay - Consumer (NIE) with a length of 9 digits
* Uruguay - Company (RUT) with a length of 12 digits
Type: str
"""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ class OrderReferences(DataObject):
__invoice_data = None
__merchant_order_id = None
__merchant_reference = None
__provider_id = None
__provider_merchant_id = None

@property
def descriptor(self):
Expand Down Expand Up @@ -102,6 +104,32 @@ def merchant_reference(self):
def merchant_reference(self, value):
self.__merchant_reference = value

@property
def provider_id(self):
"""
| Provides an additional means of reconciliation for Gateway merchants
Type: str
"""
return self.__provider_id

@provider_id.setter
def provider_id(self, value):
self.__provider_id = value

@property
def provider_merchant_id(self):
"""
| Provides an additional means of reconciliation, this is the MerchantId used at the provider
Type: str
"""
return self.__provider_merchant_id

@provider_merchant_id.setter
def provider_merchant_id(self, value):
self.__provider_merchant_id = value

def to_dictionary(self):
dictionary = super(OrderReferences, self).to_dictionary()
if self.descriptor is not None:
Expand All @@ -112,6 +140,10 @@ def to_dictionary(self):
dictionary['merchantOrderId'] = self.merchant_order_id
if self.merchant_reference is not None:
dictionary['merchantReference'] = self.merchant_reference
if self.provider_id is not None:
dictionary['providerId'] = self.provider_id
if self.provider_merchant_id is not None:
dictionary['providerMerchantId'] = self.provider_merchant_id
return dictionary

def from_dictionary(self, dictionary):
Expand All @@ -127,4 +159,8 @@ def from_dictionary(self, dictionary):
self.merchant_order_id = dictionary['merchantOrderId']
if 'merchantReference' in dictionary:
self.merchant_reference = dictionary['merchantReference']
if 'providerId' in dictionary:
self.provider_id = dictionary['providerId']
if 'providerMerchantId' in dictionary:
self.provider_merchant_id = dictionary['providerMerchantId']
return self
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,13 @@
# This class was auto-generated from the API references found at
# https://epayments-api.developer-ingenico.com/s2sapi/v1/
#
from ingenico.connect.sdk.domain.definitions.key_value_pair import KeyValuePair
from ingenico.connect.sdk.domain.definitions.order_status_output import OrderStatusOutput


class PaymentStatusOutput(OrderStatusOutput):

__is_authorized = None
__is_refundable = None
__is_retriable = None
__provider_raw_output = None
__three_d_secure_status = None

@property
Expand Down Expand Up @@ -47,35 +44,6 @@ def is_refundable(self):
def is_refundable(self, value):
self.__is_refundable = value

@property
def is_retriable(self):
"""
| Flag indicating whether a rejected payment may be retried by the merchant without incurring a fee
* true
* false
Type: bool
"""
return self.__is_retriable

@is_retriable.setter
def is_retriable(self, value):
self.__is_retriable = value

@property
def provider_raw_output(self):
"""
| This is the raw response returned by the acquirer. This property contains unprocessed data directly returned by the acquirer. It's recommended for data analysis only due to its dynamic nature, which may undergo future changes.
Type: list[:class:`ingenico.connect.sdk.domain.definitions.key_value_pair.KeyValuePair`]
"""
return self.__provider_raw_output

@provider_raw_output.setter
def provider_raw_output(self, value):
self.__provider_raw_output = value

@property
def three_d_secure_status(self):
"""
Expand Down Expand Up @@ -104,13 +72,6 @@ def to_dictionary(self):
dictionary['isAuthorized'] = self.is_authorized
if self.is_refundable is not None:
dictionary['isRefundable'] = self.is_refundable
if self.is_retriable is not None:
dictionary['isRetriable'] = self.is_retriable
if self.provider_raw_output is not None:
dictionary['providerRawOutput'] = []
for element in self.provider_raw_output:
if element is not None:
dictionary['providerRawOutput'].append(element.to_dictionary())
if self.three_d_secure_status is not None:
dictionary['threeDSecureStatus'] = self.three_d_secure_status
return dictionary
Expand All @@ -121,15 +82,6 @@ def from_dictionary(self, dictionary):
self.is_authorized = dictionary['isAuthorized']
if 'isRefundable' in dictionary:
self.is_refundable = dictionary['isRefundable']
if 'isRetriable' in dictionary:
self.is_retriable = dictionary['isRetriable']
if 'providerRawOutput' in dictionary:
if not isinstance(dictionary['providerRawOutput'], list):
raise TypeError('value \'{}\' is not a list'.format(dictionary['providerRawOutput']))
self.provider_raw_output = []
for element in dictionary['providerRawOutput']:
value = KeyValuePair()
self.provider_raw_output.append(value.from_dictionary(element))
if 'threeDSecureStatus' in dictionary:
self.three_d_secure_status = dictionary['threeDSecureStatus']
return self
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,29 @@

class RefundCardMethodSpecificOutput(RefundMethodSpecificOutput):

__authorisation_code = None

@property
def authorisation_code(self):
"""
| Card Authorization code as returned by the acquirer
Type: str
"""
return self.__authorisation_code

@authorisation_code.setter
def authorisation_code(self, value):
self.__authorisation_code = value

def to_dictionary(self):
dictionary = super(RefundCardMethodSpecificOutput, self).to_dictionary()
if self.authorisation_code is not None:
dictionary['authorisationCode'] = self.authorisation_code
return dictionary

def from_dictionary(self, dictionary):
super(RefundCardMethodSpecificOutput, self).from_dictionary(dictionary)
if 'authorisationCode' in dictionary:
self.authorisation_code = dictionary['authorisationCode']
return self
Loading

0 comments on commit f660d65

Please sign in to comment.