Skip to content

Commit

Permalink
Release 4.2.0.
Browse files Browse the repository at this point in the history
  • Loading branch information
WorldlineConnect committed Oct 31, 2024
1 parent 8c42daf commit 77b2d1f
Show file tree
Hide file tree
Showing 16 changed files with 135 additions and 86 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 = '4.1.0'
version = '4.2.0'
# The full version, including alpha/beta/rc tags.
release = '4.1.0'
release = '4.2.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 v4.1.0'
# html_title = 'Python SDK v4.2.0'

# A shorter title for the navigation bar. Default is the same as html_title.
#
Expand Down
7 changes: 0 additions & 7 deletions index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2501,13 +2501,6 @@ API Reference
:special-members:
:exclude-members: __dict__,__weakref__,__module__,__get__

.. automodule:: worldline.connect.sdk.v1.domain.redirect_payment_product816_specific_input
:members:
:show-inheritance:
:undoc-members:
:special-members:
:exclude-members: __dict__,__weakref__,__module__,__get__

.. automodule:: worldline.connect.sdk.v1.domain.redirect_payment_product840_specific_input
:members:
:show-inheritance:
Expand Down
3 changes: 2 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ def test_collector():

setup(
name="connect-sdk-python3",
version="4.1.0",
version="4.2.0",
author="Worldline Global Collect",
author_email="github.connect@worldline.com",
description="SDK to communicate with the Worldline Global Collect platform using the Worldline Connect Server API",
Expand Down Expand Up @@ -54,6 +54,7 @@ def test_collector():
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Topic :: Office/Business :: Financial",
"License :: OSI Approved :: MIT License"
],
Expand Down
2 changes: 1 addition & 1 deletion worldline/connect/sdk/communication/metadata_provider.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ class MetadataProvider(object):
"""
Provides meta info about the server.
"""
__sdk_version = "4.1.0"
__sdk_version = "4.2.0"
__server_meta_info_header = "X-GCS-ServerMetaInfo"
__prohibited_headers = tuple(sorted([__server_meta_info_header, "X-GCS-Idempotence-Key", "Date", "Content-Type", "Authorization"],
key=str.lower))
Expand Down
2 changes: 1 addition & 1 deletion worldline/connect/sdk/communicator.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ def __init__(self, api_endpoint: Union[str, ParseResult], connection: Connection
raise ValueError("api_endpoint is required")
if isinstance(api_endpoint, str):
api_endpoint = urlparse(api_endpoint)
if not api_endpoint.scheme.lower() in ["http", "https"] or not api_endpoint.netloc:
if api_endpoint.scheme.lower() not in ["http", "https"] or not api_endpoint.netloc:
raise ValueError("invalid api_endpoint: " + str(api_endpoint))
if api_endpoint.path:
raise ValueError("api_endpoint should not contain a path")
Expand Down
2 changes: 1 addition & 1 deletion worldline/connect/sdk/communicator_configuration.py
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ def __create_uri(scheme: str, host: str, port: int) -> ParseResult:
else:
uri = scheme + "://" + host
url = urlparse(uri)
if not url.scheme.lower() in ["http", "https"] or not url.netloc:
if url.scheme.lower() not in ["http", "https"] or not url.netloc:
raise ValueError("Unable to construct endpoint URI")
return url

Expand Down
2 changes: 1 addition & 1 deletion worldline/connect/sdk/v1/domain/card_essentials.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ def card_number(self, value: Optional[str]) -> None:
@property
def cardholder_name(self) -> Optional[str]:
"""
| The card holder's name on the card.
| The card holder's name on the card. Minimum length of 2, maximum length of 51 characters.
Type: str
"""
Expand Down
19 changes: 19 additions & 0 deletions worldline/connect/sdk/v1/domain/company_information.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,24 @@

class CompanyInformation(DataObject):

__date_of_incorporation: Optional[str] = None
__name: Optional[str] = None
__vat_number: Optional[str] = None

@property
def date_of_incorporation(self) -> Optional[str]:
"""
| The date of incorporation is the specific date when the company was registered with the relevant authority.
| Format: YYYYMMDD
Type: str
"""
return self.__date_of_incorporation

@date_of_incorporation.setter
def date_of_incorporation(self, value: Optional[str]) -> None:
self.__date_of_incorporation = value

@property
def name(self) -> Optional[str]:
"""
Expand Down Expand Up @@ -41,6 +56,8 @@ def vat_number(self, value: Optional[str]) -> None:

def to_dictionary(self) -> dict:
dictionary = super(CompanyInformation, self).to_dictionary()
if self.date_of_incorporation is not None:
dictionary['dateOfIncorporation'] = self.date_of_incorporation
if self.name is not None:
dictionary['name'] = self.name
if self.vat_number is not None:
Expand All @@ -49,6 +66,8 @@ def to_dictionary(self) -> dict:

def from_dictionary(self, dictionary: dict) -> 'CompanyInformation':
super(CompanyInformation, self).from_dictionary(dictionary)
if 'dateOfIncorporation' in dictionary:
self.date_of_incorporation = dictionary['dateOfIncorporation']
if 'name' in dictionary:
self.name = dictionary['name']
if 'vatNumber' in dictionary:
Expand Down
2 changes: 1 addition & 1 deletion worldline/connect/sdk/v1/domain/decrypted_payment_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ def auth_method(self, value: Optional[str]) -> None:
@property
def cardholder_name(self) -> Optional[str]:
"""
| Card holder's name on the card.
| The card holder's name on the card. Minimum length of 2, maximum length of 51 characters.
* For Apple Pay, maps to the cardholderName property in the encrypted payment data.
* For Google Pay this is not available in the encrypted payment data, and can be omitted.
Expand Down
3 changes: 3 additions & 0 deletions worldline/connect/sdk/v1/domain/merchant_action.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ def action_type(self) -> Optional[str]:
* SHOW_INSTRUCTIONS - The customer needs to be shown payment instruction using the details found in showData. Alternatively the instructions can be rendered by us using the instructionsRenderingData
* SHOW_TRANSACTION_RESULTS - The customer needs to be shown the transaction results using the details found in showData
* MOBILE_THREEDS_CHALLENGE - The customer needs to complete a challenge as part of the 3D Secure authentication inside your mobile app. The details contained in mobileThreeDSecureChallengeParameters need to be provided to the EMVco certified Mobile SDK as a challengeParameters object.
* INITIALIZE_INAPP_THREED_SECURE_SDK - You need to initialize the 3D in app SDK using the returned parameters. The details contained in mobileThreeDSecureChallengeParameters need to be provided to the EMVco certified Mobile SDK as an initializationParameters object.
* CALL_THIRD_PARTY - The merchant needs to call a third party using the data found in thirdPartyData
Type: str
Expand Down Expand Up @@ -128,6 +129,8 @@ def show_data(self) -> Optional[List[KeyValuePair]]:
* desktopQRCode - contains a QR code that can be used to complete the payment in the WeChat app. In this case, the key QRCODE contains a base64 encoded PNG image. By prepending 'data:image/png;base64,' this value can be used as the source of an HTML inline image on a desktop or tablet (intended to be scanned by a mobile device with the WeChat app).
* urlIntent - contains a URL intent that can be used to complete the payment in the WeChat app. In this case, the key URLINTENT contains a URL intent that can be used as the link of an 'open the app' button on a mobile device.
| For SHOW_FORM, for payment product 740 (PromptPay), this contains a QR code image URL and a timestamp with the expiration date-time of the QR code. In this case, the key QRCODE_IMAGE_URL contains a URL that can be used as the source of an HTML inline image on a desktop. For tablets and mobile devices, it is advised to use the &lt;a&gt; download attribute, so the user can download the image on their device and upload it in their banking mobile application. The key COUNTDOWN_DATETIME, contains a date-time that the QR code will expire. The date-time is in UTC with format: YYYYMMDDHH24MISS. You are advised to show a countdown timer.
Type: list[:class:`worldline.connect.sdk.v1.domain.key_value_pair.KeyValuePair`]
"""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ class MobilePaymentProduct320SpecificInput(DataObject):
@property
def cardholder_name(self) -> Optional[str]:
"""
| The card holder's name on the card.
| The card holder's name on the card. Minimum length of 2, maximum length of 51 characters.
| The encrypted payment data can be found in property paymentMethodData.tokenizationData.info.billingAddress.name of the PaymentData <https://developers.google.com/android/reference/com/google/android/gms/wallet/PaymentData>.toJson() result.
Type: str
Expand Down
100 changes: 100 additions & 0 deletions worldline/connect/sdk/v1/domain/order_type_information.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
class OrderTypeInformation(DataObject):

__funding_type: Optional[str] = None
__payment_code: Optional[str] = None
__purchase_type: Optional[str] = None
__transaction_type: Optional[str] = None
__usage_type: Optional[str] = None
Expand All @@ -37,6 +38,101 @@ def funding_type(self) -> Optional[str]:
def funding_type(self, value: Optional[str]) -> None:
self.__funding_type = value

@property
def payment_code(self) -> Optional[str]:
"""
| Payment code to support account funding transactions. Possible values are:
* accountManagement
* paymentAllowance
* settlementOfAnnuity
* unemploymentDisabilityBenefit
* businessExpenses
* bonusPayment
* busTransportRelatedBusiness
* cashManagementTransfer
* paymentOfCableTVBill
* governmentInstituteIssued
* creditCardPayment
* creditCardBill
* charity
* collectionPayment
* commercialPayment
* commission
* compensation
* copyright
* debitCardPayment
* deposit
* dividend
* studyFees
* electricityBill
* energies
* generalFees
* ferry
* foreignExchange
* gasBill
* unemployedCompensation
* governmentPayment
* healthInsurance
* reimbursementCreditCard
* reimbursementDebitCard
* carInsurancePremium
* insuranceClaim
* installment
* insurancePremium
* investmentPayment
* intraCompany
* interest
* incomeTax
* investment
* laborInsurance
* licenseFree
* lifeInsurance
* loan
* medicalServices
* mobilePersonToBusiness
* mobilePersonToPerson
* mobileTopUp
* notSpecified
* other
* anotherTelecomBill
* payroll
* pensionFundContribution
* pensionPayment
* telephoneBill
* propertyInsurance
* generalLease
* rent
* railwayPayment
* royalties
* salary
* savingsPayment
* securities
* socialSecurity
* study
* subscription
* supplierPayment
* taxRefund
* taxPayment
* telecommunicationsBill
* tradeServices
* treasuryPayment
* travelPayment
* utilityBill
* valueAddedTaxPayment
* withHolding
* waterBill
| .
Type: str
"""
return self.__payment_code

@payment_code.setter
def payment_code(self, value: Optional[str]) -> None:
self.__payment_code = value

@property
def purchase_type(self) -> Optional[str]:
"""
Expand Down Expand Up @@ -92,6 +188,8 @@ def to_dictionary(self) -> dict:
dictionary = super(OrderTypeInformation, self).to_dictionary()
if self.funding_type is not None:
dictionary['fundingType'] = self.funding_type
if self.payment_code is not None:
dictionary['paymentCode'] = self.payment_code
if self.purchase_type is not None:
dictionary['purchaseType'] = self.purchase_type
if self.transaction_type is not None:
Expand All @@ -104,6 +202,8 @@ def from_dictionary(self, dictionary: dict) -> 'OrderTypeInformation':
super(OrderTypeInformation, self).from_dictionary(dictionary)
if 'fundingType' in dictionary:
self.funding_type = dictionary['fundingType']
if 'paymentCode' in dictionary:
self.payment_code = dictionary['paymentCode']
if 'purchaseType' in dictionary:
self.purchase_type = dictionary['purchaseType']
if 'transactionType' in dictionary:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
from worldline.connect.sdk.v1.domain.abstract_redirect_payment_method_specific_input import AbstractRedirectPaymentMethodSpecificInput
from worldline.connect.sdk.v1.domain.redirect_payment_product4101_specific_input import RedirectPaymentProduct4101SpecificInput
from worldline.connect.sdk.v1.domain.redirect_payment_product809_specific_input import RedirectPaymentProduct809SpecificInput
from worldline.connect.sdk.v1.domain.redirect_payment_product816_specific_input import RedirectPaymentProduct816SpecificInput
from worldline.connect.sdk.v1.domain.redirect_payment_product840_specific_input import RedirectPaymentProduct840SpecificInput
from worldline.connect.sdk.v1.domain.redirect_payment_product861_specific_input import RedirectPaymentProduct861SpecificInput
from worldline.connect.sdk.v1.domain.redirect_payment_product863_specific_input import RedirectPaymentProduct863SpecificInput
Expand All @@ -22,7 +21,6 @@ class RedirectPaymentMethodSpecificInput(AbstractRedirectPaymentMethodSpecificIn
__is_recurring: Optional[bool] = None
__payment_product4101_specific_input: Optional[RedirectPaymentProduct4101SpecificInput] = None
__payment_product809_specific_input: Optional[RedirectPaymentProduct809SpecificInput] = None
__payment_product816_specific_input: Optional[RedirectPaymentProduct816SpecificInput] = None
__payment_product840_specific_input: Optional[RedirectPaymentProduct840SpecificInput] = None
__payment_product861_specific_input: Optional[RedirectPaymentProduct861SpecificInput] = None
__payment_product863_specific_input: Optional[RedirectPaymentProduct863SpecificInput] = None
Expand Down Expand Up @@ -71,19 +69,6 @@ def payment_product809_specific_input(self) -> Optional[RedirectPaymentProduct80
def payment_product809_specific_input(self, value: Optional[RedirectPaymentProduct809SpecificInput]) -> None:
self.__payment_product809_specific_input = value

@property
def payment_product816_specific_input(self) -> Optional[RedirectPaymentProduct816SpecificInput]:
"""
| Object containing specific input required for German giropay payments (Payment product ID 816)
Type: :class:`worldline.connect.sdk.v1.domain.redirect_payment_product816_specific_input.RedirectPaymentProduct816SpecificInput`
"""
return self.__payment_product816_specific_input

@payment_product816_specific_input.setter
def payment_product816_specific_input(self, value: Optional[RedirectPaymentProduct816SpecificInput]) -> None:
self.__payment_product816_specific_input = value

@property
def payment_product840_specific_input(self) -> Optional[RedirectPaymentProduct840SpecificInput]:
"""
Expand Down Expand Up @@ -187,8 +172,6 @@ def to_dictionary(self) -> dict:
dictionary['paymentProduct4101SpecificInput'] = self.payment_product4101_specific_input.to_dictionary()
if self.payment_product809_specific_input is not None:
dictionary['paymentProduct809SpecificInput'] = self.payment_product809_specific_input.to_dictionary()
if self.payment_product816_specific_input is not None:
dictionary['paymentProduct816SpecificInput'] = self.payment_product816_specific_input.to_dictionary()
if self.payment_product840_specific_input is not None:
dictionary['paymentProduct840SpecificInput'] = self.payment_product840_specific_input.to_dictionary()
if self.payment_product861_specific_input is not None:
Expand Down Expand Up @@ -219,11 +202,6 @@ def from_dictionary(self, dictionary: dict) -> 'RedirectPaymentMethodSpecificInp
raise TypeError('value \'{}\' is not a dictionary'.format(dictionary['paymentProduct809SpecificInput']))
value = RedirectPaymentProduct809SpecificInput()
self.payment_product809_specific_input = value.from_dictionary(dictionary['paymentProduct809SpecificInput'])
if 'paymentProduct816SpecificInput' in dictionary:
if not isinstance(dictionary['paymentProduct816SpecificInput'], dict):
raise TypeError('value \'{}\' is not a dictionary'.format(dictionary['paymentProduct816SpecificInput']))
value = RedirectPaymentProduct816SpecificInput()
self.payment_product816_specific_input = value.from_dictionary(dictionary['paymentProduct816SpecificInput'])
if 'paymentProduct840SpecificInput' in dictionary:
if not isinstance(dictionary['paymentProduct840SpecificInput'], dict):
raise TypeError('value \'{}\' is not a dictionary'.format(dictionary['paymentProduct840SpecificInput']))
Expand Down

This file was deleted.

Loading

0 comments on commit 77b2d1f

Please sign in to comment.