diff --git a/.github/workflows/generate-release-tag.yml b/.github/workflows/generate-release-tag.yml index 344dada4..4e095204 100644 --- a/.github/workflows/generate-release-tag.yml +++ b/.github/workflows/generate-release-tag.yml @@ -12,7 +12,7 @@ jobs: id: parse-changelog run: | echo "changelog<> "$GITHUB_OUTPUT" - echo "${{ github.event.client_payload.changelog }}" | tr -s '%0A' '\n' >> "$GITHUB_OUTPUT" + echo "${{ github.event.client_payload.changelog }}" | sed -e 's/%0A/\n/g' >> "$GITHUB_OUTPUT" echo "EOF" >> "$GITHUB_OUTPUT" - name: Create Release id: create-release @@ -20,8 +20,8 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.REPO_ACCESS_TOKEN }} with: - tag_name: v${{ github.event.client_payload.version }} - release_name: v${{ github.event.client_payload.version }} + tag_name: ${{ github.event.client_payload.version }} + release_name: ${{ github.event.client_payload.version }} body: ${{ steps.parse-changelog.outputs.changelog }} draft: false prerelease: false \ No newline at end of file diff --git a/.openapi-generator/FILES b/.openapi-generator/FILES index a2cb18b1..409bafc6 100644 --- a/.openapi-generator/FILES +++ b/.openapi-generator/FILES @@ -3,121 +3,121 @@ .gitignore LICENSE README.md -docs/Capture.md -docs/CaptureList.md -docs/CaptureListResponse.md -docs/CaptureParameters.md +docs/BillingInformation.md docs/Card.md docs/CardChannelProperties.md -docs/CardInformation.md +docs/CardParameters.md +docs/CardParametersCardInformation.md docs/CardVerificationResults.md docs/CardVerificationResultsThreeDSecure.md +docs/ChannelAmountLimits.md +docs/ChannelAmountLimitsAllOf.md +docs/ChannelProperty.md +docs/ChannelPropertyAllOf.md +docs/CreatePaymentMethod409Response.md +docs/CreatePaymentMethod503Response.md docs/DirectDebit.md docs/DirectDebitAllOf.md docs/DirectDebitBankAccount.md docs/DirectDebitChannelCode.md docs/DirectDebitChannelProperties.md -docs/DirectDebitChannelPropertiesBankAccount.md -docs/DirectDebitChannelPropertiesBankRedirect.md -docs/DirectDebitChannelPropertiesDebitCard.md docs/DirectDebitDebitCard.md docs/DirectDebitParameters.md docs/DirectDebitType.md docs/EWallet.md docs/EWalletAccount.md -docs/EWalletAllOf.md docs/EWalletChannelCode.md docs/EWalletChannelProperties.md docs/EWalletParameters.md -docs/Error.md +docs/GetAllPaymentMethods400Response.md +docs/GetAllPaymentMethods403Response.md +docs/GetAllPaymentMethods404Response.md +docs/GetAllPaymentMethodsDefaultResponse.md docs/OverTheCounter.md docs/OverTheCounterChannelCode.md docs/OverTheCounterChannelProperties.md +docs/OverTheCounterChannelPropertiesUpdate.md docs/OverTheCounterParameters.md +docs/OverTheCounterUpdateParameters.md +docs/PaymentChannel.md +docs/PaymentChannelAllOf.md +docs/PaymentChannelList.md +docs/PaymentChannelListLinksInner.md +docs/PaymentChannelListLinksInnerAllOf.md docs/PaymentMethod.md +docs/PaymentMethodAction.md +docs/PaymentMethodApi.md +docs/PaymentMethodAuthParameters.md +docs/PaymentMethodCountry.md +docs/PaymentMethodExpireParameters.md +docs/PaymentMethodList.md docs/PaymentMethodParameters.md docs/PaymentMethodReusability.md docs/PaymentMethodStatus.md docs/PaymentMethodType.md -docs/PaymentRequest.md -docs/PaymentRequestAction.md -docs/PaymentRequestApi.md -docs/PaymentRequestAuthParameters.md -docs/PaymentRequestBasket.md -docs/PaymentRequestBasketItem.md -docs/PaymentRequestCaptureMethod.md -docs/PaymentRequestCardVerificationResults.md -docs/PaymentRequestCardVerificationResultsThreeDeeSecure.md -docs/PaymentRequestChannelProperties.md -docs/PaymentRequestCountry.md -docs/PaymentRequestCurrency.md -docs/PaymentRequestInitiator.md -docs/PaymentRequestListResponse.md -docs/PaymentRequestParameters.md -docs/PaymentRequestParametersChannelProperties.md -docs/PaymentRequestParametersChannelPropertiesAllOf.md -docs/PaymentRequestShippingInformation.md -docs/PaymentRequestStatus.md +docs/PaymentMethodUpdateParameters.md docs/QRCode.md docs/QRCodeChannelCode.md docs/QRCodeChannelProperties.md docs/QRCodeParameters.md +docs/SimulatePaymentRequest.md +docs/TokenizedCardInformation.md docs/VirtualAccount.md docs/VirtualAccountAllOf.md docs/VirtualAccountAlternativeDisplay.md docs/VirtualAccountChannelCode.md docs/VirtualAccountChannelProperties.md +docs/VirtualAccountChannelPropertiesPatch.md docs/VirtualAccountParameters.md +docs/VirtualAccountUpdateParameters.md docs/header.jpg requirements.txt setup.cfg setup.py test-requirements.txt test/__init__.py -test/test_capture.py -test/test_capture_list.py -test/test_capture_list_response.py -test/test_capture_parameters.py -test/test_card_information.py -test/test_direct_debit_all_of.py -test/test_direct_debit_bank_account.py -test/test_direct_debit_channel_code.py -test/test_direct_debit_channel_properties.py -test/test_direct_debit_channel_properties_bank_account.py -test/test_direct_debit_channel_properties_bank_redirect.py -test/test_direct_debit_channel_properties_debit_card.py -test/test_e_wallet_all_of.py -test/test_error.py -test/test_over_the_counter.py -test/test_over_the_counter_channel_code.py -test/test_over_the_counter_channel_properties.py -test/test_over_the_counter_parameters.py -test/test_payment_method.py -test/test_payment_method_parameters.py -test/test_payment_method_reusability.py -test/test_payment_method_status.py -test/test_payment_method_type.py -test/test_payment_request.py -test/test_payment_request_action.py -test/test_payment_request_api.py -test/test_payment_request_auth_parameters.py -test/test_payment_request_basket.py -test/test_payment_request_basket_item.py -test/test_payment_request_capture_method.py -test/test_payment_request_card_verification_results.py -test/test_payment_request_card_verification_results_three_dee_secure.py -test/test_payment_request_channel_properties.py -test/test_payment_request_country.py -test/test_payment_request_currency.py -test/test_payment_request_initiator.py -test/test_payment_request_list_response.py -test/test_payment_request_parameters.py -test/test_payment_request_parameters_channel_properties.py -test/test_payment_request_parameters_channel_properties_all_of.py -test/test_payment_request_shipping_information.py -test/test_payment_request_status.py -tmp/payment_request.api.py -tmp/payment_request.model.py +test/test_billing_information.py +test/test_card.py +test/test_card_channel_properties.py +test/test_card_parameters.py +test/test_card_parameters_card_information.py +test/test_card_verification_results_three_d_secure.py +test/test_channel_amount_limits.py +test/test_channel_amount_limits_all_of.py +test/test_channel_property.py +test/test_channel_property_all_of.py +test/test_create_payment_method409_response.py +test/test_create_payment_method503_response.py +test/test_e_wallet_channel_code.py +test/test_e_wallet_channel_properties.py +test/test_e_wallet_parameters.py +test/test_get_all_payment_methods400_response.py +test/test_get_all_payment_methods403_response.py +test/test_get_all_payment_methods404_response.py +test/test_get_all_payment_methods_default_response.py +test/test_over_the_counter_channel_properties_update.py +test/test_over_the_counter_update_parameters.py +test/test_payment_channel.py +test/test_payment_channel_all_of.py +test/test_payment_channel_list.py +test/test_payment_channel_list_links_inner.py +test/test_payment_channel_list_links_inner_all_of.py +test/test_payment_method_action.py +test/test_payment_method_api.py +test/test_payment_method_auth_parameters.py +test/test_payment_method_country.py +test/test_payment_method_expire_parameters.py +test/test_payment_method_list.py +test/test_payment_method_update_parameters.py +test/test_qr_code_channel_code.py +test/test_qr_code_channel_properties.py +test/test_qr_code_parameters.py +test/test_simulate_payment_request.py +test/test_tokenized_card_information.py +test/test_virtual_account_channel_properties_patch.py +test/test_virtual_account_update_parameters.py +tmp/payment_method.api.py +tmp/payment_method.model.py tox.ini xendit/__init__.py xendit/api_client.py @@ -126,71 +126,73 @@ xendit/configuration.py xendit/exceptions.py xendit/model_utils.py xendit/models/__init__.py -xendit/payment_request/__init__.py -xendit/payment_request/model/__init__.py -xendit/payment_request/model/capture.py -xendit/payment_request/model/capture_list.py -xendit/payment_request/model/capture_list_response.py -xendit/payment_request/model/capture_parameters.py -xendit/payment_request/model/card.py -xendit/payment_request/model/card_channel_properties.py -xendit/payment_request/model/card_information.py -xendit/payment_request/model/card_verification_results.py -xendit/payment_request/model/card_verification_results_three_d_secure.py -xendit/payment_request/model/direct_debit.py -xendit/payment_request/model/direct_debit_all_of.py -xendit/payment_request/model/direct_debit_bank_account.py -xendit/payment_request/model/direct_debit_channel_code.py -xendit/payment_request/model/direct_debit_channel_properties.py -xendit/payment_request/model/direct_debit_channel_properties_bank_account.py -xendit/payment_request/model/direct_debit_channel_properties_bank_redirect.py -xendit/payment_request/model/direct_debit_channel_properties_debit_card.py -xendit/payment_request/model/direct_debit_debit_card.py -xendit/payment_request/model/direct_debit_parameters.py -xendit/payment_request/model/direct_debit_type.py -xendit/payment_request/model/e_wallet.py -xendit/payment_request/model/e_wallet_account.py -xendit/payment_request/model/e_wallet_all_of.py -xendit/payment_request/model/e_wallet_channel_code.py -xendit/payment_request/model/e_wallet_channel_properties.py -xendit/payment_request/model/e_wallet_parameters.py -xendit/payment_request/model/error.py -xendit/payment_request/model/over_the_counter.py -xendit/payment_request/model/over_the_counter_channel_code.py -xendit/payment_request/model/over_the_counter_channel_properties.py -xendit/payment_request/model/over_the_counter_parameters.py -xendit/payment_request/model/payment_method.py -xendit/payment_request/model/payment_method_parameters.py -xendit/payment_request/model/payment_method_reusability.py -xendit/payment_request/model/payment_method_status.py -xendit/payment_request/model/payment_method_type.py -xendit/payment_request/model/payment_request.py -xendit/payment_request/model/payment_request_action.py -xendit/payment_request/model/payment_request_auth_parameters.py -xendit/payment_request/model/payment_request_basket.py -xendit/payment_request/model/payment_request_basket_item.py -xendit/payment_request/model/payment_request_capture_method.py -xendit/payment_request/model/payment_request_card_verification_results.py -xendit/payment_request/model/payment_request_card_verification_results_three_dee_secure.py -xendit/payment_request/model/payment_request_channel_properties.py -xendit/payment_request/model/payment_request_country.py -xendit/payment_request/model/payment_request_currency.py -xendit/payment_request/model/payment_request_initiator.py -xendit/payment_request/model/payment_request_list_response.py -xendit/payment_request/model/payment_request_parameters.py -xendit/payment_request/model/payment_request_parameters_channel_properties.py -xendit/payment_request/model/payment_request_parameters_channel_properties_all_of.py -xendit/payment_request/model/payment_request_shipping_information.py -xendit/payment_request/model/payment_request_status.py -xendit/payment_request/model/qr_code.py -xendit/payment_request/model/qr_code_channel_code.py -xendit/payment_request/model/qr_code_channel_properties.py -xendit/payment_request/model/qr_code_parameters.py -xendit/payment_request/model/virtual_account.py -xendit/payment_request/model/virtual_account_all_of.py -xendit/payment_request/model/virtual_account_alternative_display.py -xendit/payment_request/model/virtual_account_channel_code.py -xendit/payment_request/model/virtual_account_channel_properties.py -xendit/payment_request/model/virtual_account_parameters.py -xendit/payment_request/payment_request_api.py +xendit/payment_method/__init__.py +xendit/payment_method/model/__init__.py +xendit/payment_method/model/billing_information.py +xendit/payment_method/model/card.py +xendit/payment_method/model/card_channel_properties.py +xendit/payment_method/model/card_parameters.py +xendit/payment_method/model/card_parameters_card_information.py +xendit/payment_method/model/card_verification_results.py +xendit/payment_method/model/card_verification_results_three_d_secure.py +xendit/payment_method/model/channel_amount_limits.py +xendit/payment_method/model/channel_amount_limits_all_of.py +xendit/payment_method/model/channel_property.py +xendit/payment_method/model/channel_property_all_of.py +xendit/payment_method/model/create_payment_method409_response.py +xendit/payment_method/model/create_payment_method503_response.py +xendit/payment_method/model/direct_debit.py +xendit/payment_method/model/direct_debit_all_of.py +xendit/payment_method/model/direct_debit_bank_account.py +xendit/payment_method/model/direct_debit_channel_code.py +xendit/payment_method/model/direct_debit_channel_properties.py +xendit/payment_method/model/direct_debit_debit_card.py +xendit/payment_method/model/direct_debit_parameters.py +xendit/payment_method/model/direct_debit_type.py +xendit/payment_method/model/e_wallet.py +xendit/payment_method/model/e_wallet_account.py +xendit/payment_method/model/e_wallet_channel_code.py +xendit/payment_method/model/e_wallet_channel_properties.py +xendit/payment_method/model/e_wallet_parameters.py +xendit/payment_method/model/get_all_payment_methods400_response.py +xendit/payment_method/model/get_all_payment_methods403_response.py +xendit/payment_method/model/get_all_payment_methods404_response.py +xendit/payment_method/model/get_all_payment_methods_default_response.py +xendit/payment_method/model/over_the_counter.py +xendit/payment_method/model/over_the_counter_channel_code.py +xendit/payment_method/model/over_the_counter_channel_properties.py +xendit/payment_method/model/over_the_counter_channel_properties_update.py +xendit/payment_method/model/over_the_counter_parameters.py +xendit/payment_method/model/over_the_counter_update_parameters.py +xendit/payment_method/model/payment_channel.py +xendit/payment_method/model/payment_channel_all_of.py +xendit/payment_method/model/payment_channel_list.py +xendit/payment_method/model/payment_channel_list_links_inner.py +xendit/payment_method/model/payment_channel_list_links_inner_all_of.py +xendit/payment_method/model/payment_method.py +xendit/payment_method/model/payment_method_action.py +xendit/payment_method/model/payment_method_auth_parameters.py +xendit/payment_method/model/payment_method_country.py +xendit/payment_method/model/payment_method_expire_parameters.py +xendit/payment_method/model/payment_method_list.py +xendit/payment_method/model/payment_method_parameters.py +xendit/payment_method/model/payment_method_reusability.py +xendit/payment_method/model/payment_method_status.py +xendit/payment_method/model/payment_method_type.py +xendit/payment_method/model/payment_method_update_parameters.py +xendit/payment_method/model/qr_code.py +xendit/payment_method/model/qr_code_channel_code.py +xendit/payment_method/model/qr_code_channel_properties.py +xendit/payment_method/model/qr_code_parameters.py +xendit/payment_method/model/simulate_payment_request.py +xendit/payment_method/model/tokenized_card_information.py +xendit/payment_method/model/virtual_account.py +xendit/payment_method/model/virtual_account_all_of.py +xendit/payment_method/model/virtual_account_alternative_display.py +xendit/payment_method/model/virtual_account_channel_code.py +xendit/payment_method/model/virtual_account_channel_properties.py +xendit/payment_method/model/virtual_account_channel_properties_patch.py +xendit/payment_method/model/virtual_account_parameters.py +xendit/payment_method/model/virtual_account_update_parameters.py +xendit/payment_method/payment_method_api.py xendit/rest.py diff --git a/README.md b/README.md index 04f37de2..59f0a3db 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@ The official Xendit Python SDK provides a simple and convenient way to call Xendit's REST API in applications written in Python. -* Package version: 3.1.0 +* Package version: 3.2.0 ## Requirements. @@ -58,7 +58,7 @@ client = xendit.ApiClient() try: response = BalancesApi(client).get_balance('CASH') pprint(response) -except xendit.ApiException as e: +except xendit.XenditSdkException as e: print("Exception when calling BalancesApi->get_balance: %s\n" % e) ``` diff --git a/docs/BalanceApi.md b/docs/BalanceApi.md index c1e407a9..084c34db 100644 --- a/docs/BalanceApi.md +++ b/docs/BalanceApi.md @@ -41,7 +41,7 @@ try: # Retrieves balances for a business, default to CASH type api_response = api_instance.get_balance(account_type=account_type, currency=currency, for_user_id=for_user_id) pprint(api_response) -except xendit.ApiException as e: +except xendit.XenditSdkException as e: print("Exception when calling BalanceApi->get_balance: %s\n" % e) ``` diff --git a/docs/BankCode.md b/docs/BankCode.md index f2d248ad..6d7e6a5f 100644 --- a/docs/BankCode.md +++ b/docs/BankCode.md @@ -5,7 +5,7 @@ Representing the available bank channels used for invoice-related transactions. ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**value** | **str** | Representing the available bank channels used for invoice-related transactions. | must be one of ["BCA", "BNI", "BRI", "MANDIRI", "PERMATA", "BSI", "BJB", ] +**value** | **str** | Representing the available bank channels used for invoice-related transactions. | must be one of ["BCA", "BNI", "BRI", "MANDIRI", "PERMATA", "BSI", "BJB", "SAHABAT_SAMPOERNA", "CIMB", "BNC", ] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/CardVerificationResults.md b/docs/CardVerificationResults.md index 7a74dae4..e1e3ea3c 100644 --- a/docs/CardVerificationResults.md +++ b/docs/CardVerificationResults.md @@ -1,10 +1,10 @@ -# xendit.payment_request.model.CardVerificationResults +# xendit.payment_method.model.CardVerificationResults ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**three_d_secure** | [**CardVerificationResultsThreeDSecure**](CardVerificationResultsThreeDSecure.md) | | [optional] +**three_d_secure** | [**CardVerificationResultsThreeDSecure**](CardVerificationResultsThreeDSecure.md) | | **cvv_result** | **str, none_type** | | [optional] **address_verification_result** | **str, none_type** | | [optional] diff --git a/docs/DirectDebitDebitCard.md b/docs/DirectDebitDebitCard.md index 46223137..f1ab04cf 100644 --- a/docs/DirectDebitDebitCard.md +++ b/docs/DirectDebitDebitCard.md @@ -1,11 +1,10 @@ -# xendit.payment_request.model.DirectDebitDebitCard +# xendit.payment_method.model.DirectDebitDebitCard ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **mobile_number** | **str, none_type** | Mobile number of the customer registered to the partner channel | [optional] -**account_number** | **str** | | [optional] **card_last_four** | **str, none_type** | Last four digits of the debit card | [optional] **card_expiry** | **str, none_type** | Expiry month and year of the debit card (in MM/YY format) | [optional] **email** | **str, none_type** | Email address of the customer that is registered to the partner channel | [optional] diff --git a/docs/EWallet.md b/docs/EWallet.md index a33aaeca..ab1121fa 100644 --- a/docs/EWallet.md +++ b/docs/EWallet.md @@ -1,11 +1,11 @@ -# xendit.payment_request.model.EWallet +# xendit.payment_method.model.EWallet Ewallet Payment Method Details ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**channel_code** | [**EWalletChannelCode**](EWalletChannelCode.md) | | [optional] +**channel_code** | [**EWalletChannelCode**](EWalletChannelCode.md) | | **channel_properties** | [**EWalletChannelProperties**](EWalletChannelProperties.md) | | [optional] **account** | [**EWalletAccount**](EWalletAccount.md) | | [optional] diff --git a/docs/EWalletAccount.md b/docs/EWalletAccount.md index 7422a70f..060dbf3a 100644 --- a/docs/EWalletAccount.md +++ b/docs/EWalletAccount.md @@ -1,4 +1,4 @@ -# xendit.payment_request.model.EWalletAccount +# xendit.payment_method.model.EWalletAccount EWallet Account Properties diff --git a/docs/EWalletChannelProperties.md b/docs/EWalletChannelProperties.md index ecc561a3..4a12bef5 100644 --- a/docs/EWalletChannelProperties.md +++ b/docs/EWalletChannelProperties.md @@ -1,6 +1,6 @@ -# xendit.payment_request.model.EWalletChannelProperties +# xendit.payment_method.model.EWalletChannelProperties -Ewallet Channel Properties +EWallet Channel Properties ## Properties Name | Type | Description | Notes @@ -8,9 +8,9 @@ Name | Type | Description | Notes **success_return_url** | **str** | URL where the end-customer is redirected if the authorization is successful | [optional] **failure_return_url** | **str** | URL where the end-customer is redirected if the authorization failed | [optional] **cancel_return_url** | **str** | URL where the end-customer is redirected if the authorization cancelled | [optional] +**mobile_number** | **str** | Mobile number of customer in E.164 format (e.g. +628123123123). For OVO one time payment use only. | [optional] **redeem_points** | **str** | REDEEM_NONE will not use any point, REDEEM_ALL will use all available points before cash balance is used. For OVO and ShopeePay tokenized payment use only. | [optional] -**mobilenumber** | **str** | | [optional] -**cashtag** | **str** | | [optional] +**cashtag** | **str** | Available for JENIUSPAY only | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/EwalletType.md b/docs/EwalletType.md index 7dcf0599..0364be7e 100644 --- a/docs/EwalletType.md +++ b/docs/EwalletType.md @@ -5,7 +5,7 @@ Representing the available eWallet channels used for invoice-related transaction ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**value** | **str** | Representing the available eWallet channels used for invoice-related transactions. | must be one of ["OVO", "DANA", "LINKAJA", "PAYMAYA", "SHOPEEPAY", "GCASH", "GRABPAY", ] +**value** | **str** | Representing the available eWallet channels used for invoice-related transactions. | must be one of ["OVO", "DANA", "LINKAJA", "PAYMAYA", "SHOPEEPAY", "GCASH", "GRABPAY", "ASTRAPAY", "NEXCASH", "JENIUSPAY", ] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/InvoiceApi.md b/docs/InvoiceApi.md index d0eb34db..ce332920 100644 --- a/docs/InvoiceApi.md +++ b/docs/InvoiceApi.md @@ -114,7 +114,7 @@ try: # Create an invoice api_response = api_instance.create_invoice(create_invoice_request) pprint(api_response) -except xendit.ApiException as e: +except xendit.XenditSdkException as e: print("Exception when calling InvoiceApi->create_invoice: %s\n" % e) ``` @@ -174,7 +174,7 @@ try: # Manually expire an invoice api_response = api_instance.expire_invoice(invoice_id) pprint(api_response) -except xendit.ApiException as e: +except xendit.XenditSdkException as e: print("Exception when calling InvoiceApi->expire_invoice: %s\n" % e) ``` @@ -233,7 +233,7 @@ try: # Get invoice by invoice id api_response = api_instance.get_invoice_by_id(invoice_id) pprint(api_response) -except xendit.ApiException as e: +except xendit.XenditSdkException as e: print("Exception when calling InvoiceApi->get_invoice_by_id: %s\n" % e) ``` @@ -294,7 +294,7 @@ try: # Get all Invoices api_response = api_instance.get_invoices(external_id=external_id, statuses=statuses, limit=limit, created_after=created_after, created_before=created_before, paid_after=paid_after, paid_before=paid_before, expired_after=expired_after, expired_before=expired_before, last_invoice=last_invoice, client_types=client_types, payment_channels=payment_channels, on_demand_link=on_demand_link, recurring_payment_id=recurring_payment_id) pprint(api_response) -except xendit.ApiException as e: +except xendit.XenditSdkException as e: print("Exception when calling InvoiceApi->get_invoices: %s\n" % e) ``` diff --git a/docs/InvoiceCurrency.md b/docs/InvoiceCurrency.md index 3aff7d52..4fa65ce6 100644 --- a/docs/InvoiceCurrency.md +++ b/docs/InvoiceCurrency.md @@ -5,7 +5,7 @@ Representing the currency used for an invoice. ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**value** | **str** | Representing the currency used for an invoice. | must be one of ["IDR", "USD", "PHP", ] +**value** | **str** | Representing the currency used for an invoice. | must be one of ["IDR", "USD", "THB", "VND", "PHP", ] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/OverTheCounter.md b/docs/OverTheCounter.md index 15abf680..f195e987 100644 --- a/docs/OverTheCounter.md +++ b/docs/OverTheCounter.md @@ -1,6 +1,6 @@ -# xendit.payment_request.model.OverTheCounter +# xendit.payment_method.model.OverTheCounter -Over the Counter Payment Method Details +Over The Counter Payment Method Details ## Properties Name | Type | Description | Notes @@ -8,7 +8,7 @@ Name | Type | Description | Notes **channel_code** | [**OverTheCounterChannelCode**](OverTheCounterChannelCode.md) | | **channel_properties** | [**OverTheCounterChannelProperties**](OverTheCounterChannelProperties.md) | | **amount** | **float, none_type** | | [optional] -**currency** | [**PaymentRequestCurrency**](PaymentRequestCurrency.md) | | [optional] +**currency** | **str** | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/PaymentMethodApi.md b/docs/PaymentMethodApi.md index 0fdf1d5f..c8ca86b6 100644 --- a/docs/PaymentMethodApi.md +++ b/docs/PaymentMethodApi.md @@ -54,7 +54,7 @@ try: # Validate a payment method's linking OTP api_response = api_instance.auth_payment_method(payment_method_id) pprint(api_response) -except xendit.ApiException as e: +except xendit.XenditSdkException as e: print("Exception when calling PaymentMethodApi->auth_payment_method: %s\n" % e) # example passing only required values which don't have defaults set @@ -63,7 +63,7 @@ try: # Validate a payment method's linking OTP api_response = api_instance.auth_payment_method(payment_method_id, payment_method_auth_parameters=payment_method_auth_parameters) pprint(api_response) -except xendit.ApiException as e: +except xendit.XenditSdkException as e: print("Exception when calling PaymentMethodApi->auth_payment_method: %s\n" % e) ``` @@ -133,7 +133,7 @@ try: # Creates payment method api_response = api_instance.create_payment_method(payment_method_parameters=payment_method_parameters) pprint(api_response) -except xendit.ApiException as e: +except xendit.XenditSdkException as e: print("Exception when calling PaymentMethodApi->create_payment_method: %s\n" % e) ``` @@ -201,7 +201,7 @@ try: # Expires a payment method api_response = api_instance.expire_payment_method(payment_method_id) pprint(api_response) -except xendit.ApiException as e: +except xendit.XenditSdkException as e: print("Exception when calling PaymentMethodApi->expire_payment_method: %s\n" % e) # example passing only required values which don't have defaults set @@ -210,7 +210,7 @@ try: # Expires a payment method api_response = api_instance.expire_payment_method(payment_method_id, payment_method_expire_parameters=payment_method_expire_parameters) pprint(api_response) -except xendit.ApiException as e: +except xendit.XenditSdkException as e: print("Exception when calling PaymentMethodApi->expire_payment_method: %s\n" % e) ``` @@ -275,7 +275,7 @@ try: # Get all payment channels api_response = api_instance.get_all_payment_channels(is_activated=is_activated, type=type) pprint(api_response) -except xendit.ApiException as e: +except xendit.XenditSdkException as e: print("Exception when calling PaymentMethodApi->get_all_payment_channels: %s\n" % e) ``` @@ -341,7 +341,7 @@ try: # Get all payment methods by filters api_response = api_instance.get_all_payment_methods(id=id, type=type, status=status, reusability=reusability, customer_id=customer_id, reference_id=reference_id, after_id=after_id, before_id=before_id, limit=limit) pprint(api_response) -except xendit.ApiException as e: +except xendit.XenditSdkException as e: print("Exception when calling PaymentMethodApi->get_all_payment_methods: %s\n" % e) ``` @@ -413,7 +413,7 @@ try: # Get payment method by ID api_response = api_instance.get_payment_method_by_id(payment_method_id) pprint(api_response) -except xendit.ApiException as e: +except xendit.XenditSdkException as e: print("Exception when calling PaymentMethodApi->get_payment_method_by_id: %s\n" % e) ``` @@ -478,7 +478,7 @@ try: # Returns payments with matching PaymentMethodID. api_response = api_instance.get_payments_by_payment_method_id(payment_method_id) pprint(api_response) -except xendit.ApiException as e: +except xendit.XenditSdkException as e: print("Exception when calling PaymentMethodApi->get_payments_by_payment_method_id: %s\n" % e) # example passing only required values which don't have defaults set @@ -487,7 +487,7 @@ try: # Returns payments with matching PaymentMethodID. api_response = api_instance.get_payments_by_payment_method_id(payment_method_id, payment_request_id=payment_request_id, payment_method_id2=payment_method_id2, reference_id=reference_id, payment_method_type=payment_method_type, channel_code=channel_code, status=status, currency=currency, created_gte=created_gte, created_lte=created_lte, updated_gte=updated_gte, updated_lte=updated_lte, limit=limit) pprint(api_response) -except xendit.ApiException as e: +except xendit.XenditSdkException as e: print("Exception when calling PaymentMethodApi->get_payments_by_payment_method_id: %s\n" % e) ``` @@ -565,7 +565,7 @@ try: # Patch payment methods api_response = api_instance.patch_payment_method(payment_method_id) pprint(api_response) -except xendit.ApiException as e: +except xendit.XenditSdkException as e: print("Exception when calling PaymentMethodApi->patch_payment_method: %s\n" % e) # example passing only required values which don't have defaults set @@ -574,7 +574,7 @@ try: # Patch payment methods api_response = api_instance.patch_payment_method(payment_method_id, payment_method_update_parameters=payment_method_update_parameters) pprint(api_response) -except xendit.ApiException as e: +except xendit.XenditSdkException as e: print("Exception when calling PaymentMethodApi->patch_payment_method: %s\n" % e) ``` @@ -639,7 +639,7 @@ payment_method_id = "pm-1fdaf346-dd2e-4b6c-b938-124c7167a822" # str | try: # Makes payment with matching PaymentMethodID. api_instance.simulate_payment(payment_method_id) -except xendit.ApiException as e: +except xendit.XenditSdkException as e: print("Exception when calling PaymentMethodApi->simulate_payment: %s\n" % e) # example passing only required values which don't have defaults set @@ -647,7 +647,7 @@ except xendit.ApiException as e: try: # Makes payment with matching PaymentMethodID. api_instance.simulate_payment(payment_method_id, simulate_payment_request=simulate_payment_request) -except xendit.ApiException as e: +except xendit.XenditSdkException as e: print("Exception when calling PaymentMethodApi->simulate_payment: %s\n" % e) ``` diff --git a/docs/PaymentRequestApi.md b/docs/PaymentRequestApi.md index cf0ccd57..f956bb76 100644 --- a/docs/PaymentRequestApi.md +++ b/docs/PaymentRequestApi.md @@ -47,7 +47,7 @@ try: # Payment Request Authorize api_response = api_instance.authorize_payment_request(payment_request_id) pprint(api_response) -except xendit.ApiException as e: +except xendit.XenditSdkException as e: print("Exception when calling PaymentRequestApi->authorize_payment_request: %s\n" % e) # example passing only required values which don't have defaults set @@ -56,7 +56,7 @@ try: # Payment Request Authorize api_response = api_instance.authorize_payment_request(payment_request_id, payment_request_auth_parameters=payment_request_auth_parameters) pprint(api_response) -except xendit.ApiException as e: +except xendit.XenditSdkException as e: print("Exception when calling PaymentRequestApi->authorize_payment_request: %s\n" % e) ``` @@ -118,7 +118,7 @@ try: # Payment Request Capture api_response = api_instance.capture_payment_request(payment_request_id) pprint(api_response) -except xendit.ApiException as e: +except xendit.XenditSdkException as e: print("Exception when calling PaymentRequestApi->capture_payment_request: %s\n" % e) # example passing only required values which don't have defaults set @@ -127,7 +127,7 @@ try: # Payment Request Capture api_response = api_instance.capture_payment_request(payment_request_id, capture_parameters=capture_parameters) pprint(api_response) -except xendit.ApiException as e: +except xendit.XenditSdkException as e: print("Exception when calling PaymentRequestApi->capture_payment_request: %s\n" % e) ``` @@ -189,7 +189,7 @@ try: # Create Payment Request api_response = api_instance.create_payment_request(idempotency_key=idempotency_key, payment_request_parameters=payment_request_parameters) pprint(api_response) -except xendit.ApiException as e: +except xendit.XenditSdkException as e: print("Exception when calling PaymentRequestApi->create_payment_request: %s\n" % e) ``` @@ -251,7 +251,7 @@ try: # Get all payment requests by filter api_response = api_instance.get_all_payment_requests(reference_id=reference_id, id=id, customer_id=customer_id, limit=limit, before_id=before_id, after_id=after_id) pprint(api_response) -except xendit.ApiException as e: +except xendit.XenditSdkException as e: print("Exception when calling PaymentRequestApi->get_all_payment_requests: %s\n" % e) ``` @@ -316,7 +316,7 @@ try: # Get payment request by ID api_response = api_instance.get_payment_request_by_id(payment_request_id) pprint(api_response) -except xendit.ApiException as e: +except xendit.XenditSdkException as e: print("Exception when calling PaymentRequestApi->get_payment_request_by_id: %s\n" % e) ``` @@ -376,16 +376,16 @@ try: # Get Payment Request Capture api_response = api_instance.get_payment_request_captures(payment_request_id) pprint(api_response) -except xendit.ApiException as e: +except xendit.XenditSdkException as e: print("Exception when calling PaymentRequestApi->get_payment_request_captures: %s\n" % e) # example passing only required values which don't have defaults set # and optional values try: # Get Payment Request Capture - api_response = api_instance.get_payment_request_captures(payment_request_id, limit=limit, after_id=after_id, before_id=before_id) + api_response = api_instance.get_payment_request_captures(payment_request_id, limit=limit) pprint(api_response) -except xendit.ApiException as e: +except xendit.XenditSdkException as e: print("Exception when calling PaymentRequestApi->get_payment_request_captures: %s\n" % e) ``` @@ -396,8 +396,6 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **payment_request_id** | **str**| | **limit** | **int**| | [optional] - **after_id** | **str**| | [optional] - **before_id** | **str**| | [optional] ### Return type @@ -448,7 +446,7 @@ try: # Payment Request Resend Auth api_response = api_instance.resend_payment_request_auth(payment_request_id) pprint(api_response) -except xendit.ApiException as e: +except xendit.XenditSdkException as e: print("Exception when calling PaymentRequestApi->resend_payment_request_auth: %s\n" % e) ``` diff --git a/docs/PayoutApi.md b/docs/PayoutApi.md index fdc8242b..8c637834 100644 --- a/docs/PayoutApi.md +++ b/docs/PayoutApi.md @@ -42,7 +42,7 @@ try: # API to cancel requested payouts that have not yet been sent to partner banks and e-wallets. Cancellation is possible if the payout has not been sent out via our partner and when payout status is ACCEPTED. api_response = api_instance.cancel_payout(id) pprint(api_response) -except xendit.ApiException as e: +except xendit.XenditSdkException as e: print("Exception when calling PayoutApi->cancel_payout: %s\n" % e) ``` @@ -101,7 +101,7 @@ try: # API to send money at scale to bank accounts & eWallets api_response = api_instance.create_payout(idempotency_key) pprint(api_response) -except xendit.ApiException as e: +except xendit.XenditSdkException as e: print("Exception when calling PayoutApi->create_payout: %s\n" % e) # example passing only required values which don't have defaults set @@ -110,7 +110,7 @@ try: # API to send money at scale to bank accounts & eWallets api_response = api_instance.create_payout(idempotency_key, for_user_id=for_user_id, create_payout_request=create_payout_request) pprint(api_response) -except xendit.ApiException as e: +except xendit.XenditSdkException as e: print("Exception when calling PayoutApi->create_payout: %s\n" % e) ``` @@ -172,7 +172,7 @@ try: # API to fetch the current status, or details of the payout api_response = api_instance.get_payout_by_id(id) pprint(api_response) -except xendit.ApiException as e: +except xendit.XenditSdkException as e: print("Exception when calling PayoutApi->get_payout_by_id: %s\n" % e) ``` @@ -232,7 +232,7 @@ try: # API providing the current list of banks and e-wallets we support for payouts for both regions api_response = api_instance.get_payout_channels(currency=currency, channel_category=channel_category, channel_code=channel_code) pprint(api_response) -except xendit.ApiException as e: +except xendit.XenditSdkException as e: print("Exception when calling PayoutApi->get_payout_channels: %s\n" % e) ``` @@ -290,7 +290,7 @@ try: # API to retrieve all matching payouts with reference ID api_response = api_instance.get_payouts(reference_id) pprint(api_response) -except xendit.ApiException as e: +except xendit.XenditSdkException as e: print("Exception when calling PayoutApi->get_payouts: %s\n" % e) # example passing only required values which don't have defaults set @@ -299,7 +299,7 @@ try: # API to retrieve all matching payouts with reference ID api_response = api_instance.get_payouts(reference_id, limit=limit, after_id=after_id, before_id=before_id) pprint(api_response) -except xendit.ApiException as e: +except xendit.XenditSdkException as e: print("Exception when calling PayoutApi->get_payouts: %s\n" % e) ``` diff --git a/docs/QRCodeParameters.md b/docs/QRCodeParameters.md index 1230ef94..8b22b626 100644 --- a/docs/QRCodeParameters.md +++ b/docs/QRCodeParameters.md @@ -1,9 +1,11 @@ -# xendit.payment_request.model.QRCodeParameters +# xendit.payment_method.model.QRCodeParameters ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- +**amount** | **float, none_type** | | [optional] +**currency** | **str** | | [optional] **channel_code** | [**QRCodeChannelCode**](QRCodeChannelCode.md) | | [optional] **channel_properties** | [**QRCodeChannelProperties**](QRCodeChannelProperties.md) | | [optional] diff --git a/docs/RefundApi.md b/docs/RefundApi.md index 16ea165a..a07b8c99 100644 --- a/docs/RefundApi.md +++ b/docs/RefundApi.md @@ -43,7 +43,7 @@ refund_id = "rfd-1fdaf346-dd2e-4b6c-b938-124c7167a822" # str | try: api_response = api_instance.cancel_refund(refund_id) pprint(api_response) -except xendit.ApiException as e: +except xendit.XenditSdkException as e: print("Exception when calling RefundApi->cancel_refund: %s\n" % e) # example passing only required values which don't have defaults set @@ -51,7 +51,7 @@ except xendit.ApiException as e: try: api_response = api_instance.cancel_refund(refund_id, idempotency_key=idempotency_key) pprint(api_response) -except xendit.ApiException as e: +except xendit.XenditSdkException as e: print("Exception when calling RefundApi->cancel_refund: %s\n" % e) ``` @@ -116,7 +116,7 @@ api_instance = RefundApi(api_client) try: api_response = api_instance.create_refund(idempotency_key=idempotency_key, create_refund=create_refund) pprint(api_response) -except xendit.ApiException as e: +except xendit.XenditSdkException as e: print("Exception when calling RefundApi->create_refund: %s\n" % e) ``` @@ -176,7 +176,7 @@ api_instance = RefundApi(api_client) try: api_response = api_instance.get_all_refunds() pprint(api_response) -except xendit.ApiException as e: +except xendit.XenditSdkException as e: print("Exception when calling RefundApi->get_all_refunds: %s\n" % e) ``` @@ -228,7 +228,7 @@ refund_id = "rfd-1fdaf346-dd2e-4b6c-b938-124c7167a822" # str | try: api_response = api_instance.get_refund(refund_id) pprint(api_response) -except xendit.ApiException as e: +except xendit.XenditSdkException as e: print("Exception when calling RefundApi->get_refund: %s\n" % e) # example passing only required values which don't have defaults set @@ -236,7 +236,7 @@ except xendit.ApiException as e: try: api_response = api_instance.get_refund(refund_id, idempotency_key=idempotency_key) pprint(api_response) -except xendit.ApiException as e: +except xendit.XenditSdkException as e: print("Exception when calling RefundApi->get_refund: %s\n" % e) ``` diff --git a/docs/TransactionApi.md b/docs/TransactionApi.md index 554a7e6a..63e6106d 100644 --- a/docs/TransactionApi.md +++ b/docs/TransactionApi.md @@ -47,7 +47,7 @@ try: # Get a list of transactions api_response = api_instance.get_all_transactions(for_user_id=for_user_id, types=types, statuses=statuses, channel_categories=channel_categories, reference_id=reference_id, product_id=product_id, account_identifier=account_identifier, amount=amount, currency=currency, created=created, updated=updated, limit=limit, after_id=after_id, before_id=before_id) pprint(api_response) -except xendit.ApiException as e: +except xendit.XenditSdkException as e: print("Exception when calling TransactionApi->get_all_transactions: %s\n" % e) ``` @@ -120,7 +120,7 @@ try: # Get a transaction based on its id api_response = api_instance.get_transaction_by_id(id) pprint(api_response) -except xendit.ApiException as e: +except xendit.XenditSdkException as e: print("Exception when calling TransactionApi->get_transaction_by_id: %s\n" % e) # example passing only required values which don't have defaults set @@ -129,7 +129,7 @@ try: # Get a transaction based on its id api_response = api_instance.get_transaction_by_id(id, for_user_id=for_user_id) pprint(api_response) -except xendit.ApiException as e: +except xendit.XenditSdkException as e: print("Exception when calling TransactionApi->get_transaction_by_id: %s\n" % e) ``` diff --git a/docs/VirtualAccountAllOf.md b/docs/VirtualAccountAllOf.md index 514161b6..ce2ea2a0 100644 --- a/docs/VirtualAccountAllOf.md +++ b/docs/VirtualAccountAllOf.md @@ -1,4 +1,4 @@ -# xendit.payment_request.model.VirtualAccountAllOf +# xendit.payment_method.model.VirtualAccountAllOf ## Properties diff --git a/docs/VirtualAccountAlternativeDisplay.md b/docs/VirtualAccountAlternativeDisplay.md index 7aa466a4..d3acfad2 100644 --- a/docs/VirtualAccountAlternativeDisplay.md +++ b/docs/VirtualAccountAlternativeDisplay.md @@ -1,4 +1,4 @@ -# xendit.payment_request.model.VirtualAccountAlternativeDisplay +# xendit.payment_method.model.VirtualAccountAlternativeDisplay Alternative Display Object diff --git a/docs/VirtualAccountChannelCode.md b/docs/VirtualAccountChannelCode.md index df5d7274..95c31d47 100644 --- a/docs/VirtualAccountChannelCode.md +++ b/docs/VirtualAccountChannelCode.md @@ -1,4 +1,4 @@ -# xendit.payment_request.model.VirtualAccountChannelCode +# xendit.payment_method.model.VirtualAccountChannelCode Virtual Account Channel Code diff --git a/docs/VirtualAccountChannelProperties.md b/docs/VirtualAccountChannelProperties.md index 9c540c0e..15ef0b20 100644 --- a/docs/VirtualAccountChannelProperties.md +++ b/docs/VirtualAccountChannelProperties.md @@ -1,11 +1,11 @@ -# xendit.payment_request.model.VirtualAccountChannelProperties +# xendit.payment_method.model.VirtualAccountChannelProperties Virtual Account Channel Properties ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**customer_name** | **str** | Name of customer. | +**customer_name** | **str** | Name of customer. | [optional] **virtual_account_number** | **str** | You can assign specific Virtual Account number using this parameter. If you do not send one, one will be picked at random. Make sure the number you specify is within your Virtual Account range. | [optional] **expires_at** | **datetime** | The date and time in ISO 8601 UTC+0 when the virtual account number will be expired. Default: The default expiration date will be 31 years from creation date. | [optional] **suggested_amount** | **float** | The suggested amount you want to assign. Note: Suggested amounts is the amounts that can see as a suggestion, but user can still put any numbers (only supported for Mandiri and BRI) | [optional] diff --git a/docs/VirtualAccountParameters.md b/docs/VirtualAccountParameters.md index 5527659e..eca0e892 100644 --- a/docs/VirtualAccountParameters.md +++ b/docs/VirtualAccountParameters.md @@ -1,4 +1,4 @@ -# xendit.payment_request.model.VirtualAccountParameters +# xendit.payment_method.model.VirtualAccountParameters ## Properties @@ -6,11 +6,11 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **channel_code** | [**VirtualAccountChannelCode**](VirtualAccountChannelCode.md) | | **channel_properties** | [**VirtualAccountChannelProperties**](VirtualAccountChannelProperties.md) | | +**amount** | **float, none_type** | | [optional] **min_amount** | **float, none_type** | | [optional] **max_amount** | **float, none_type** | | [optional] -**amount** | **float, none_type** | | [optional] -**currency** | [**PaymentRequestCurrency**](PaymentRequestCurrency.md) | | [optional] -**alternative_display_types** | **[str]** | Alternative display requested for the virtual account | [optional] +**currency** | **str** | | [optional] +**alternative_display_types** | **[str]** | For payments in Vietnam only, alternative display requested for the virtual account | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/setup.py b/setup.py index d3fc9eed..38ec47e4 100644 --- a/setup.py +++ b/setup.py @@ -6,7 +6,7 @@ from setuptools import setup, find_packages # noqa: H301 NAME = "xendit" -VERSION = "3.1.0" +VERSION = "3.2.0" # To install the library, run the following # # python setup.py install diff --git a/test/test_card_verification_results.py b/test/test_card_verification_results.py index ace611c0..32e81e01 100644 --- a/test/test_card_verification_results.py +++ b/test/test_card_verification_results.py @@ -1,5 +1,5 @@ """ - The version of the XENDIT API: 2.87.2 + The version of the XENDIT API: 1.44.0 """ @@ -7,9 +7,9 @@ import unittest import xendit -from xendit.payment_method.model.card_verification_results_three_d_secure import CardVerificationResultsThreeDSecure +from xendit.payment_request.model.card_verification_results_three_d_secure import CardVerificationResultsThreeDSecure globals()['CardVerificationResultsThreeDSecure'] = CardVerificationResultsThreeDSecure -from xendit.payment_method.model.card_verification_results import CardVerificationResults +from xendit.payment_request.model.card_verification_results import CardVerificationResults class TestCardVerificationResults(unittest.TestCase): diff --git a/test/test_direct_debit_debit_card.py b/test/test_direct_debit_debit_card.py index 7de560f8..0ab84b29 100644 --- a/test/test_direct_debit_debit_card.py +++ b/test/test_direct_debit_debit_card.py @@ -1,5 +1,5 @@ """ - The version of the XENDIT API: 2.87.2 + The version of the XENDIT API: 1.44.0 """ @@ -7,7 +7,7 @@ import unittest import xendit -from xendit.payment_method.model.direct_debit_debit_card import DirectDebitDebitCard +from xendit.payment_request.model.direct_debit_debit_card import DirectDebitDebitCard class TestDirectDebitDebitCard(unittest.TestCase): diff --git a/test/test_direct_debit_parameters.py b/test/test_direct_debit_parameters.py index d5cb7d7c..0e0984a7 100644 --- a/test/test_direct_debit_parameters.py +++ b/test/test_direct_debit_parameters.py @@ -1,5 +1,5 @@ """ - The version of the XENDIT API: 2.87.2 + The version of the XENDIT API: 1.44.0 """ @@ -7,11 +7,13 @@ import unittest import xendit -from xendit.payment_method.model.direct_debit_channel_code import DirectDebitChannelCode -from xendit.payment_method.model.direct_debit_channel_properties import DirectDebitChannelProperties +from xendit.payment_request.model.direct_debit_channel_code import DirectDebitChannelCode +from xendit.payment_request.model.direct_debit_channel_properties import DirectDebitChannelProperties +from xendit.payment_request.model.direct_debit_type import DirectDebitType globals()['DirectDebitChannelCode'] = DirectDebitChannelCode globals()['DirectDebitChannelProperties'] = DirectDebitChannelProperties -from xendit.payment_method.model.direct_debit_parameters import DirectDebitParameters +globals()['DirectDebitType'] = DirectDebitType +from xendit.payment_request.model.direct_debit_parameters import DirectDebitParameters class TestDirectDebitParameters(unittest.TestCase): diff --git a/test/test_e_wallet.py b/test/test_e_wallet.py index 5b8c547c..ff9dfdeb 100644 --- a/test/test_e_wallet.py +++ b/test/test_e_wallet.py @@ -1,5 +1,5 @@ """ - The version of the XENDIT API: 2.87.2 + The version of the XENDIT API: 1.44.0 """ @@ -7,15 +7,17 @@ import unittest import xendit -from xendit.payment_method.model.e_wallet_account import EWalletAccount -from xendit.payment_method.model.e_wallet_channel_code import EWalletChannelCode -from xendit.payment_method.model.e_wallet_channel_properties import EWalletChannelProperties -from xendit.payment_method.model.e_wallet_parameters import EWalletParameters +from xendit.payment_request.model.e_wallet_account import EWalletAccount +from xendit.payment_request.model.e_wallet_all_of import EWalletAllOf +from xendit.payment_request.model.e_wallet_channel_code import EWalletChannelCode +from xendit.payment_request.model.e_wallet_channel_properties import EWalletChannelProperties +from xendit.payment_request.model.e_wallet_parameters import EWalletParameters globals()['EWalletAccount'] = EWalletAccount +globals()['EWalletAllOf'] = EWalletAllOf globals()['EWalletChannelCode'] = EWalletChannelCode globals()['EWalletChannelProperties'] = EWalletChannelProperties globals()['EWalletParameters'] = EWalletParameters -from xendit.payment_method.model.e_wallet import EWallet +from xendit.payment_request.model.e_wallet import EWallet class TestEWallet(unittest.TestCase): diff --git a/test/test_e_wallet_account.py b/test/test_e_wallet_account.py index 1b16cee6..4e2fe164 100644 --- a/test/test_e_wallet_account.py +++ b/test/test_e_wallet_account.py @@ -1,5 +1,5 @@ """ - The version of the XENDIT API: 2.87.2 + The version of the XENDIT API: 1.44.0 """ @@ -7,7 +7,7 @@ import unittest import xendit -from xendit.payment_method.model.e_wallet_account import EWalletAccount +from xendit.payment_request.model.e_wallet_account import EWalletAccount class TestEWalletAccount(unittest.TestCase): diff --git a/test/test_virtual_account.py b/test/test_virtual_account.py index 4429b6a5..3dcb6f92 100644 --- a/test/test_virtual_account.py +++ b/test/test_virtual_account.py @@ -1,5 +1,5 @@ """ - The version of the XENDIT API: 2.87.2 + The version of the XENDIT API: 1.44.0 """ @@ -7,17 +7,19 @@ import unittest import xendit -from xendit.payment_method.model.virtual_account_all_of import VirtualAccountAllOf -from xendit.payment_method.model.virtual_account_alternative_display import VirtualAccountAlternativeDisplay -from xendit.payment_method.model.virtual_account_channel_code import VirtualAccountChannelCode -from xendit.payment_method.model.virtual_account_channel_properties import VirtualAccountChannelProperties -from xendit.payment_method.model.virtual_account_parameters import VirtualAccountParameters +from xendit.payment_request.model.payment_request_currency import PaymentRequestCurrency +from xendit.payment_request.model.virtual_account_all_of import VirtualAccountAllOf +from xendit.payment_request.model.virtual_account_alternative_display import VirtualAccountAlternativeDisplay +from xendit.payment_request.model.virtual_account_channel_code import VirtualAccountChannelCode +from xendit.payment_request.model.virtual_account_channel_properties import VirtualAccountChannelProperties +from xendit.payment_request.model.virtual_account_parameters import VirtualAccountParameters +globals()['PaymentRequestCurrency'] = PaymentRequestCurrency globals()['VirtualAccountAllOf'] = VirtualAccountAllOf globals()['VirtualAccountAlternativeDisplay'] = VirtualAccountAlternativeDisplay globals()['VirtualAccountChannelCode'] = VirtualAccountChannelCode globals()['VirtualAccountChannelProperties'] = VirtualAccountChannelProperties globals()['VirtualAccountParameters'] = VirtualAccountParameters -from xendit.payment_method.model.virtual_account import VirtualAccount +from xendit.payment_request.model.virtual_account import VirtualAccount class TestVirtualAccount(unittest.TestCase): diff --git a/test/test_virtual_account_all_of.py b/test/test_virtual_account_all_of.py index 9d808f9f..a0ee7e03 100644 --- a/test/test_virtual_account_all_of.py +++ b/test/test_virtual_account_all_of.py @@ -1,5 +1,5 @@ """ - The version of the XENDIT API: 2.87.2 + The version of the XENDIT API: 1.44.0 """ @@ -7,9 +7,9 @@ import unittest import xendit -from xendit.payment_method.model.virtual_account_alternative_display import VirtualAccountAlternativeDisplay +from xendit.payment_request.model.virtual_account_alternative_display import VirtualAccountAlternativeDisplay globals()['VirtualAccountAlternativeDisplay'] = VirtualAccountAlternativeDisplay -from xendit.payment_method.model.virtual_account_all_of import VirtualAccountAllOf +from xendit.payment_request.model.virtual_account_all_of import VirtualAccountAllOf class TestVirtualAccountAllOf(unittest.TestCase): diff --git a/test/test_virtual_account_alternative_display.py b/test/test_virtual_account_alternative_display.py index c336c7e3..0fdba1e3 100644 --- a/test/test_virtual_account_alternative_display.py +++ b/test/test_virtual_account_alternative_display.py @@ -1,5 +1,5 @@ """ - The version of the XENDIT API: 2.87.2 + The version of the XENDIT API: 1.44.0 """ @@ -7,7 +7,7 @@ import unittest import xendit -from xendit.payment_method.model.virtual_account_alternative_display import VirtualAccountAlternativeDisplay +from xendit.payment_request.model.virtual_account_alternative_display import VirtualAccountAlternativeDisplay class TestVirtualAccountAlternativeDisplay(unittest.TestCase): diff --git a/test/test_virtual_account_channel_code.py b/test/test_virtual_account_channel_code.py index 28b46d34..f87ab0a3 100644 --- a/test/test_virtual_account_channel_code.py +++ b/test/test_virtual_account_channel_code.py @@ -1,5 +1,5 @@ """ - The version of the XENDIT API: 2.87.2 + The version of the XENDIT API: 1.44.0 """ @@ -7,7 +7,7 @@ import unittest import xendit -from xendit.payment_method.model.virtual_account_channel_code import VirtualAccountChannelCode +from xendit.payment_request.model.virtual_account_channel_code import VirtualAccountChannelCode class TestVirtualAccountChannelCode(unittest.TestCase): diff --git a/test/test_virtual_account_channel_properties.py b/test/test_virtual_account_channel_properties.py index b38dbe60..7f278e2c 100644 --- a/test/test_virtual_account_channel_properties.py +++ b/test/test_virtual_account_channel_properties.py @@ -1,5 +1,5 @@ """ - The version of the XENDIT API: 2.87.2 + The version of the XENDIT API: 1.44.0 """ @@ -7,7 +7,7 @@ import unittest import xendit -from xendit.payment_method.model.virtual_account_channel_properties import VirtualAccountChannelProperties +from xendit.payment_request.model.virtual_account_channel_properties import VirtualAccountChannelProperties class TestVirtualAccountChannelProperties(unittest.TestCase): diff --git a/test/test_virtual_account_parameters.py b/test/test_virtual_account_parameters.py index 97888ab7..bf2327f3 100644 --- a/test/test_virtual_account_parameters.py +++ b/test/test_virtual_account_parameters.py @@ -1,5 +1,5 @@ """ - The version of the XENDIT API: 2.87.2 + The version of the XENDIT API: 1.44.0 """ @@ -7,11 +7,13 @@ import unittest import xendit -from xendit.payment_method.model.virtual_account_channel_code import VirtualAccountChannelCode -from xendit.payment_method.model.virtual_account_channel_properties import VirtualAccountChannelProperties +from xendit.payment_request.model.payment_request_currency import PaymentRequestCurrency +from xendit.payment_request.model.virtual_account_channel_code import VirtualAccountChannelCode +from xendit.payment_request.model.virtual_account_channel_properties import VirtualAccountChannelProperties +globals()['PaymentRequestCurrency'] = PaymentRequestCurrency globals()['VirtualAccountChannelCode'] = VirtualAccountChannelCode globals()['VirtualAccountChannelProperties'] = VirtualAccountChannelProperties -from xendit.payment_method.model.virtual_account_parameters import VirtualAccountParameters +from xendit.payment_request.model.virtual_account_parameters import VirtualAccountParameters class TestVirtualAccountParameters(unittest.TestCase): diff --git a/xendit/__init__.py b/xendit/__init__.py index 2d4cd7ed..707f299d 100644 --- a/xendit/__init__.py +++ b/xendit/__init__.py @@ -5,7 +5,7 @@ """ -__version__ = "3.1.0" +__version__ = "3.2.0" # import ApiClient from xendit.api_client import ApiClient @@ -20,4 +20,4 @@ from xendit.exceptions import ApiTypeError from xendit.exceptions import ApiValueError from xendit.exceptions import ApiKeyError -from xendit.exceptions import ApiException +from xendit.exceptions import XenditSdkException diff --git a/xendit/api_client.py b/xendit/api_client.py index 90baef71..cb8c1ee6 100644 --- a/xendit/api_client.py +++ b/xendit/api_client.py @@ -18,7 +18,7 @@ from xendit import rest from xendit.configuration import Configuration -from xendit.exceptions import ApiTypeError, ApiValueError, ApiException +from xendit.exceptions import ApiTypeError, ApiValueError, XenditSdkException from xendit.model_utils import ( ModelNormal, ModelSimple, @@ -74,11 +74,11 @@ def __init__(self, configuration=None, header_name=None, header_value=None, # XENDIT headers self.default_headers['xendit-lib'] = 'python' - self.default_headers['xendit-lib-version'] = '3.1.0' + self.default_headers['xendit-lib-version'] = '3.2.0' self.cookie = cookie # Set default User-Agent. - self.user_agent = 'OpenAPI-Generator/3.1.0/python' + self.user_agent = 'OpenAPI-Generator/3.2.0/python' def __enter__(self): return self @@ -203,8 +203,7 @@ def __call_api( post_params=post_params, body=body, _preload_content=_preload_content, _request_timeout=_request_timeout) - except ApiException as e: - e.body = e.body.decode('utf-8') + except XenditSdkException as e: raise e self.last_response = response_data diff --git a/xendit/balance_and_transaction/balance_api.py b/xendit/balance_and_transaction/balance_api.py index 99bd8c88..db921627 100644 --- a/xendit/balance_and_transaction/balance_api.py +++ b/xendit/balance_and_transaction/balance_api.py @@ -19,6 +19,7 @@ none_type, validate_and_convert_types ) +from typing import Optional, List # noqa: F401 from xendit.balance_and_transaction.model import * # noqa: F401,E501 @@ -98,15 +99,18 @@ def __init__(self, api_client=None): def get_balance( self, + account_type: Optional[str] = "CASH", + currency: Optional[str] = None, + for_user_id: Optional[str] = None, **kwargs - ): + ) -> Balance: """Retrieves balances for a business, default to CASH type # noqa: E501 Retrieves balance for your business, defaults to CASH type # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_balance(async_req=True) + >>> thread = api.get_balance(currency, for_user_id, account_type="CASH", async_req=True) >>> result = thread.get() @@ -175,5 +179,11 @@ def get_balance( '_content_type') kwargs['_host_index'] = kwargs.get('_host_index') kwargs['_request_auths'] = kwargs.get('_request_auths', None) + if account_type is not None: + kwargs['account_type'] = account_type + if currency is not None: + kwargs['currency'] = currency + if for_user_id is not None: + kwargs['for_user_id'] = for_user_id return self.get_balance_endpoint.call_with_http_info(**kwargs) diff --git a/xendit/balance_and_transaction/model/balance.py b/xendit/balance_and_transaction/model/balance.py index 3c8c4fa5..8396ba38 100644 --- a/xendit/balance_and_transaction/model/balance.py +++ b/xendit/balance_and_transaction/model/balance.py @@ -5,6 +5,7 @@ import re # noqa: F401 import sys # noqa: F401 +from typing import List # noqa: F401 from xendit.model_utils import ( # noqa: F401 ApiTypeError, @@ -25,6 +26,9 @@ +def lazy_import(): + pass + class Balance(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -186,12 +190,16 @@ def _from_openapi_data(cls, balance, *args, **kwargs): # noqa: E501 ]) @convert_js_args_to_python_args - def __init__(self, balance, *args, **kwargs): # noqa: E501 + def __init__(self, + balance: float, + *args, **kwargs + ): # noqa: E501 """Balance - a model defined in OpenAPI Args: balance (float): + Keyword Args: _check_type (bool): if True, values for parameters in openapi_types will be type checked and a TypeError will be diff --git a/xendit/balance_and_transaction/model/channels_categories.py b/xendit/balance_and_transaction/model/channels_categories.py index ea12b357..4ea7748e 100644 --- a/xendit/balance_and_transaction/model/channels_categories.py +++ b/xendit/balance_and_transaction/model/channels_categories.py @@ -5,6 +5,7 @@ import re # noqa: F401 import sys # noqa: F401 +from typing import List # noqa: F401 from xendit.model_utils import ( # noqa: F401 ApiTypeError, @@ -25,6 +26,9 @@ +def lazy_import(): + pass + class ChannelsCategories(ModelSimple): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech diff --git a/xendit/balance_and_transaction/model/currency.py b/xendit/balance_and_transaction/model/currency.py index 73a8bd5d..6efcdf72 100644 --- a/xendit/balance_and_transaction/model/currency.py +++ b/xendit/balance_and_transaction/model/currency.py @@ -5,6 +5,7 @@ import re # noqa: F401 import sys # noqa: F401 +from typing import List # noqa: F401 from xendit.model_utils import ( # noqa: F401 ApiTypeError, @@ -25,6 +26,9 @@ +def lazy_import(): + pass + class Currency(ModelSimple): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech diff --git a/xendit/balance_and_transaction/model/date_range_filter.py b/xendit/balance_and_transaction/model/date_range_filter.py index 27f832b2..118f0dbb 100644 --- a/xendit/balance_and_transaction/model/date_range_filter.py +++ b/xendit/balance_and_transaction/model/date_range_filter.py @@ -5,6 +5,7 @@ import re # noqa: F401 import sys # noqa: F401 +from typing import List # noqa: F401 from xendit.model_utils import ( # noqa: F401 ApiTypeError, @@ -25,6 +26,9 @@ +def lazy_import(): + pass + class DateRangeFilter(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -76,8 +80,8 @@ def openapi_types(): and the value is attribute type. """ return { - 'gte': (datetime,), # noqa: E501 - 'lte': (datetime,), # noqa: E501 + 'gte': (datetime, none_type), # noqa: E501 + 'lte': (datetime, none_type), # noqa: E501 } @cached_property @@ -186,9 +190,14 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 ]) @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 + def __init__(self, + gte: datetime | None = None, + lte: datetime | None = None, + *args, **kwargs + ): # noqa: E501 """DateRangeFilter - a model defined in OpenAPI + Keyword Args: _check_type (bool): if True, values for parameters in openapi_types will be type checked and a TypeError will be @@ -253,6 +262,10 @@ def __init__(self, *args, **kwargs): # noqa: E501 self._configuration = _configuration self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + if gte is not None: + self.gte = gte + if lte is not None: + self.lte = lte for var_name, var_value in kwargs.items(): if var_name not in self.attribute_map and \ self._configuration is not None and \ diff --git a/xendit/balance_and_transaction/model/fee_response.py b/xendit/balance_and_transaction/model/fee_response.py index 14a83e6a..513a97cf 100644 --- a/xendit/balance_and_transaction/model/fee_response.py +++ b/xendit/balance_and_transaction/model/fee_response.py @@ -5,6 +5,7 @@ import re # noqa: F401 import sys # noqa: F401 +from typing import List # noqa: F401 from xendit.model_utils import ( # noqa: F401 ApiTypeError, @@ -25,6 +26,9 @@ +def lazy_import(): + pass + class FeeResponse(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -84,9 +88,9 @@ def openapi_types(): return { 'xendit_fee': (float,), # noqa: E501 'value_added_tax': (float,), # noqa: E501 - 'xendit_withholding_tax': (float,), # noqa: E501 - 'third_party_withholding_tax': (float,), # noqa: E501 - 'status': (str,), # noqa: E501 + 'xendit_withholding_tax': (float, none_type), # noqa: E501 + 'third_party_withholding_tax': (float, none_type), # noqa: E501 + 'status': (str, none_type), # noqa: E501 } @cached_property @@ -205,13 +209,21 @@ def _from_openapi_data(cls, xendit_fee, value_added_tax, *args, **kwargs): # no ]) @convert_js_args_to_python_args - def __init__(self, xendit_fee, value_added_tax, *args, **kwargs): # noqa: E501 + def __init__(self, + xendit_fee: float, + value_added_tax: float, + xendit_withholding_tax: float | None = None, + third_party_withholding_tax: float | None = None, + status: str | None = None, + *args, **kwargs + ): # noqa: E501 """FeeResponse - a model defined in OpenAPI Args: xendit_fee (float): Amount of the Xendit fee for this transaction. value_added_tax (float): Amount of the VAT for this transaction. + Keyword Args: _check_type (bool): if True, values for parameters in openapi_types will be type checked and a TypeError will be @@ -279,6 +291,12 @@ def __init__(self, xendit_fee, value_added_tax, *args, **kwargs): # noqa: E501 self.xendit_fee = xendit_fee self.value_added_tax = value_added_tax + if xendit_withholding_tax is not None: + self.xendit_withholding_tax = xendit_withholding_tax + if third_party_withholding_tax is not None: + self.third_party_withholding_tax = third_party_withholding_tax + if status is not None: + self.status = status for var_name, var_value in kwargs.items(): if var_name not in self.attribute_map and \ self._configuration is not None and \ diff --git a/xendit/balance_and_transaction/model/link_item.py b/xendit/balance_and_transaction/model/link_item.py index 1b68c7b5..21d99471 100644 --- a/xendit/balance_and_transaction/model/link_item.py +++ b/xendit/balance_and_transaction/model/link_item.py @@ -5,6 +5,7 @@ import re # noqa: F401 import sys # noqa: F401 +from typing import List # noqa: F401 from xendit.model_utils import ( # noqa: F401 ApiTypeError, @@ -25,6 +26,9 @@ +def lazy_import(): + pass + class LinkItem(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -194,7 +198,12 @@ def _from_openapi_data(cls, href, rel, method, *args, **kwargs): # noqa: E501 ]) @convert_js_args_to_python_args - def __init__(self, href, rel, method, *args, **kwargs): # noqa: E501 + def __init__(self, + href: str, + rel: str, + method: str, + *args, **kwargs + ): # noqa: E501 """LinkItem - a model defined in OpenAPI Args: @@ -202,6 +211,7 @@ def __init__(self, href, rel, method, *args, **kwargs): # noqa: E501 rel (str): The relationship between source and target. The value will be `next`. method (str): The HTTP method, the value will be `GET`. + Keyword Args: _check_type (bool): if True, values for parameters in openapi_types will be type checked and a TypeError will be diff --git a/xendit/balance_and_transaction/model/server_error.py b/xendit/balance_and_transaction/model/server_error.py index c98e56d8..adee2828 100644 --- a/xendit/balance_and_transaction/model/server_error.py +++ b/xendit/balance_and_transaction/model/server_error.py @@ -5,6 +5,7 @@ import re # noqa: F401 import sys # noqa: F401 +from typing import List # noqa: F401 from xendit.model_utils import ( # noqa: F401 ApiTypeError, @@ -25,6 +26,9 @@ +def lazy_import(): + pass + class ServerError(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -194,7 +198,12 @@ def _from_openapi_data(cls, status_code, error, message, *args, **kwargs): # no ]) @convert_js_args_to_python_args - def __init__(self, status_code, error, message, *args, **kwargs): # noqa: E501 + def __init__(self, + status_code: float, + error: str, + message: str, + *args, **kwargs + ): # noqa: E501 """ServerError - a model defined in OpenAPI Args: @@ -202,6 +211,7 @@ def __init__(self, status_code, error, message, *args, **kwargs): # noqa: E501 error (str): message (str): + Keyword Args: _check_type (bool): if True, values for parameters in openapi_types will be type checked and a TypeError will be diff --git a/xendit/balance_and_transaction/model/transaction_id.py b/xendit/balance_and_transaction/model/transaction_id.py index d3c837ae..9cd4b6a5 100644 --- a/xendit/balance_and_transaction/model/transaction_id.py +++ b/xendit/balance_and_transaction/model/transaction_id.py @@ -5,6 +5,7 @@ import re # noqa: F401 import sys # noqa: F401 +from typing import List # noqa: F401 from xendit.model_utils import ( # noqa: F401 ApiTypeError, @@ -25,6 +26,9 @@ +def lazy_import(): + pass + class TransactionId(ModelSimple): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech diff --git a/xendit/balance_and_transaction/model/transaction_response.py b/xendit/balance_and_transaction/model/transaction_response.py index 4df17f7f..39fa0a63 100644 --- a/xendit/balance_and_transaction/model/transaction_response.py +++ b/xendit/balance_and_transaction/model/transaction_response.py @@ -5,6 +5,7 @@ import re # noqa: F401 import sys # noqa: F401 +from typing import List # noqa: F401 from xendit.model_utils import ( # noqa: F401 ApiTypeError, @@ -23,21 +24,22 @@ ) from xendit.exceptions import ApiAttributeError +from xendit.balance_and_transaction.model.channels_categories import ChannelsCategories +from xendit.balance_and_transaction.model.currency import Currency +from xendit.balance_and_transaction.model.fee_response import FeeResponse +from xendit.balance_and_transaction.model.transaction_id import TransactionId +from xendit.balance_and_transaction.model.transaction_response_type import TransactionResponseType +from xendit.balance_and_transaction.model.transaction_statuses import TransactionStatuses +globals()['ChannelsCategories'] = ChannelsCategories +globals()['Currency'] = Currency +globals()['FeeResponse'] = FeeResponse +globals()['TransactionId'] = TransactionId +globals()['TransactionResponseType'] = TransactionResponseType +globals()['TransactionStatuses'] = TransactionStatuses -def lazy_import(): - from xendit.balance_and_transaction.model.channels_categories import ChannelsCategories - from xendit.balance_and_transaction.model.currency import Currency - from xendit.balance_and_transaction.model.fee_response import FeeResponse - from xendit.balance_and_transaction.model.transaction_id import TransactionId - from xendit.balance_and_transaction.model.transaction_response_type import TransactionResponseType - from xendit.balance_and_transaction.model.transaction_statuses import TransactionStatuses - globals()['ChannelsCategories'] = ChannelsCategories - globals()['Currency'] = Currency - globals()['FeeResponse'] = FeeResponse - globals()['TransactionId'] = TransactionId - globals()['TransactionResponseType'] = TransactionResponseType - globals()['TransactionStatuses'] = TransactionStatuses +def lazy_import(): + pass class TransactionResponse(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. @@ -116,8 +118,8 @@ def openapi_types(): 'fee': (FeeResponse,), # noqa: E501 'created': (datetime,), # noqa: E501 'updated': (datetime,), # noqa: E501 - 'settlement_status': (str, none_type,), # noqa: E501 - 'estimated_settlement_time': (datetime, none_type,), # noqa: E501 + 'settlement_status': (str, none_type, none_type), # noqa: E501 + 'estimated_settlement_time': (datetime, none_type, none_type), # noqa: E501 } @cached_property @@ -273,7 +275,26 @@ def _from_openapi_data(cls, id, product_id, type, status, channel_category, chan ]) @convert_js_args_to_python_args - def __init__(self, id, product_id, type, status, channel_category, channel_code, account_identifier, reference_id, currency, amount, cashflow, business_id, fee, created, updated, *args, **kwargs): # noqa: E501 + def __init__(self, + id: str, + product_id: str, + type: TransactionResponseType, + status: TransactionStatuses, + channel_category: ChannelsCategories, + channel_code: str, + account_identifier: str, + reference_id: str, + currency: Currency, + amount: float, + cashflow: str, + business_id: str, + fee: FeeResponse, + created: datetime, + updated: datetime, + settlement_status: str | None = None, + estimated_settlement_time: datetime | None = None, + *args, **kwargs + ): # noqa: E501 """TransactionResponse - a model defined in OpenAPI Args: @@ -293,6 +314,7 @@ def __init__(self, id, product_id, type, status, channel_category, channel_code, created (datetime): Transaction created timestamp (UTC+0) updated (datetime): Transaction updated timestamp (UTC+0) + Keyword Args: _check_type (bool): if True, values for parameters in openapi_types will be type checked and a TypeError will be @@ -372,6 +394,10 @@ def __init__(self, id, product_id, type, status, channel_category, channel_code, self.fee = fee self.created = created self.updated = updated + if settlement_status is not None: + self.settlement_status = settlement_status + if estimated_settlement_time is not None: + self.estimated_settlement_time = estimated_settlement_time for var_name, var_value in kwargs.items(): if var_name not in self.attribute_map and \ self._configuration is not None and \ diff --git a/xendit/balance_and_transaction/model/transaction_response_type.py b/xendit/balance_and_transaction/model/transaction_response_type.py index b711aa55..fb9ea302 100644 --- a/xendit/balance_and_transaction/model/transaction_response_type.py +++ b/xendit/balance_and_transaction/model/transaction_response_type.py @@ -5,6 +5,7 @@ import re # noqa: F401 import sys # noqa: F401 +from typing import List # noqa: F401 from xendit.model_utils import ( # noqa: F401 ApiTypeError, @@ -23,11 +24,12 @@ ) from xendit.exceptions import ApiAttributeError +from xendit.balance_and_transaction.model.transaction_types import TransactionTypes +globals()['TransactionTypes'] = TransactionTypes -def lazy_import(): - from xendit.balance_and_transaction.model.transaction_types import TransactionTypes - globals()['TransactionTypes'] = TransactionTypes +def lazy_import(): + pass class TransactionResponseType(ModelComposed): """NOTE: This class is auto generated by OpenAPI Generator. diff --git a/xendit/balance_and_transaction/model/transaction_statuses.py b/xendit/balance_and_transaction/model/transaction_statuses.py index 567673e1..f09cd8fc 100644 --- a/xendit/balance_and_transaction/model/transaction_statuses.py +++ b/xendit/balance_and_transaction/model/transaction_statuses.py @@ -5,6 +5,7 @@ import re # noqa: F401 import sys # noqa: F401 +from typing import List # noqa: F401 from xendit.model_utils import ( # noqa: F401 ApiTypeError, @@ -25,6 +26,9 @@ +def lazy_import(): + pass + class TransactionStatuses(ModelSimple): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech diff --git a/xendit/balance_and_transaction/model/transaction_types.py b/xendit/balance_and_transaction/model/transaction_types.py index 64fbc7a6..36bfa9e6 100644 --- a/xendit/balance_and_transaction/model/transaction_types.py +++ b/xendit/balance_and_transaction/model/transaction_types.py @@ -5,6 +5,7 @@ import re # noqa: F401 import sys # noqa: F401 +from typing import List # noqa: F401 from xendit.model_utils import ( # noqa: F401 ApiTypeError, @@ -25,6 +26,9 @@ +def lazy_import(): + pass + class TransactionTypes(ModelSimple): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech diff --git a/xendit/balance_and_transaction/model/transactions_response.py b/xendit/balance_and_transaction/model/transactions_response.py index 8b70ca38..f340dd58 100644 --- a/xendit/balance_and_transaction/model/transactions_response.py +++ b/xendit/balance_and_transaction/model/transactions_response.py @@ -5,6 +5,7 @@ import re # noqa: F401 import sys # noqa: F401 +from typing import List # noqa: F401 from xendit.model_utils import ( # noqa: F401 ApiTypeError, @@ -23,13 +24,14 @@ ) from xendit.exceptions import ApiAttributeError +from xendit.balance_and_transaction.model.link_item import LinkItem +from xendit.balance_and_transaction.model.transaction_response import TransactionResponse +globals()['LinkItem'] = LinkItem +globals()['TransactionResponse'] = TransactionResponse -def lazy_import(): - from xendit.balance_and_transaction.model.link_item import LinkItem - from xendit.balance_and_transaction.model.transaction_response import TransactionResponse - globals()['LinkItem'] = LinkItem - globals()['TransactionResponse'] = TransactionResponse +def lazy_import(): + pass class TransactionsResponse(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. @@ -86,7 +88,7 @@ def openapi_types(): return { 'has_more': (bool,), # noqa: E501 'data': ([TransactionResponse],), # noqa: E501 - 'links': ([LinkItem],), # noqa: E501 + 'links': ([LinkItem], none_type), # noqa: E501 } @cached_property @@ -201,13 +203,19 @@ def _from_openapi_data(cls, has_more, data, *args, **kwargs): # noqa: E501 ]) @convert_js_args_to_python_args - def __init__(self, has_more, data, *args, **kwargs): # noqa: E501 + def __init__(self, + has_more: bool, + data: list, + links: list | None = None, + *args, **kwargs + ): # noqa: E501 """TransactionsResponse - a model defined in OpenAPI Args: has_more (bool): Indicates whether there are more items to be queried with `after_id` of the last item from the current result. Use the `links` to follow to the next result. data ([TransactionResponse]): + Keyword Args: _check_type (bool): if True, values for parameters in openapi_types will be type checked and a TypeError will be @@ -273,6 +281,8 @@ def __init__(self, has_more, data, *args, **kwargs): # noqa: E501 self.has_more = has_more self.data = data + if links is not None: + self.links = links for var_name, var_value in kwargs.items(): if var_name not in self.attribute_map and \ self._configuration is not None and \ diff --git a/xendit/balance_and_transaction/model/validation_error.py b/xendit/balance_and_transaction/model/validation_error.py index f15bc374..85aa7949 100644 --- a/xendit/balance_and_transaction/model/validation_error.py +++ b/xendit/balance_and_transaction/model/validation_error.py @@ -5,6 +5,7 @@ import re # noqa: F401 import sys # noqa: F401 +from typing import List # noqa: F401 from xendit.model_utils import ( # noqa: F401 ApiTypeError, @@ -25,6 +26,9 @@ +def lazy_import(): + pass + class ValidationError(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -79,7 +83,7 @@ def openapi_types(): 'status_code': (float,), # noqa: E501 'error': (str,), # noqa: E501 'message': (str,), # noqa: E501 - 'validation': ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type,), # noqa: E501 + 'validation': ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type, none_type), # noqa: E501 } @cached_property @@ -197,7 +201,13 @@ def _from_openapi_data(cls, status_code, error, message, *args, **kwargs): # no ]) @convert_js_args_to_python_args - def __init__(self, status_code, error, message, *args, **kwargs): # noqa: E501 + def __init__(self, + status_code: float, + error: str, + message: str, + validation: dict | None = None, + *args, **kwargs + ): # noqa: E501 """ValidationError - a model defined in OpenAPI Args: @@ -205,6 +215,7 @@ def __init__(self, status_code, error, message, *args, **kwargs): # noqa: E501 error (str): message (str): + Keyword Args: _check_type (bool): if True, values for parameters in openapi_types will be type checked and a TypeError will be @@ -271,6 +282,8 @@ def __init__(self, status_code, error, message, *args, **kwargs): # noqa: E501 self.status_code = status_code self.error = error self.message = message + if validation is not None: + self.validation = validation for var_name, var_value in kwargs.items(): if var_name not in self.attribute_map and \ self._configuration is not None and \ diff --git a/xendit/balance_and_transaction/transaction_api.py b/xendit/balance_and_transaction/transaction_api.py index a5190663..f4ae8547 100644 --- a/xendit/balance_and_transaction/transaction_api.py +++ b/xendit/balance_and_transaction/transaction_api.py @@ -19,6 +19,7 @@ none_type, validate_and_convert_types ) +from typing import Optional, List # noqa: F401 from xendit.balance_and_transaction.model import * # noqa: F401,E501 @@ -229,15 +230,29 @@ def __init__(self, api_client=None): def get_all_transactions( self, + for_user_id: Optional[str] = None, + types: Optional[List[TransactionTypes]] = None, + statuses: Optional[List[TransactionStatuses]] = None, + channel_categories: Optional[List[ChannelsCategories]] = None, + reference_id: Optional[str] = None, + product_id: Optional[str] = None, + account_identifier: Optional[str] = None, + amount: Optional[float] = None, + currency: Optional[Currency] = None, + created: Optional[DateRangeFilter] = None, + updated: Optional[DateRangeFilter] = None, + limit: Optional[float] = 10, + after_id: Optional[TransactionId] = None, + before_id: Optional[TransactionId] = None, **kwargs - ): + ) -> TransactionsResponse: """Get a list of transactions # noqa: E501 Get a list of all transactions based on filter and search parameters. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_all_transactions(async_req=True) + >>> thread = api.get_all_transactions(for_user_id, types, statuses, channel_categories, reference_id, product_id, account_identifier, amount, currency, created, updated, after_id, before_id, limit=10, async_req=True) >>> result = thread.get() @@ -317,20 +332,49 @@ def get_all_transactions( '_content_type') kwargs['_host_index'] = kwargs.get('_host_index') kwargs['_request_auths'] = kwargs.get('_request_auths', None) + if for_user_id is not None: + kwargs['for_user_id'] = for_user_id + if types is not None: + kwargs['types'] = types + if statuses is not None: + kwargs['statuses'] = statuses + if channel_categories is not None: + kwargs['channel_categories'] = channel_categories + if reference_id is not None: + kwargs['reference_id'] = reference_id + if product_id is not None: + kwargs['product_id'] = product_id + if account_identifier is not None: + kwargs['account_identifier'] = account_identifier + if amount is not None: + kwargs['amount'] = amount + if currency is not None: + kwargs['currency'] = currency + if created is not None: + kwargs['created'] = created + if updated is not None: + kwargs['updated'] = updated + if limit is not None: + kwargs['limit'] = limit + if after_id is not None: + kwargs['after_id'] = after_id + if before_id is not None: + kwargs['before_id'] = before_id return self.get_all_transactions_endpoint.call_with_http_info(**kwargs) def get_transaction_by_id( self, - id, + id: TransactionId, + for_user_id: Optional[str] = None, **kwargs - ): + ) -> TransactionResponse: """Get a transaction based on its id # noqa: E501 Get single specific transaction by transaction id. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_transaction_by_id(id, async_req=True) + >>> thread = api.get_transaction_by_id(id, for_user_id, async_req=True) >>> result = thread.get() Args: @@ -399,7 +443,8 @@ def get_transaction_by_id( '_content_type') kwargs['_host_index'] = kwargs.get('_host_index') kwargs['_request_auths'] = kwargs.get('_request_auths', None) - kwargs['id'] = \ - id + kwargs['id'] = id + if for_user_id is not None: + kwargs['for_user_id'] = for_user_id return self.get_transaction_by_id_endpoint.call_with_http_info(**kwargs) diff --git a/xendit/configuration.py b/xendit/configuration.py index d8085552..ad0983b3 100644 --- a/xendit/configuration.py +++ b/xendit/configuration.py @@ -365,7 +365,7 @@ def to_debug_report(self): "OS: {env}\n"\ "Python Version: {pyversion}\n"\ "Version of the API: 2.87.2\n"\ - "SDK Package Version: 3.1.0".\ + "SDK Package Version: 3.2.0".\ format(env=sys.platform, pyversion=sys.version) def get_host_settings(self): diff --git a/xendit/exceptions.py b/xendit/exceptions.py index 58208c5b..c711eb98 100644 --- a/xendit/exceptions.py +++ b/xendit/exceptions.py @@ -2,6 +2,7 @@ The version of the XENDIT API: 2.87.2 """ +import json class OpenApiException(Exception): """The base exception class for all OpenAPIExceptions""" @@ -90,58 +91,52 @@ def __init__(self, msg, path_to_item=None): super(ApiKeyError, self).__init__(full_msg) -class ApiException(OpenApiException): - - def __init__(self, status=None, reason=None, http_resp=None): - if http_resp: - self.status = http_resp.status - self.reason = http_resp.reason - self.body = http_resp.data - self.headers = http_resp.getheaders() +class XenditSdkException(OpenApiException): + def __init__(self, raw_response=None, param_status=None, param_status_text=None): + if raw_response is None: + self.rawResponse = raw_response + self.status = param_status or "" + self.errorCode = "" + self.errorMessage = param_status_text or "" else: - self.status = status - self.reason = reason - self.body = None - self.headers = None + raw_response = json.loads(raw_response.decode(encoding="utf-8")) if isinstance(raw_response, bytes) else raw_response + self.rawResponse = raw_response + + self.status = param_status or "" + if self.status == "" and "status" in raw_response and raw_response["status"] is not None: + self.status = raw_response["status"] + elif self.status == "" and "status_code" in raw_response and raw_response["status_code"] is not None: + self.status = raw_response["status_code"] + elif self.status == "" and "statusCode" in raw_response and raw_response["statusCode"] is not None: + self.status = raw_response["statusCode"] + + + if "error" in raw_response and raw_response["error"] is not None: + self.errorCode = raw_response["error"] + elif "error_code" in raw_response and raw_response["error_code"] is not None: + self.errorCode = raw_response["error_code"] + elif "errorCode" in raw_response and raw_response["errorCode"] is not None: + self.errorCode = raw_response["errorCode"] + else: + self.errorCode = "" + + if "message" in raw_response and raw_response["message"] is not None: + self.errorMessage = raw_response["message"] + elif "error_message" in raw_response and raw_response["error_message"] is not None: + self.errorMessage = raw_response["error_message"] + elif "errorMessage" in raw_response and raw_response["errorMessage"] is not None: + self.errorMessage = raw_response["errorMessage"] + else: + self.errorMessage = param_status_text or "" def __str__(self): """Custom error messages for exception""" error_message = "Status Code: {0}\n"\ - "Reason: {1}\n".format(self.status, self.reason) - if self.headers: - error_message += "HTTP response headers: {0}\n".format( - self.headers) - - if self.body: - error_message += "HTTP response body: {0}\n".format(self.body) - + "Error Code: {1}\n"\ + "Error Message: {2}\n"\ + "Raw Response: {3}\n".format(self.status, self.errorCode, self.errorMessage, self.rawResponse) return error_message - -class NotFoundException(ApiException): - - def __init__(self, status=None, reason=None, http_resp=None): - super(NotFoundException, self).__init__(status, reason, http_resp) - - -class UnauthorizedException(ApiException): - - def __init__(self, status=None, reason=None, http_resp=None): - super(UnauthorizedException, self).__init__(status, reason, http_resp) - - -class ForbiddenException(ApiException): - - def __init__(self, status=None, reason=None, http_resp=None): - super(ForbiddenException, self).__init__(status, reason, http_resp) - - -class ServiceException(ApiException): - - def __init__(self, status=None, reason=None, http_resp=None): - super(ServiceException, self).__init__(status, reason, http_resp) - - def render_path(path_to_item): """Returns a string representation of a path""" result = "" diff --git a/xendit/invoice/invoice_api.py b/xendit/invoice/invoice_api.py index 996ff8b7..71c7e730 100644 --- a/xendit/invoice/invoice_api.py +++ b/xendit/invoice/invoice_api.py @@ -19,6 +19,7 @@ none_type, validate_and_convert_types ) +from typing import Optional, List # noqa: F401 from xendit.invoice.model import * # noqa: F401,E501 @@ -297,9 +298,9 @@ def __init__(self, api_client=None): def create_invoice( self, - create_invoice_request, + create_invoice_request: CreateInvoiceRequest, **kwargs - ): + ) -> Invoice: """Create an invoice # noqa: E501 This method makes a synchronous HTTP request by default. To make an @@ -373,15 +374,14 @@ def create_invoice( '_content_type') kwargs['_host_index'] = kwargs.get('_host_index') kwargs['_request_auths'] = kwargs.get('_request_auths', None) - kwargs['create_invoice_request'] = \ - create_invoice_request + kwargs['create_invoice_request'] = create_invoice_request return self.create_invoice_endpoint.call_with_http_info(**kwargs) def expire_invoice( self, - invoice_id, + invoice_id: str, **kwargs - ): + ) -> Invoice: """Manually expire an invoice # noqa: E501 This method makes a synchronous HTTP request by default. To make an @@ -455,15 +455,14 @@ def expire_invoice( '_content_type') kwargs['_host_index'] = kwargs.get('_host_index') kwargs['_request_auths'] = kwargs.get('_request_auths', None) - kwargs['invoice_id'] = \ - invoice_id + kwargs['invoice_id'] = invoice_id return self.expire_invoice_endpoint.call_with_http_info(**kwargs) def get_invoice_by_id( self, - invoice_id, + invoice_id: str, **kwargs - ): + ) -> Invoice: """Get invoice by invoice id # noqa: E501 This method makes a synchronous HTTP request by default. To make an @@ -537,20 +536,33 @@ def get_invoice_by_id( '_content_type') kwargs['_host_index'] = kwargs.get('_host_index') kwargs['_request_auths'] = kwargs.get('_request_auths', None) - kwargs['invoice_id'] = \ - invoice_id + kwargs['invoice_id'] = invoice_id return self.get_invoice_by_id_endpoint.call_with_http_info(**kwargs) def get_invoices( self, + external_id: Optional[str] = None, + statuses: Optional[List[InvoiceStatus]] = None, + limit: Optional[float] = None, + created_after: Optional[datetime] = None, + created_before: Optional[datetime] = None, + paid_after: Optional[datetime] = None, + paid_before: Optional[datetime] = None, + expired_after: Optional[datetime] = None, + expired_before: Optional[datetime] = None, + last_invoice: Optional[str] = None, + client_types: Optional[List[InvoiceClientType]] = None, + payment_channels: Optional[List[str]] = None, + on_demand_link: Optional[str] = None, + recurring_payment_id: Optional[str] = None, **kwargs - ): + ) -> [Invoice]: """Get all Invoices # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_invoices(async_req=True) + >>> thread = api.get_invoices(external_id, statuses, limit, created_after, created_before, paid_after, paid_before, expired_after, expired_before, last_invoice, client_types, payment_channels, on_demand_link, recurring_payment_id, async_req=True) >>> result = thread.get() @@ -630,5 +642,33 @@ def get_invoices( '_content_type') kwargs['_host_index'] = kwargs.get('_host_index') kwargs['_request_auths'] = kwargs.get('_request_auths', None) + if external_id is not None: + kwargs['external_id'] = external_id + if statuses is not None: + kwargs['statuses'] = statuses + if limit is not None: + kwargs['limit'] = limit + if created_after is not None: + kwargs['created_after'] = created_after + if created_before is not None: + kwargs['created_before'] = created_before + if paid_after is not None: + kwargs['paid_after'] = paid_after + if paid_before is not None: + kwargs['paid_before'] = paid_before + if expired_after is not None: + kwargs['expired_after'] = expired_after + if expired_before is not None: + kwargs['expired_before'] = expired_before + if last_invoice is not None: + kwargs['last_invoice'] = last_invoice + if client_types is not None: + kwargs['client_types'] = client_types + if payment_channels is not None: + kwargs['payment_channels'] = payment_channels + if on_demand_link is not None: + kwargs['on_demand_link'] = on_demand_link + if recurring_payment_id is not None: + kwargs['recurring_payment_id'] = recurring_payment_id return self.get_invoices_endpoint.call_with_http_info(**kwargs) diff --git a/xendit/invoice/model/address_object.py b/xendit/invoice/model/address_object.py index 15be07bc..552d7d3e 100644 --- a/xendit/invoice/model/address_object.py +++ b/xendit/invoice/model/address_object.py @@ -5,6 +5,7 @@ import re # noqa: F401 import sys # noqa: F401 +from typing import List # noqa: F401 from xendit.model_utils import ( # noqa: F401 ApiTypeError, @@ -25,6 +26,9 @@ +def lazy_import(): + pass + class AddressObject(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -76,13 +80,13 @@ def openapi_types(): and the value is attribute type. """ return { - 'country': (str, none_type,), # noqa: E501 - 'street_line1': (str, none_type,), # noqa: E501 - 'street_line2': (str, none_type,), # noqa: E501 - 'city': (str, none_type,), # noqa: E501 - 'province': (str, none_type,), # noqa: E501 - 'state': (str, none_type,), # noqa: E501 - 'postal_code': (str, none_type,), # noqa: E501 + 'country': (str, none_type, none_type), # noqa: E501 + 'street_line1': (str, none_type, none_type), # noqa: E501 + 'street_line2': (str, none_type, none_type), # noqa: E501 + 'city': (str, none_type, none_type), # noqa: E501 + 'province': (str, none_type, none_type), # noqa: E501 + 'state': (str, none_type, none_type), # noqa: E501 + 'postal_code': (str, none_type, none_type), # noqa: E501 } @cached_property @@ -201,9 +205,19 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 ]) @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 + def __init__(self, + country: str | None = None, + street_line1: str | None = None, + street_line2: str | None = None, + city: str | None = None, + province: str | None = None, + state: str | None = None, + postal_code: str | None = None, + *args, **kwargs + ): # noqa: E501 """AddressObject - a model defined in OpenAPI + Keyword Args: _check_type (bool): if True, values for parameters in openapi_types will be type checked and a TypeError will be @@ -273,6 +287,20 @@ def __init__(self, *args, **kwargs): # noqa: E501 self._configuration = _configuration self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + if country is not None: + self.country = country + if street_line1 is not None: + self.street_line1 = street_line1 + if street_line2 is not None: + self.street_line2 = street_line2 + if city is not None: + self.city = city + if province is not None: + self.province = province + if state is not None: + self.state = state + if postal_code is not None: + self.postal_code = postal_code for var_name, var_value in kwargs.items(): if var_name not in self.attribute_map and \ self._configuration is not None and \ diff --git a/xendit/invoice/model/alternative_display_item.py b/xendit/invoice/model/alternative_display_item.py index 0110e052..ebb02fd9 100644 --- a/xendit/invoice/model/alternative_display_item.py +++ b/xendit/invoice/model/alternative_display_item.py @@ -5,6 +5,7 @@ import re # noqa: F401 import sys # noqa: F401 +from typing import List # noqa: F401 from xendit.model_utils import ( # noqa: F401 ApiTypeError, @@ -25,6 +26,9 @@ +def lazy_import(): + pass + class AlternativeDisplayItem(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -76,8 +80,8 @@ def openapi_types(): and the value is attribute type. """ return { - 'type': (str,), # noqa: E501 - 'value': (str,), # noqa: E501 + 'type': (str, none_type), # noqa: E501 + 'value': (str, none_type), # noqa: E501 } @cached_property @@ -186,9 +190,14 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 ]) @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 + def __init__(self, + type: str | None = None, + value: str | None = None, + *args, **kwargs + ): # noqa: E501 """AlternativeDisplayItem - a model defined in OpenAPI + Keyword Args: _check_type (bool): if True, values for parameters in openapi_types will be type checked and a TypeError will be @@ -253,6 +262,10 @@ def __init__(self, *args, **kwargs): # noqa: E501 self._configuration = _configuration self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + if type is not None: + self.type = type + if value is not None: + self.value = value for var_name, var_value in kwargs.items(): if var_name not in self.attribute_map and \ self._configuration is not None and \ diff --git a/xendit/invoice/model/bad_request_error.py b/xendit/invoice/model/bad_request_error.py index 3888699b..38c55b24 100644 --- a/xendit/invoice/model/bad_request_error.py +++ b/xendit/invoice/model/bad_request_error.py @@ -5,6 +5,7 @@ import re # noqa: F401 import sys # noqa: F401 +from typing import List # noqa: F401 from xendit.model_utils import ( # noqa: F401 ApiTypeError, @@ -25,6 +26,9 @@ +def lazy_import(): + pass + class BadRequestError(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -199,13 +203,18 @@ def _from_openapi_data(cls, error_code, message, *args, **kwargs): # noqa: E501 ]) @convert_js_args_to_python_args - def __init__(self, error_code, message, *args, **kwargs): # noqa: E501 + def __init__(self, + error_code: str, + message: str, + *args, **kwargs + ): # noqa: E501 """BadRequestError - a model defined in OpenAPI Args: error_code (str): The error code indicating the type of error that occurred. message (str): A human-readable error message that provides additional information about the error. + Keyword Args: _check_type (bool): if True, values for parameters in openapi_types will be type checked and a TypeError will be diff --git a/xendit/invoice/model/bank.py b/xendit/invoice/model/bank.py index 741e8e94..2c726e47 100644 --- a/xendit/invoice/model/bank.py +++ b/xendit/invoice/model/bank.py @@ -5,6 +5,7 @@ import re # noqa: F401 import sys # noqa: F401 +from typing import List # noqa: F401 from xendit.model_utils import ( # noqa: F401 ApiTypeError, @@ -23,13 +24,14 @@ ) from xendit.exceptions import ApiAttributeError +from xendit.invoice.model.alternative_display_item import AlternativeDisplayItem +from xendit.invoice.model.bank_code import BankCode +globals()['AlternativeDisplayItem'] = AlternativeDisplayItem +globals()['BankCode'] = BankCode -def lazy_import(): - from xendit.invoice.model.alternative_display_item import AlternativeDisplayItem - from xendit.invoice.model.bank_code import BankCode - globals()['AlternativeDisplayItem'] = AlternativeDisplayItem - globals()['BankCode'] = BankCode +def lazy_import(): + pass class Bank(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. @@ -87,10 +89,10 @@ def openapi_types(): 'bank_code': (BankCode,), # noqa: E501 'collection_type': (str,), # noqa: E501 'account_holder_name': (str,), # noqa: E501 - 'bank_branch': (str,), # noqa: E501 - 'bank_account_number': (str,), # noqa: E501 - 'transfer_amount': (float,), # noqa: E501 - 'alternative_displays': ([AlternativeDisplayItem],), # noqa: E501 + 'bank_branch': (str, none_type), # noqa: E501 + 'bank_account_number': (str, none_type), # noqa: E501 + 'transfer_amount': (float, none_type), # noqa: E501 + 'alternative_displays': ([AlternativeDisplayItem], none_type), # noqa: E501 } @cached_property @@ -214,7 +216,16 @@ def _from_openapi_data(cls, bank_code, collection_type, account_holder_name, *ar ]) @convert_js_args_to_python_args - def __init__(self, bank_code, collection_type, account_holder_name, *args, **kwargs): # noqa: E501 + def __init__(self, + bank_code: BankCode, + collection_type: str, + account_holder_name: str, + bank_branch: str | None = None, + bank_account_number: str | None = None, + transfer_amount: float | None = None, + alternative_displays: list | None = None, + *args, **kwargs + ): # noqa: E501 """Bank - a model defined in OpenAPI Args: @@ -222,6 +233,7 @@ def __init__(self, bank_code, collection_type, account_holder_name, *args, **kwa collection_type (str): The collection type for the bank details. account_holder_name (str): The name of the account holder. + Keyword Args: _check_type (bool): if True, values for parameters in openapi_types will be type checked and a TypeError will be @@ -291,6 +303,14 @@ def __init__(self, bank_code, collection_type, account_holder_name, *args, **kwa self.bank_code = bank_code self.collection_type = collection_type self.account_holder_name = account_holder_name + if bank_branch is not None: + self.bank_branch = bank_branch + if bank_account_number is not None: + self.bank_account_number = bank_account_number + if transfer_amount is not None: + self.transfer_amount = transfer_amount + if alternative_displays is not None: + self.alternative_displays = alternative_displays for var_name, var_value in kwargs.items(): if var_name not in self.attribute_map and \ self._configuration is not None and \ diff --git a/xendit/invoice/model/bank_code.py b/xendit/invoice/model/bank_code.py index 73e07762..519b6606 100644 --- a/xendit/invoice/model/bank_code.py +++ b/xendit/invoice/model/bank_code.py @@ -5,6 +5,7 @@ import re # noqa: F401 import sys # noqa: F401 +from typing import List # noqa: F401 from xendit.model_utils import ( # noqa: F401 ApiTypeError, @@ -25,6 +26,9 @@ +def lazy_import(): + pass + class BankCode(ModelSimple): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -54,6 +58,9 @@ class BankCode(ModelSimple): 'PERMATA': "PERMATA", 'BSI': "BSI", 'BJB': "BJB", + 'SAHABAT_SAMPOERNA': "SAHABAT_SAMPOERNA", + 'CIMB': "CIMB", + 'BNC': "BNC", }, } @@ -105,10 +112,10 @@ def __init__(self, *args, **kwargs): Note that value can be passed either in args or in kwargs, but not in both. Args: - args[0] (str): Representing the available bank channels used for invoice-related transactions.., must be one of ["BCA", "BNI", "BRI", "MANDIRI", "PERMATA", "BSI", "BJB", ] # noqa: E501 + args[0] (str): Representing the available bank channels used for invoice-related transactions.., must be one of ["BCA", "BNI", "BRI", "MANDIRI", "PERMATA", "BSI", "BJB", "SAHABAT_SAMPOERNA", "CIMB", "BNC", ] # noqa: E501 Keyword Args: - value (str): Representing the available bank channels used for invoice-related transactions.., must be one of ["BCA", "BNI", "BRI", "MANDIRI", "PERMATA", "BSI", "BJB", ] # noqa: E501 + value (str): Representing the available bank channels used for invoice-related transactions.., must be one of ["BCA", "BNI", "BRI", "MANDIRI", "PERMATA", "BSI", "BJB", "SAHABAT_SAMPOERNA", "CIMB", "BNC", ] # noqa: E501 _check_type (bool): if True, values for parameters in openapi_types will be type checked and a TypeError will be raised if the wrong type is input. @@ -201,10 +208,10 @@ def _from_openapi_data(cls, *args, **kwargs): Note that value can be passed either in args or in kwargs, but not in both. Args: - args[0] (str): Representing the available bank channels used for invoice-related transactions.., must be one of ["BCA", "BNI", "BRI", "MANDIRI", "PERMATA", "BSI", "BJB", ] # noqa: E501 + args[0] (str): Representing the available bank channels used for invoice-related transactions.., must be one of ["BCA", "BNI", "BRI", "MANDIRI", "PERMATA", "BSI", "BJB", "SAHABAT_SAMPOERNA", "CIMB", "BNC", ] # noqa: E501 Keyword Args: - value (str): Representing the available bank channels used for invoice-related transactions.., must be one of ["BCA", "BNI", "BRI", "MANDIRI", "PERMATA", "BSI", "BJB", ] # noqa: E501 + value (str): Representing the available bank channels used for invoice-related transactions.., must be one of ["BCA", "BNI", "BRI", "MANDIRI", "PERMATA", "BSI", "BJB", "SAHABAT_SAMPOERNA", "CIMB", "BNC", ] # noqa: E501 _check_type (bool): if True, values for parameters in openapi_types will be type checked and a TypeError will be raised if the wrong type is input. diff --git a/xendit/invoice/model/create_invoice_request.py b/xendit/invoice/model/create_invoice_request.py index e14a1fa1..6e47a9a4 100644 --- a/xendit/invoice/model/create_invoice_request.py +++ b/xendit/invoice/model/create_invoice_request.py @@ -5,6 +5,7 @@ import re # noqa: F401 import sys # noqa: F401 +from typing import List # noqa: F401 from xendit.model_utils import ( # noqa: F401 ApiTypeError, @@ -23,17 +24,18 @@ ) from xendit.exceptions import ApiAttributeError +from xendit.invoice.model.customer_object import CustomerObject +from xendit.invoice.model.invoice_fee import InvoiceFee +from xendit.invoice.model.invoice_item import InvoiceItem +from xendit.invoice.model.notification_preference import NotificationPreference +globals()['CustomerObject'] = CustomerObject +globals()['InvoiceFee'] = InvoiceFee +globals()['InvoiceItem'] = InvoiceItem +globals()['NotificationPreference'] = NotificationPreference -def lazy_import(): - from xendit.invoice.model.customer_object import CustomerObject - from xendit.invoice.model.invoice_fee import InvoiceFee - from xendit.invoice.model.invoice_item import InvoiceItem - from xendit.invoice.model.notification_preference import NotificationPreference - globals()['CustomerObject'] = CustomerObject - globals()['InvoiceFee'] = InvoiceFee - globals()['InvoiceItem'] = InvoiceItem - globals()['NotificationPreference'] = NotificationPreference +def lazy_import(): + pass class CreateInvoiceRequest(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. @@ -90,24 +92,24 @@ def openapi_types(): return { 'external_id': (str,), # noqa: E501 'amount': (float,), # noqa: E501 - 'payer_email': (str,), # noqa: E501 - 'description': (str,), # noqa: E501 - 'invoice_duration': (str,), # noqa: E501 - 'callback_virtual_account_id': (str,), # noqa: E501 - 'should_send_email': (bool,), # noqa: E501 - 'customer': (CustomerObject,), # noqa: E501 - 'customer_notification_preference': (NotificationPreference,), # noqa: E501 - 'success_redirect_url': (str,), # noqa: E501 - 'failure_redirect_url': (str,), # noqa: E501 - 'payment_methods': ([str],), # noqa: E501 - 'mid_label': (str,), # noqa: E501 - 'should_authenticate_credit_card': (bool,), # noqa: E501 - 'currency': (str,), # noqa: E501 - 'reminder_time': (float,), # noqa: E501 - 'local': (str,), # noqa: E501 - 'reminder_time_unit': (str,), # noqa: E501 - 'items': ([InvoiceItem],), # noqa: E501 - 'fees': ([InvoiceFee],), # noqa: E501 + 'payer_email': (str, none_type), # noqa: E501 + 'description': (str, none_type), # noqa: E501 + 'invoice_duration': (str, none_type), # noqa: E501 + 'callback_virtual_account_id': (str, none_type), # noqa: E501 + 'should_send_email': (bool, none_type), # noqa: E501 + 'customer': (CustomerObject, none_type), # noqa: E501 + 'customer_notification_preference': (NotificationPreference, none_type), # noqa: E501 + 'success_redirect_url': (str, none_type), # noqa: E501 + 'failure_redirect_url': (str, none_type), # noqa: E501 + 'payment_methods': ([str], none_type), # noqa: E501 + 'mid_label': (str, none_type), # noqa: E501 + 'should_authenticate_credit_card': (bool, none_type), # noqa: E501 + 'currency': (str, none_type), # noqa: E501 + 'reminder_time': (float, none_type), # noqa: E501 + 'local': (str, none_type), # noqa: E501 + 'reminder_time_unit': (str, none_type), # noqa: E501 + 'items': ([InvoiceItem], none_type), # noqa: E501 + 'fees': ([InvoiceFee], none_type), # noqa: E501 } @cached_property @@ -256,13 +258,36 @@ def _from_openapi_data(cls, external_id, amount, *args, **kwargs): # noqa: E501 ]) @convert_js_args_to_python_args - def __init__(self, external_id, amount, *args, **kwargs): # noqa: E501 + def __init__(self, + external_id: str, + amount: float, + payer_email: str | None = None, + description: str | None = None, + invoice_duration: str | None = None, + callback_virtual_account_id: str | None = None, + should_send_email: bool | None = None, + customer: CustomerObject | None = None, + customer_notification_preference: NotificationPreference | None = None, + success_redirect_url: str | None = None, + failure_redirect_url: str | None = None, + payment_methods: list | None = None, + mid_label: str | None = None, + should_authenticate_credit_card: bool | None = None, + currency: str | None = None, + reminder_time: float | None = None, + local: str | None = None, + reminder_time_unit: str | None = None, + items: list | None = None, + fees: list | None = None, + *args, **kwargs + ): # noqa: E501 """CreateInvoiceRequest - a model defined in OpenAPI Args: external_id (str): The external ID of the invoice. amount (float): The invoice amount. + Keyword Args: _check_type (bool): if True, values for parameters in openapi_types will be type checked and a TypeError will be @@ -345,6 +370,42 @@ def __init__(self, external_id, amount, *args, **kwargs): # noqa: E501 self.external_id = external_id self.amount = amount + if payer_email is not None: + self.payer_email = payer_email + if description is not None: + self.description = description + if invoice_duration is not None: + self.invoice_duration = invoice_duration + if callback_virtual_account_id is not None: + self.callback_virtual_account_id = callback_virtual_account_id + if should_send_email is not None: + self.should_send_email = should_send_email + if customer is not None: + self.customer = customer + if customer_notification_preference is not None: + self.customer_notification_preference = customer_notification_preference + if success_redirect_url is not None: + self.success_redirect_url = success_redirect_url + if failure_redirect_url is not None: + self.failure_redirect_url = failure_redirect_url + if payment_methods is not None: + self.payment_methods = payment_methods + if mid_label is not None: + self.mid_label = mid_label + if should_authenticate_credit_card is not None: + self.should_authenticate_credit_card = should_authenticate_credit_card + if currency is not None: + self.currency = currency + if reminder_time is not None: + self.reminder_time = reminder_time + if local is not None: + self.local = local + if reminder_time_unit is not None: + self.reminder_time_unit = reminder_time_unit + if items is not None: + self.items = items + if fees is not None: + self.fees = fees for var_name, var_value in kwargs.items(): if var_name not in self.attribute_map and \ self._configuration is not None and \ diff --git a/xendit/invoice/model/customer_object.py b/xendit/invoice/model/customer_object.py index 09763dfc..cbcc2451 100644 --- a/xendit/invoice/model/customer_object.py +++ b/xendit/invoice/model/customer_object.py @@ -5,6 +5,7 @@ import re # noqa: F401 import sys # noqa: F401 +from typing import List # noqa: F401 from xendit.model_utils import ( # noqa: F401 ApiTypeError, @@ -23,11 +24,12 @@ ) from xendit.exceptions import ApiAttributeError +from xendit.invoice.model.address_object import AddressObject +globals()['AddressObject'] = AddressObject -def lazy_import(): - from xendit.invoice.model.address_object import AddressObject - globals()['AddressObject'] = AddressObject +def lazy_import(): + pass class CustomerObject(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. @@ -82,14 +84,14 @@ def openapi_types(): """ lazy_import() return { - 'id': (str, none_type,), # noqa: E501 - 'phone_number': (str, none_type,), # noqa: E501 - 'given_names': (str, none_type,), # noqa: E501 - 'surname': (str, none_type,), # noqa: E501 - 'email': (str, none_type,), # noqa: E501 - 'mobile_number': (str, none_type,), # noqa: E501 - 'customer_id': (str, none_type,), # noqa: E501 - 'addresses': ([AddressObject], none_type,), # noqa: E501 + 'id': (str, none_type, none_type), # noqa: E501 + 'phone_number': (str, none_type, none_type), # noqa: E501 + 'given_names': (str, none_type, none_type), # noqa: E501 + 'surname': (str, none_type, none_type), # noqa: E501 + 'email': (str, none_type, none_type), # noqa: E501 + 'mobile_number': (str, none_type, none_type), # noqa: E501 + 'customer_id': (str, none_type, none_type), # noqa: E501 + 'addresses': ([AddressObject], none_type, none_type), # noqa: E501 } @cached_property @@ -210,9 +212,20 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 ]) @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 + def __init__(self, + id: str | None = None, + phone_number: str | None = None, + given_names: str | None = None, + surname: str | None = None, + email: str | None = None, + mobile_number: str | None = None, + customer_id: str | None = None, + addresses: list | None = None, + *args, **kwargs + ): # noqa: E501 """CustomerObject - a model defined in OpenAPI + Keyword Args: _check_type (bool): if True, values for parameters in openapi_types will be type checked and a TypeError will be @@ -283,6 +296,22 @@ def __init__(self, *args, **kwargs): # noqa: E501 self._configuration = _configuration self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + if id is not None: + self.id = id + if phone_number is not None: + self.phone_number = phone_number + if given_names is not None: + self.given_names = given_names + if surname is not None: + self.surname = surname + if email is not None: + self.email = email + if mobile_number is not None: + self.mobile_number = mobile_number + if customer_id is not None: + self.customer_id = customer_id + if addresses is not None: + self.addresses = addresses for var_name, var_value in kwargs.items(): if var_name not in self.attribute_map and \ self._configuration is not None and \ diff --git a/xendit/invoice/model/direct_debit.py b/xendit/invoice/model/direct_debit.py index 9bf54e73..cd591d9c 100644 --- a/xendit/invoice/model/direct_debit.py +++ b/xendit/invoice/model/direct_debit.py @@ -5,6 +5,7 @@ import re # noqa: F401 import sys # noqa: F401 +from typing import List # noqa: F401 from xendit.model_utils import ( # noqa: F401 ApiTypeError, @@ -23,11 +24,12 @@ ) from xendit.exceptions import ApiAttributeError +from xendit.invoice.model.direct_debit_type import DirectDebitType +globals()['DirectDebitType'] = DirectDebitType -def lazy_import(): - from xendit.invoice.model.direct_debit_type import DirectDebitType - globals()['DirectDebitType'] = DirectDebitType +def lazy_import(): + pass class DirectDebit(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. @@ -192,12 +194,16 @@ def _from_openapi_data(cls, direct_debit_type, *args, **kwargs): # noqa: E501 ]) @convert_js_args_to_python_args - def __init__(self, direct_debit_type, *args, **kwargs): # noqa: E501 + def __init__(self, + direct_debit_type: DirectDebitType, + *args, **kwargs + ): # noqa: E501 """DirectDebit - a model defined in OpenAPI Args: direct_debit_type (DirectDebitType): + Keyword Args: _check_type (bool): if True, values for parameters in openapi_types will be type checked and a TypeError will be diff --git a/xendit/invoice/model/direct_debit_type.py b/xendit/invoice/model/direct_debit_type.py index d4b6cfab..62bb9914 100644 --- a/xendit/invoice/model/direct_debit_type.py +++ b/xendit/invoice/model/direct_debit_type.py @@ -5,6 +5,7 @@ import re # noqa: F401 import sys # noqa: F401 +from typing import List # noqa: F401 from xendit.model_utils import ( # noqa: F401 ApiTypeError, @@ -25,6 +26,9 @@ +def lazy_import(): + pass + class DirectDebitType(ModelSimple): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -61,6 +65,11 @@ class DirectDebitType(ModelSimple): 'BA_BCA_KLIKPAY': "BA_BCA_KLIKPAY", 'DC_BCA_KLIKPAY': "DC_BCA_KLIKPAY", 'DD_BCA_KLIKPAY': "DD_BCA_KLIKPAY", + 'DD_BDO_EPAY': "DD_BDO_EPAY", + 'DD_RCBC': "DD_RCBC", + 'DD_CHINABANK': "DD_CHINABANK", + 'BA_CHINABANK': "BA_CHINABANK", + 'DC_CHINABANK': "DC_CHINABANK", }, } @@ -112,10 +121,10 @@ def __init__(self, *args, **kwargs): Note that value can be passed either in args or in kwargs, but not in both. Args: - args[0] (str): Representing the available Direct Debit channels used for invoice-related transactions.., must be one of ["BA_BRI", "DC_BRI", "DD_BRI", "DD_MANDIRI", "BA_BPI", "DC_BPI", "DD_BPI", "BA_UBP", "DC_UBP", "DD_UBP", "BCA_KLIKPAY", "BA_BCA_KLIKPAY", "DC_BCA_KLIKPAY", "DD_BCA_KLIKPAY", ] # noqa: E501 + args[0] (str): Representing the available Direct Debit channels used for invoice-related transactions.., must be one of ["BA_BRI", "DC_BRI", "DD_BRI", "DD_MANDIRI", "BA_BPI", "DC_BPI", "DD_BPI", "BA_UBP", "DC_UBP", "DD_UBP", "BCA_KLIKPAY", "BA_BCA_KLIKPAY", "DC_BCA_KLIKPAY", "DD_BCA_KLIKPAY", "DD_BDO_EPAY", "DD_RCBC", "DD_CHINABANK", "BA_CHINABANK", "DC_CHINABANK", ] # noqa: E501 Keyword Args: - value (str): Representing the available Direct Debit channels used for invoice-related transactions.., must be one of ["BA_BRI", "DC_BRI", "DD_BRI", "DD_MANDIRI", "BA_BPI", "DC_BPI", "DD_BPI", "BA_UBP", "DC_UBP", "DD_UBP", "BCA_KLIKPAY", "BA_BCA_KLIKPAY", "DC_BCA_KLIKPAY", "DD_BCA_KLIKPAY", ] # noqa: E501 + value (str): Representing the available Direct Debit channels used for invoice-related transactions.., must be one of ["BA_BRI", "DC_BRI", "DD_BRI", "DD_MANDIRI", "BA_BPI", "DC_BPI", "DD_BPI", "BA_UBP", "DC_UBP", "DD_UBP", "BCA_KLIKPAY", "BA_BCA_KLIKPAY", "DC_BCA_KLIKPAY", "DD_BCA_KLIKPAY", "DD_BDO_EPAY", "DD_RCBC", "DD_CHINABANK", "BA_CHINABANK", "DC_CHINABANK", ] # noqa: E501 _check_type (bool): if True, values for parameters in openapi_types will be type checked and a TypeError will be raised if the wrong type is input. @@ -208,10 +217,10 @@ def _from_openapi_data(cls, *args, **kwargs): Note that value can be passed either in args or in kwargs, but not in both. Args: - args[0] (str): Representing the available Direct Debit channels used for invoice-related transactions.., must be one of ["BA_BRI", "DC_BRI", "DD_BRI", "DD_MANDIRI", "BA_BPI", "DC_BPI", "DD_BPI", "BA_UBP", "DC_UBP", "DD_UBP", "BCA_KLIKPAY", "BA_BCA_KLIKPAY", "DC_BCA_KLIKPAY", "DD_BCA_KLIKPAY", ] # noqa: E501 + args[0] (str): Representing the available Direct Debit channels used for invoice-related transactions.., must be one of ["BA_BRI", "DC_BRI", "DD_BRI", "DD_MANDIRI", "BA_BPI", "DC_BPI", "DD_BPI", "BA_UBP", "DC_UBP", "DD_UBP", "BCA_KLIKPAY", "BA_BCA_KLIKPAY", "DC_BCA_KLIKPAY", "DD_BCA_KLIKPAY", "DD_BDO_EPAY", "DD_RCBC", "DD_CHINABANK", "BA_CHINABANK", "DC_CHINABANK", ] # noqa: E501 Keyword Args: - value (str): Representing the available Direct Debit channels used for invoice-related transactions.., must be one of ["BA_BRI", "DC_BRI", "DD_BRI", "DD_MANDIRI", "BA_BPI", "DC_BPI", "DD_BPI", "BA_UBP", "DC_UBP", "DD_UBP", "BCA_KLIKPAY", "BA_BCA_KLIKPAY", "DC_BCA_KLIKPAY", "DD_BCA_KLIKPAY", ] # noqa: E501 + value (str): Representing the available Direct Debit channels used for invoice-related transactions.., must be one of ["BA_BRI", "DC_BRI", "DD_BRI", "DD_MANDIRI", "BA_BPI", "DC_BPI", "DD_BPI", "BA_UBP", "DC_UBP", "DD_UBP", "BCA_KLIKPAY", "BA_BCA_KLIKPAY", "DC_BCA_KLIKPAY", "DD_BCA_KLIKPAY", "DD_BDO_EPAY", "DD_RCBC", "DD_CHINABANK", "BA_CHINABANK", "DC_CHINABANK", ] # noqa: E501 _check_type (bool): if True, values for parameters in openapi_types will be type checked and a TypeError will be raised if the wrong type is input. diff --git a/xendit/invoice/model/ewallet.py b/xendit/invoice/model/ewallet.py index e439e12a..1602bcb9 100644 --- a/xendit/invoice/model/ewallet.py +++ b/xendit/invoice/model/ewallet.py @@ -5,6 +5,7 @@ import re # noqa: F401 import sys # noqa: F401 +from typing import List # noqa: F401 from xendit.model_utils import ( # noqa: F401 ApiTypeError, @@ -23,11 +24,12 @@ ) from xendit.exceptions import ApiAttributeError +from xendit.invoice.model.ewallet_type import EwalletType +globals()['EwalletType'] = EwalletType -def lazy_import(): - from xendit.invoice.model.ewallet_type import EwalletType - globals()['EwalletType'] = EwalletType +def lazy_import(): + pass class Ewallet(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. @@ -192,12 +194,16 @@ def _from_openapi_data(cls, ewallet_type, *args, **kwargs): # noqa: E501 ]) @convert_js_args_to_python_args - def __init__(self, ewallet_type, *args, **kwargs): # noqa: E501 + def __init__(self, + ewallet_type: EwalletType, + *args, **kwargs + ): # noqa: E501 """Ewallet - a model defined in OpenAPI Args: ewallet_type (EwalletType): + Keyword Args: _check_type (bool): if True, values for parameters in openapi_types will be type checked and a TypeError will be diff --git a/xendit/invoice/model/ewallet_type.py b/xendit/invoice/model/ewallet_type.py index eb11bc7d..4ccf7fc7 100644 --- a/xendit/invoice/model/ewallet_type.py +++ b/xendit/invoice/model/ewallet_type.py @@ -5,6 +5,7 @@ import re # noqa: F401 import sys # noqa: F401 +from typing import List # noqa: F401 from xendit.model_utils import ( # noqa: F401 ApiTypeError, @@ -25,6 +26,9 @@ +def lazy_import(): + pass + class EwalletType(ModelSimple): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -54,6 +58,9 @@ class EwalletType(ModelSimple): 'SHOPEEPAY': "SHOPEEPAY", 'GCASH': "GCASH", 'GRABPAY': "GRABPAY", + 'ASTRAPAY': "ASTRAPAY", + 'NEXCASH': "NEXCASH", + 'JENIUSPAY': "JENIUSPAY", }, } @@ -105,10 +112,10 @@ def __init__(self, *args, **kwargs): Note that value can be passed either in args or in kwargs, but not in both. Args: - args[0] (str): Representing the available eWallet channels used for invoice-related transactions.., must be one of ["OVO", "DANA", "LINKAJA", "PAYMAYA", "SHOPEEPAY", "GCASH", "GRABPAY", ] # noqa: E501 + args[0] (str): Representing the available eWallet channels used for invoice-related transactions.., must be one of ["OVO", "DANA", "LINKAJA", "PAYMAYA", "SHOPEEPAY", "GCASH", "GRABPAY", "ASTRAPAY", "NEXCASH", "JENIUSPAY", ] # noqa: E501 Keyword Args: - value (str): Representing the available eWallet channels used for invoice-related transactions.., must be one of ["OVO", "DANA", "LINKAJA", "PAYMAYA", "SHOPEEPAY", "GCASH", "GRABPAY", ] # noqa: E501 + value (str): Representing the available eWallet channels used for invoice-related transactions.., must be one of ["OVO", "DANA", "LINKAJA", "PAYMAYA", "SHOPEEPAY", "GCASH", "GRABPAY", "ASTRAPAY", "NEXCASH", "JENIUSPAY", ] # noqa: E501 _check_type (bool): if True, values for parameters in openapi_types will be type checked and a TypeError will be raised if the wrong type is input. @@ -201,10 +208,10 @@ def _from_openapi_data(cls, *args, **kwargs): Note that value can be passed either in args or in kwargs, but not in both. Args: - args[0] (str): Representing the available eWallet channels used for invoice-related transactions.., must be one of ["OVO", "DANA", "LINKAJA", "PAYMAYA", "SHOPEEPAY", "GCASH", "GRABPAY", ] # noqa: E501 + args[0] (str): Representing the available eWallet channels used for invoice-related transactions.., must be one of ["OVO", "DANA", "LINKAJA", "PAYMAYA", "SHOPEEPAY", "GCASH", "GRABPAY", "ASTRAPAY", "NEXCASH", "JENIUSPAY", ] # noqa: E501 Keyword Args: - value (str): Representing the available eWallet channels used for invoice-related transactions.., must be one of ["OVO", "DANA", "LINKAJA", "PAYMAYA", "SHOPEEPAY", "GCASH", "GRABPAY", ] # noqa: E501 + value (str): Representing the available eWallet channels used for invoice-related transactions.., must be one of ["OVO", "DANA", "LINKAJA", "PAYMAYA", "SHOPEEPAY", "GCASH", "GRABPAY", "ASTRAPAY", "NEXCASH", "JENIUSPAY", ] # noqa: E501 _check_type (bool): if True, values for parameters in openapi_types will be type checked and a TypeError will be raised if the wrong type is input. diff --git a/xendit/invoice/model/forbidden_error.py b/xendit/invoice/model/forbidden_error.py index 926a8555..e36d4c35 100644 --- a/xendit/invoice/model/forbidden_error.py +++ b/xendit/invoice/model/forbidden_error.py @@ -5,6 +5,7 @@ import re # noqa: F401 import sys # noqa: F401 +from typing import List # noqa: F401 from xendit.model_utils import ( # noqa: F401 ApiTypeError, @@ -25,6 +26,9 @@ +def lazy_import(): + pass + class ForbiddenError(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -194,12 +198,17 @@ def _from_openapi_data(cls, message, *args, **kwargs): # noqa: E501 ]) @convert_js_args_to_python_args - def __init__(self, message, *args, **kwargs): # noqa: E501 + def __init__(self, + message: str, + error_code: str = "ACCESS_SUSPENDED", + *args, **kwargs + ): # noqa: E501 """ForbiddenError - a model defined in OpenAPI Args: message (str): A human-readable error message providing additional context about the 403 Forbidden response. + Keyword Args: error_code (str): The specific error code indicating that access to the invoice operation is suspended.. defaults to "ACCESS_SUSPENDED", must be one of ["ACCESS_SUSPENDED", ] # noqa: E501 _check_type (bool): if True, values for parameters in openapi_types @@ -234,7 +243,6 @@ def __init__(self, message, *args, **kwargs): # noqa: E501 _visited_composed_classes = (Animal,) """ - error_code = kwargs.get('error_code', "ACCESS_SUSPENDED") _check_type = kwargs.pop('_check_type', True) _spec_property_naming = kwargs.pop('_spec_property_naming', False) _path_to_item = kwargs.pop('_path_to_item', ()) diff --git a/xendit/invoice/model/invoice.py b/xendit/invoice/model/invoice.py index 4d5720f3..a189cd9b 100644 --- a/xendit/invoice/model/invoice.py +++ b/xendit/invoice/model/invoice.py @@ -5,6 +5,7 @@ import re # noqa: F401 import sys # noqa: F401 +from typing import List # noqa: F401 from xendit.model_utils import ( # noqa: F401 ApiTypeError, @@ -23,35 +24,36 @@ ) from xendit.exceptions import ApiAttributeError +from xendit.invoice.model.bank import Bank +from xendit.invoice.model.customer_object import CustomerObject +from xendit.invoice.model.direct_debit import DirectDebit +from xendit.invoice.model.ewallet import Ewallet +from xendit.invoice.model.invoice_currency import InvoiceCurrency +from xendit.invoice.model.invoice_fee import InvoiceFee +from xendit.invoice.model.invoice_item import InvoiceItem +from xendit.invoice.model.invoice_payment_method import InvoicePaymentMethod +from xendit.invoice.model.invoice_status import InvoiceStatus +from xendit.invoice.model.notification_preference import NotificationPreference +from xendit.invoice.model.paylater import Paylater +from xendit.invoice.model.qr_code import QrCode +from xendit.invoice.model.retail_outlet import RetailOutlet +globals()['Bank'] = Bank +globals()['CustomerObject'] = CustomerObject +globals()['DirectDebit'] = DirectDebit +globals()['Ewallet'] = Ewallet +globals()['InvoiceCurrency'] = InvoiceCurrency +globals()['InvoiceFee'] = InvoiceFee +globals()['InvoiceItem'] = InvoiceItem +globals()['InvoicePaymentMethod'] = InvoicePaymentMethod +globals()['InvoiceStatus'] = InvoiceStatus +globals()['NotificationPreference'] = NotificationPreference +globals()['Paylater'] = Paylater +globals()['QrCode'] = QrCode +globals()['RetailOutlet'] = RetailOutlet -def lazy_import(): - from xendit.invoice.model.bank import Bank - from xendit.invoice.model.customer_object import CustomerObject - from xendit.invoice.model.direct_debit import DirectDebit - from xendit.invoice.model.ewallet import Ewallet - from xendit.invoice.model.invoice_currency import InvoiceCurrency - from xendit.invoice.model.invoice_fee import InvoiceFee - from xendit.invoice.model.invoice_item import InvoiceItem - from xendit.invoice.model.invoice_payment_method import InvoicePaymentMethod - from xendit.invoice.model.invoice_status import InvoiceStatus - from xendit.invoice.model.notification_preference import NotificationPreference - from xendit.invoice.model.paylater import Paylater - from xendit.invoice.model.qr_code import QrCode - from xendit.invoice.model.retail_outlet import RetailOutlet - globals()['Bank'] = Bank - globals()['CustomerObject'] = CustomerObject - globals()['DirectDebit'] = DirectDebit - globals()['Ewallet'] = Ewallet - globals()['InvoiceCurrency'] = InvoiceCurrency - globals()['InvoiceFee'] = InvoiceFee - globals()['InvoiceItem'] = InvoiceItem - globals()['InvoicePaymentMethod'] = InvoicePaymentMethod - globals()['InvoiceStatus'] = InvoiceStatus - globals()['NotificationPreference'] = NotificationPreference - globals()['Paylater'] = Paylater - globals()['QrCode'] = QrCode - globals()['RetailOutlet'] = RetailOutlet +def lazy_import(): + pass class Invoice(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. @@ -123,22 +125,22 @@ def openapi_types(): 'should_send_email': (bool,), # noqa: E501 'created': (datetime,), # noqa: E501 'updated': (datetime,), # noqa: E501 - 'id': (str,), # noqa: E501 - 'payer_email': (str,), # noqa: E501 - 'description': (str,), # noqa: E501 - 'payment_method': (InvoicePaymentMethod,), # noqa: E501 - 'locale': (str,), # noqa: E501 - 'should_exclude_credit_card': (bool,), # noqa: E501 - 'success_redirect_url': (str,), # noqa: E501 - 'failure_redirect_url': (str,), # noqa: E501 - 'should_authenticate_credit_card': (bool,), # noqa: E501 - 'currency': (InvoiceCurrency,), # noqa: E501 - 'items': ([InvoiceItem],), # noqa: E501 - 'fixed_va': (bool,), # noqa: E501 - 'reminder_date': (datetime,), # noqa: E501 - 'customer': (CustomerObject,), # noqa: E501 - 'customer_notification_preference': (NotificationPreference,), # noqa: E501 - 'fees': ([InvoiceFee],), # noqa: E501 + 'id': (str, none_type), # noqa: E501 + 'payer_email': (str, none_type), # noqa: E501 + 'description': (str, none_type), # noqa: E501 + 'payment_method': (InvoicePaymentMethod, none_type), # noqa: E501 + 'locale': (str, none_type), # noqa: E501 + 'should_exclude_credit_card': (bool, none_type), # noqa: E501 + 'success_redirect_url': (str, none_type), # noqa: E501 + 'failure_redirect_url': (str, none_type), # noqa: E501 + 'should_authenticate_credit_card': (bool, none_type), # noqa: E501 + 'currency': (InvoiceCurrency, none_type), # noqa: E501 + 'items': ([InvoiceItem], none_type), # noqa: E501 + 'fixed_va': (bool, none_type), # noqa: E501 + 'reminder_date': (datetime, none_type), # noqa: E501 + 'customer': (CustomerObject, none_type), # noqa: E501 + 'customer_notification_preference': (NotificationPreference, none_type), # noqa: E501 + 'fees': ([InvoiceFee], none_type), # noqa: E501 } @cached_property @@ -328,7 +330,42 @@ def _from_openapi_data(cls, external_id, user_id, status, merchant_name, merchan ]) @convert_js_args_to_python_args - def __init__(self, external_id, user_id, status, merchant_name, merchant_profile_picture_url, amount, expiry_date, invoice_url, available_banks, available_retail_outlets, available_ewallets, available_qr_codes, available_direct_debits, available_paylaters, should_send_email, created, updated, *args, **kwargs): # noqa: E501 + def __init__(self, + external_id: str, + user_id: str, + status: InvoiceStatus, + merchant_name: str, + merchant_profile_picture_url: str, + amount: float, + expiry_date: datetime, + invoice_url: str, + available_banks: list, + available_retail_outlets: list, + available_ewallets: list, + available_qr_codes: list, + available_direct_debits: list, + available_paylaters: list, + should_send_email: bool, + created: datetime, + updated: datetime, + id: str | None = None, + payer_email: str | None = None, + description: str | None = None, + payment_method: InvoicePaymentMethod | None = None, + locale: str | None = None, + should_exclude_credit_card: bool | None = None, + success_redirect_url: str | None = None, + failure_redirect_url: str | None = None, + should_authenticate_credit_card: bool | None = None, + currency: InvoiceCurrency | None = None, + items: list | None = None, + fixed_va: bool | None = None, + reminder_date: datetime | None = None, + customer: CustomerObject | None = None, + customer_notification_preference: NotificationPreference | None = None, + fees: list | None = None, + *args, **kwargs + ): # noqa: E501 """Invoice - a model defined in OpenAPI Args: @@ -350,6 +387,7 @@ def __init__(self, external_id, user_id, status, merchant_name, merchant_profile created (datetime): Representing a date and time in ISO 8601 format. updated (datetime): Representing a date and time in ISO 8601 format. + Keyword Args: _check_type (bool): if True, values for parameters in openapi_types will be type checked and a TypeError will be @@ -445,6 +483,38 @@ def __init__(self, external_id, user_id, status, merchant_name, merchant_profile self.should_send_email = should_send_email self.created = created self.updated = updated + if id is not None: + self.id = id + if payer_email is not None: + self.payer_email = payer_email + if description is not None: + self.description = description + if payment_method is not None: + self.payment_method = payment_method + if locale is not None: + self.locale = locale + if should_exclude_credit_card is not None: + self.should_exclude_credit_card = should_exclude_credit_card + if success_redirect_url is not None: + self.success_redirect_url = success_redirect_url + if failure_redirect_url is not None: + self.failure_redirect_url = failure_redirect_url + if should_authenticate_credit_card is not None: + self.should_authenticate_credit_card = should_authenticate_credit_card + if currency is not None: + self.currency = currency + if items is not None: + self.items = items + if fixed_va is not None: + self.fixed_va = fixed_va + if reminder_date is not None: + self.reminder_date = reminder_date + if customer is not None: + self.customer = customer + if customer_notification_preference is not None: + self.customer_notification_preference = customer_notification_preference + if fees is not None: + self.fees = fees for var_name, var_value in kwargs.items(): if var_name not in self.attribute_map and \ self._configuration is not None and \ diff --git a/xendit/invoice/model/invoice_client_type.py b/xendit/invoice/model/invoice_client_type.py index c9a5b91a..f4e4f25a 100644 --- a/xendit/invoice/model/invoice_client_type.py +++ b/xendit/invoice/model/invoice_client_type.py @@ -5,6 +5,7 @@ import re # noqa: F401 import sys # noqa: F401 +from typing import List # noqa: F401 from xendit.model_utils import ( # noqa: F401 ApiTypeError, @@ -25,6 +26,9 @@ +def lazy_import(): + pass + class InvoiceClientType(ModelSimple): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech diff --git a/xendit/invoice/model/invoice_currency.py b/xendit/invoice/model/invoice_currency.py index 8adfb803..1ddb1235 100644 --- a/xendit/invoice/model/invoice_currency.py +++ b/xendit/invoice/model/invoice_currency.py @@ -5,6 +5,7 @@ import re # noqa: F401 import sys # noqa: F401 +from typing import List # noqa: F401 from xendit.model_utils import ( # noqa: F401 ApiTypeError, @@ -25,6 +26,9 @@ +def lazy_import(): + pass + class InvoiceCurrency(ModelSimple): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -49,6 +53,8 @@ class InvoiceCurrency(ModelSimple): ('value',): { 'IDR': "IDR", 'USD': "USD", + 'THB': "THB", + 'VND': "VND", 'PHP': "PHP", }, } @@ -101,10 +107,10 @@ def __init__(self, *args, **kwargs): Note that value can be passed either in args or in kwargs, but not in both. Args: - args[0] (str): Representing the currency used for an invoice.., must be one of ["IDR", "USD", "PHP", ] # noqa: E501 + args[0] (str): Representing the currency used for an invoice.., must be one of ["IDR", "USD", "THB", "VND", "PHP", ] # noqa: E501 Keyword Args: - value (str): Representing the currency used for an invoice.., must be one of ["IDR", "USD", "PHP", ] # noqa: E501 + value (str): Representing the currency used for an invoice.., must be one of ["IDR", "USD", "THB", "VND", "PHP", ] # noqa: E501 _check_type (bool): if True, values for parameters in openapi_types will be type checked and a TypeError will be raised if the wrong type is input. @@ -197,10 +203,10 @@ def _from_openapi_data(cls, *args, **kwargs): Note that value can be passed either in args or in kwargs, but not in both. Args: - args[0] (str): Representing the currency used for an invoice.., must be one of ["IDR", "USD", "PHP", ] # noqa: E501 + args[0] (str): Representing the currency used for an invoice.., must be one of ["IDR", "USD", "THB", "VND", "PHP", ] # noqa: E501 Keyword Args: - value (str): Representing the currency used for an invoice.., must be one of ["IDR", "USD", "PHP", ] # noqa: E501 + value (str): Representing the currency used for an invoice.., must be one of ["IDR", "USD", "THB", "VND", "PHP", ] # noqa: E501 _check_type (bool): if True, values for parameters in openapi_types will be type checked and a TypeError will be raised if the wrong type is input. diff --git a/xendit/invoice/model/invoice_error404_response_definition.py b/xendit/invoice/model/invoice_error404_response_definition.py index 927d1a71..6bb82e79 100644 --- a/xendit/invoice/model/invoice_error404_response_definition.py +++ b/xendit/invoice/model/invoice_error404_response_definition.py @@ -5,6 +5,7 @@ import re # noqa: F401 import sys # noqa: F401 +from typing import List # noqa: F401 from xendit.model_utils import ( # noqa: F401 ApiTypeError, @@ -25,6 +26,9 @@ +def lazy_import(): + pass + class InvoiceError404ResponseDefinition(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -194,12 +198,17 @@ def _from_openapi_data(cls, message, *args, **kwargs): # noqa: E501 ]) @convert_js_args_to_python_args - def __init__(self, message, *args, **kwargs): # noqa: E501 + def __init__(self, + message: str, + error_code: str = "INVOICE_NOT_FOUND_ERROR", + *args, **kwargs + ): # noqa: E501 """InvoiceError404ResponseDefinition - a model defined in OpenAPI Args: message (str): A human-readable error message providing additional context about the resource not being found. + Keyword Args: error_code (str): The specific error code indicating that the requested invoice was not found.. defaults to "INVOICE_NOT_FOUND_ERROR", must be one of ["INVOICE_NOT_FOUND_ERROR", ] # noqa: E501 _check_type (bool): if True, values for parameters in openapi_types @@ -234,7 +243,6 @@ def __init__(self, message, *args, **kwargs): # noqa: E501 _visited_composed_classes = (Animal,) """ - error_code = kwargs.get('error_code', "INVOICE_NOT_FOUND_ERROR") _check_type = kwargs.pop('_check_type', True) _spec_property_naming = kwargs.pop('_spec_property_naming', False) _path_to_item = kwargs.pop('_path_to_item', ()) diff --git a/xendit/invoice/model/invoice_fee.py b/xendit/invoice/model/invoice_fee.py index 7def8877..b8443705 100644 --- a/xendit/invoice/model/invoice_fee.py +++ b/xendit/invoice/model/invoice_fee.py @@ -5,6 +5,7 @@ import re # noqa: F401 import sys # noqa: F401 +from typing import List # noqa: F401 from xendit.model_utils import ( # noqa: F401 ApiTypeError, @@ -25,6 +26,9 @@ +def lazy_import(): + pass + class InvoiceFee(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -190,13 +194,18 @@ def _from_openapi_data(cls, type, value, *args, **kwargs): # noqa: E501 ]) @convert_js_args_to_python_args - def __init__(self, type, value, *args, **kwargs): # noqa: E501 + def __init__(self, + type: str, + value: float, + *args, **kwargs + ): # noqa: E501 """InvoiceFee - a model defined in OpenAPI Args: type (str): The type of fee. value (float): The value or amount of the fee. + Keyword Args: _check_type (bool): if True, values for parameters in openapi_types will be type checked and a TypeError will be diff --git a/xendit/invoice/model/invoice_item.py b/xendit/invoice/model/invoice_item.py index 1bffdded..c3927eba 100644 --- a/xendit/invoice/model/invoice_item.py +++ b/xendit/invoice/model/invoice_item.py @@ -5,6 +5,7 @@ import re # noqa: F401 import sys # noqa: F401 +from typing import List # noqa: F401 from xendit.model_utils import ( # noqa: F401 ApiTypeError, @@ -25,6 +26,9 @@ +def lazy_import(): + pass + class InvoiceItem(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -82,9 +86,9 @@ def openapi_types(): 'name': (str,), # noqa: E501 'price': (float,), # noqa: E501 'quantity': (float,), # noqa: E501 - 'reference_id': (str,), # noqa: E501 - 'url': (str,), # noqa: E501 - 'category': (str,), # noqa: E501 + 'reference_id': (str, none_type), # noqa: E501 + 'url': (str, none_type), # noqa: E501 + 'category': (str, none_type), # noqa: E501 } @cached_property @@ -206,7 +210,15 @@ def _from_openapi_data(cls, name, price, quantity, *args, **kwargs): # noqa: E5 ]) @convert_js_args_to_python_args - def __init__(self, name, price, quantity, *args, **kwargs): # noqa: E501 + def __init__(self, + name: str, + price: float, + quantity: float, + reference_id: str | None = None, + url: str | None = None, + category: str | None = None, + *args, **kwargs + ): # noqa: E501 """InvoiceItem - a model defined in OpenAPI Args: @@ -214,6 +226,7 @@ def __init__(self, name, price, quantity, *args, **kwargs): # noqa: E501 price (float): The price of the item. quantity (float): The quantity of the item. Must be greater than or equal to 0. + Keyword Args: _check_type (bool): if True, values for parameters in openapi_types will be type checked and a TypeError will be @@ -282,6 +295,12 @@ def __init__(self, name, price, quantity, *args, **kwargs): # noqa: E501 self.name = name self.price = price self.quantity = quantity + if reference_id is not None: + self.reference_id = reference_id + if url is not None: + self.url = url + if category is not None: + self.category = category for var_name, var_value in kwargs.items(): if var_name not in self.attribute_map and \ self._configuration is not None and \ diff --git a/xendit/invoice/model/invoice_not_found_error.py b/xendit/invoice/model/invoice_not_found_error.py index 2753a89d..41c52f41 100644 --- a/xendit/invoice/model/invoice_not_found_error.py +++ b/xendit/invoice/model/invoice_not_found_error.py @@ -5,6 +5,7 @@ import re # noqa: F401 import sys # noqa: F401 +from typing import List # noqa: F401 from xendit.model_utils import ( # noqa: F401 ApiTypeError, @@ -25,6 +26,9 @@ +def lazy_import(): + pass + class InvoiceNotFoundError(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -195,13 +199,18 @@ def _from_openapi_data(cls, error_code, message, *args, **kwargs): # noqa: E501 ]) @convert_js_args_to_python_args - def __init__(self, error_code, message, *args, **kwargs): # noqa: E501 + def __init__(self, + error_code: str, + message: str, + *args, **kwargs + ): # noqa: E501 """InvoiceNotFoundError - a model defined in OpenAPI Args: error_code (str): The error code indicating the type of error that occurred. message (str): A human-readable error message that provides additional information about the error. + Keyword Args: _check_type (bool): if True, values for parameters in openapi_types will be type checked and a TypeError will be diff --git a/xendit/invoice/model/invoice_payment_method.py b/xendit/invoice/model/invoice_payment_method.py index 3f70e61f..71dee369 100644 --- a/xendit/invoice/model/invoice_payment_method.py +++ b/xendit/invoice/model/invoice_payment_method.py @@ -5,6 +5,7 @@ import re # noqa: F401 import sys # noqa: F401 +from typing import List # noqa: F401 from xendit.model_utils import ( # noqa: F401 ApiTypeError, @@ -25,6 +26,9 @@ +def lazy_import(): + pass + class InvoicePaymentMethod(ModelSimple): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech diff --git a/xendit/invoice/model/invoice_status.py b/xendit/invoice/model/invoice_status.py index 814e44c0..c760a8b2 100644 --- a/xendit/invoice/model/invoice_status.py +++ b/xendit/invoice/model/invoice_status.py @@ -5,6 +5,7 @@ import re # noqa: F401 import sys # noqa: F401 +from typing import List # noqa: F401 from xendit.model_utils import ( # noqa: F401 ApiTypeError, @@ -25,6 +26,9 @@ +def lazy_import(): + pass + class InvoiceStatus(ModelSimple): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech diff --git a/xendit/invoice/model/notification_channel.py b/xendit/invoice/model/notification_channel.py index 6eee4e68..4b9cf300 100644 --- a/xendit/invoice/model/notification_channel.py +++ b/xendit/invoice/model/notification_channel.py @@ -5,6 +5,7 @@ import re # noqa: F401 import sys # noqa: F401 +from typing import List # noqa: F401 from xendit.model_utils import ( # noqa: F401 ApiTypeError, @@ -25,6 +26,9 @@ +def lazy_import(): + pass + class NotificationChannel(ModelSimple): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech diff --git a/xendit/invoice/model/notification_preference.py b/xendit/invoice/model/notification_preference.py index 458ac7a6..f69b95dd 100644 --- a/xendit/invoice/model/notification_preference.py +++ b/xendit/invoice/model/notification_preference.py @@ -5,6 +5,7 @@ import re # noqa: F401 import sys # noqa: F401 +from typing import List # noqa: F401 from xendit.model_utils import ( # noqa: F401 ApiTypeError, @@ -23,11 +24,12 @@ ) from xendit.exceptions import ApiAttributeError +from xendit.invoice.model.notification_channel import NotificationChannel +globals()['NotificationChannel'] = NotificationChannel -def lazy_import(): - from xendit.invoice.model.notification_channel import NotificationChannel - globals()['NotificationChannel'] = NotificationChannel +def lazy_import(): + pass class NotificationPreference(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. @@ -82,10 +84,10 @@ def openapi_types(): """ lazy_import() return { - 'invoice_created': ([NotificationChannel],), # noqa: E501 - 'invoice_reminder': ([NotificationChannel],), # noqa: E501 - 'invoice_expired': ([NotificationChannel],), # noqa: E501 - 'invoice_paid': ([NotificationChannel],), # noqa: E501 + 'invoice_created': ([NotificationChannel], none_type), # noqa: E501 + 'invoice_reminder': ([NotificationChannel], none_type), # noqa: E501 + 'invoice_expired': ([NotificationChannel], none_type), # noqa: E501 + 'invoice_paid': ([NotificationChannel], none_type), # noqa: E501 } @cached_property @@ -198,9 +200,16 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 ]) @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 + def __init__(self, + invoice_created: list | None = None, + invoice_reminder: list | None = None, + invoice_expired: list | None = None, + invoice_paid: list | None = None, + *args, **kwargs + ): # noqa: E501 """NotificationPreference - a model defined in OpenAPI + Keyword Args: _check_type (bool): if True, values for parameters in openapi_types will be type checked and a TypeError will be @@ -267,6 +276,14 @@ def __init__(self, *args, **kwargs): # noqa: E501 self._configuration = _configuration self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + if invoice_created is not None: + self.invoice_created = invoice_created + if invoice_reminder is not None: + self.invoice_reminder = invoice_reminder + if invoice_expired is not None: + self.invoice_expired = invoice_expired + if invoice_paid is not None: + self.invoice_paid = invoice_paid for var_name, var_value in kwargs.items(): if var_name not in self.attribute_map and \ self._configuration is not None and \ diff --git a/xendit/invoice/model/paylater.py b/xendit/invoice/model/paylater.py index 1898c835..56926f08 100644 --- a/xendit/invoice/model/paylater.py +++ b/xendit/invoice/model/paylater.py @@ -5,6 +5,7 @@ import re # noqa: F401 import sys # noqa: F401 +from typing import List # noqa: F401 from xendit.model_utils import ( # noqa: F401 ApiTypeError, @@ -23,11 +24,12 @@ ) from xendit.exceptions import ApiAttributeError +from xendit.invoice.model.paylater_type import PaylaterType +globals()['PaylaterType'] = PaylaterType -def lazy_import(): - from xendit.invoice.model.paylater_type import PaylaterType - globals()['PaylaterType'] = PaylaterType +def lazy_import(): + pass class Paylater(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. @@ -83,7 +85,7 @@ def openapi_types(): lazy_import() return { 'paylater_type': (PaylaterType,), # noqa: E501 - 'should_exclude': (bool,), # noqa: E501 + 'should_exclude': (bool, none_type), # noqa: E501 } @cached_property @@ -195,12 +197,17 @@ def _from_openapi_data(cls, paylater_type, *args, **kwargs): # noqa: E501 ]) @convert_js_args_to_python_args - def __init__(self, paylater_type, *args, **kwargs): # noqa: E501 + def __init__(self, + paylater_type: PaylaterType, + should_exclude: bool | None = None, + *args, **kwargs + ): # noqa: E501 """Paylater - a model defined in OpenAPI Args: paylater_type (PaylaterType): + Keyword Args: _check_type (bool): if True, values for parameters in openapi_types will be type checked and a TypeError will be @@ -265,6 +272,8 @@ def __init__(self, paylater_type, *args, **kwargs): # noqa: E501 self._visited_composed_classes = _visited_composed_classes + (self.__class__,) self.paylater_type = paylater_type + if should_exclude is not None: + self.should_exclude = should_exclude for var_name, var_value in kwargs.items(): if var_name not in self.attribute_map and \ self._configuration is not None and \ diff --git a/xendit/invoice/model/paylater_type.py b/xendit/invoice/model/paylater_type.py index cc342fe3..edb1c26b 100644 --- a/xendit/invoice/model/paylater_type.py +++ b/xendit/invoice/model/paylater_type.py @@ -5,6 +5,7 @@ import re # noqa: F401 import sys # noqa: F401 +from typing import List # noqa: F401 from xendit.model_utils import ( # noqa: F401 ApiTypeError, @@ -25,6 +26,9 @@ +def lazy_import(): + pass + class PaylaterType(ModelSimple): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech diff --git a/xendit/invoice/model/qr_code.py b/xendit/invoice/model/qr_code.py index 73cfd57f..80236ed7 100644 --- a/xendit/invoice/model/qr_code.py +++ b/xendit/invoice/model/qr_code.py @@ -5,6 +5,7 @@ import re # noqa: F401 import sys # noqa: F401 +from typing import List # noqa: F401 from xendit.model_utils import ( # noqa: F401 ApiTypeError, @@ -23,11 +24,12 @@ ) from xendit.exceptions import ApiAttributeError +from xendit.invoice.model.qr_code_type import QrCodeType +globals()['QrCodeType'] = QrCodeType -def lazy_import(): - from xendit.invoice.model.qr_code_type import QrCodeType - globals()['QrCodeType'] = QrCodeType +def lazy_import(): + pass class QrCode(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. @@ -192,12 +194,16 @@ def _from_openapi_data(cls, qr_code_type, *args, **kwargs): # noqa: E501 ]) @convert_js_args_to_python_args - def __init__(self, qr_code_type, *args, **kwargs): # noqa: E501 + def __init__(self, + qr_code_type: QrCodeType, + *args, **kwargs + ): # noqa: E501 """QrCode - a model defined in OpenAPI Args: qr_code_type (QrCodeType): + Keyword Args: _check_type (bool): if True, values for parameters in openapi_types will be type checked and a TypeError will be diff --git a/xendit/invoice/model/qr_code_type.py b/xendit/invoice/model/qr_code_type.py index 59ccc3a3..f868299f 100644 --- a/xendit/invoice/model/qr_code_type.py +++ b/xendit/invoice/model/qr_code_type.py @@ -5,6 +5,7 @@ import re # noqa: F401 import sys # noqa: F401 +from typing import List # noqa: F401 from xendit.model_utils import ( # noqa: F401 ApiTypeError, @@ -25,6 +26,9 @@ +def lazy_import(): + pass + class QrCodeType(ModelSimple): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech diff --git a/xendit/invoice/model/retail_outlet.py b/xendit/invoice/model/retail_outlet.py index afda7468..80f80a0b 100644 --- a/xendit/invoice/model/retail_outlet.py +++ b/xendit/invoice/model/retail_outlet.py @@ -5,6 +5,7 @@ import re # noqa: F401 import sys # noqa: F401 +from typing import List # noqa: F401 from xendit.model_utils import ( # noqa: F401 ApiTypeError, @@ -23,11 +24,12 @@ ) from xendit.exceptions import ApiAttributeError +from xendit.invoice.model.retail_outlet_name import RetailOutletName +globals()['RetailOutletName'] = RetailOutletName -def lazy_import(): - from xendit.invoice.model.retail_outlet_name import RetailOutletName - globals()['RetailOutletName'] = RetailOutletName +def lazy_import(): + pass class RetailOutlet(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. @@ -83,9 +85,9 @@ def openapi_types(): lazy_import() return { 'retail_outlet_name': (RetailOutletName,), # noqa: E501 - 'payment_code': (str,), # noqa: E501 - 'transfer_amount': (float,), # noqa: E501 - 'merchant_name': (str,), # noqa: E501 + 'payment_code': (str, none_type), # noqa: E501 + 'transfer_amount': (float, none_type), # noqa: E501 + 'merchant_name': (str, none_type), # noqa: E501 } @cached_property @@ -201,12 +203,19 @@ def _from_openapi_data(cls, retail_outlet_name, *args, **kwargs): # noqa: E501 ]) @convert_js_args_to_python_args - def __init__(self, retail_outlet_name, *args, **kwargs): # noqa: E501 + def __init__(self, + retail_outlet_name: RetailOutletName, + payment_code: str | None = None, + transfer_amount: float | None = None, + merchant_name: str | None = None, + *args, **kwargs + ): # noqa: E501 """RetailOutlet - a model defined in OpenAPI Args: retail_outlet_name (RetailOutletName): + Keyword Args: _check_type (bool): if True, values for parameters in openapi_types will be type checked and a TypeError will be @@ -273,6 +282,12 @@ def __init__(self, retail_outlet_name, *args, **kwargs): # noqa: E501 self._visited_composed_classes = _visited_composed_classes + (self.__class__,) self.retail_outlet_name = retail_outlet_name + if payment_code is not None: + self.payment_code = payment_code + if transfer_amount is not None: + self.transfer_amount = transfer_amount + if merchant_name is not None: + self.merchant_name = merchant_name for var_name, var_value in kwargs.items(): if var_name not in self.attribute_map and \ self._configuration is not None and \ diff --git a/xendit/invoice/model/retail_outlet_name.py b/xendit/invoice/model/retail_outlet_name.py index fa391a20..0bf8cd3b 100644 --- a/xendit/invoice/model/retail_outlet_name.py +++ b/xendit/invoice/model/retail_outlet_name.py @@ -5,6 +5,7 @@ import re # noqa: F401 import sys # noqa: F401 +from typing import List # noqa: F401 from xendit.model_utils import ( # noqa: F401 ApiTypeError, @@ -25,6 +26,9 @@ +def lazy_import(): + pass + class RetailOutletName(ModelSimple): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech diff --git a/xendit/invoice/model/server_error.py b/xendit/invoice/model/server_error.py index a690c976..088a348a 100644 --- a/xendit/invoice/model/server_error.py +++ b/xendit/invoice/model/server_error.py @@ -5,6 +5,7 @@ import re # noqa: F401 import sys # noqa: F401 +from typing import List # noqa: F401 from xendit.model_utils import ( # noqa: F401 ApiTypeError, @@ -25,6 +26,9 @@ +def lazy_import(): + pass + class ServerError(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -194,12 +198,17 @@ def _from_openapi_data(cls, message, *args, **kwargs): # noqa: E501 ]) @convert_js_args_to_python_args - def __init__(self, message, *args, **kwargs): # noqa: E501 + def __init__(self, + message: str, + error_code: str = "SERVER_ERROR", + *args, **kwargs + ): # noqa: E501 """ServerError - a model defined in OpenAPI Args: message (str): + Keyword Args: error_code (str): defaults to "SERVER_ERROR", must be one of ["SERVER_ERROR", ] # noqa: E501 _check_type (bool): if True, values for parameters in openapi_types @@ -234,7 +243,6 @@ def __init__(self, message, *args, **kwargs): # noqa: E501 _visited_composed_classes = (Animal,) """ - error_code = kwargs.get('error_code', "SERVER_ERROR") _check_type = kwargs.pop('_check_type', True) _spec_property_naming = kwargs.pop('_spec_property_naming', False) _path_to_item = kwargs.pop('_path_to_item', ()) diff --git a/xendit/invoice/model/unauthorized_error.py b/xendit/invoice/model/unauthorized_error.py index fe2cbbe0..83c489ee 100644 --- a/xendit/invoice/model/unauthorized_error.py +++ b/xendit/invoice/model/unauthorized_error.py @@ -5,6 +5,7 @@ import re # noqa: F401 import sys # noqa: F401 +from typing import List # noqa: F401 from xendit.model_utils import ( # noqa: F401 ApiTypeError, @@ -25,6 +26,9 @@ +def lazy_import(): + pass + class UnauthorizedError(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -194,12 +198,17 @@ def _from_openapi_data(cls, message, *args, **kwargs): # noqa: E501 ]) @convert_js_args_to_python_args - def __init__(self, message, *args, **kwargs): # noqa: E501 + def __init__(self, + message: str, + error_code: str = "INVALID_API_KEY", + *args, **kwargs + ): # noqa: E501 """UnauthorizedError - a model defined in OpenAPI Args: message (str): A human-readable error message providing additional context about the unauthorized access. + Keyword Args: error_code (str): The specific error code associated with the unauthorized access.. defaults to "INVALID_API_KEY", must be one of ["INVALID_API_KEY", ] # noqa: E501 _check_type (bool): if True, values for parameters in openapi_types @@ -234,7 +243,6 @@ def __init__(self, message, *args, **kwargs): # noqa: E501 _visited_composed_classes = (Animal,) """ - error_code = kwargs.get('error_code', "INVALID_API_KEY") _check_type = kwargs.pop('_check_type', True) _spec_property_naming = kwargs.pop('_spec_property_naming', False) _path_to_item = kwargs.pop('_path_to_item', ()) diff --git a/xendit/payment_method/model/billing_information.py b/xendit/payment_method/model/billing_information.py index 1869ba39..2748be82 100644 --- a/xendit/payment_method/model/billing_information.py +++ b/xendit/payment_method/model/billing_information.py @@ -5,6 +5,7 @@ import re # noqa: F401 import sys # noqa: F401 +from typing import List # noqa: F401 from xendit.model_utils import ( # noqa: F401 ApiTypeError, @@ -25,6 +26,9 @@ +def lazy_import(): + pass + class BillingInformation(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -95,11 +99,11 @@ def openapi_types(): """ return { 'country': (str,), # noqa: E501 - 'street_line1': (str, none_type,), # noqa: E501 - 'street_line2': (str, none_type,), # noqa: E501 - 'city': (str, none_type,), # noqa: E501 - 'province_state': (str, none_type,), # noqa: E501 - 'postal_code': (str, none_type,), # noqa: E501 + 'street_line1': (str, none_type, none_type), # noqa: E501 + 'street_line2': (str, none_type, none_type), # noqa: E501 + 'city': (str, none_type, none_type), # noqa: E501 + 'province_state': (str, none_type, none_type), # noqa: E501 + 'postal_code': (str, none_type, none_type), # noqa: E501 } @cached_property @@ -219,12 +223,21 @@ def _from_openapi_data(cls, country, *args, **kwargs): # noqa: E501 ]) @convert_js_args_to_python_args - def __init__(self, country, *args, **kwargs): # noqa: E501 + def __init__(self, + country: str, + street_line1: str | None = None, + street_line2: str | None = None, + city: str | None = None, + province_state: str | None = None, + postal_code: str | None = None, + *args, **kwargs + ): # noqa: E501 """BillingInformation - a model defined in OpenAPI Args: country (str): + Keyword Args: _check_type (bool): if True, values for parameters in openapi_types will be type checked and a TypeError will be @@ -293,6 +306,16 @@ def __init__(self, country, *args, **kwargs): # noqa: E501 self._visited_composed_classes = _visited_composed_classes + (self.__class__,) self.country = country + if street_line1 is not None: + self.street_line1 = street_line1 + if street_line2 is not None: + self.street_line2 = street_line2 + if city is not None: + self.city = city + if province_state is not None: + self.province_state = province_state + if postal_code is not None: + self.postal_code = postal_code for var_name, var_value in kwargs.items(): if var_name not in self.attribute_map and \ self._configuration is not None and \ diff --git a/xendit/payment_method/model/card.py b/xendit/payment_method/model/card.py index 5b0b47b0..18ebb224 100644 --- a/xendit/payment_method/model/card.py +++ b/xendit/payment_method/model/card.py @@ -5,6 +5,7 @@ import re # noqa: F401 import sys # noqa: F401 +from typing import List # noqa: F401 from xendit.model_utils import ( # noqa: F401 ApiTypeError, @@ -23,15 +24,16 @@ ) from xendit.exceptions import ApiAttributeError +from xendit.payment_method.model.card_channel_properties import CardChannelProperties +from xendit.payment_method.model.card_verification_results import CardVerificationResults +from xendit.payment_method.model.tokenized_card_information import TokenizedCardInformation +globals()['CardChannelProperties'] = CardChannelProperties +globals()['CardVerificationResults'] = CardVerificationResults +globals()['TokenizedCardInformation'] = TokenizedCardInformation -def lazy_import(): - from xendit.payment_method.model.card_channel_properties import CardChannelProperties - from xendit.payment_method.model.card_verification_results import CardVerificationResults - from xendit.payment_method.model.tokenized_card_information import TokenizedCardInformation - globals()['CardChannelProperties'] = CardChannelProperties - globals()['CardVerificationResults'] = CardVerificationResults - globals()['TokenizedCardInformation'] = TokenizedCardInformation +def lazy_import(): + pass class Card(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. @@ -88,8 +90,8 @@ def openapi_types(): return { 'currency': (str, none_type,), # noqa: E501 'channel_properties': (CardChannelProperties,), # noqa: E501 - 'card_information': (TokenizedCardInformation,), # noqa: E501 - 'card_verification_results': (CardVerificationResults,), # noqa: E501 + 'card_information': (TokenizedCardInformation, none_type), # noqa: E501 + 'card_verification_results': (CardVerificationResults, none_type), # noqa: E501 } @cached_property @@ -206,13 +208,20 @@ def _from_openapi_data(cls, currency, channel_properties, *args, **kwargs): # n ]) @convert_js_args_to_python_args - def __init__(self, currency, channel_properties, *args, **kwargs): # noqa: E501 + def __init__(self, + currency: str, + channel_properties: CardChannelProperties, + card_information: TokenizedCardInformation | None = None, + card_verification_results: CardVerificationResults | None = None, + *args, **kwargs + ): # noqa: E501 """Card - a model defined in OpenAPI Args: currency (str, none_type): channel_properties (CardChannelProperties): + Keyword Args: _check_type (bool): if True, values for parameters in openapi_types will be type checked and a TypeError will be @@ -279,6 +288,10 @@ def __init__(self, currency, channel_properties, *args, **kwargs): # noqa: E501 self.currency = currency self.channel_properties = channel_properties + if card_information is not None: + self.card_information = card_information + if card_verification_results is not None: + self.card_verification_results = card_verification_results for var_name, var_value in kwargs.items(): if var_name not in self.attribute_map and \ self._configuration is not None and \ diff --git a/xendit/payment_method/model/card_channel_properties.py b/xendit/payment_method/model/card_channel_properties.py index e33654d5..eb932e84 100644 --- a/xendit/payment_method/model/card_channel_properties.py +++ b/xendit/payment_method/model/card_channel_properties.py @@ -5,6 +5,7 @@ import re # noqa: F401 import sys # noqa: F401 +from typing import List # noqa: F401 from xendit.model_utils import ( # noqa: F401 ApiTypeError, @@ -25,6 +26,9 @@ +def lazy_import(): + pass + class CardChannelProperties(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -92,10 +96,10 @@ def openapi_types(): and the value is attribute type. """ return { - 'skip_three_d_secure': (bool, none_type,), # noqa: E501 - 'success_return_url': (str, none_type,), # noqa: E501 - 'failure_return_url': (str, none_type,), # noqa: E501 - 'cardonfile_type': (str, none_type,), # noqa: E501 + 'skip_three_d_secure': (bool, none_type, none_type), # noqa: E501 + 'success_return_url': (str, none_type, none_type), # noqa: E501 + 'failure_return_url': (str, none_type, none_type), # noqa: E501 + 'cardonfile_type': (str, none_type, none_type), # noqa: E501 } @cached_property @@ -208,9 +212,16 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 ]) @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 + def __init__(self, + skip_three_d_secure: bool | None = None, + success_return_url: str | None = None, + failure_return_url: str | None = None, + cardonfile_type: str | None = None, + *args, **kwargs + ): # noqa: E501 """CardChannelProperties - a model defined in OpenAPI + Keyword Args: _check_type (bool): if True, values for parameters in openapi_types will be type checked and a TypeError will be @@ -277,6 +288,14 @@ def __init__(self, *args, **kwargs): # noqa: E501 self._configuration = _configuration self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + if skip_three_d_secure is not None: + self.skip_three_d_secure = skip_three_d_secure + if success_return_url is not None: + self.success_return_url = success_return_url + if failure_return_url is not None: + self.failure_return_url = failure_return_url + if cardonfile_type is not None: + self.cardonfile_type = cardonfile_type for var_name, var_value in kwargs.items(): if var_name not in self.attribute_map and \ self._configuration is not None and \ diff --git a/xendit/payment_method/model/card_parameters.py b/xendit/payment_method/model/card_parameters.py index fc16aef5..ff7b3c6d 100644 --- a/xendit/payment_method/model/card_parameters.py +++ b/xendit/payment_method/model/card_parameters.py @@ -5,6 +5,7 @@ import re # noqa: F401 import sys # noqa: F401 +from typing import List # noqa: F401 from xendit.model_utils import ( # noqa: F401 ApiTypeError, @@ -23,13 +24,14 @@ ) from xendit.exceptions import ApiAttributeError +from xendit.payment_method.model.card_channel_properties import CardChannelProperties +from xendit.payment_method.model.card_parameters_card_information import CardParametersCardInformation +globals()['CardChannelProperties'] = CardChannelProperties +globals()['CardParametersCardInformation'] = CardParametersCardInformation -def lazy_import(): - from xendit.payment_method.model.card_channel_properties import CardChannelProperties - from xendit.payment_method.model.card_parameters_card_information import CardParametersCardInformation - globals()['CardChannelProperties'] = CardChannelProperties - globals()['CardParametersCardInformation'] = CardParametersCardInformation +def lazy_import(): + pass class CardParameters(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. @@ -85,8 +87,8 @@ def openapi_types(): lazy_import() return { 'currency': (str,), # noqa: E501 - 'channel_properties': (CardChannelProperties,), # noqa: E501 - 'card_information': (CardParametersCardInformation,), # noqa: E501 + 'channel_properties': (CardChannelProperties, none_type), # noqa: E501 + 'card_information': (CardParametersCardInformation, none_type), # noqa: E501 } @cached_property @@ -200,12 +202,18 @@ def _from_openapi_data(cls, currency, *args, **kwargs): # noqa: E501 ]) @convert_js_args_to_python_args - def __init__(self, currency, *args, **kwargs): # noqa: E501 + def __init__(self, + currency: str, + channel_properties: CardChannelProperties | None = None, + card_information: CardParametersCardInformation | None = None, + *args, **kwargs + ): # noqa: E501 """CardParameters - a model defined in OpenAPI Args: currency (str): + Keyword Args: _check_type (bool): if True, values for parameters in openapi_types will be type checked and a TypeError will be @@ -271,6 +279,10 @@ def __init__(self, currency, *args, **kwargs): # noqa: E501 self._visited_composed_classes = _visited_composed_classes + (self.__class__,) self.currency = currency + if channel_properties is not None: + self.channel_properties = channel_properties + if card_information is not None: + self.card_information = card_information for var_name, var_value in kwargs.items(): if var_name not in self.attribute_map and \ self._configuration is not None and \ diff --git a/xendit/payment_method/model/card_parameters_card_information.py b/xendit/payment_method/model/card_parameters_card_information.py index 83181dd5..e3f7236a 100644 --- a/xendit/payment_method/model/card_parameters_card_information.py +++ b/xendit/payment_method/model/card_parameters_card_information.py @@ -5,6 +5,7 @@ import re # noqa: F401 import sys # noqa: F401 +from typing import List # noqa: F401 from xendit.model_utils import ( # noqa: F401 ApiTypeError, @@ -25,6 +26,9 @@ +def lazy_import(): + pass + class CardParametersCardInformation(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -79,8 +83,8 @@ def openapi_types(): 'card_number': (str,), # noqa: E501 'expiry_month': (str,), # noqa: E501 'expiry_year': (str,), # noqa: E501 - 'cardholder_name': (str, none_type,), # noqa: E501 - 'cvv': (str, none_type,), # noqa: E501 + 'cardholder_name': (str, none_type, none_type), # noqa: E501 + 'cvv': (str, none_type, none_type), # noqa: E501 } @cached_property @@ -200,7 +204,14 @@ def _from_openapi_data(cls, card_number, expiry_month, expiry_year, *args, **kwa ]) @convert_js_args_to_python_args - def __init__(self, card_number, expiry_month, expiry_year, *args, **kwargs): # noqa: E501 + def __init__(self, + card_number: str, + expiry_month: str, + expiry_year: str, + cardholder_name: str | None = None, + cvv: str | None = None, + *args, **kwargs + ): # noqa: E501 """CardParametersCardInformation - a model defined in OpenAPI Args: @@ -208,6 +219,7 @@ def __init__(self, card_number, expiry_month, expiry_year, *args, **kwargs): # expiry_month (str): Card expiry month in MM format expiry_year (str): Card expiry month in YY format + Keyword Args: _check_type (bool): if True, values for parameters in openapi_types will be type checked and a TypeError will be @@ -275,6 +287,10 @@ def __init__(self, card_number, expiry_month, expiry_year, *args, **kwargs): # self.card_number = card_number self.expiry_month = expiry_month self.expiry_year = expiry_year + if cardholder_name is not None: + self.cardholder_name = cardholder_name + if cvv is not None: + self.cvv = cvv for var_name, var_value in kwargs.items(): if var_name not in self.attribute_map and \ self._configuration is not None and \ diff --git a/xendit/payment_method/model/card_verification_results.py b/xendit/payment_method/model/card_verification_results.py index 86da593a..994a3168 100644 --- a/xendit/payment_method/model/card_verification_results.py +++ b/xendit/payment_method/model/card_verification_results.py @@ -5,6 +5,7 @@ import re # noqa: F401 import sys # noqa: F401 +from typing import List # noqa: F401 from xendit.model_utils import ( # noqa: F401 ApiTypeError, @@ -23,11 +24,12 @@ ) from xendit.exceptions import ApiAttributeError +from xendit.payment_method.model.card_verification_results_three_d_secure import CardVerificationResultsThreeDSecure +globals()['CardVerificationResultsThreeDSecure'] = CardVerificationResultsThreeDSecure -def lazy_import(): - from xendit.payment_method.model.card_verification_results_three_d_secure import CardVerificationResultsThreeDSecure - globals()['CardVerificationResultsThreeDSecure'] = CardVerificationResultsThreeDSecure +def lazy_import(): + pass class CardVerificationResults(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. @@ -83,8 +85,8 @@ def openapi_types(): lazy_import() return { 'three_d_secure': (CardVerificationResultsThreeDSecure,), # noqa: E501 - 'cvv_result': (str, none_type,), # noqa: E501 - 'address_verification_result': (str, none_type,), # noqa: E501 + 'cvv_result': (str, none_type, none_type), # noqa: E501 + 'address_verification_result': (str, none_type, none_type), # noqa: E501 } @cached_property @@ -198,12 +200,18 @@ def _from_openapi_data(cls, three_d_secure, *args, **kwargs): # noqa: E501 ]) @convert_js_args_to_python_args - def __init__(self, three_d_secure, *args, **kwargs): # noqa: E501 + def __init__(self, + three_d_secure: CardVerificationResultsThreeDSecure, + cvv_result: str | None = None, + address_verification_result: str | None = None, + *args, **kwargs + ): # noqa: E501 """CardVerificationResults - a model defined in OpenAPI Args: three_d_secure (CardVerificationResultsThreeDSecure): + Keyword Args: _check_type (bool): if True, values for parameters in openapi_types will be type checked and a TypeError will be @@ -269,6 +277,10 @@ def __init__(self, three_d_secure, *args, **kwargs): # noqa: E501 self._visited_composed_classes = _visited_composed_classes + (self.__class__,) self.three_d_secure = three_d_secure + if cvv_result is not None: + self.cvv_result = cvv_result + if address_verification_result is not None: + self.address_verification_result = address_verification_result for var_name, var_value in kwargs.items(): if var_name not in self.attribute_map and \ self._configuration is not None and \ diff --git a/xendit/payment_method/model/card_verification_results_three_d_secure.py b/xendit/payment_method/model/card_verification_results_three_d_secure.py index 562095b6..7e6e4d3f 100644 --- a/xendit/payment_method/model/card_verification_results_three_d_secure.py +++ b/xendit/payment_method/model/card_verification_results_three_d_secure.py @@ -5,6 +5,7 @@ import re # noqa: F401 import sys # noqa: F401 +from typing import List # noqa: F401 from xendit.model_utils import ( # noqa: F401 ApiTypeError, @@ -25,6 +26,9 @@ +def lazy_import(): + pass + class CardVerificationResultsThreeDSecure(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -81,11 +85,11 @@ def openapi_types(): and the value is attribute type. """ return { - 'three_d_secure_flow': (str, none_type,), # noqa: E501 - 'eci_code': (str, none_type,), # noqa: E501 - 'three_d_secure_result': (str, none_type,), # noqa: E501 - 'three_d_secure_result_reason': (str, none_type,), # noqa: E501 - 'three_d_secure_version': (str, none_type,), # noqa: E501 + 'three_d_secure_flow': (str, none_type, none_type), # noqa: E501 + 'eci_code': (str, none_type, none_type), # noqa: E501 + 'three_d_secure_result': (str, none_type, none_type), # noqa: E501 + 'three_d_secure_result_reason': (str, none_type, none_type), # noqa: E501 + 'three_d_secure_version': (str, none_type, none_type), # noqa: E501 } @cached_property @@ -200,9 +204,17 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 ]) @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 + def __init__(self, + three_d_secure_flow: str | None = None, + eci_code: str | None = None, + three_d_secure_result: str | None = None, + three_d_secure_result_reason: str | None = None, + three_d_secure_version: str | None = None, + *args, **kwargs + ): # noqa: E501 """CardVerificationResultsThreeDSecure - a model defined in OpenAPI + Keyword Args: _check_type (bool): if True, values for parameters in openapi_types will be type checked and a TypeError will be @@ -270,6 +282,16 @@ def __init__(self, *args, **kwargs): # noqa: E501 self._configuration = _configuration self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + if three_d_secure_flow is not None: + self.three_d_secure_flow = three_d_secure_flow + if eci_code is not None: + self.eci_code = eci_code + if three_d_secure_result is not None: + self.three_d_secure_result = three_d_secure_result + if three_d_secure_result_reason is not None: + self.three_d_secure_result_reason = three_d_secure_result_reason + if three_d_secure_version is not None: + self.three_d_secure_version = three_d_secure_version for var_name, var_value in kwargs.items(): if var_name not in self.attribute_map and \ self._configuration is not None and \ diff --git a/xendit/payment_method/model/channel_amount_limits.py b/xendit/payment_method/model/channel_amount_limits.py index f1f01883..3a07cf83 100644 --- a/xendit/payment_method/model/channel_amount_limits.py +++ b/xendit/payment_method/model/channel_amount_limits.py @@ -5,6 +5,7 @@ import re # noqa: F401 import sys # noqa: F401 +from typing import List # noqa: F401 from xendit.model_utils import ( # noqa: F401 ApiTypeError, @@ -23,11 +24,12 @@ ) from xendit.exceptions import ApiAttributeError +from xendit.payment_method.model.channel_amount_limits_all_of import ChannelAmountLimitsAllOf +globals()['ChannelAmountLimitsAllOf'] = ChannelAmountLimitsAllOf -def lazy_import(): - from xendit.payment_method.model.channel_amount_limits_all_of import ChannelAmountLimitsAllOf - globals()['ChannelAmountLimitsAllOf'] = ChannelAmountLimitsAllOf +def lazy_import(): + pass class ChannelAmountLimits(ModelComposed): """NOTE: This class is auto generated by OpenAPI Generator. @@ -82,9 +84,9 @@ def openapi_types(): """ lazy_import() return { - 'currency': (str,), # noqa: E501 - 'min_limit': (float,), # noqa: E501 - 'max_limit': (float,), # noqa: E501 + 'currency': (str, none_type), # noqa: E501 + 'min_limit': (float, none_type), # noqa: E501 + 'max_limit': (float, none_type), # noqa: E501 } @cached_property diff --git a/xendit/payment_method/model/channel_amount_limits_all_of.py b/xendit/payment_method/model/channel_amount_limits_all_of.py index 3f0c49e6..fa9ec284 100644 --- a/xendit/payment_method/model/channel_amount_limits_all_of.py +++ b/xendit/payment_method/model/channel_amount_limits_all_of.py @@ -5,6 +5,7 @@ import re # noqa: F401 import sys # noqa: F401 +from typing import List # noqa: F401 from xendit.model_utils import ( # noqa: F401 ApiTypeError, @@ -25,6 +26,9 @@ +def lazy_import(): + pass + class ChannelAmountLimitsAllOf(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -76,9 +80,9 @@ def openapi_types(): and the value is attribute type. """ return { - 'currency': (str,), # noqa: E501 - 'min_limit': (float,), # noqa: E501 - 'max_limit': (float,), # noqa: E501 + 'currency': (str, none_type), # noqa: E501 + 'min_limit': (float, none_type), # noqa: E501 + 'max_limit': (float, none_type), # noqa: E501 } @cached_property @@ -189,9 +193,15 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 ]) @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 + def __init__(self, + currency: str | None = None, + min_limit: float | None = None, + max_limit: float | None = None, + *args, **kwargs + ): # noqa: E501 """ChannelAmountLimitsAllOf - a model defined in OpenAPI + Keyword Args: _check_type (bool): if True, values for parameters in openapi_types will be type checked and a TypeError will be @@ -257,6 +267,12 @@ def __init__(self, *args, **kwargs): # noqa: E501 self._configuration = _configuration self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + if currency is not None: + self.currency = currency + if min_limit is not None: + self.min_limit = min_limit + if max_limit is not None: + self.max_limit = max_limit for var_name, var_value in kwargs.items(): if var_name not in self.attribute_map and \ self._configuration is not None and \ diff --git a/xendit/payment_method/model/channel_property.py b/xendit/payment_method/model/channel_property.py index 8b271a98..1e6f7812 100644 --- a/xendit/payment_method/model/channel_property.py +++ b/xendit/payment_method/model/channel_property.py @@ -5,6 +5,7 @@ import re # noqa: F401 import sys # noqa: F401 +from typing import List # noqa: F401 from xendit.model_utils import ( # noqa: F401 ApiTypeError, @@ -23,11 +24,12 @@ ) from xendit.exceptions import ApiAttributeError +from xendit.payment_method.model.channel_property_all_of import ChannelPropertyAllOf +globals()['ChannelPropertyAllOf'] = ChannelPropertyAllOf -def lazy_import(): - from xendit.payment_method.model.channel_property_all_of import ChannelPropertyAllOf - globals()['ChannelPropertyAllOf'] = ChannelPropertyAllOf +def lazy_import(): + pass class ChannelProperty(ModelComposed): """NOTE: This class is auto generated by OpenAPI Generator. @@ -82,9 +84,9 @@ def openapi_types(): """ lazy_import() return { - 'name': (str,), # noqa: E501 - 'type': (str,), # noqa: E501 - 'is_required': (bool,), # noqa: E501 + 'name': (str, none_type), # noqa: E501 + 'type': (str, none_type), # noqa: E501 + 'is_required': (bool, none_type), # noqa: E501 } @cached_property diff --git a/xendit/payment_method/model/channel_property_all_of.py b/xendit/payment_method/model/channel_property_all_of.py index ac8ce1cf..1e87fa2f 100644 --- a/xendit/payment_method/model/channel_property_all_of.py +++ b/xendit/payment_method/model/channel_property_all_of.py @@ -5,6 +5,7 @@ import re # noqa: F401 import sys # noqa: F401 +from typing import List # noqa: F401 from xendit.model_utils import ( # noqa: F401 ApiTypeError, @@ -25,6 +26,9 @@ +def lazy_import(): + pass + class ChannelPropertyAllOf(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -76,9 +80,9 @@ def openapi_types(): and the value is attribute type. """ return { - 'name': (str,), # noqa: E501 - 'type': (str,), # noqa: E501 - 'is_required': (bool,), # noqa: E501 + 'name': (str, none_type), # noqa: E501 + 'type': (str, none_type), # noqa: E501 + 'is_required': (bool, none_type), # noqa: E501 } @cached_property @@ -189,9 +193,15 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 ]) @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 + def __init__(self, + name: str | None = None, + type: str | None = None, + is_required: bool | None = None, + *args, **kwargs + ): # noqa: E501 """ChannelPropertyAllOf - a model defined in OpenAPI + Keyword Args: _check_type (bool): if True, values for parameters in openapi_types will be type checked and a TypeError will be @@ -257,6 +267,12 @@ def __init__(self, *args, **kwargs): # noqa: E501 self._configuration = _configuration self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + if name is not None: + self.name = name + if type is not None: + self.type = type + if is_required is not None: + self.is_required = is_required for var_name, var_value in kwargs.items(): if var_name not in self.attribute_map and \ self._configuration is not None and \ diff --git a/xendit/payment_method/model/create_payment_method409_response.py b/xendit/payment_method/model/create_payment_method409_response.py index 5befb0cd..447209c7 100644 --- a/xendit/payment_method/model/create_payment_method409_response.py +++ b/xendit/payment_method/model/create_payment_method409_response.py @@ -5,6 +5,7 @@ import re # noqa: F401 import sys # noqa: F401 +from typing import List # noqa: F401 from xendit.model_utils import ( # noqa: F401 ApiTypeError, @@ -25,6 +26,9 @@ +def lazy_import(): + pass + class CreatePaymentMethod409Response(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -82,8 +86,8 @@ def openapi_types(): and the value is attribute type. """ return { - 'error_code': (str,), # noqa: E501 - 'message': (str,), # noqa: E501 + 'error_code': (str, none_type), # noqa: E501 + 'message': (str, none_type), # noqa: E501 } @cached_property @@ -192,9 +196,14 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 ]) @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 + def __init__(self, + error_code: str | None = None, + message: str | None = None, + *args, **kwargs + ): # noqa: E501 """CreatePaymentMethod409Response - a model defined in OpenAPI + Keyword Args: _check_type (bool): if True, values for parameters in openapi_types will be type checked and a TypeError will be @@ -259,6 +268,10 @@ def __init__(self, *args, **kwargs): # noqa: E501 self._configuration = _configuration self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + if error_code is not None: + self.error_code = error_code + if message is not None: + self.message = message for var_name, var_value in kwargs.items(): if var_name not in self.attribute_map and \ self._configuration is not None and \ diff --git a/xendit/payment_method/model/create_payment_method503_response.py b/xendit/payment_method/model/create_payment_method503_response.py index 2ad3f17b..a20120a8 100644 --- a/xendit/payment_method/model/create_payment_method503_response.py +++ b/xendit/payment_method/model/create_payment_method503_response.py @@ -5,6 +5,7 @@ import re # noqa: F401 import sys # noqa: F401 +from typing import List # noqa: F401 from xendit.model_utils import ( # noqa: F401 ApiTypeError, @@ -25,6 +26,9 @@ +def lazy_import(): + pass + class CreatePaymentMethod503Response(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -80,8 +84,8 @@ def openapi_types(): and the value is attribute type. """ return { - 'error_code': (str,), # noqa: E501 - 'message': (str,), # noqa: E501 + 'error_code': (str, none_type), # noqa: E501 + 'message': (str, none_type), # noqa: E501 } @cached_property @@ -190,9 +194,14 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 ]) @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 + def __init__(self, + error_code: str | None = None, + message: str | None = None, + *args, **kwargs + ): # noqa: E501 """CreatePaymentMethod503Response - a model defined in OpenAPI + Keyword Args: _check_type (bool): if True, values for parameters in openapi_types will be type checked and a TypeError will be @@ -257,6 +266,10 @@ def __init__(self, *args, **kwargs): # noqa: E501 self._configuration = _configuration self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + if error_code is not None: + self.error_code = error_code + if message is not None: + self.message = message for var_name, var_value in kwargs.items(): if var_name not in self.attribute_map and \ self._configuration is not None and \ diff --git a/xendit/payment_method/model/direct_debit.py b/xendit/payment_method/model/direct_debit.py index 71fcdb6c..ab63a44e 100644 --- a/xendit/payment_method/model/direct_debit.py +++ b/xendit/payment_method/model/direct_debit.py @@ -5,6 +5,7 @@ import re # noqa: F401 import sys # noqa: F401 +from typing import List # noqa: F401 from xendit.model_utils import ( # noqa: F401 ApiTypeError, @@ -23,23 +24,24 @@ ) from xendit.exceptions import ApiAttributeError +from xendit.payment_method.model.direct_debit_all_of import DirectDebitAllOf +from xendit.payment_method.model.direct_debit_bank_account import DirectDebitBankAccount +from xendit.payment_method.model.direct_debit_channel_code import DirectDebitChannelCode +from xendit.payment_method.model.direct_debit_channel_properties import DirectDebitChannelProperties +from xendit.payment_method.model.direct_debit_debit_card import DirectDebitDebitCard +from xendit.payment_method.model.direct_debit_parameters import DirectDebitParameters +from xendit.payment_method.model.direct_debit_type import DirectDebitType +globals()['DirectDebitAllOf'] = DirectDebitAllOf +globals()['DirectDebitBankAccount'] = DirectDebitBankAccount +globals()['DirectDebitChannelCode'] = DirectDebitChannelCode +globals()['DirectDebitChannelProperties'] = DirectDebitChannelProperties +globals()['DirectDebitDebitCard'] = DirectDebitDebitCard +globals()['DirectDebitParameters'] = DirectDebitParameters +globals()['DirectDebitType'] = DirectDebitType -def lazy_import(): - from xendit.payment_method.model.direct_debit_all_of import DirectDebitAllOf - from xendit.payment_method.model.direct_debit_bank_account import DirectDebitBankAccount - from xendit.payment_method.model.direct_debit_channel_code import DirectDebitChannelCode - from xendit.payment_method.model.direct_debit_channel_properties import DirectDebitChannelProperties - from xendit.payment_method.model.direct_debit_debit_card import DirectDebitDebitCard - from xendit.payment_method.model.direct_debit_parameters import DirectDebitParameters - from xendit.payment_method.model.direct_debit_type import DirectDebitType - globals()['DirectDebitAllOf'] = DirectDebitAllOf - globals()['DirectDebitBankAccount'] = DirectDebitBankAccount - globals()['DirectDebitChannelCode'] = DirectDebitChannelCode - globals()['DirectDebitChannelProperties'] = DirectDebitChannelProperties - globals()['DirectDebitDebitCard'] = DirectDebitDebitCard - globals()['DirectDebitParameters'] = DirectDebitParameters - globals()['DirectDebitType'] = DirectDebitType +def lazy_import(): + pass class DirectDebit(ModelComposed): """NOTE: This class is auto generated by OpenAPI Generator. @@ -97,8 +99,8 @@ def openapi_types(): 'channel_code': (DirectDebitChannelCode,), # noqa: E501 'channel_properties': (DirectDebitChannelProperties,), # noqa: E501 'type': (DirectDebitType,), # noqa: E501 - 'bank_account': (DirectDebitBankAccount,), # noqa: E501 - 'debit_card': (DirectDebitDebitCard,), # noqa: E501 + 'bank_account': (DirectDebitBankAccount, none_type), # noqa: E501 + 'debit_card': (DirectDebitDebitCard, none_type), # noqa: E501 } @cached_property diff --git a/xendit/payment_method/model/direct_debit_all_of.py b/xendit/payment_method/model/direct_debit_all_of.py index ba7fca89..0c7af953 100644 --- a/xendit/payment_method/model/direct_debit_all_of.py +++ b/xendit/payment_method/model/direct_debit_all_of.py @@ -5,6 +5,7 @@ import re # noqa: F401 import sys # noqa: F401 +from typing import List # noqa: F401 from xendit.model_utils import ( # noqa: F401 ApiTypeError, @@ -23,15 +24,16 @@ ) from xendit.exceptions import ApiAttributeError +from xendit.payment_method.model.direct_debit_bank_account import DirectDebitBankAccount +from xendit.payment_method.model.direct_debit_debit_card import DirectDebitDebitCard +from xendit.payment_method.model.direct_debit_type import DirectDebitType +globals()['DirectDebitBankAccount'] = DirectDebitBankAccount +globals()['DirectDebitDebitCard'] = DirectDebitDebitCard +globals()['DirectDebitType'] = DirectDebitType -def lazy_import(): - from xendit.payment_method.model.direct_debit_bank_account import DirectDebitBankAccount - from xendit.payment_method.model.direct_debit_debit_card import DirectDebitDebitCard - from xendit.payment_method.model.direct_debit_type import DirectDebitType - globals()['DirectDebitBankAccount'] = DirectDebitBankAccount - globals()['DirectDebitDebitCard'] = DirectDebitDebitCard - globals()['DirectDebitType'] = DirectDebitType +def lazy_import(): + pass class DirectDebitAllOf(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. @@ -87,8 +89,8 @@ def openapi_types(): lazy_import() return { 'type': (DirectDebitType,), # noqa: E501 - 'bank_account': (DirectDebitBankAccount,), # noqa: E501 - 'debit_card': (DirectDebitDebitCard,), # noqa: E501 + 'bank_account': (DirectDebitBankAccount, none_type), # noqa: E501 + 'debit_card': (DirectDebitDebitCard, none_type), # noqa: E501 } @cached_property @@ -202,12 +204,18 @@ def _from_openapi_data(cls, type, *args, **kwargs): # noqa: E501 ]) @convert_js_args_to_python_args - def __init__(self, type, *args, **kwargs): # noqa: E501 + def __init__(self, + type: DirectDebitType, + bank_account: DirectDebitBankAccount | None = None, + debit_card: DirectDebitDebitCard | None = None, + *args, **kwargs + ): # noqa: E501 """DirectDebitAllOf - a model defined in OpenAPI Args: type (DirectDebitType): + Keyword Args: _check_type (bool): if True, values for parameters in openapi_types will be type checked and a TypeError will be @@ -273,6 +281,10 @@ def __init__(self, type, *args, **kwargs): # noqa: E501 self._visited_composed_classes = _visited_composed_classes + (self.__class__,) self.type = type + if bank_account is not None: + self.bank_account = bank_account + if debit_card is not None: + self.debit_card = debit_card for var_name, var_value in kwargs.items(): if var_name not in self.attribute_map and \ self._configuration is not None and \ diff --git a/xendit/payment_method/model/direct_debit_bank_account.py b/xendit/payment_method/model/direct_debit_bank_account.py index 40f0a735..9da05c77 100644 --- a/xendit/payment_method/model/direct_debit_bank_account.py +++ b/xendit/payment_method/model/direct_debit_bank_account.py @@ -5,6 +5,7 @@ import re # noqa: F401 import sys # noqa: F401 +from typing import List # noqa: F401 from xendit.model_utils import ( # noqa: F401 ApiTypeError, @@ -25,6 +26,9 @@ +def lazy_import(): + pass + class DirectDebitBankAccount(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -76,10 +80,10 @@ def openapi_types(): and the value is attribute type. """ return { - 'masked_bank_account_number': (str, none_type,), # noqa: E501 - 'bank_account_hash': (str, none_type,), # noqa: E501 - 'mobile_number': (str, none_type,), # noqa: E501 - 'identity_document_number': (str, none_type,), # noqa: E501 + 'masked_bank_account_number': (str, none_type, none_type), # noqa: E501 + 'bank_account_hash': (str, none_type, none_type), # noqa: E501 + 'mobile_number': (str, none_type, none_type), # noqa: E501 + 'identity_document_number': (str, none_type, none_type), # noqa: E501 } @cached_property @@ -192,9 +196,16 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 ]) @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 + def __init__(self, + masked_bank_account_number: str | None = None, + bank_account_hash: str | None = None, + mobile_number: str | None = None, + identity_document_number: str | None = None, + *args, **kwargs + ): # noqa: E501 """DirectDebitBankAccount - a model defined in OpenAPI + Keyword Args: _check_type (bool): if True, values for parameters in openapi_types will be type checked and a TypeError will be @@ -261,6 +272,14 @@ def __init__(self, *args, **kwargs): # noqa: E501 self._configuration = _configuration self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + if masked_bank_account_number is not None: + self.masked_bank_account_number = masked_bank_account_number + if bank_account_hash is not None: + self.bank_account_hash = bank_account_hash + if mobile_number is not None: + self.mobile_number = mobile_number + if identity_document_number is not None: + self.identity_document_number = identity_document_number for var_name, var_value in kwargs.items(): if var_name not in self.attribute_map and \ self._configuration is not None and \ diff --git a/xendit/payment_method/model/direct_debit_channel_code.py b/xendit/payment_method/model/direct_debit_channel_code.py index 912b2ac9..778f6ec7 100644 --- a/xendit/payment_method/model/direct_debit_channel_code.py +++ b/xendit/payment_method/model/direct_debit_channel_code.py @@ -5,6 +5,7 @@ import re # noqa: F401 import sys # noqa: F401 +from typing import List # noqa: F401 from xendit.model_utils import ( # noqa: F401 ApiTypeError, @@ -25,6 +26,9 @@ +def lazy_import(): + pass + class DirectDebitChannelCode(ModelSimple): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech diff --git a/xendit/payment_method/model/direct_debit_channel_properties.py b/xendit/payment_method/model/direct_debit_channel_properties.py index 7607f86a..e4868773 100644 --- a/xendit/payment_method/model/direct_debit_channel_properties.py +++ b/xendit/payment_method/model/direct_debit_channel_properties.py @@ -5,6 +5,7 @@ import re # noqa: F401 import sys # noqa: F401 +from typing import List # noqa: F401 from xendit.model_utils import ( # noqa: F401 ApiTypeError, @@ -25,6 +26,9 @@ +def lazy_import(): + pass + class DirectDebitChannelProperties(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -76,14 +80,14 @@ def openapi_types(): and the value is attribute type. """ return { - 'success_return_url': (str,), # noqa: E501 - 'failure_return_url': (str, none_type,), # noqa: E501 - 'mobile_number': (str, none_type,), # noqa: E501 - 'card_last_four': (str, none_type,), # noqa: E501 - 'card_expiry': (str, none_type,), # noqa: E501 - 'email': (str, none_type,), # noqa: E501 - 'identity_document_number': (str, none_type,), # noqa: E501 - 'require_auth': (bool, none_type,), # noqa: E501 + 'success_return_url': (str, none_type), # noqa: E501 + 'failure_return_url': (str, none_type, none_type), # noqa: E501 + 'mobile_number': (str, none_type, none_type), # noqa: E501 + 'card_last_four': (str, none_type, none_type), # noqa: E501 + 'card_expiry': (str, none_type, none_type), # noqa: E501 + 'email': (str, none_type, none_type), # noqa: E501 + 'identity_document_number': (str, none_type, none_type), # noqa: E501 + 'require_auth': (bool, none_type, none_type), # noqa: E501 } @cached_property @@ -204,9 +208,20 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 ]) @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 + def __init__(self, + success_return_url: str | None = None, + failure_return_url: str | None = None, + mobile_number: str | None = None, + card_last_four: str | None = None, + card_expiry: str | None = None, + email: str | None = None, + identity_document_number: str | None = None, + require_auth: bool | None = None, + *args, **kwargs + ): # noqa: E501 """DirectDebitChannelProperties - a model defined in OpenAPI + Keyword Args: _check_type (bool): if True, values for parameters in openapi_types will be type checked and a TypeError will be @@ -277,6 +292,22 @@ def __init__(self, *args, **kwargs): # noqa: E501 self._configuration = _configuration self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + if success_return_url is not None: + self.success_return_url = success_return_url + if failure_return_url is not None: + self.failure_return_url = failure_return_url + if mobile_number is not None: + self.mobile_number = mobile_number + if card_last_four is not None: + self.card_last_four = card_last_four + if card_expiry is not None: + self.card_expiry = card_expiry + if email is not None: + self.email = email + if identity_document_number is not None: + self.identity_document_number = identity_document_number + if require_auth is not None: + self.require_auth = require_auth for var_name, var_value in kwargs.items(): if var_name not in self.attribute_map and \ self._configuration is not None and \ diff --git a/xendit/payment_method/model/direct_debit_debit_card.py b/xendit/payment_method/model/direct_debit_debit_card.py index 4ef78884..aae4a37a 100644 --- a/xendit/payment_method/model/direct_debit_debit_card.py +++ b/xendit/payment_method/model/direct_debit_debit_card.py @@ -5,6 +5,7 @@ import re # noqa: F401 import sys # noqa: F401 +from typing import List # noqa: F401 from xendit.model_utils import ( # noqa: F401 ApiTypeError, @@ -25,6 +26,9 @@ +def lazy_import(): + pass + class DirectDebitDebitCard(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -76,10 +80,10 @@ def openapi_types(): and the value is attribute type. """ return { - 'mobile_number': (str, none_type,), # noqa: E501 - 'card_last_four': (str, none_type,), # noqa: E501 - 'card_expiry': (str, none_type,), # noqa: E501 - 'email': (str, none_type,), # noqa: E501 + 'mobile_number': (str, none_type, none_type), # noqa: E501 + 'card_last_four': (str, none_type, none_type), # noqa: E501 + 'card_expiry': (str, none_type, none_type), # noqa: E501 + 'email': (str, none_type, none_type), # noqa: E501 } @cached_property @@ -192,9 +196,16 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 ]) @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 + def __init__(self, + mobile_number: str | None = None, + card_last_four: str | None = None, + card_expiry: str | None = None, + email: str | None = None, + *args, **kwargs + ): # noqa: E501 """DirectDebitDebitCard - a model defined in OpenAPI + Keyword Args: _check_type (bool): if True, values for parameters in openapi_types will be type checked and a TypeError will be @@ -261,6 +272,14 @@ def __init__(self, *args, **kwargs): # noqa: E501 self._configuration = _configuration self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + if mobile_number is not None: + self.mobile_number = mobile_number + if card_last_four is not None: + self.card_last_four = card_last_four + if card_expiry is not None: + self.card_expiry = card_expiry + if email is not None: + self.email = email for var_name, var_value in kwargs.items(): if var_name not in self.attribute_map and \ self._configuration is not None and \ diff --git a/xendit/payment_method/model/direct_debit_parameters.py b/xendit/payment_method/model/direct_debit_parameters.py index c5f061e2..dbaf309d 100644 --- a/xendit/payment_method/model/direct_debit_parameters.py +++ b/xendit/payment_method/model/direct_debit_parameters.py @@ -5,6 +5,7 @@ import re # noqa: F401 import sys # noqa: F401 +from typing import List # noqa: F401 from xendit.model_utils import ( # noqa: F401 ApiTypeError, @@ -23,13 +24,14 @@ ) from xendit.exceptions import ApiAttributeError +from xendit.payment_method.model.direct_debit_channel_code import DirectDebitChannelCode +from xendit.payment_method.model.direct_debit_channel_properties import DirectDebitChannelProperties +globals()['DirectDebitChannelCode'] = DirectDebitChannelCode +globals()['DirectDebitChannelProperties'] = DirectDebitChannelProperties -def lazy_import(): - from xendit.payment_method.model.direct_debit_channel_code import DirectDebitChannelCode - from xendit.payment_method.model.direct_debit_channel_properties import DirectDebitChannelProperties - globals()['DirectDebitChannelCode'] = DirectDebitChannelCode - globals()['DirectDebitChannelProperties'] = DirectDebitChannelProperties +def lazy_import(): + pass class DirectDebitParameters(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. @@ -198,13 +200,18 @@ def _from_openapi_data(cls, channel_code, channel_properties, *args, **kwargs): ]) @convert_js_args_to_python_args - def __init__(self, channel_code, channel_properties, *args, **kwargs): # noqa: E501 + def __init__(self, + channel_code: DirectDebitChannelCode, + channel_properties: DirectDebitChannelProperties, + *args, **kwargs + ): # noqa: E501 """DirectDebitParameters - a model defined in OpenAPI Args: channel_code (DirectDebitChannelCode): channel_properties (DirectDebitChannelProperties): + Keyword Args: _check_type (bool): if True, values for parameters in openapi_types will be type checked and a TypeError will be diff --git a/xendit/payment_method/model/direct_debit_type.py b/xendit/payment_method/model/direct_debit_type.py index 99a8cdbc..c46da87d 100644 --- a/xendit/payment_method/model/direct_debit_type.py +++ b/xendit/payment_method/model/direct_debit_type.py @@ -5,6 +5,7 @@ import re # noqa: F401 import sys # noqa: F401 +from typing import List # noqa: F401 from xendit.model_utils import ( # noqa: F401 ApiTypeError, @@ -25,6 +26,9 @@ +def lazy_import(): + pass + class DirectDebitType(ModelSimple): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech diff --git a/xendit/payment_method/model/e_wallet.py b/xendit/payment_method/model/e_wallet.py index eda2df44..305903f0 100644 --- a/xendit/payment_method/model/e_wallet.py +++ b/xendit/payment_method/model/e_wallet.py @@ -5,6 +5,7 @@ import re # noqa: F401 import sys # noqa: F401 +from typing import List # noqa: F401 from xendit.model_utils import ( # noqa: F401 ApiTypeError, @@ -23,17 +24,18 @@ ) from xendit.exceptions import ApiAttributeError +from xendit.payment_method.model.e_wallet_account import EWalletAccount +from xendit.payment_method.model.e_wallet_channel_code import EWalletChannelCode +from xendit.payment_method.model.e_wallet_channel_properties import EWalletChannelProperties +from xendit.payment_method.model.e_wallet_parameters import EWalletParameters +globals()['EWalletAccount'] = EWalletAccount +globals()['EWalletChannelCode'] = EWalletChannelCode +globals()['EWalletChannelProperties'] = EWalletChannelProperties +globals()['EWalletParameters'] = EWalletParameters -def lazy_import(): - from xendit.payment_method.model.e_wallet_account import EWalletAccount - from xendit.payment_method.model.e_wallet_channel_code import EWalletChannelCode - from xendit.payment_method.model.e_wallet_channel_properties import EWalletChannelProperties - from xendit.payment_method.model.e_wallet_parameters import EWalletParameters - globals()['EWalletAccount'] = EWalletAccount - globals()['EWalletChannelCode'] = EWalletChannelCode - globals()['EWalletChannelProperties'] = EWalletChannelProperties - globals()['EWalletParameters'] = EWalletParameters +def lazy_import(): + pass class EWallet(ModelComposed): """NOTE: This class is auto generated by OpenAPI Generator. @@ -89,8 +91,8 @@ def openapi_types(): lazy_import() return { 'channel_code': (EWalletChannelCode,), # noqa: E501 - 'channel_properties': (EWalletChannelProperties,), # noqa: E501 - 'account': (EWalletAccount,), # noqa: E501 + 'channel_properties': (EWalletChannelProperties, none_type), # noqa: E501 + 'account': (EWalletAccount, none_type), # noqa: E501 } @cached_property diff --git a/xendit/payment_method/model/e_wallet_account.py b/xendit/payment_method/model/e_wallet_account.py index ae55076a..37d3637b 100644 --- a/xendit/payment_method/model/e_wallet_account.py +++ b/xendit/payment_method/model/e_wallet_account.py @@ -5,6 +5,7 @@ import re # noqa: F401 import sys # noqa: F401 +from typing import List # noqa: F401 from xendit.model_utils import ( # noqa: F401 ApiTypeError, @@ -25,6 +26,9 @@ +def lazy_import(): + pass + class EWalletAccount(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -76,10 +80,10 @@ def openapi_types(): and the value is attribute type. """ return { - 'name': (str, none_type,), # noqa: E501 - 'account_details': (str, none_type,), # noqa: E501 - 'balance': (float, none_type,), # noqa: E501 - 'point_balance': (float, none_type,), # noqa: E501 + 'name': (str, none_type, none_type), # noqa: E501 + 'account_details': (str, none_type, none_type), # noqa: E501 + 'balance': (float, none_type, none_type), # noqa: E501 + 'point_balance': (float, none_type, none_type), # noqa: E501 } @cached_property @@ -192,9 +196,16 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 ]) @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 + def __init__(self, + name: str | None = None, + account_details: str | None = None, + balance: float | None = None, + point_balance: float | None = None, + *args, **kwargs + ): # noqa: E501 """EWalletAccount - a model defined in OpenAPI + Keyword Args: _check_type (bool): if True, values for parameters in openapi_types will be type checked and a TypeError will be @@ -261,6 +272,14 @@ def __init__(self, *args, **kwargs): # noqa: E501 self._configuration = _configuration self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + if name is not None: + self.name = name + if account_details is not None: + self.account_details = account_details + if balance is not None: + self.balance = balance + if point_balance is not None: + self.point_balance = point_balance for var_name, var_value in kwargs.items(): if var_name not in self.attribute_map and \ self._configuration is not None and \ diff --git a/xendit/payment_method/model/e_wallet_channel_code.py b/xendit/payment_method/model/e_wallet_channel_code.py index 9664a2a6..91aec071 100644 --- a/xendit/payment_method/model/e_wallet_channel_code.py +++ b/xendit/payment_method/model/e_wallet_channel_code.py @@ -5,6 +5,7 @@ import re # noqa: F401 import sys # noqa: F401 +from typing import List # noqa: F401 from xendit.model_utils import ( # noqa: F401 ApiTypeError, @@ -25,6 +26,9 @@ +def lazy_import(): + pass + class EWalletChannelCode(ModelSimple): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech diff --git a/xendit/payment_method/model/e_wallet_channel_properties.py b/xendit/payment_method/model/e_wallet_channel_properties.py index 248f0804..63b6de21 100644 --- a/xendit/payment_method/model/e_wallet_channel_properties.py +++ b/xendit/payment_method/model/e_wallet_channel_properties.py @@ -5,6 +5,7 @@ import re # noqa: F401 import sys # noqa: F401 +from typing import List # noqa: F401 from xendit.model_utils import ( # noqa: F401 ApiTypeError, @@ -25,6 +26,9 @@ +def lazy_import(): + pass + class EWalletChannelProperties(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -96,12 +100,12 @@ def openapi_types(): and the value is attribute type. """ return { - 'success_return_url': (str,), # noqa: E501 - 'failure_return_url': (str,), # noqa: E501 - 'cancel_return_url': (str,), # noqa: E501 - 'mobile_number': (str,), # noqa: E501 - 'redeem_points': (str,), # noqa: E501 - 'cashtag': (str,), # noqa: E501 + 'success_return_url': (str, none_type), # noqa: E501 + 'failure_return_url': (str, none_type), # noqa: E501 + 'cancel_return_url': (str, none_type), # noqa: E501 + 'mobile_number': (str, none_type), # noqa: E501 + 'redeem_points': (str, none_type), # noqa: E501 + 'cashtag': (str, none_type), # noqa: E501 } @cached_property @@ -218,9 +222,18 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 ]) @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 + def __init__(self, + success_return_url: str | None = None, + failure_return_url: str | None = None, + cancel_return_url: str | None = None, + mobile_number: str | None = None, + redeem_points: str | None = None, + cashtag: str | None = None, + *args, **kwargs + ): # noqa: E501 """EWalletChannelProperties - a model defined in OpenAPI + Keyword Args: _check_type (bool): if True, values for parameters in openapi_types will be type checked and a TypeError will be @@ -289,6 +302,18 @@ def __init__(self, *args, **kwargs): # noqa: E501 self._configuration = _configuration self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + if success_return_url is not None: + self.success_return_url = success_return_url + if failure_return_url is not None: + self.failure_return_url = failure_return_url + if cancel_return_url is not None: + self.cancel_return_url = cancel_return_url + if mobile_number is not None: + self.mobile_number = mobile_number + if redeem_points is not None: + self.redeem_points = redeem_points + if cashtag is not None: + self.cashtag = cashtag for var_name, var_value in kwargs.items(): if var_name not in self.attribute_map and \ self._configuration is not None and \ diff --git a/xendit/payment_method/model/e_wallet_parameters.py b/xendit/payment_method/model/e_wallet_parameters.py index a161338c..6d926426 100644 --- a/xendit/payment_method/model/e_wallet_parameters.py +++ b/xendit/payment_method/model/e_wallet_parameters.py @@ -5,6 +5,7 @@ import re # noqa: F401 import sys # noqa: F401 +from typing import List # noqa: F401 from xendit.model_utils import ( # noqa: F401 ApiTypeError, @@ -23,15 +24,16 @@ ) from xendit.exceptions import ApiAttributeError +from xendit.payment_method.model.e_wallet_account import EWalletAccount +from xendit.payment_method.model.e_wallet_channel_code import EWalletChannelCode +from xendit.payment_method.model.e_wallet_channel_properties import EWalletChannelProperties +globals()['EWalletAccount'] = EWalletAccount +globals()['EWalletChannelCode'] = EWalletChannelCode +globals()['EWalletChannelProperties'] = EWalletChannelProperties -def lazy_import(): - from xendit.payment_method.model.e_wallet_account import EWalletAccount - from xendit.payment_method.model.e_wallet_channel_code import EWalletChannelCode - from xendit.payment_method.model.e_wallet_channel_properties import EWalletChannelProperties - globals()['EWalletAccount'] = EWalletAccount - globals()['EWalletChannelCode'] = EWalletChannelCode - globals()['EWalletChannelProperties'] = EWalletChannelProperties +def lazy_import(): + pass class EWalletParameters(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. @@ -87,8 +89,8 @@ def openapi_types(): lazy_import() return { 'channel_code': (EWalletChannelCode,), # noqa: E501 - 'channel_properties': (EWalletChannelProperties,), # noqa: E501 - 'account': (EWalletAccount,), # noqa: E501 + 'channel_properties': (EWalletChannelProperties, none_type), # noqa: E501 + 'account': (EWalletAccount, none_type), # noqa: E501 } @cached_property @@ -202,12 +204,18 @@ def _from_openapi_data(cls, channel_code, *args, **kwargs): # noqa: E501 ]) @convert_js_args_to_python_args - def __init__(self, channel_code, *args, **kwargs): # noqa: E501 + def __init__(self, + channel_code: EWalletChannelCode, + channel_properties: EWalletChannelProperties | None = None, + account: EWalletAccount | None = None, + *args, **kwargs + ): # noqa: E501 """EWalletParameters - a model defined in OpenAPI Args: channel_code (EWalletChannelCode): + Keyword Args: _check_type (bool): if True, values for parameters in openapi_types will be type checked and a TypeError will be @@ -273,6 +281,10 @@ def __init__(self, channel_code, *args, **kwargs): # noqa: E501 self._visited_composed_classes = _visited_composed_classes + (self.__class__,) self.channel_code = channel_code + if channel_properties is not None: + self.channel_properties = channel_properties + if account is not None: + self.account = account for var_name, var_value in kwargs.items(): if var_name not in self.attribute_map and \ self._configuration is not None and \ diff --git a/xendit/payment_method/model/get_all_payment_methods400_response.py b/xendit/payment_method/model/get_all_payment_methods400_response.py index 2ed03aca..c4308d4b 100644 --- a/xendit/payment_method/model/get_all_payment_methods400_response.py +++ b/xendit/payment_method/model/get_all_payment_methods400_response.py @@ -5,6 +5,7 @@ import re # noqa: F401 import sys # noqa: F401 +from typing import List # noqa: F401 from xendit.model_utils import ( # noqa: F401 ApiTypeError, @@ -25,6 +26,9 @@ +def lazy_import(): + pass + class GetAllPaymentMethods400Response(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -93,8 +97,8 @@ def openapi_types(): and the value is attribute type. """ return { - 'error_code': (str,), # noqa: E501 - 'message': (str,), # noqa: E501 + 'error_code': (str, none_type), # noqa: E501 + 'message': (str, none_type), # noqa: E501 } @cached_property @@ -203,9 +207,14 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 ]) @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 + def __init__(self, + error_code: str | None = None, + message: str | None = None, + *args, **kwargs + ): # noqa: E501 """GetAllPaymentMethods400Response - a model defined in OpenAPI + Keyword Args: _check_type (bool): if True, values for parameters in openapi_types will be type checked and a TypeError will be @@ -270,6 +279,10 @@ def __init__(self, *args, **kwargs): # noqa: E501 self._configuration = _configuration self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + if error_code is not None: + self.error_code = error_code + if message is not None: + self.message = message for var_name, var_value in kwargs.items(): if var_name not in self.attribute_map and \ self._configuration is not None and \ diff --git a/xendit/payment_method/model/get_all_payment_methods403_response.py b/xendit/payment_method/model/get_all_payment_methods403_response.py index 28050319..d0b7f388 100644 --- a/xendit/payment_method/model/get_all_payment_methods403_response.py +++ b/xendit/payment_method/model/get_all_payment_methods403_response.py @@ -5,6 +5,7 @@ import re # noqa: F401 import sys # noqa: F401 +from typing import List # noqa: F401 from xendit.model_utils import ( # noqa: F401 ApiTypeError, @@ -25,6 +26,9 @@ +def lazy_import(): + pass + class GetAllPaymentMethods403Response(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -80,8 +84,8 @@ def openapi_types(): and the value is attribute type. """ return { - 'error_code': (str,), # noqa: E501 - 'message': (str,), # noqa: E501 + 'error_code': (str, none_type), # noqa: E501 + 'message': (str, none_type), # noqa: E501 } @cached_property @@ -190,9 +194,14 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 ]) @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 + def __init__(self, + error_code: str | None = None, + message: str | None = None, + *args, **kwargs + ): # noqa: E501 """GetAllPaymentMethods403Response - a model defined in OpenAPI + Keyword Args: _check_type (bool): if True, values for parameters in openapi_types will be type checked and a TypeError will be @@ -257,6 +266,10 @@ def __init__(self, *args, **kwargs): # noqa: E501 self._configuration = _configuration self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + if error_code is not None: + self.error_code = error_code + if message is not None: + self.message = message for var_name, var_value in kwargs.items(): if var_name not in self.attribute_map and \ self._configuration is not None and \ diff --git a/xendit/payment_method/model/get_all_payment_methods404_response.py b/xendit/payment_method/model/get_all_payment_methods404_response.py index 724440a1..07767b1a 100644 --- a/xendit/payment_method/model/get_all_payment_methods404_response.py +++ b/xendit/payment_method/model/get_all_payment_methods404_response.py @@ -5,6 +5,7 @@ import re # noqa: F401 import sys # noqa: F401 +from typing import List # noqa: F401 from xendit.model_utils import ( # noqa: F401 ApiTypeError, @@ -25,6 +26,9 @@ +def lazy_import(): + pass + class GetAllPaymentMethods404Response(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -79,8 +83,8 @@ def openapi_types(): and the value is attribute type. """ return { - 'error_code': (str,), # noqa: E501 - 'message': (str,), # noqa: E501 + 'error_code': (str, none_type), # noqa: E501 + 'message': (str, none_type), # noqa: E501 } @cached_property @@ -189,9 +193,14 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 ]) @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 + def __init__(self, + message: str | None = None, + error_code: str | None = "DATA_NOT_FOUND", + *args, **kwargs + ): # noqa: E501 """GetAllPaymentMethods404Response - a model defined in OpenAPI + Keyword Args: _check_type (bool): if True, values for parameters in openapi_types will be type checked and a TypeError will be @@ -256,6 +265,10 @@ def __init__(self, *args, **kwargs): # noqa: E501 self._configuration = _configuration self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + if error_code is not None: + self.error_code = error_code + if message is not None: + self.message = message for var_name, var_value in kwargs.items(): if var_name not in self.attribute_map and \ self._configuration is not None and \ diff --git a/xendit/payment_method/model/get_all_payment_methods_default_response.py b/xendit/payment_method/model/get_all_payment_methods_default_response.py index e5b51fe1..85f387b4 100644 --- a/xendit/payment_method/model/get_all_payment_methods_default_response.py +++ b/xendit/payment_method/model/get_all_payment_methods_default_response.py @@ -5,6 +5,7 @@ import re # noqa: F401 import sys # noqa: F401 +from typing import List # noqa: F401 from xendit.model_utils import ( # noqa: F401 ApiTypeError, @@ -25,6 +26,9 @@ +def lazy_import(): + pass + class GetAllPaymentMethodsDefaultResponse(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -76,8 +80,8 @@ def openapi_types(): and the value is attribute type. """ return { - 'error_code': (str,), # noqa: E501 - 'message': (str,), # noqa: E501 + 'error_code': (str, none_type), # noqa: E501 + 'message': (str, none_type), # noqa: E501 } @cached_property @@ -186,9 +190,14 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 ]) @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 + def __init__(self, + error_code: str | None = None, + message: str | None = None, + *args, **kwargs + ): # noqa: E501 """GetAllPaymentMethodsDefaultResponse - a model defined in OpenAPI + Keyword Args: _check_type (bool): if True, values for parameters in openapi_types will be type checked and a TypeError will be @@ -253,6 +262,10 @@ def __init__(self, *args, **kwargs): # noqa: E501 self._configuration = _configuration self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + if error_code is not None: + self.error_code = error_code + if message is not None: + self.message = message for var_name, var_value in kwargs.items(): if var_name not in self.attribute_map and \ self._configuration is not None and \ diff --git a/xendit/payment_method/model/over_the_counter.py b/xendit/payment_method/model/over_the_counter.py index a80bedc0..12abbe12 100644 --- a/xendit/payment_method/model/over_the_counter.py +++ b/xendit/payment_method/model/over_the_counter.py @@ -5,6 +5,7 @@ import re # noqa: F401 import sys # noqa: F401 +from typing import List # noqa: F401 from xendit.model_utils import ( # noqa: F401 ApiTypeError, @@ -23,15 +24,16 @@ ) from xendit.exceptions import ApiAttributeError +from xendit.payment_method.model.over_the_counter_channel_code import OverTheCounterChannelCode +from xendit.payment_method.model.over_the_counter_channel_properties import OverTheCounterChannelProperties +from xendit.payment_method.model.over_the_counter_parameters import OverTheCounterParameters +globals()['OverTheCounterChannelCode'] = OverTheCounterChannelCode +globals()['OverTheCounterChannelProperties'] = OverTheCounterChannelProperties +globals()['OverTheCounterParameters'] = OverTheCounterParameters -def lazy_import(): - from xendit.payment_method.model.over_the_counter_channel_code import OverTheCounterChannelCode - from xendit.payment_method.model.over_the_counter_channel_properties import OverTheCounterChannelProperties - from xendit.payment_method.model.over_the_counter_parameters import OverTheCounterParameters - globals()['OverTheCounterChannelCode'] = OverTheCounterChannelCode - globals()['OverTheCounterChannelProperties'] = OverTheCounterChannelProperties - globals()['OverTheCounterParameters'] = OverTheCounterParameters +def lazy_import(): + pass class OverTheCounter(ModelComposed): """NOTE: This class is auto generated by OpenAPI Generator. @@ -88,8 +90,8 @@ def openapi_types(): return { 'channel_code': (OverTheCounterChannelCode,), # noqa: E501 'channel_properties': (OverTheCounterChannelProperties,), # noqa: E501 - 'amount': (float, none_type,), # noqa: E501 - 'currency': (str,), # noqa: E501 + 'amount': (float, none_type, none_type), # noqa: E501 + 'currency': (str, none_type), # noqa: E501 } @cached_property diff --git a/xendit/payment_method/model/over_the_counter_channel_code.py b/xendit/payment_method/model/over_the_counter_channel_code.py index 23b58b59..1dbe9f0a 100644 --- a/xendit/payment_method/model/over_the_counter_channel_code.py +++ b/xendit/payment_method/model/over_the_counter_channel_code.py @@ -5,6 +5,7 @@ import re # noqa: F401 import sys # noqa: F401 +from typing import List # noqa: F401 from xendit.model_utils import ( # noqa: F401 ApiTypeError, @@ -25,6 +26,9 @@ +def lazy_import(): + pass + class OverTheCounterChannelCode(ModelSimple): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech diff --git a/xendit/payment_method/model/over_the_counter_channel_properties.py b/xendit/payment_method/model/over_the_counter_channel_properties.py index bf406655..95935a60 100644 --- a/xendit/payment_method/model/over_the_counter_channel_properties.py +++ b/xendit/payment_method/model/over_the_counter_channel_properties.py @@ -5,6 +5,7 @@ import re # noqa: F401 import sys # noqa: F401 +from typing import List # noqa: F401 from xendit.model_utils import ( # noqa: F401 ApiTypeError, @@ -25,6 +26,9 @@ +def lazy_import(): + pass + class OverTheCounterChannelProperties(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -77,8 +81,8 @@ def openapi_types(): """ return { 'customer_name': (str,), # noqa: E501 - 'payment_code': (str,), # noqa: E501 - 'expires_at': (datetime,), # noqa: E501 + 'payment_code': (str, none_type), # noqa: E501 + 'expires_at': (datetime, none_type), # noqa: E501 } @cached_property @@ -192,12 +196,18 @@ def _from_openapi_data(cls, customer_name, *args, **kwargs): # noqa: E501 ]) @convert_js_args_to_python_args - def __init__(self, customer_name, *args, **kwargs): # noqa: E501 + def __init__(self, + customer_name: str, + payment_code: str | None = None, + expires_at: datetime | None = None, + *args, **kwargs + ): # noqa: E501 """OverTheCounterChannelProperties - a model defined in OpenAPI Args: customer_name (str): Name of customer. + Keyword Args: _check_type (bool): if True, values for parameters in openapi_types will be type checked and a TypeError will be @@ -263,6 +273,10 @@ def __init__(self, customer_name, *args, **kwargs): # noqa: E501 self._visited_composed_classes = _visited_composed_classes + (self.__class__,) self.customer_name = customer_name + if payment_code is not None: + self.payment_code = payment_code + if expires_at is not None: + self.expires_at = expires_at for var_name, var_value in kwargs.items(): if var_name not in self.attribute_map and \ self._configuration is not None and \ diff --git a/xendit/payment_method/model/over_the_counter_channel_properties_update.py b/xendit/payment_method/model/over_the_counter_channel_properties_update.py index ab9b9e1e..bd7e0a1f 100644 --- a/xendit/payment_method/model/over_the_counter_channel_properties_update.py +++ b/xendit/payment_method/model/over_the_counter_channel_properties_update.py @@ -5,6 +5,7 @@ import re # noqa: F401 import sys # noqa: F401 +from typing import List # noqa: F401 from xendit.model_utils import ( # noqa: F401 ApiTypeError, @@ -25,6 +26,9 @@ +def lazy_import(): + pass + class OverTheCounterChannelPropertiesUpdate(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -76,8 +80,8 @@ def openapi_types(): and the value is attribute type. """ return { - 'customer_name': (str,), # noqa: E501 - 'expires_at': (datetime,), # noqa: E501 + 'customer_name': (str, none_type), # noqa: E501 + 'expires_at': (datetime, none_type), # noqa: E501 } @cached_property @@ -186,9 +190,14 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 ]) @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 + def __init__(self, + customer_name: str | None = None, + expires_at: datetime | None = None, + *args, **kwargs + ): # noqa: E501 """OverTheCounterChannelPropertiesUpdate - a model defined in OpenAPI + Keyword Args: _check_type (bool): if True, values for parameters in openapi_types will be type checked and a TypeError will be @@ -253,6 +262,10 @@ def __init__(self, *args, **kwargs): # noqa: E501 self._configuration = _configuration self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + if customer_name is not None: + self.customer_name = customer_name + if expires_at is not None: + self.expires_at = expires_at for var_name, var_value in kwargs.items(): if var_name not in self.attribute_map and \ self._configuration is not None and \ diff --git a/xendit/payment_method/model/over_the_counter_parameters.py b/xendit/payment_method/model/over_the_counter_parameters.py index 68d10b62..247fef2c 100644 --- a/xendit/payment_method/model/over_the_counter_parameters.py +++ b/xendit/payment_method/model/over_the_counter_parameters.py @@ -5,6 +5,7 @@ import re # noqa: F401 import sys # noqa: F401 +from typing import List # noqa: F401 from xendit.model_utils import ( # noqa: F401 ApiTypeError, @@ -23,13 +24,14 @@ ) from xendit.exceptions import ApiAttributeError +from xendit.payment_method.model.over_the_counter_channel_code import OverTheCounterChannelCode +from xendit.payment_method.model.over_the_counter_channel_properties import OverTheCounterChannelProperties +globals()['OverTheCounterChannelCode'] = OverTheCounterChannelCode +globals()['OverTheCounterChannelProperties'] = OverTheCounterChannelProperties -def lazy_import(): - from xendit.payment_method.model.over_the_counter_channel_code import OverTheCounterChannelCode - from xendit.payment_method.model.over_the_counter_channel_properties import OverTheCounterChannelProperties - globals()['OverTheCounterChannelCode'] = OverTheCounterChannelCode - globals()['OverTheCounterChannelProperties'] = OverTheCounterChannelProperties +def lazy_import(): + pass class OverTheCounterParameters(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. @@ -86,8 +88,8 @@ def openapi_types(): return { 'channel_code': (OverTheCounterChannelCode,), # noqa: E501 'channel_properties': (OverTheCounterChannelProperties,), # noqa: E501 - 'amount': (float, none_type,), # noqa: E501 - 'currency': (str,), # noqa: E501 + 'amount': (float, none_type, none_type), # noqa: E501 + 'currency': (str, none_type), # noqa: E501 } @cached_property @@ -204,13 +206,20 @@ def _from_openapi_data(cls, channel_code, channel_properties, *args, **kwargs): ]) @convert_js_args_to_python_args - def __init__(self, channel_code, channel_properties, *args, **kwargs): # noqa: E501 + def __init__(self, + channel_code: OverTheCounterChannelCode, + channel_properties: OverTheCounterChannelProperties, + amount: float | None = None, + currency: str | None = None, + *args, **kwargs + ): # noqa: E501 """OverTheCounterParameters - a model defined in OpenAPI Args: channel_code (OverTheCounterChannelCode): channel_properties (OverTheCounterChannelProperties): + Keyword Args: _check_type (bool): if True, values for parameters in openapi_types will be type checked and a TypeError will be @@ -277,6 +286,10 @@ def __init__(self, channel_code, channel_properties, *args, **kwargs): # noqa: self.channel_code = channel_code self.channel_properties = channel_properties + if amount is not None: + self.amount = amount + if currency is not None: + self.currency = currency for var_name, var_value in kwargs.items(): if var_name not in self.attribute_map and \ self._configuration is not None and \ diff --git a/xendit/payment_method/model/over_the_counter_update_parameters.py b/xendit/payment_method/model/over_the_counter_update_parameters.py index 9ab6ac87..ea248be6 100644 --- a/xendit/payment_method/model/over_the_counter_update_parameters.py +++ b/xendit/payment_method/model/over_the_counter_update_parameters.py @@ -5,6 +5,7 @@ import re # noqa: F401 import sys # noqa: F401 +from typing import List # noqa: F401 from xendit.model_utils import ( # noqa: F401 ApiTypeError, @@ -23,11 +24,12 @@ ) from xendit.exceptions import ApiAttributeError +from xendit.payment_method.model.over_the_counter_channel_properties_update import OverTheCounterChannelPropertiesUpdate +globals()['OverTheCounterChannelPropertiesUpdate'] = OverTheCounterChannelPropertiesUpdate -def lazy_import(): - from xendit.payment_method.model.over_the_counter_channel_properties_update import OverTheCounterChannelPropertiesUpdate - globals()['OverTheCounterChannelPropertiesUpdate'] = OverTheCounterChannelPropertiesUpdate +def lazy_import(): + pass class OverTheCounterUpdateParameters(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. @@ -82,8 +84,8 @@ def openapi_types(): """ lazy_import() return { - 'amount': (float, none_type,), # noqa: E501 - 'channel_properties': (OverTheCounterChannelPropertiesUpdate,), # noqa: E501 + 'amount': (float, none_type, none_type), # noqa: E501 + 'channel_properties': (OverTheCounterChannelPropertiesUpdate, none_type), # noqa: E501 } @cached_property @@ -192,9 +194,14 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 ]) @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 + def __init__(self, + amount: float | None = None, + channel_properties: OverTheCounterChannelPropertiesUpdate | None = None, + *args, **kwargs + ): # noqa: E501 """OverTheCounterUpdateParameters - a model defined in OpenAPI + Keyword Args: _check_type (bool): if True, values for parameters in openapi_types will be type checked and a TypeError will be @@ -259,6 +266,10 @@ def __init__(self, *args, **kwargs): # noqa: E501 self._configuration = _configuration self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + if amount is not None: + self.amount = amount + if channel_properties is not None: + self.channel_properties = channel_properties for var_name, var_value in kwargs.items(): if var_name not in self.attribute_map and \ self._configuration is not None and \ diff --git a/xendit/payment_method/model/payment_channel.py b/xendit/payment_method/model/payment_channel.py index 6378dc57..12ff9a78 100644 --- a/xendit/payment_method/model/payment_channel.py +++ b/xendit/payment_method/model/payment_channel.py @@ -5,6 +5,7 @@ import re # noqa: F401 import sys # noqa: F401 +from typing import List # noqa: F401 from xendit.model_utils import ( # noqa: F401 ApiTypeError, @@ -23,15 +24,16 @@ ) from xendit.exceptions import ApiAttributeError +from xendit.payment_method.model.channel_amount_limits import ChannelAmountLimits +from xendit.payment_method.model.channel_property import ChannelProperty +from xendit.payment_method.model.payment_channel_all_of import PaymentChannelAllOf +globals()['ChannelAmountLimits'] = ChannelAmountLimits +globals()['ChannelProperty'] = ChannelProperty +globals()['PaymentChannelAllOf'] = PaymentChannelAllOf -def lazy_import(): - from xendit.payment_method.model.channel_amount_limits import ChannelAmountLimits - from xendit.payment_method.model.channel_property import ChannelProperty - from xendit.payment_method.model.payment_channel_all_of import PaymentChannelAllOf - globals()['ChannelAmountLimits'] = ChannelAmountLimits - globals()['ChannelProperty'] = ChannelProperty - globals()['PaymentChannelAllOf'] = PaymentChannelAllOf +def lazy_import(): + pass class PaymentChannel(ModelComposed): """NOTE: This class is auto generated by OpenAPI Generator. @@ -86,13 +88,13 @@ def openapi_types(): """ lazy_import() return { - 'channel_code': (str,), # noqa: E501 - 'type': (str,), # noqa: E501 - 'country': (str,), # noqa: E501 - 'channel_name': (str,), # noqa: E501 - 'channel_properties': ([ChannelProperty],), # noqa: E501 - 'logo_url': (str,), # noqa: E501 - 'amount_limits': ([ChannelAmountLimits],), # noqa: E501 + 'channel_code': (str, none_type), # noqa: E501 + 'type': (str, none_type), # noqa: E501 + 'country': (str, none_type), # noqa: E501 + 'channel_name': (str, none_type), # noqa: E501 + 'channel_properties': ([ChannelProperty], none_type), # noqa: E501 + 'logo_url': (str, none_type), # noqa: E501 + 'amount_limits': ([ChannelAmountLimits], none_type), # noqa: E501 } @cached_property diff --git a/xendit/payment_method/model/payment_channel_all_of.py b/xendit/payment_method/model/payment_channel_all_of.py index 7563596a..920bf218 100644 --- a/xendit/payment_method/model/payment_channel_all_of.py +++ b/xendit/payment_method/model/payment_channel_all_of.py @@ -5,6 +5,7 @@ import re # noqa: F401 import sys # noqa: F401 +from typing import List # noqa: F401 from xendit.model_utils import ( # noqa: F401 ApiTypeError, @@ -23,13 +24,14 @@ ) from xendit.exceptions import ApiAttributeError +from xendit.payment_method.model.channel_amount_limits import ChannelAmountLimits +from xendit.payment_method.model.channel_property import ChannelProperty +globals()['ChannelAmountLimits'] = ChannelAmountLimits +globals()['ChannelProperty'] = ChannelProperty -def lazy_import(): - from xendit.payment_method.model.channel_amount_limits import ChannelAmountLimits - from xendit.payment_method.model.channel_property import ChannelProperty - globals()['ChannelAmountLimits'] = ChannelAmountLimits - globals()['ChannelProperty'] = ChannelProperty +def lazy_import(): + pass class PaymentChannelAllOf(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. @@ -84,13 +86,13 @@ def openapi_types(): """ lazy_import() return { - 'channel_code': (str,), # noqa: E501 - 'type': (str,), # noqa: E501 - 'country': (str,), # noqa: E501 - 'channel_name': (str,), # noqa: E501 - 'channel_properties': ([ChannelProperty],), # noqa: E501 - 'logo_url': (str,), # noqa: E501 - 'amount_limits': ([ChannelAmountLimits],), # noqa: E501 + 'channel_code': (str, none_type), # noqa: E501 + 'type': (str, none_type), # noqa: E501 + 'country': (str, none_type), # noqa: E501 + 'channel_name': (str, none_type), # noqa: E501 + 'channel_properties': ([ChannelProperty], none_type), # noqa: E501 + 'logo_url': (str, none_type), # noqa: E501 + 'amount_limits': ([ChannelAmountLimits], none_type), # noqa: E501 } @cached_property @@ -209,9 +211,19 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 ]) @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 + def __init__(self, + channel_code: str | None = None, + type: str | None = None, + country: str | None = None, + channel_name: str | None = None, + channel_properties: list | None = None, + logo_url: str | None = None, + amount_limits: list | None = None, + *args, **kwargs + ): # noqa: E501 """PaymentChannelAllOf - a model defined in OpenAPI + Keyword Args: _check_type (bool): if True, values for parameters in openapi_types will be type checked and a TypeError will be @@ -281,6 +293,20 @@ def __init__(self, *args, **kwargs): # noqa: E501 self._configuration = _configuration self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + if channel_code is not None: + self.channel_code = channel_code + if type is not None: + self.type = type + if country is not None: + self.country = country + if channel_name is not None: + self.channel_name = channel_name + if channel_properties is not None: + self.channel_properties = channel_properties + if logo_url is not None: + self.logo_url = logo_url + if amount_limits is not None: + self.amount_limits = amount_limits for var_name, var_value in kwargs.items(): if var_name not in self.attribute_map and \ self._configuration is not None and \ diff --git a/xendit/payment_method/model/payment_channel_list.py b/xendit/payment_method/model/payment_channel_list.py index 04b54389..2038e98e 100644 --- a/xendit/payment_method/model/payment_channel_list.py +++ b/xendit/payment_method/model/payment_channel_list.py @@ -5,6 +5,7 @@ import re # noqa: F401 import sys # noqa: F401 +from typing import List # noqa: F401 from xendit.model_utils import ( # noqa: F401 ApiTypeError, @@ -23,13 +24,14 @@ ) from xendit.exceptions import ApiAttributeError +from xendit.payment_method.model.payment_channel import PaymentChannel +from xendit.payment_method.model.payment_channel_list_links_inner import PaymentChannelListLinksInner +globals()['PaymentChannel'] = PaymentChannel +globals()['PaymentChannelListLinksInner'] = PaymentChannelListLinksInner -def lazy_import(): - from xendit.payment_method.model.payment_channel import PaymentChannel - from xendit.payment_method.model.payment_channel_list_links_inner import PaymentChannelListLinksInner - globals()['PaymentChannel'] = PaymentChannel - globals()['PaymentChannelListLinksInner'] = PaymentChannelListLinksInner +def lazy_import(): + pass class PaymentChannelList(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. @@ -84,9 +86,9 @@ def openapi_types(): """ lazy_import() return { - 'data': ([PaymentChannel],), # noqa: E501 - 'links': ([PaymentChannelListLinksInner],), # noqa: E501 - 'has_more': (bool,), # noqa: E501 + 'data': ([PaymentChannel], none_type), # noqa: E501 + 'links': ([PaymentChannelListLinksInner], none_type), # noqa: E501 + 'has_more': (bool, none_type), # noqa: E501 } @cached_property @@ -197,9 +199,15 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 ]) @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 + def __init__(self, + data: list | None = None, + links: list | None = None, + has_more: bool | None = None, + *args, **kwargs + ): # noqa: E501 """PaymentChannelList - a model defined in OpenAPI + Keyword Args: _check_type (bool): if True, values for parameters in openapi_types will be type checked and a TypeError will be @@ -265,6 +273,12 @@ def __init__(self, *args, **kwargs): # noqa: E501 self._configuration = _configuration self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + if data is not None: + self.data = data + if links is not None: + self.links = links + if has_more is not None: + self.has_more = has_more for var_name, var_value in kwargs.items(): if var_name not in self.attribute_map and \ self._configuration is not None and \ diff --git a/xendit/payment_method/model/payment_channel_list_links_inner.py b/xendit/payment_method/model/payment_channel_list_links_inner.py index a9571f73..e3454d2d 100644 --- a/xendit/payment_method/model/payment_channel_list_links_inner.py +++ b/xendit/payment_method/model/payment_channel_list_links_inner.py @@ -5,6 +5,7 @@ import re # noqa: F401 import sys # noqa: F401 +from typing import List # noqa: F401 from xendit.model_utils import ( # noqa: F401 ApiTypeError, @@ -23,11 +24,12 @@ ) from xendit.exceptions import ApiAttributeError +from xendit.payment_method.model.payment_channel_list_links_inner_all_of import PaymentChannelListLinksInnerAllOf +globals()['PaymentChannelListLinksInnerAllOf'] = PaymentChannelListLinksInnerAllOf -def lazy_import(): - from xendit.payment_method.model.payment_channel_list_links_inner_all_of import PaymentChannelListLinksInnerAllOf - globals()['PaymentChannelListLinksInnerAllOf'] = PaymentChannelListLinksInnerAllOf +def lazy_import(): + pass class PaymentChannelListLinksInner(ModelComposed): """NOTE: This class is auto generated by OpenAPI Generator. @@ -88,9 +90,9 @@ def openapi_types(): """ lazy_import() return { - 'href': (str,), # noqa: E501 - 'rel': (str,), # noqa: E501 - 'method': (str,), # noqa: E501 + 'href': (str, none_type), # noqa: E501 + 'rel': (str, none_type), # noqa: E501 + 'method': (str, none_type), # noqa: E501 } @cached_property diff --git a/xendit/payment_method/model/payment_channel_list_links_inner_all_of.py b/xendit/payment_method/model/payment_channel_list_links_inner_all_of.py index 026e8aa3..4eab2284 100644 --- a/xendit/payment_method/model/payment_channel_list_links_inner_all_of.py +++ b/xendit/payment_method/model/payment_channel_list_links_inner_all_of.py @@ -5,6 +5,7 @@ import re # noqa: F401 import sys # noqa: F401 +from typing import List # noqa: F401 from xendit.model_utils import ( # noqa: F401 ApiTypeError, @@ -25,6 +26,9 @@ +def lazy_import(): + pass + class PaymentChannelListLinksInnerAllOf(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -82,9 +86,9 @@ def openapi_types(): and the value is attribute type. """ return { - 'href': (str,), # noqa: E501 - 'rel': (str,), # noqa: E501 - 'method': (str,), # noqa: E501 + 'href': (str, none_type), # noqa: E501 + 'rel': (str, none_type), # noqa: E501 + 'method': (str, none_type), # noqa: E501 } @cached_property @@ -195,9 +199,15 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 ]) @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 + def __init__(self, + href: str | None = None, + rel: str | None = None, + method: str | None = None, + *args, **kwargs + ): # noqa: E501 """PaymentChannelListLinksInnerAllOf - a model defined in OpenAPI + Keyword Args: _check_type (bool): if True, values for parameters in openapi_types will be type checked and a TypeError will be @@ -263,6 +273,12 @@ def __init__(self, *args, **kwargs): # noqa: E501 self._configuration = _configuration self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + if href is not None: + self.href = href + if rel is not None: + self.rel = rel + if method is not None: + self.method = method for var_name, var_value in kwargs.items(): if var_name not in self.attribute_map and \ self._configuration is not None and \ diff --git a/xendit/payment_method/model/payment_method.py b/xendit/payment_method/model/payment_method.py index d1f78cb5..0624a290 100644 --- a/xendit/payment_method/model/payment_method.py +++ b/xendit/payment_method/model/payment_method.py @@ -5,6 +5,7 @@ import re # noqa: F401 import sys # noqa: F401 +from typing import List # noqa: F401 from xendit.model_utils import ( # noqa: F401 ApiTypeError, @@ -23,33 +24,34 @@ ) from xendit.exceptions import ApiAttributeError +from xendit.payment_method.model.billing_information import BillingInformation +from xendit.payment_method.model.card import Card +from xendit.payment_method.model.direct_debit import DirectDebit +from xendit.payment_method.model.e_wallet import EWallet +from xendit.payment_method.model.over_the_counter import OverTheCounter +from xendit.payment_method.model.payment_method_action import PaymentMethodAction +from xendit.payment_method.model.payment_method_country import PaymentMethodCountry +from xendit.payment_method.model.payment_method_reusability import PaymentMethodReusability +from xendit.payment_method.model.payment_method_status import PaymentMethodStatus +from xendit.payment_method.model.payment_method_type import PaymentMethodType +from xendit.payment_method.model.qr_code import QRCode +from xendit.payment_method.model.virtual_account import VirtualAccount +globals()['BillingInformation'] = BillingInformation +globals()['Card'] = Card +globals()['DirectDebit'] = DirectDebit +globals()['EWallet'] = EWallet +globals()['OverTheCounter'] = OverTheCounter +globals()['PaymentMethodAction'] = PaymentMethodAction +globals()['PaymentMethodCountry'] = PaymentMethodCountry +globals()['PaymentMethodReusability'] = PaymentMethodReusability +globals()['PaymentMethodStatus'] = PaymentMethodStatus +globals()['PaymentMethodType'] = PaymentMethodType +globals()['QRCode'] = QRCode +globals()['VirtualAccount'] = VirtualAccount -def lazy_import(): - from xendit.payment_method.model.billing_information import BillingInformation - from xendit.payment_method.model.card import Card - from xendit.payment_method.model.direct_debit import DirectDebit - from xendit.payment_method.model.e_wallet import EWallet - from xendit.payment_method.model.over_the_counter import OverTheCounter - from xendit.payment_method.model.payment_method_action import PaymentMethodAction - from xendit.payment_method.model.payment_method_country import PaymentMethodCountry - from xendit.payment_method.model.payment_method_reusability import PaymentMethodReusability - from xendit.payment_method.model.payment_method_status import PaymentMethodStatus - from xendit.payment_method.model.payment_method_type import PaymentMethodType - from xendit.payment_method.model.qr_code import QRCode - from xendit.payment_method.model.virtual_account import VirtualAccount - globals()['BillingInformation'] = BillingInformation - globals()['Card'] = Card - globals()['DirectDebit'] = DirectDebit - globals()['EWallet'] = EWallet - globals()['OverTheCounter'] = OverTheCounter - globals()['PaymentMethodAction'] = PaymentMethodAction - globals()['PaymentMethodCountry'] = PaymentMethodCountry - globals()['PaymentMethodReusability'] = PaymentMethodReusability - globals()['PaymentMethodStatus'] = PaymentMethodStatus - globals()['PaymentMethodType'] = PaymentMethodType - globals()['QRCode'] = QRCode - globals()['VirtualAccount'] = VirtualAccount +def lazy_import(): + pass class PaymentMethod(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. @@ -105,27 +107,27 @@ def openapi_types(): lazy_import() return { 'id': (str,), # noqa: E501 - 'business_id': (str,), # noqa: E501 - 'type': (PaymentMethodType,), # noqa: E501 - 'country': (PaymentMethodCountry,), # noqa: E501 - 'customer_id': (str, none_type,), # noqa: E501 - 'customer': ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type,), # noqa: E501 - 'reference_id': (str,), # noqa: E501 - 'description': (str, none_type,), # noqa: E501 - 'status': (PaymentMethodStatus,), # noqa: E501 - 'reusability': (PaymentMethodReusability,), # noqa: E501 - 'actions': ([PaymentMethodAction],), # noqa: E501 - 'metadata': ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type,), # noqa: E501 - 'billing_information': (BillingInformation,), # noqa: E501 - 'failure_code': (str, none_type,), # noqa: E501 - 'created': (datetime,), # noqa: E501 - 'updated': (datetime,), # noqa: E501 - 'ewallet': (EWallet,), # noqa: E501 - 'direct_debit': (DirectDebit,), # noqa: E501 - 'over_the_counter': (OverTheCounter,), # noqa: E501 - 'card': (Card,), # noqa: E501 - 'qr_code': (QRCode,), # noqa: E501 - 'virtual_account': (VirtualAccount,), # noqa: E501 + 'business_id': (str, none_type), # noqa: E501 + 'type': (PaymentMethodType, none_type), # noqa: E501 + 'country': (PaymentMethodCountry, none_type), # noqa: E501 + 'customer_id': (str, none_type, none_type), # noqa: E501 + 'customer': ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type, none_type), # noqa: E501 + 'reference_id': (str, none_type), # noqa: E501 + 'description': (str, none_type, none_type), # noqa: E501 + 'status': (PaymentMethodStatus, none_type), # noqa: E501 + 'reusability': (PaymentMethodReusability, none_type), # noqa: E501 + 'actions': ([PaymentMethodAction], none_type), # noqa: E501 + 'metadata': ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type, none_type), # noqa: E501 + 'billing_information': (BillingInformation, none_type), # noqa: E501 + 'failure_code': (str, none_type, none_type), # noqa: E501 + 'created': (datetime, none_type), # noqa: E501 + 'updated': (datetime, none_type), # noqa: E501 + 'ewallet': (EWallet, none_type), # noqa: E501 + 'direct_debit': (DirectDebit, none_type), # noqa: E501 + 'over_the_counter': (OverTheCounter, none_type), # noqa: E501 + 'card': (Card, none_type), # noqa: E501 + 'qr_code': (QRCode, none_type), # noqa: E501 + 'virtual_account': (VirtualAccount, none_type), # noqa: E501 } @cached_property @@ -277,12 +279,37 @@ def _from_openapi_data(cls, id, *args, **kwargs): # noqa: E501 ]) @convert_js_args_to_python_args - def __init__(self, id, *args, **kwargs): # noqa: E501 + def __init__(self, + id: str, + business_id: str | None = None, + type: PaymentMethodType | None = None, + country: PaymentMethodCountry | None = None, + customer_id: str | None = None, + customer: dict | None = None, + reference_id: str | None = None, + description: str | None = None, + status: PaymentMethodStatus | None = None, + reusability: PaymentMethodReusability | None = None, + actions: list | None = None, + metadata: dict | None = None, + billing_information: BillingInformation | None = None, + failure_code: str | None = None, + created: datetime | None = None, + updated: datetime | None = None, + ewallet: EWallet | None = None, + direct_debit: DirectDebit | None = None, + over_the_counter: OverTheCounter | None = None, + card: Card | None = None, + qr_code: QRCode | None = None, + virtual_account: VirtualAccount | None = None, + *args, **kwargs + ): # noqa: E501 """PaymentMethod - a model defined in OpenAPI Args: id (str): + Keyword Args: _check_type (bool): if True, values for parameters in openapi_types will be type checked and a TypeError will be @@ -367,6 +394,48 @@ def __init__(self, id, *args, **kwargs): # noqa: E501 self._visited_composed_classes = _visited_composed_classes + (self.__class__,) self.id = id + if business_id is not None: + self.business_id = business_id + if type is not None: + self.type = type + if country is not None: + self.country = country + if customer_id is not None: + self.customer_id = customer_id + if customer is not None: + self.customer = customer + if reference_id is not None: + self.reference_id = reference_id + if description is not None: + self.description = description + if status is not None: + self.status = status + if reusability is not None: + self.reusability = reusability + if actions is not None: + self.actions = actions + if metadata is not None: + self.metadata = metadata + if billing_information is not None: + self.billing_information = billing_information + if failure_code is not None: + self.failure_code = failure_code + if created is not None: + self.created = created + if updated is not None: + self.updated = updated + if ewallet is not None: + self.ewallet = ewallet + if direct_debit is not None: + self.direct_debit = direct_debit + if over_the_counter is not None: + self.over_the_counter = over_the_counter + if card is not None: + self.card = card + if qr_code is not None: + self.qr_code = qr_code + if virtual_account is not None: + self.virtual_account = virtual_account for var_name, var_value in kwargs.items(): if var_name not in self.attribute_map and \ self._configuration is not None and \ diff --git a/xendit/payment_method/model/payment_method_action.py b/xendit/payment_method/model/payment_method_action.py index 6d9b9366..8eca725d 100644 --- a/xendit/payment_method/model/payment_method_action.py +++ b/xendit/payment_method/model/payment_method_action.py @@ -5,6 +5,7 @@ import re # noqa: F401 import sys # noqa: F401 +from typing import List # noqa: F401 from xendit.model_utils import ( # noqa: F401 ApiTypeError, @@ -25,6 +26,9 @@ +def lazy_import(): + pass + class PaymentMethodAction(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -76,10 +80,10 @@ def openapi_types(): and the value is attribute type. """ return { - 'action': (str,), # noqa: E501 - 'method': (str,), # noqa: E501 - 'url': (str,), # noqa: E501 - 'url_type': (str,), # noqa: E501 + 'action': (str, none_type), # noqa: E501 + 'method': (str, none_type), # noqa: E501 + 'url': (str, none_type), # noqa: E501 + 'url_type': (str, none_type), # noqa: E501 } @cached_property @@ -192,9 +196,16 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 ]) @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 + def __init__(self, + action: str | None = None, + method: str | None = None, + url: str | None = None, + url_type: str | None = None, + *args, **kwargs + ): # noqa: E501 """PaymentMethodAction - a model defined in OpenAPI + Keyword Args: _check_type (bool): if True, values for parameters in openapi_types will be type checked and a TypeError will be @@ -261,6 +272,14 @@ def __init__(self, *args, **kwargs): # noqa: E501 self._configuration = _configuration self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + if action is not None: + self.action = action + if method is not None: + self.method = method + if url is not None: + self.url = url + if url_type is not None: + self.url_type = url_type for var_name, var_value in kwargs.items(): if var_name not in self.attribute_map and \ self._configuration is not None and \ diff --git a/xendit/payment_method/model/payment_method_auth_parameters.py b/xendit/payment_method/model/payment_method_auth_parameters.py index 717d55fd..ca9bae8c 100644 --- a/xendit/payment_method/model/payment_method_auth_parameters.py +++ b/xendit/payment_method/model/payment_method_auth_parameters.py @@ -5,6 +5,7 @@ import re # noqa: F401 import sys # noqa: F401 +from typing import List # noqa: F401 from xendit.model_utils import ( # noqa: F401 ApiTypeError, @@ -25,6 +26,9 @@ +def lazy_import(): + pass + class PaymentMethodAuthParameters(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -190,12 +194,16 @@ def _from_openapi_data(cls, auth_code, *args, **kwargs): # noqa: E501 ]) @convert_js_args_to_python_args - def __init__(self, auth_code, *args, **kwargs): # noqa: E501 + def __init__(self, + auth_code: str, + *args, **kwargs + ): # noqa: E501 """PaymentMethodAuthParameters - a model defined in OpenAPI Args: auth_code (str): + Keyword Args: _check_type (bool): if True, values for parameters in openapi_types will be type checked and a TypeError will be diff --git a/xendit/payment_method/model/payment_method_country.py b/xendit/payment_method/model/payment_method_country.py index 66de3193..7ecc1c97 100644 --- a/xendit/payment_method/model/payment_method_country.py +++ b/xendit/payment_method/model/payment_method_country.py @@ -5,6 +5,7 @@ import re # noqa: F401 import sys # noqa: F401 +from typing import List # noqa: F401 from xendit.model_utils import ( # noqa: F401 ApiTypeError, @@ -25,6 +26,9 @@ +def lazy_import(): + pass + class PaymentMethodCountry(ModelSimple): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech diff --git a/xendit/payment_method/model/payment_method_expire_parameters.py b/xendit/payment_method/model/payment_method_expire_parameters.py index 6746e17a..a011e6c8 100644 --- a/xendit/payment_method/model/payment_method_expire_parameters.py +++ b/xendit/payment_method/model/payment_method_expire_parameters.py @@ -5,6 +5,7 @@ import re # noqa: F401 import sys # noqa: F401 +from typing import List # noqa: F401 from xendit.model_utils import ( # noqa: F401 ApiTypeError, @@ -25,6 +26,9 @@ +def lazy_import(): + pass + class PaymentMethodExpireParameters(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -76,8 +80,8 @@ def openapi_types(): and the value is attribute type. """ return { - 'success_return_url': (str, none_type,), # noqa: E501 - 'failure_return_url': (str, none_type,), # noqa: E501 + 'success_return_url': (str, none_type, none_type), # noqa: E501 + 'failure_return_url': (str, none_type, none_type), # noqa: E501 } @cached_property @@ -186,9 +190,14 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 ]) @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 + def __init__(self, + success_return_url: str | None = None, + failure_return_url: str | None = None, + *args, **kwargs + ): # noqa: E501 """PaymentMethodExpireParameters - a model defined in OpenAPI + Keyword Args: _check_type (bool): if True, values for parameters in openapi_types will be type checked and a TypeError will be @@ -253,6 +262,10 @@ def __init__(self, *args, **kwargs): # noqa: E501 self._configuration = _configuration self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + if success_return_url is not None: + self.success_return_url = success_return_url + if failure_return_url is not None: + self.failure_return_url = failure_return_url for var_name, var_value in kwargs.items(): if var_name not in self.attribute_map and \ self._configuration is not None and \ diff --git a/xendit/payment_method/model/payment_method_list.py b/xendit/payment_method/model/payment_method_list.py index 9e66158f..aa453e0e 100644 --- a/xendit/payment_method/model/payment_method_list.py +++ b/xendit/payment_method/model/payment_method_list.py @@ -5,6 +5,7 @@ import re # noqa: F401 import sys # noqa: F401 +from typing import List # noqa: F401 from xendit.model_utils import ( # noqa: F401 ApiTypeError, @@ -23,11 +24,12 @@ ) from xendit.exceptions import ApiAttributeError +from xendit.payment_method.model.payment_method import PaymentMethod +globals()['PaymentMethod'] = PaymentMethod -def lazy_import(): - from xendit.payment_method.model.payment_method import PaymentMethod - globals()['PaymentMethod'] = PaymentMethod +def lazy_import(): + pass class PaymentMethodList(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. @@ -83,7 +85,7 @@ def openapi_types(): lazy_import() return { 'data': ([PaymentMethod],), # noqa: E501 - 'has_more': (bool,), # noqa: E501 + 'has_more': (bool, none_type), # noqa: E501 } @cached_property @@ -195,12 +197,17 @@ def _from_openapi_data(cls, data, *args, **kwargs): # noqa: E501 ]) @convert_js_args_to_python_args - def __init__(self, data, *args, **kwargs): # noqa: E501 + def __init__(self, + data: list, + has_more: bool | None = None, + *args, **kwargs + ): # noqa: E501 """PaymentMethodList - a model defined in OpenAPI Args: data ([PaymentMethod]): + Keyword Args: _check_type (bool): if True, values for parameters in openapi_types will be type checked and a TypeError will be @@ -265,6 +272,8 @@ def __init__(self, data, *args, **kwargs): # noqa: E501 self._visited_composed_classes = _visited_composed_classes + (self.__class__,) self.data = data + if has_more is not None: + self.has_more = has_more for var_name, var_value in kwargs.items(): if var_name not in self.attribute_map and \ self._configuration is not None and \ diff --git a/xendit/payment_method/model/payment_method_parameters.py b/xendit/payment_method/model/payment_method_parameters.py index 93547666..e0f6275b 100644 --- a/xendit/payment_method/model/payment_method_parameters.py +++ b/xendit/payment_method/model/payment_method_parameters.py @@ -5,6 +5,7 @@ import re # noqa: F401 import sys # noqa: F401 +from typing import List # noqa: F401 from xendit.model_utils import ( # noqa: F401 ApiTypeError, @@ -23,27 +24,28 @@ ) from xendit.exceptions import ApiAttributeError +from xendit.payment_method.model.billing_information import BillingInformation +from xendit.payment_method.model.card_parameters import CardParameters +from xendit.payment_method.model.direct_debit_parameters import DirectDebitParameters +from xendit.payment_method.model.e_wallet_parameters import EWalletParameters +from xendit.payment_method.model.over_the_counter_parameters import OverTheCounterParameters +from xendit.payment_method.model.payment_method_reusability import PaymentMethodReusability +from xendit.payment_method.model.payment_method_type import PaymentMethodType +from xendit.payment_method.model.qr_code_parameters import QRCodeParameters +from xendit.payment_method.model.virtual_account_parameters import VirtualAccountParameters +globals()['BillingInformation'] = BillingInformation +globals()['CardParameters'] = CardParameters +globals()['DirectDebitParameters'] = DirectDebitParameters +globals()['EWalletParameters'] = EWalletParameters +globals()['OverTheCounterParameters'] = OverTheCounterParameters +globals()['PaymentMethodReusability'] = PaymentMethodReusability +globals()['PaymentMethodType'] = PaymentMethodType +globals()['QRCodeParameters'] = QRCodeParameters +globals()['VirtualAccountParameters'] = VirtualAccountParameters -def lazy_import(): - from xendit.payment_method.model.billing_information import BillingInformation - from xendit.payment_method.model.card_parameters import CardParameters - from xendit.payment_method.model.direct_debit_parameters import DirectDebitParameters - from xendit.payment_method.model.e_wallet_parameters import EWalletParameters - from xendit.payment_method.model.over_the_counter_parameters import OverTheCounterParameters - from xendit.payment_method.model.payment_method_reusability import PaymentMethodReusability - from xendit.payment_method.model.payment_method_type import PaymentMethodType - from xendit.payment_method.model.qr_code_parameters import QRCodeParameters - from xendit.payment_method.model.virtual_account_parameters import VirtualAccountParameters - globals()['BillingInformation'] = BillingInformation - globals()['CardParameters'] = CardParameters - globals()['DirectDebitParameters'] = DirectDebitParameters - globals()['EWalletParameters'] = EWalletParameters - globals()['OverTheCounterParameters'] = OverTheCounterParameters - globals()['PaymentMethodReusability'] = PaymentMethodReusability - globals()['PaymentMethodType'] = PaymentMethodType - globals()['QRCodeParameters'] = QRCodeParameters - globals()['VirtualAccountParameters'] = VirtualAccountParameters +def lazy_import(): + pass class PaymentMethodParameters(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. @@ -100,18 +102,18 @@ def openapi_types(): return { 'type': (PaymentMethodType,), # noqa: E501 'reusability': (PaymentMethodReusability,), # noqa: E501 - 'country': (str, none_type,), # noqa: E501 - 'customer_id': (str, none_type,), # noqa: E501 - 'reference_id': (str,), # noqa: E501 - 'description': (str, none_type,), # noqa: E501 - 'card': (CardParameters,), # noqa: E501 - 'direct_debit': (DirectDebitParameters,), # noqa: E501 - 'ewallet': (EWalletParameters,), # noqa: E501 - 'over_the_counter': (OverTheCounterParameters,), # noqa: E501 - 'virtual_account': (VirtualAccountParameters,), # noqa: E501 - 'qr_code': (QRCodeParameters,), # noqa: E501 - 'metadata': ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type,), # noqa: E501 - 'billing_information': (BillingInformation,), # noqa: E501 + 'country': (str, none_type, none_type), # noqa: E501 + 'customer_id': (str, none_type, none_type), # noqa: E501 + 'reference_id': (str, none_type), # noqa: E501 + 'description': (str, none_type, none_type), # noqa: E501 + 'card': (CardParameters, none_type), # noqa: E501 + 'direct_debit': (DirectDebitParameters, none_type), # noqa: E501 + 'ewallet': (EWalletParameters, none_type), # noqa: E501 + 'over_the_counter': (OverTheCounterParameters, none_type), # noqa: E501 + 'virtual_account': (VirtualAccountParameters, none_type), # noqa: E501 + 'qr_code': (QRCodeParameters, none_type), # noqa: E501 + 'metadata': ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type, none_type), # noqa: E501 + 'billing_information': (BillingInformation, none_type), # noqa: E501 } @cached_property @@ -248,13 +250,30 @@ def _from_openapi_data(cls, type, reusability, *args, **kwargs): # noqa: E501 ]) @convert_js_args_to_python_args - def __init__(self, type, reusability, *args, **kwargs): # noqa: E501 + def __init__(self, + type: PaymentMethodType, + reusability: PaymentMethodReusability, + country: str | None = None, + customer_id: str | None = None, + reference_id: str | None = None, + description: str | None = None, + card: CardParameters | None = None, + direct_debit: DirectDebitParameters | None = None, + ewallet: EWalletParameters | None = None, + over_the_counter: OverTheCounterParameters | None = None, + virtual_account: VirtualAccountParameters | None = None, + qr_code: QRCodeParameters | None = None, + metadata: dict | None = None, + billing_information: BillingInformation | None = None, + *args, **kwargs + ): # noqa: E501 """PaymentMethodParameters - a model defined in OpenAPI Args: type (PaymentMethodType): reusability (PaymentMethodReusability): + Keyword Args: _check_type (bool): if True, values for parameters in openapi_types will be type checked and a TypeError will be @@ -331,6 +350,30 @@ def __init__(self, type, reusability, *args, **kwargs): # noqa: E501 self.type = type self.reusability = reusability + if country is not None: + self.country = country + if customer_id is not None: + self.customer_id = customer_id + if reference_id is not None: + self.reference_id = reference_id + if description is not None: + self.description = description + if card is not None: + self.card = card + if direct_debit is not None: + self.direct_debit = direct_debit + if ewallet is not None: + self.ewallet = ewallet + if over_the_counter is not None: + self.over_the_counter = over_the_counter + if virtual_account is not None: + self.virtual_account = virtual_account + if qr_code is not None: + self.qr_code = qr_code + if metadata is not None: + self.metadata = metadata + if billing_information is not None: + self.billing_information = billing_information for var_name, var_value in kwargs.items(): if var_name not in self.attribute_map and \ self._configuration is not None and \ diff --git a/xendit/payment_method/model/payment_method_reusability.py b/xendit/payment_method/model/payment_method_reusability.py index 9d68b81c..8e8ac438 100644 --- a/xendit/payment_method/model/payment_method_reusability.py +++ b/xendit/payment_method/model/payment_method_reusability.py @@ -5,6 +5,7 @@ import re # noqa: F401 import sys # noqa: F401 +from typing import List # noqa: F401 from xendit.model_utils import ( # noqa: F401 ApiTypeError, @@ -25,6 +26,9 @@ +def lazy_import(): + pass + class PaymentMethodReusability(ModelSimple): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech diff --git a/xendit/payment_method/model/payment_method_status.py b/xendit/payment_method/model/payment_method_status.py index e734af32..0aeeafbe 100644 --- a/xendit/payment_method/model/payment_method_status.py +++ b/xendit/payment_method/model/payment_method_status.py @@ -5,6 +5,7 @@ import re # noqa: F401 import sys # noqa: F401 +from typing import List # noqa: F401 from xendit.model_utils import ( # noqa: F401 ApiTypeError, @@ -25,6 +26,9 @@ +def lazy_import(): + pass + class PaymentMethodStatus(ModelSimple): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech diff --git a/xendit/payment_method/model/payment_method_type.py b/xendit/payment_method/model/payment_method_type.py index 9f3d5665..b60bddca 100644 --- a/xendit/payment_method/model/payment_method_type.py +++ b/xendit/payment_method/model/payment_method_type.py @@ -5,6 +5,7 @@ import re # noqa: F401 import sys # noqa: F401 +from typing import List # noqa: F401 from xendit.model_utils import ( # noqa: F401 ApiTypeError, @@ -25,6 +26,9 @@ +def lazy_import(): + pass + class PaymentMethodType(ModelSimple): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech diff --git a/xendit/payment_method/model/payment_method_update_parameters.py b/xendit/payment_method/model/payment_method_update_parameters.py index 0f0b0c61..a914b272 100644 --- a/xendit/payment_method/model/payment_method_update_parameters.py +++ b/xendit/payment_method/model/payment_method_update_parameters.py @@ -5,6 +5,7 @@ import re # noqa: F401 import sys # noqa: F401 +from typing import List # noqa: F401 from xendit.model_utils import ( # noqa: F401 ApiTypeError, @@ -23,17 +24,18 @@ ) from xendit.exceptions import ApiAttributeError +from xendit.payment_method.model.over_the_counter_update_parameters import OverTheCounterUpdateParameters +from xendit.payment_method.model.payment_method_reusability import PaymentMethodReusability +from xendit.payment_method.model.payment_method_status import PaymentMethodStatus +from xendit.payment_method.model.virtual_account_update_parameters import VirtualAccountUpdateParameters +globals()['OverTheCounterUpdateParameters'] = OverTheCounterUpdateParameters +globals()['PaymentMethodReusability'] = PaymentMethodReusability +globals()['PaymentMethodStatus'] = PaymentMethodStatus +globals()['VirtualAccountUpdateParameters'] = VirtualAccountUpdateParameters -def lazy_import(): - from xendit.payment_method.model.over_the_counter_update_parameters import OverTheCounterUpdateParameters - from xendit.payment_method.model.payment_method_reusability import PaymentMethodReusability - from xendit.payment_method.model.payment_method_status import PaymentMethodStatus - from xendit.payment_method.model.virtual_account_update_parameters import VirtualAccountUpdateParameters - globals()['OverTheCounterUpdateParameters'] = OverTheCounterUpdateParameters - globals()['PaymentMethodReusability'] = PaymentMethodReusability - globals()['PaymentMethodStatus'] = PaymentMethodStatus - globals()['VirtualAccountUpdateParameters'] = VirtualAccountUpdateParameters +def lazy_import(): + pass class PaymentMethodUpdateParameters(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. @@ -88,12 +90,12 @@ def openapi_types(): """ lazy_import() return { - 'description': (str,), # noqa: E501 - 'reference_id': (str,), # noqa: E501 - 'reusability': (PaymentMethodReusability,), # noqa: E501 - 'status': (PaymentMethodStatus,), # noqa: E501 - 'over_the_counter': (OverTheCounterUpdateParameters,), # noqa: E501 - 'virtual_account': (VirtualAccountUpdateParameters,), # noqa: E501 + 'description': (str, none_type), # noqa: E501 + 'reference_id': (str, none_type), # noqa: E501 + 'reusability': (PaymentMethodReusability, none_type), # noqa: E501 + 'status': (PaymentMethodStatus, none_type), # noqa: E501 + 'over_the_counter': (OverTheCounterUpdateParameters, none_type), # noqa: E501 + 'virtual_account': (VirtualAccountUpdateParameters, none_type), # noqa: E501 } @cached_property @@ -210,9 +212,18 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 ]) @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 + def __init__(self, + description: str | None = None, + reference_id: str | None = None, + reusability: PaymentMethodReusability | None = None, + status: PaymentMethodStatus | None = None, + over_the_counter: OverTheCounterUpdateParameters | None = None, + virtual_account: VirtualAccountUpdateParameters | None = None, + *args, **kwargs + ): # noqa: E501 """PaymentMethodUpdateParameters - a model defined in OpenAPI + Keyword Args: _check_type (bool): if True, values for parameters in openapi_types will be type checked and a TypeError will be @@ -281,6 +292,18 @@ def __init__(self, *args, **kwargs): # noqa: E501 self._configuration = _configuration self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + if description is not None: + self.description = description + if reference_id is not None: + self.reference_id = reference_id + if reusability is not None: + self.reusability = reusability + if status is not None: + self.status = status + if over_the_counter is not None: + self.over_the_counter = over_the_counter + if virtual_account is not None: + self.virtual_account = virtual_account for var_name, var_value in kwargs.items(): if var_name not in self.attribute_map and \ self._configuration is not None and \ diff --git a/xendit/payment_method/model/qr_code.py b/xendit/payment_method/model/qr_code.py index 2bde22d6..c4d18aec 100644 --- a/xendit/payment_method/model/qr_code.py +++ b/xendit/payment_method/model/qr_code.py @@ -5,6 +5,7 @@ import re # noqa: F401 import sys # noqa: F401 +from typing import List # noqa: F401 from xendit.model_utils import ( # noqa: F401 ApiTypeError, @@ -23,15 +24,16 @@ ) from xendit.exceptions import ApiAttributeError +from xendit.payment_method.model.qr_code_channel_code import QRCodeChannelCode +from xendit.payment_method.model.qr_code_channel_properties import QRCodeChannelProperties +from xendit.payment_method.model.qr_code_parameters import QRCodeParameters +globals()['QRCodeChannelCode'] = QRCodeChannelCode +globals()['QRCodeChannelProperties'] = QRCodeChannelProperties +globals()['QRCodeParameters'] = QRCodeParameters -def lazy_import(): - from xendit.payment_method.model.qr_code_channel_code import QRCodeChannelCode - from xendit.payment_method.model.qr_code_channel_properties import QRCodeChannelProperties - from xendit.payment_method.model.qr_code_parameters import QRCodeParameters - globals()['QRCodeChannelCode'] = QRCodeChannelCode - globals()['QRCodeChannelProperties'] = QRCodeChannelProperties - globals()['QRCodeParameters'] = QRCodeParameters +def lazy_import(): + pass class QRCode(ModelComposed): """NOTE: This class is auto generated by OpenAPI Generator. @@ -86,10 +88,10 @@ def openapi_types(): """ lazy_import() return { - 'amount': (float, none_type,), # noqa: E501 - 'currency': (str,), # noqa: E501 - 'channel_code': (QRCodeChannelCode,), # noqa: E501 - 'channel_properties': (QRCodeChannelProperties,), # noqa: E501 + 'amount': (float, none_type, none_type), # noqa: E501 + 'currency': (str, none_type), # noqa: E501 + 'channel_code': (QRCodeChannelCode, none_type), # noqa: E501 + 'channel_properties': (QRCodeChannelProperties, none_type), # noqa: E501 } @cached_property diff --git a/xendit/payment_method/model/qr_code_channel_code.py b/xendit/payment_method/model/qr_code_channel_code.py index c9599fa3..fb8f9519 100644 --- a/xendit/payment_method/model/qr_code_channel_code.py +++ b/xendit/payment_method/model/qr_code_channel_code.py @@ -5,6 +5,7 @@ import re # noqa: F401 import sys # noqa: F401 +from typing import List # noqa: F401 from xendit.model_utils import ( # noqa: F401 ApiTypeError, @@ -25,6 +26,9 @@ +def lazy_import(): + pass + class QRCodeChannelCode(ModelSimple): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech diff --git a/xendit/payment_method/model/qr_code_channel_properties.py b/xendit/payment_method/model/qr_code_channel_properties.py index 4eaaf879..0a37df36 100644 --- a/xendit/payment_method/model/qr_code_channel_properties.py +++ b/xendit/payment_method/model/qr_code_channel_properties.py @@ -5,6 +5,7 @@ import re # noqa: F401 import sys # noqa: F401 +from typing import List # noqa: F401 from xendit.model_utils import ( # noqa: F401 ApiTypeError, @@ -25,6 +26,9 @@ +def lazy_import(): + pass + class QRCodeChannelProperties(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -76,8 +80,8 @@ def openapi_types(): and the value is attribute type. """ return { - 'qr_string': (str,), # noqa: E501 - 'expires_at': (datetime,), # noqa: E501 + 'qr_string': (str, none_type), # noqa: E501 + 'expires_at': (datetime, none_type), # noqa: E501 } @cached_property @@ -186,9 +190,14 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 ]) @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 + def __init__(self, + qr_string: str | None = None, + expires_at: datetime | None = None, + *args, **kwargs + ): # noqa: E501 """QRCodeChannelProperties - a model defined in OpenAPI + Keyword Args: _check_type (bool): if True, values for parameters in openapi_types will be type checked and a TypeError will be @@ -253,6 +262,10 @@ def __init__(self, *args, **kwargs): # noqa: E501 self._configuration = _configuration self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + if qr_string is not None: + self.qr_string = qr_string + if expires_at is not None: + self.expires_at = expires_at for var_name, var_value in kwargs.items(): if var_name not in self.attribute_map and \ self._configuration is not None and \ diff --git a/xendit/payment_method/model/qr_code_parameters.py b/xendit/payment_method/model/qr_code_parameters.py index 5a0d35e6..1e5ad53c 100644 --- a/xendit/payment_method/model/qr_code_parameters.py +++ b/xendit/payment_method/model/qr_code_parameters.py @@ -5,6 +5,7 @@ import re # noqa: F401 import sys # noqa: F401 +from typing import List # noqa: F401 from xendit.model_utils import ( # noqa: F401 ApiTypeError, @@ -23,13 +24,14 @@ ) from xendit.exceptions import ApiAttributeError +from xendit.payment_method.model.qr_code_channel_code import QRCodeChannelCode +from xendit.payment_method.model.qr_code_channel_properties import QRCodeChannelProperties +globals()['QRCodeChannelCode'] = QRCodeChannelCode +globals()['QRCodeChannelProperties'] = QRCodeChannelProperties -def lazy_import(): - from xendit.payment_method.model.qr_code_channel_code import QRCodeChannelCode - from xendit.payment_method.model.qr_code_channel_properties import QRCodeChannelProperties - globals()['QRCodeChannelCode'] = QRCodeChannelCode - globals()['QRCodeChannelProperties'] = QRCodeChannelProperties +def lazy_import(): + pass class QRCodeParameters(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. @@ -84,10 +86,10 @@ def openapi_types(): """ lazy_import() return { - 'amount': (float, none_type,), # noqa: E501 - 'currency': (str,), # noqa: E501 - 'channel_code': (QRCodeChannelCode,), # noqa: E501 - 'channel_properties': (QRCodeChannelProperties,), # noqa: E501 + 'amount': (float, none_type, none_type), # noqa: E501 + 'currency': (str, none_type), # noqa: E501 + 'channel_code': (QRCodeChannelCode, none_type), # noqa: E501 + 'channel_properties': (QRCodeChannelProperties, none_type), # noqa: E501 } @cached_property @@ -200,9 +202,16 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 ]) @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 + def __init__(self, + amount: float | None = None, + currency: str | None = None, + channel_code: QRCodeChannelCode | None = None, + channel_properties: QRCodeChannelProperties | None = None, + *args, **kwargs + ): # noqa: E501 """QRCodeParameters - a model defined in OpenAPI + Keyword Args: _check_type (bool): if True, values for parameters in openapi_types will be type checked and a TypeError will be @@ -269,6 +278,14 @@ def __init__(self, *args, **kwargs): # noqa: E501 self._configuration = _configuration self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + if amount is not None: + self.amount = amount + if currency is not None: + self.currency = currency + if channel_code is not None: + self.channel_code = channel_code + if channel_properties is not None: + self.channel_properties = channel_properties for var_name, var_value in kwargs.items(): if var_name not in self.attribute_map and \ self._configuration is not None and \ diff --git a/xendit/payment_method/model/simulate_payment_request.py b/xendit/payment_method/model/simulate_payment_request.py index 89ba21f6..c33a8972 100644 --- a/xendit/payment_method/model/simulate_payment_request.py +++ b/xendit/payment_method/model/simulate_payment_request.py @@ -5,6 +5,7 @@ import re # noqa: F401 import sys # noqa: F401 +from typing import List # noqa: F401 from xendit.model_utils import ( # noqa: F401 ApiTypeError, @@ -25,6 +26,9 @@ +def lazy_import(): + pass + class SimulatePaymentRequest(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -76,7 +80,7 @@ def openapi_types(): and the value is attribute type. """ return { - 'amount': (float,), # noqa: E501 + 'amount': (float, none_type), # noqa: E501 } @cached_property @@ -183,9 +187,13 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 ]) @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 + def __init__(self, + amount: float | None = None, + *args, **kwargs + ): # noqa: E501 """SimulatePaymentRequest - a model defined in OpenAPI + Keyword Args: _check_type (bool): if True, values for parameters in openapi_types will be type checked and a TypeError will be @@ -249,6 +257,8 @@ def __init__(self, *args, **kwargs): # noqa: E501 self._configuration = _configuration self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + if amount is not None: + self.amount = amount for var_name, var_value in kwargs.items(): if var_name not in self.attribute_map and \ self._configuration is not None and \ diff --git a/xendit/payment_method/model/tokenized_card_information.py b/xendit/payment_method/model/tokenized_card_information.py index 5cdb2de1..6a8b5b8e 100644 --- a/xendit/payment_method/model/tokenized_card_information.py +++ b/xendit/payment_method/model/tokenized_card_information.py @@ -5,6 +5,7 @@ import re # noqa: F401 import sys # noqa: F401 +from typing import List # noqa: F401 from xendit.model_utils import ( # noqa: F401 ApiTypeError, @@ -25,6 +26,9 @@ +def lazy_import(): + pass + class TokenizedCardInformation(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -85,7 +89,7 @@ def openapi_types(): 'network': (str,), # noqa: E501 'country': (str,), # noqa: E501 'issuer': (str,), # noqa: E501 - 'cardholder_name': (str, none_type,), # noqa: E501 + 'cardholder_name': (str, none_type, none_type), # noqa: E501 } @cached_property @@ -221,7 +225,19 @@ def _from_openapi_data(cls, token_id, masked_card_number, expiry_month, expiry_y ]) @convert_js_args_to_python_args - def __init__(self, token_id, masked_card_number, expiry_month, expiry_year, fingerprint, type, network, country, issuer, *args, **kwargs): # noqa: E501 + def __init__(self, + token_id: str, + masked_card_number: str, + expiry_month: str, + expiry_year: str, + fingerprint: str, + type: str, + network: str, + country: str, + issuer: str, + cardholder_name: str | None = None, + *args, **kwargs + ): # noqa: E501 """TokenizedCardInformation - a model defined in OpenAPI Args: @@ -235,6 +251,7 @@ def __init__(self, token_id, masked_card_number, expiry_month, expiry_year, fing country (str): Country where the card was issued ISO 3166-1 Alpha-2 issuer (str): Issuer of the card, most often an issuing bank For example, “BCA”, “MANDIRI” + Keyword Args: _check_type (bool): if True, values for parameters in openapi_types will be type checked and a TypeError will be @@ -307,6 +324,8 @@ def __init__(self, token_id, masked_card_number, expiry_month, expiry_year, fing self.network = network self.country = country self.issuer = issuer + if cardholder_name is not None: + self.cardholder_name = cardholder_name for var_name, var_value in kwargs.items(): if var_name not in self.attribute_map and \ self._configuration is not None and \ diff --git a/xendit/payment_method/model/virtual_account.py b/xendit/payment_method/model/virtual_account.py index b8fdede3..6ad1886f 100644 --- a/xendit/payment_method/model/virtual_account.py +++ b/xendit/payment_method/model/virtual_account.py @@ -5,6 +5,7 @@ import re # noqa: F401 import sys # noqa: F401 +from typing import List # noqa: F401 from xendit.model_utils import ( # noqa: F401 ApiTypeError, @@ -23,19 +24,20 @@ ) from xendit.exceptions import ApiAttributeError +from xendit.payment_method.model.virtual_account_all_of import VirtualAccountAllOf +from xendit.payment_method.model.virtual_account_alternative_display import VirtualAccountAlternativeDisplay +from xendit.payment_method.model.virtual_account_channel_code import VirtualAccountChannelCode +from xendit.payment_method.model.virtual_account_channel_properties import VirtualAccountChannelProperties +from xendit.payment_method.model.virtual_account_parameters import VirtualAccountParameters +globals()['VirtualAccountAllOf'] = VirtualAccountAllOf +globals()['VirtualAccountAlternativeDisplay'] = VirtualAccountAlternativeDisplay +globals()['VirtualAccountChannelCode'] = VirtualAccountChannelCode +globals()['VirtualAccountChannelProperties'] = VirtualAccountChannelProperties +globals()['VirtualAccountParameters'] = VirtualAccountParameters -def lazy_import(): - from xendit.payment_method.model.virtual_account_all_of import VirtualAccountAllOf - from xendit.payment_method.model.virtual_account_alternative_display import VirtualAccountAlternativeDisplay - from xendit.payment_method.model.virtual_account_channel_code import VirtualAccountChannelCode - from xendit.payment_method.model.virtual_account_channel_properties import VirtualAccountChannelProperties - from xendit.payment_method.model.virtual_account_parameters import VirtualAccountParameters - globals()['VirtualAccountAllOf'] = VirtualAccountAllOf - globals()['VirtualAccountAlternativeDisplay'] = VirtualAccountAlternativeDisplay - globals()['VirtualAccountChannelCode'] = VirtualAccountChannelCode - globals()['VirtualAccountChannelProperties'] = VirtualAccountChannelProperties - globals()['VirtualAccountParameters'] = VirtualAccountParameters +def lazy_import(): + pass class VirtualAccount(ModelComposed): """NOTE: This class is auto generated by OpenAPI Generator. @@ -101,12 +103,12 @@ def openapi_types(): return { 'channel_code': (VirtualAccountChannelCode,), # noqa: E501 'channel_properties': (VirtualAccountChannelProperties,), # noqa: E501 - 'amount': (float, none_type,), # noqa: E501 - 'min_amount': (float, none_type,), # noqa: E501 - 'max_amount': (float, none_type,), # noqa: E501 - 'currency': (str,), # noqa: E501 - 'alternative_display_types': ([str],), # noqa: E501 - 'alternative_displays': ([VirtualAccountAlternativeDisplay],), # noqa: E501 + 'amount': (float, none_type, none_type), # noqa: E501 + 'min_amount': (float, none_type, none_type), # noqa: E501 + 'max_amount': (float, none_type, none_type), # noqa: E501 + 'currency': (str, none_type), # noqa: E501 + 'alternative_display_types': ([str], none_type), # noqa: E501 + 'alternative_displays': ([VirtualAccountAlternativeDisplay], none_type), # noqa: E501 } @cached_property diff --git a/xendit/payment_method/model/virtual_account_all_of.py b/xendit/payment_method/model/virtual_account_all_of.py index f4b8c75f..0347f676 100644 --- a/xendit/payment_method/model/virtual_account_all_of.py +++ b/xendit/payment_method/model/virtual_account_all_of.py @@ -5,6 +5,7 @@ import re # noqa: F401 import sys # noqa: F401 +from typing import List # noqa: F401 from xendit.model_utils import ( # noqa: F401 ApiTypeError, @@ -23,11 +24,12 @@ ) from xendit.exceptions import ApiAttributeError +from xendit.payment_method.model.virtual_account_alternative_display import VirtualAccountAlternativeDisplay +globals()['VirtualAccountAlternativeDisplay'] = VirtualAccountAlternativeDisplay -def lazy_import(): - from xendit.payment_method.model.virtual_account_alternative_display import VirtualAccountAlternativeDisplay - globals()['VirtualAccountAlternativeDisplay'] = VirtualAccountAlternativeDisplay +def lazy_import(): + pass class VirtualAccountAllOf(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. @@ -82,7 +84,7 @@ def openapi_types(): """ lazy_import() return { - 'alternative_displays': ([VirtualAccountAlternativeDisplay],), # noqa: E501 + 'alternative_displays': ([VirtualAccountAlternativeDisplay], none_type), # noqa: E501 } @cached_property @@ -189,9 +191,13 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 ]) @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 + def __init__(self, + alternative_displays: list | None = None, + *args, **kwargs + ): # noqa: E501 """VirtualAccountAllOf - a model defined in OpenAPI + Keyword Args: _check_type (bool): if True, values for parameters in openapi_types will be type checked and a TypeError will be @@ -255,6 +261,8 @@ def __init__(self, *args, **kwargs): # noqa: E501 self._configuration = _configuration self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + if alternative_displays is not None: + self.alternative_displays = alternative_displays for var_name, var_value in kwargs.items(): if var_name not in self.attribute_map and \ self._configuration is not None and \ diff --git a/xendit/payment_method/model/virtual_account_alternative_display.py b/xendit/payment_method/model/virtual_account_alternative_display.py index 8a65a3ec..228618e6 100644 --- a/xendit/payment_method/model/virtual_account_alternative_display.py +++ b/xendit/payment_method/model/virtual_account_alternative_display.py @@ -5,6 +5,7 @@ import re # noqa: F401 import sys # noqa: F401 +from typing import List # noqa: F401 from xendit.model_utils import ( # noqa: F401 ApiTypeError, @@ -25,6 +26,9 @@ +def lazy_import(): + pass + class VirtualAccountAlternativeDisplay(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -79,8 +83,8 @@ def openapi_types(): and the value is attribute type. """ return { - 'type': (str,), # noqa: E501 - 'data': (str,), # noqa: E501 + 'type': (str, none_type), # noqa: E501 + 'data': (str, none_type), # noqa: E501 } @cached_property @@ -190,9 +194,13 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 ]) @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 + def __init__(self, + data: str | None = None, + *args, **kwargs + ): # noqa: E501 """VirtualAccountAlternativeDisplay - a model defined in OpenAPI + Keyword Args: _check_type (bool): if True, values for parameters in openapi_types will be type checked and a TypeError will be @@ -257,6 +265,8 @@ def __init__(self, *args, **kwargs): # noqa: E501 self._configuration = _configuration self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + if data is not None: + self.data = data for var_name, var_value in kwargs.items(): if var_name not in self.attribute_map and \ self._configuration is not None and \ diff --git a/xendit/payment_method/model/virtual_account_channel_code.py b/xendit/payment_method/model/virtual_account_channel_code.py index fb08750c..41c44eed 100644 --- a/xendit/payment_method/model/virtual_account_channel_code.py +++ b/xendit/payment_method/model/virtual_account_channel_code.py @@ -5,6 +5,7 @@ import re # noqa: F401 import sys # noqa: F401 +from typing import List # noqa: F401 from xendit.model_utils import ( # noqa: F401 ApiTypeError, @@ -25,6 +26,9 @@ +def lazy_import(): + pass + class VirtualAccountChannelCode(ModelSimple): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech diff --git a/xendit/payment_method/model/virtual_account_channel_properties.py b/xendit/payment_method/model/virtual_account_channel_properties.py index cca4a324..13e26115 100644 --- a/xendit/payment_method/model/virtual_account_channel_properties.py +++ b/xendit/payment_method/model/virtual_account_channel_properties.py @@ -5,6 +5,7 @@ import re # noqa: F401 import sys # noqa: F401 +from typing import List # noqa: F401 from xendit.model_utils import ( # noqa: F401 ApiTypeError, @@ -25,6 +26,9 @@ +def lazy_import(): + pass + class VirtualAccountChannelProperties(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -76,10 +80,10 @@ def openapi_types(): and the value is attribute type. """ return { - 'customer_name': (str,), # noqa: E501 - 'virtual_account_number': (str,), # noqa: E501 - 'expires_at': (datetime,), # noqa: E501 - 'suggested_amount': (float,), # noqa: E501 + 'customer_name': (str, none_type), # noqa: E501 + 'virtual_account_number': (str, none_type), # noqa: E501 + 'expires_at': (datetime, none_type), # noqa: E501 + 'suggested_amount': (float, none_type), # noqa: E501 } @cached_property @@ -192,9 +196,16 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 ]) @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 + def __init__(self, + customer_name: str | None = None, + virtual_account_number: str | None = None, + expires_at: datetime | None = None, + suggested_amount: float | None = None, + *args, **kwargs + ): # noqa: E501 """VirtualAccountChannelProperties - a model defined in OpenAPI + Keyword Args: _check_type (bool): if True, values for parameters in openapi_types will be type checked and a TypeError will be @@ -261,6 +272,14 @@ def __init__(self, *args, **kwargs): # noqa: E501 self._configuration = _configuration self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + if customer_name is not None: + self.customer_name = customer_name + if virtual_account_number is not None: + self.virtual_account_number = virtual_account_number + if expires_at is not None: + self.expires_at = expires_at + if suggested_amount is not None: + self.suggested_amount = suggested_amount for var_name, var_value in kwargs.items(): if var_name not in self.attribute_map and \ self._configuration is not None and \ diff --git a/xendit/payment_method/model/virtual_account_channel_properties_patch.py b/xendit/payment_method/model/virtual_account_channel_properties_patch.py index 44e6d21f..a7baad55 100644 --- a/xendit/payment_method/model/virtual_account_channel_properties_patch.py +++ b/xendit/payment_method/model/virtual_account_channel_properties_patch.py @@ -5,6 +5,7 @@ import re # noqa: F401 import sys # noqa: F401 +from typing import List # noqa: F401 from xendit.model_utils import ( # noqa: F401 ApiTypeError, @@ -25,6 +26,9 @@ +def lazy_import(): + pass + class VirtualAccountChannelPropertiesPatch(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -79,8 +83,8 @@ def openapi_types(): and the value is attribute type. """ return { - 'expires_at': (datetime,), # noqa: E501 - 'suggested_amount': (float,), # noqa: E501 + 'expires_at': (datetime, none_type), # noqa: E501 + 'suggested_amount': (float, none_type), # noqa: E501 } @cached_property @@ -189,9 +193,14 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 ]) @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 + def __init__(self, + expires_at: datetime | None = None, + suggested_amount: float | None = None, + *args, **kwargs + ): # noqa: E501 """VirtualAccountChannelPropertiesPatch - a model defined in OpenAPI + Keyword Args: _check_type (bool): if True, values for parameters in openapi_types will be type checked and a TypeError will be @@ -256,6 +265,10 @@ def __init__(self, *args, **kwargs): # noqa: E501 self._configuration = _configuration self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + if expires_at is not None: + self.expires_at = expires_at + if suggested_amount is not None: + self.suggested_amount = suggested_amount for var_name, var_value in kwargs.items(): if var_name not in self.attribute_map and \ self._configuration is not None and \ diff --git a/xendit/payment_method/model/virtual_account_parameters.py b/xendit/payment_method/model/virtual_account_parameters.py index c3277f61..7d06b4cb 100644 --- a/xendit/payment_method/model/virtual_account_parameters.py +++ b/xendit/payment_method/model/virtual_account_parameters.py @@ -5,6 +5,7 @@ import re # noqa: F401 import sys # noqa: F401 +from typing import List # noqa: F401 from xendit.model_utils import ( # noqa: F401 ApiTypeError, @@ -23,13 +24,14 @@ ) from xendit.exceptions import ApiAttributeError +from xendit.payment_method.model.virtual_account_channel_code import VirtualAccountChannelCode +from xendit.payment_method.model.virtual_account_channel_properties import VirtualAccountChannelProperties +globals()['VirtualAccountChannelCode'] = VirtualAccountChannelCode +globals()['VirtualAccountChannelProperties'] = VirtualAccountChannelProperties -def lazy_import(): - from xendit.payment_method.model.virtual_account_channel_code import VirtualAccountChannelCode - from xendit.payment_method.model.virtual_account_channel_properties import VirtualAccountChannelProperties - globals()['VirtualAccountChannelCode'] = VirtualAccountChannelCode - globals()['VirtualAccountChannelProperties'] = VirtualAccountChannelProperties +def lazy_import(): + pass class VirtualAccountParameters(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. @@ -95,11 +97,11 @@ def openapi_types(): return { 'channel_code': (VirtualAccountChannelCode,), # noqa: E501 'channel_properties': (VirtualAccountChannelProperties,), # noqa: E501 - 'amount': (float, none_type,), # noqa: E501 - 'min_amount': (float, none_type,), # noqa: E501 - 'max_amount': (float, none_type,), # noqa: E501 - 'currency': (str,), # noqa: E501 - 'alternative_display_types': ([str],), # noqa: E501 + 'amount': (float, none_type, none_type), # noqa: E501 + 'min_amount': (float, none_type, none_type), # noqa: E501 + 'max_amount': (float, none_type, none_type), # noqa: E501 + 'currency': (str, none_type), # noqa: E501 + 'alternative_display_types': ([str], none_type), # noqa: E501 } @cached_property @@ -222,13 +224,23 @@ def _from_openapi_data(cls, channel_code, channel_properties, *args, **kwargs): ]) @convert_js_args_to_python_args - def __init__(self, channel_code, channel_properties, *args, **kwargs): # noqa: E501 + def __init__(self, + channel_code: VirtualAccountChannelCode, + channel_properties: VirtualAccountChannelProperties, + amount: float | None = None, + min_amount: float | None = None, + max_amount: float | None = None, + currency: str | None = None, + alternative_display_types: list | None = None, + *args, **kwargs + ): # noqa: E501 """VirtualAccountParameters - a model defined in OpenAPI Args: channel_code (VirtualAccountChannelCode): channel_properties (VirtualAccountChannelProperties): + Keyword Args: _check_type (bool): if True, values for parameters in openapi_types will be type checked and a TypeError will be @@ -298,6 +310,16 @@ def __init__(self, channel_code, channel_properties, *args, **kwargs): # noqa: self.channel_code = channel_code self.channel_properties = channel_properties + if amount is not None: + self.amount = amount + if min_amount is not None: + self.min_amount = min_amount + if max_amount is not None: + self.max_amount = max_amount + if currency is not None: + self.currency = currency + if alternative_display_types is not None: + self.alternative_display_types = alternative_display_types for var_name, var_value in kwargs.items(): if var_name not in self.attribute_map and \ self._configuration is not None and \ diff --git a/xendit/payment_method/model/virtual_account_update_parameters.py b/xendit/payment_method/model/virtual_account_update_parameters.py index 1b3c3778..8888d7e9 100644 --- a/xendit/payment_method/model/virtual_account_update_parameters.py +++ b/xendit/payment_method/model/virtual_account_update_parameters.py @@ -5,6 +5,7 @@ import re # noqa: F401 import sys # noqa: F401 +from typing import List # noqa: F401 from xendit.model_utils import ( # noqa: F401 ApiTypeError, @@ -23,11 +24,12 @@ ) from xendit.exceptions import ApiAttributeError +from xendit.payment_method.model.virtual_account_channel_properties_patch import VirtualAccountChannelPropertiesPatch +globals()['VirtualAccountChannelPropertiesPatch'] = VirtualAccountChannelPropertiesPatch -def lazy_import(): - from xendit.payment_method.model.virtual_account_channel_properties_patch import VirtualAccountChannelPropertiesPatch - globals()['VirtualAccountChannelPropertiesPatch'] = VirtualAccountChannelPropertiesPatch +def lazy_import(): + pass class VirtualAccountUpdateParameters(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. @@ -91,11 +93,11 @@ def openapi_types(): """ lazy_import() return { - 'amount': (float, none_type,), # noqa: E501 - 'min_amount': (float, none_type,), # noqa: E501 - 'max_amount': (float, none_type,), # noqa: E501 - 'channel_properties': (VirtualAccountChannelPropertiesPatch,), # noqa: E501 - 'alternative_display_types': ([str],), # noqa: E501 + 'amount': (float, none_type, none_type), # noqa: E501 + 'min_amount': (float, none_type, none_type), # noqa: E501 + 'max_amount': (float, none_type, none_type), # noqa: E501 + 'channel_properties': (VirtualAccountChannelPropertiesPatch, none_type), # noqa: E501 + 'alternative_display_types': ([str], none_type), # noqa: E501 } @cached_property @@ -210,9 +212,17 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 ]) @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 + def __init__(self, + amount: float | None = None, + min_amount: float | None = None, + max_amount: float | None = None, + channel_properties: VirtualAccountChannelPropertiesPatch | None = None, + alternative_display_types: list | None = None, + *args, **kwargs + ): # noqa: E501 """VirtualAccountUpdateParameters - a model defined in OpenAPI + Keyword Args: _check_type (bool): if True, values for parameters in openapi_types will be type checked and a TypeError will be @@ -280,6 +290,16 @@ def __init__(self, *args, **kwargs): # noqa: E501 self._configuration = _configuration self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + if amount is not None: + self.amount = amount + if min_amount is not None: + self.min_amount = min_amount + if max_amount is not None: + self.max_amount = max_amount + if channel_properties is not None: + self.channel_properties = channel_properties + if alternative_display_types is not None: + self.alternative_display_types = alternative_display_types for var_name, var_value in kwargs.items(): if var_name not in self.attribute_map and \ self._configuration is not None and \ diff --git a/xendit/payment_method/payment_method_api.py b/xendit/payment_method/payment_method_api.py index a0ea3df0..d28d7482 100644 --- a/xendit/payment_method/payment_method_api.py +++ b/xendit/payment_method/payment_method_api.py @@ -19,6 +19,7 @@ none_type, validate_and_convert_types ) +from typing import Optional, List # noqa: F401 from xendit.payment_method.model import * # noqa: F401,E501 @@ -621,16 +622,17 @@ def __init__(self, api_client=None): def auth_payment_method( self, - payment_method_id, + payment_method_id: str, + payment_method_auth_parameters: Optional[PaymentMethodAuthParameters] = None, **kwargs - ): + ) -> PaymentMethod: """Validate a payment method's linking OTP # noqa: E501 This endpoint validates a payment method linking OTP # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.auth_payment_method(payment_method_id, async_req=True) + >>> thread = api.auth_payment_method(payment_method_id, payment_method_auth_parameters, async_req=True) >>> result = thread.get() Args: @@ -699,21 +701,23 @@ def auth_payment_method( '_content_type') kwargs['_host_index'] = kwargs.get('_host_index') kwargs['_request_auths'] = kwargs.get('_request_auths', None) - kwargs['payment_method_id'] = \ - payment_method_id + kwargs['payment_method_id'] = payment_method_id + if payment_method_auth_parameters is not None: + kwargs['payment_method_auth_parameters'] = payment_method_auth_parameters return self.auth_payment_method_endpoint.call_with_http_info(**kwargs) def create_payment_method( self, + payment_method_parameters: Optional[PaymentMethodParameters] = None, **kwargs - ): + ) -> PaymentMethod: """Creates payment method # noqa: E501 This endpoint initiates creation of payment method # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.create_payment_method(async_req=True) + >>> thread = api.create_payment_method(payment_method_parameters, async_req=True) >>> result = thread.get() @@ -780,20 +784,23 @@ def create_payment_method( '_content_type') kwargs['_host_index'] = kwargs.get('_host_index') kwargs['_request_auths'] = kwargs.get('_request_auths', None) + if payment_method_parameters is not None: + kwargs['payment_method_parameters'] = payment_method_parameters return self.create_payment_method_endpoint.call_with_http_info(**kwargs) def expire_payment_method( self, - payment_method_id, + payment_method_id: str, + payment_method_expire_parameters: Optional[PaymentMethodExpireParameters] = None, **kwargs - ): + ) -> PaymentMethod: """Expires a payment method # noqa: E501 This endpoint expires a payment method and performs unlinking if necessary # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.expire_payment_method(payment_method_id, async_req=True) + >>> thread = api.expire_payment_method(payment_method_id, payment_method_expire_parameters, async_req=True) >>> result = thread.get() Args: @@ -862,21 +869,24 @@ def expire_payment_method( '_content_type') kwargs['_host_index'] = kwargs.get('_host_index') kwargs['_request_auths'] = kwargs.get('_request_auths', None) - kwargs['payment_method_id'] = \ - payment_method_id + kwargs['payment_method_id'] = payment_method_id + if payment_method_expire_parameters is not None: + kwargs['payment_method_expire_parameters'] = payment_method_expire_parameters return self.expire_payment_method_endpoint.call_with_http_info(**kwargs) def get_all_payment_channels( self, + is_activated: Optional[bool] = True, + type: Optional[str] = None, **kwargs - ): + ) -> PaymentChannelList: """Get all payment channels # noqa: E501 Get all payment channels # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_all_payment_channels(async_req=True) + >>> thread = api.get_all_payment_channels(type, is_activated=True, async_req=True) >>> result = thread.get() @@ -944,19 +954,32 @@ def get_all_payment_channels( '_content_type') kwargs['_host_index'] = kwargs.get('_host_index') kwargs['_request_auths'] = kwargs.get('_request_auths', None) + if is_activated is not None: + kwargs['is_activated'] = is_activated + if type is not None: + kwargs['type'] = type return self.get_all_payment_channels_endpoint.call_with_http_info(**kwargs) def get_all_payment_methods( self, + id: Optional[List[str]] = None, + type: Optional[List[str]] = None, + status: Optional[List[PaymentMethodStatus]] = None, + reusability: Optional[PaymentMethodReusability] = None, + customer_id: Optional[str] = None, + reference_id: Optional[str] = None, + after_id: Optional[str] = None, + before_id: Optional[str] = None, + limit: Optional[int] = None, **kwargs - ): + ) -> PaymentMethodList: """Get all payment methods by filters # noqa: E501 Get all payment methods by filters # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_all_payment_methods(async_req=True) + >>> thread = api.get_all_payment_methods(id, type, status, reusability, customer_id, reference_id, after_id, before_id, limit, async_req=True) >>> result = thread.get() @@ -1031,13 +1054,31 @@ def get_all_payment_methods( '_content_type') kwargs['_host_index'] = kwargs.get('_host_index') kwargs['_request_auths'] = kwargs.get('_request_auths', None) + if id is not None: + kwargs['id'] = id + if type is not None: + kwargs['type'] = type + if status is not None: + kwargs['status'] = status + if reusability is not None: + kwargs['reusability'] = reusability + if customer_id is not None: + kwargs['customer_id'] = customer_id + if reference_id is not None: + kwargs['reference_id'] = reference_id + if after_id is not None: + kwargs['after_id'] = after_id + if before_id is not None: + kwargs['before_id'] = before_id + if limit is not None: + kwargs['limit'] = limit return self.get_all_payment_methods_endpoint.call_with_http_info(**kwargs) def get_payment_method_by_id( self, - payment_method_id, + payment_method_id: str, **kwargs - ): + ) -> PaymentMethod: """Get payment method by ID # noqa: E501 Get payment method by ID # noqa: E501 @@ -1112,22 +1153,33 @@ def get_payment_method_by_id( '_content_type') kwargs['_host_index'] = kwargs.get('_host_index') kwargs['_request_auths'] = kwargs.get('_request_auths', None) - kwargs['payment_method_id'] = \ - payment_method_id + kwargs['payment_method_id'] = payment_method_id return self.get_payment_method_by_id_endpoint.call_with_http_info(**kwargs) def get_payments_by_payment_method_id( self, - payment_method_id, + payment_method_id: str, + payment_request_id: Optional[List[str]] = None, + payment_method_id2: Optional[List[str]] = None, + reference_id: Optional[List[str]] = None, + payment_method_type: Optional[List[PaymentMethodType]] = None, + channel_code: Optional[List[str]] = None, + status: Optional[List[str]] = None, + currency: Optional[List[str]] = None, + created_gte: Optional[datetime] = None, + created_lte: Optional[datetime] = None, + updated_gte: Optional[datetime] = None, + updated_lte: Optional[datetime] = None, + limit: Optional[int] = None, **kwargs - ): + ) -> {str: (bool, date, datetime, dict, float, int, list, str, none_type)}: """Returns payments with matching PaymentMethodID. # noqa: E501 Returns payments with matching PaymentMethodID. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_payments_by_payment_method_id(payment_method_id, async_req=True) + >>> thread = api.get_payments_by_payment_method_id(payment_method_id, payment_request_id, payment_method_id2, reference_id, payment_method_type, channel_code, status, currency, created_gte, created_lte, updated_gte, updated_lte, limit, async_req=True) >>> result = thread.get() Args: @@ -1207,22 +1259,46 @@ def get_payments_by_payment_method_id( '_content_type') kwargs['_host_index'] = kwargs.get('_host_index') kwargs['_request_auths'] = kwargs.get('_request_auths', None) - kwargs['payment_method_id'] = \ - payment_method_id + kwargs['payment_method_id'] = payment_method_id + if payment_request_id is not None: + kwargs['payment_request_id'] = payment_request_id + if payment_method_id2 is not None: + kwargs['payment_method_id2'] = payment_method_id2 + if reference_id is not None: + kwargs['reference_id'] = reference_id + if payment_method_type is not None: + kwargs['payment_method_type'] = payment_method_type + if channel_code is not None: + kwargs['channel_code'] = channel_code + if status is not None: + kwargs['status'] = status + if currency is not None: + kwargs['currency'] = currency + if created_gte is not None: + kwargs['created_gte'] = created_gte + if created_lte is not None: + kwargs['created_lte'] = created_lte + if updated_gte is not None: + kwargs['updated_gte'] = updated_gte + if updated_lte is not None: + kwargs['updated_lte'] = updated_lte + if limit is not None: + kwargs['limit'] = limit return self.get_payments_by_payment_method_id_endpoint.call_with_http_info(**kwargs) def patch_payment_method( self, - payment_method_id, + payment_method_id: str, + payment_method_update_parameters: Optional[PaymentMethodUpdateParameters] = None, **kwargs - ): + ) -> PaymentMethod: """Patch payment methods # noqa: E501 This endpoint is used to toggle the ```status``` of an e-Wallet or a Direct Debit payment method to ```ACTIVE``` or ```INACTIVE```. This is also used to update the details of an Over-the-Counter or a Virtual Account payment method. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.patch_payment_method(payment_method_id, async_req=True) + >>> thread = api.patch_payment_method(payment_method_id, payment_method_update_parameters, async_req=True) >>> result = thread.get() Args: @@ -1291,22 +1367,24 @@ def patch_payment_method( '_content_type') kwargs['_host_index'] = kwargs.get('_host_index') kwargs['_request_auths'] = kwargs.get('_request_auths', None) - kwargs['payment_method_id'] = \ - payment_method_id + kwargs['payment_method_id'] = payment_method_id + if payment_method_update_parameters is not None: + kwargs['payment_method_update_parameters'] = payment_method_update_parameters return self.patch_payment_method_endpoint.call_with_http_info(**kwargs) def simulate_payment( self, - payment_method_id, + payment_method_id: str, + simulate_payment_request: Optional[SimulatePaymentRequest] = None, **kwargs - ): + ) -> None: """Makes payment with matching PaymentMethodID. # noqa: E501 Makes payment with matching PaymentMethodID. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.simulate_payment(payment_method_id, async_req=True) + >>> thread = api.simulate_payment(payment_method_id, simulate_payment_request, async_req=True) >>> result = thread.get() Args: @@ -1375,7 +1453,8 @@ def simulate_payment( '_content_type') kwargs['_host_index'] = kwargs.get('_host_index') kwargs['_request_auths'] = kwargs.get('_request_auths', None) - kwargs['payment_method_id'] = \ - payment_method_id + kwargs['payment_method_id'] = payment_method_id + if simulate_payment_request is not None: + kwargs['simulate_payment_request'] = simulate_payment_request return self.simulate_payment_endpoint.call_with_http_info(**kwargs) diff --git a/xendit/payment_request/model/capture.py b/xendit/payment_request/model/capture.py index 5eb7aab5..3aff9acb 100644 --- a/xendit/payment_request/model/capture.py +++ b/xendit/payment_request/model/capture.py @@ -5,6 +5,7 @@ import re # noqa: F401 import sys # noqa: F401 +from typing import List # noqa: F401 from xendit.model_utils import ( # noqa: F401 ApiTypeError, @@ -23,11 +24,12 @@ ) from xendit.exceptions import ApiAttributeError +from xendit.payment_request.model.payment_method import PaymentMethod +globals()['PaymentMethod'] = PaymentMethod -def lazy_import(): - from xendit.payment_request.model.payment_method import PaymentMethod - globals()['PaymentMethod'] = PaymentMethod +def lazy_import(): + pass class Capture(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. @@ -252,7 +254,24 @@ def _from_openapi_data(cls, id, payment_request_id, payment_id, reference_id, cu ]) @convert_js_args_to_python_args - def __init__(self, id, payment_request_id, payment_id, reference_id, currency, authorized_amount, captured_amount, status, payment_method, failure_code, customer_id, metadata, channel_properties, created, updated, *args, **kwargs): # noqa: E501 + def __init__(self, + id: str, + payment_request_id: str, + payment_id: str, + reference_id: str, + currency: str, + authorized_amount: float, + captured_amount: float, + status: str, + payment_method: PaymentMethod, + failure_code: str, + customer_id: str, + metadata: dict, + channel_properties: dict, + created: str, + updated: str, + *args, **kwargs + ): # noqa: E501 """Capture - a model defined in OpenAPI Args: @@ -272,6 +291,7 @@ def __init__(self, id, payment_request_id, payment_id, reference_id, currency, a created (str): updated (str): + Keyword Args: _check_type (bool): if True, values for parameters in openapi_types will be type checked and a TypeError will be diff --git a/xendit/payment_request/model/capture_list.py b/xendit/payment_request/model/capture_list.py index eb890f2a..917d7323 100644 --- a/xendit/payment_request/model/capture_list.py +++ b/xendit/payment_request/model/capture_list.py @@ -5,6 +5,7 @@ import re # noqa: F401 import sys # noqa: F401 +from typing import List # noqa: F401 from xendit.model_utils import ( # noqa: F401 ApiTypeError, @@ -23,11 +24,12 @@ ) from xendit.exceptions import ApiAttributeError +from xendit.payment_request.model.capture import Capture +globals()['Capture'] = Capture -def lazy_import(): - from xendit.payment_request.model.capture import Capture - globals()['Capture'] = Capture +def lazy_import(): + pass class CaptureList(ModelSimple): """NOTE: This class is auto generated by OpenAPI Generator. diff --git a/xendit/payment_request/model/capture_list_response.py b/xendit/payment_request/model/capture_list_response.py index f953bbf9..2ea72a90 100644 --- a/xendit/payment_request/model/capture_list_response.py +++ b/xendit/payment_request/model/capture_list_response.py @@ -5,6 +5,7 @@ import re # noqa: F401 import sys # noqa: F401 +from typing import List # noqa: F401 from xendit.model_utils import ( # noqa: F401 ApiTypeError, @@ -23,11 +24,12 @@ ) from xendit.exceptions import ApiAttributeError +from xendit.payment_request.model.capture_list import CaptureList +globals()['CaptureList'] = CaptureList -def lazy_import(): - from xendit.payment_request.model.capture_list import CaptureList - globals()['CaptureList'] = CaptureList +def lazy_import(): + pass class CaptureListResponse(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. @@ -196,13 +198,18 @@ def _from_openapi_data(cls, data, has_more, *args, **kwargs): # noqa: E501 ]) @convert_js_args_to_python_args - def __init__(self, data, has_more, *args, **kwargs): # noqa: E501 + def __init__(self, + data: CaptureList, + has_more: bool, + *args, **kwargs + ): # noqa: E501 """CaptureListResponse - a model defined in OpenAPI Args: data (CaptureList): has_more (bool): + Keyword Args: _check_type (bool): if True, values for parameters in openapi_types will be type checked and a TypeError will be diff --git a/xendit/payment_request/model/capture_parameters.py b/xendit/payment_request/model/capture_parameters.py index cd8b63ed..4f4f3fd1 100644 --- a/xendit/payment_request/model/capture_parameters.py +++ b/xendit/payment_request/model/capture_parameters.py @@ -5,6 +5,7 @@ import re # noqa: F401 import sys # noqa: F401 +from typing import List # noqa: F401 from xendit.model_utils import ( # noqa: F401 ApiTypeError, @@ -25,6 +26,9 @@ +def lazy_import(): + pass + class CaptureParameters(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -77,7 +81,7 @@ def openapi_types(): """ return { 'capture_amount': (float,), # noqa: E501 - 'reference_id': (str, none_type,), # noqa: E501 + 'reference_id': (str, none_type, none_type), # noqa: E501 } @cached_property @@ -189,12 +193,17 @@ def _from_openapi_data(cls, capture_amount, *args, **kwargs): # noqa: E501 ]) @convert_js_args_to_python_args - def __init__(self, capture_amount, *args, **kwargs): # noqa: E501 + def __init__(self, + capture_amount: float, + reference_id: str | None = None, + *args, **kwargs + ): # noqa: E501 """CaptureParameters - a model defined in OpenAPI Args: capture_amount (float): + Keyword Args: _check_type (bool): if True, values for parameters in openapi_types will be type checked and a TypeError will be @@ -259,6 +268,8 @@ def __init__(self, capture_amount, *args, **kwargs): # noqa: E501 self._visited_composed_classes = _visited_composed_classes + (self.__class__,) self.capture_amount = capture_amount + if reference_id is not None: + self.reference_id = reference_id for var_name, var_value in kwargs.items(): if var_name not in self.attribute_map and \ self._configuration is not None and \ diff --git a/xendit/payment_request/model/card.py b/xendit/payment_request/model/card.py index 05412c46..38346002 100644 --- a/xendit/payment_request/model/card.py +++ b/xendit/payment_request/model/card.py @@ -5,6 +5,7 @@ import re # noqa: F401 import sys # noqa: F401 +from typing import List # noqa: F401 from xendit.model_utils import ( # noqa: F401 ApiTypeError, @@ -23,17 +24,18 @@ ) from xendit.exceptions import ApiAttributeError +from xendit.payment_request.model.card_channel_properties import CardChannelProperties +from xendit.payment_request.model.card_information import CardInformation +from xendit.payment_request.model.card_verification_results import CardVerificationResults +from xendit.payment_request.model.payment_request_currency import PaymentRequestCurrency +globals()['CardChannelProperties'] = CardChannelProperties +globals()['CardInformation'] = CardInformation +globals()['CardVerificationResults'] = CardVerificationResults +globals()['PaymentRequestCurrency'] = PaymentRequestCurrency -def lazy_import(): - from xendit.payment_request.model.card_channel_properties import CardChannelProperties - from xendit.payment_request.model.card_information import CardInformation - from xendit.payment_request.model.card_verification_results import CardVerificationResults - from xendit.payment_request.model.payment_request_currency import PaymentRequestCurrency - globals()['CardChannelProperties'] = CardChannelProperties - globals()['CardInformation'] = CardInformation - globals()['CardVerificationResults'] = CardVerificationResults - globals()['PaymentRequestCurrency'] = PaymentRequestCurrency +def lazy_import(): + pass class Card(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. @@ -91,7 +93,7 @@ def openapi_types(): 'currency': (PaymentRequestCurrency,), # noqa: E501 'channel_properties': (CardChannelProperties,), # noqa: E501 'card_information': (CardInformation,), # noqa: E501 - 'card_verification_results': (CardVerificationResults,), # noqa: E501 + 'card_verification_results': (CardVerificationResults, none_type), # noqa: E501 } @cached_property @@ -209,7 +211,13 @@ def _from_openapi_data(cls, currency, channel_properties, card_information, *arg ]) @convert_js_args_to_python_args - def __init__(self, currency, channel_properties, card_information, *args, **kwargs): # noqa: E501 + def __init__(self, + currency: PaymentRequestCurrency, + channel_properties: CardChannelProperties, + card_information: CardInformation, + card_verification_results: CardVerificationResults | None = None, + *args, **kwargs + ): # noqa: E501 """Card - a model defined in OpenAPI Args: @@ -217,6 +225,7 @@ def __init__(self, currency, channel_properties, card_information, *args, **kwar channel_properties (CardChannelProperties): card_information (CardInformation): + Keyword Args: _check_type (bool): if True, values for parameters in openapi_types will be type checked and a TypeError will be @@ -283,6 +292,8 @@ def __init__(self, currency, channel_properties, card_information, *args, **kwar self.currency = currency self.channel_properties = channel_properties self.card_information = card_information + if card_verification_results is not None: + self.card_verification_results = card_verification_results for var_name, var_value in kwargs.items(): if var_name not in self.attribute_map and \ self._configuration is not None and \ diff --git a/xendit/payment_request/model/card_channel_properties.py b/xendit/payment_request/model/card_channel_properties.py index 2a3210e6..03454eab 100644 --- a/xendit/payment_request/model/card_channel_properties.py +++ b/xendit/payment_request/model/card_channel_properties.py @@ -5,6 +5,7 @@ import re # noqa: F401 import sys # noqa: F401 +from typing import List # noqa: F401 from xendit.model_utils import ( # noqa: F401 ApiTypeError, @@ -25,6 +26,9 @@ +def lazy_import(): + pass + class CardChannelProperties(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -86,11 +90,11 @@ def openapi_types(): and the value is attribute type. """ return { - 'skip_three_d_secure': (bool, none_type,), # noqa: E501 - 'success_return_url': (str, none_type,), # noqa: E501 - 'failure_return_url': (str, none_type,), # noqa: E501 - 'cardonfile_type': (str, none_type,), # noqa: E501 - 'merchant_id_tag': (str,), # noqa: E501 + 'skip_three_d_secure': (bool, none_type, none_type), # noqa: E501 + 'success_return_url': (str, none_type, none_type), # noqa: E501 + 'failure_return_url': (str, none_type, none_type), # noqa: E501 + 'cardonfile_type': (str, none_type, none_type), # noqa: E501 + 'merchant_id_tag': (str, none_type), # noqa: E501 } @cached_property @@ -205,9 +209,17 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 ]) @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 + def __init__(self, + skip_three_d_secure: bool | None = None, + success_return_url: str | None = None, + failure_return_url: str | None = None, + cardonfile_type: str | None = None, + merchant_id_tag: str | None = None, + *args, **kwargs + ): # noqa: E501 """CardChannelProperties - a model defined in OpenAPI + Keyword Args: _check_type (bool): if True, values for parameters in openapi_types will be type checked and a TypeError will be @@ -275,6 +287,16 @@ def __init__(self, *args, **kwargs): # noqa: E501 self._configuration = _configuration self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + if skip_three_d_secure is not None: + self.skip_three_d_secure = skip_three_d_secure + if success_return_url is not None: + self.success_return_url = success_return_url + if failure_return_url is not None: + self.failure_return_url = failure_return_url + if cardonfile_type is not None: + self.cardonfile_type = cardonfile_type + if merchant_id_tag is not None: + self.merchant_id_tag = merchant_id_tag for var_name, var_value in kwargs.items(): if var_name not in self.attribute_map and \ self._configuration is not None and \ diff --git a/xendit/payment_request/model/card_information.py b/xendit/payment_request/model/card_information.py index e4997c80..47c01a7b 100644 --- a/xendit/payment_request/model/card_information.py +++ b/xendit/payment_request/model/card_information.py @@ -5,6 +5,7 @@ import re # noqa: F401 import sys # noqa: F401 +from typing import List # noqa: F401 from xendit.model_utils import ( # noqa: F401 ApiTypeError, @@ -25,6 +26,9 @@ +def lazy_import(): + pass + class CardInformation(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -87,12 +91,12 @@ def openapi_types(): 'masked_card_number': (str,), # noqa: E501 'expiry_month': (str,), # noqa: E501 'expiry_year': (str,), # noqa: E501 - 'cardholder_name': (str, none_type,), # noqa: E501 - 'fingerprint': (str,), # noqa: E501 - 'type': (str,), # noqa: E501 - 'network': (str,), # noqa: E501 - 'country': (str,), # noqa: E501 - 'issuer': (str,), # noqa: E501 + 'cardholder_name': (str, none_type, none_type), # noqa: E501 + 'fingerprint': (str, none_type), # noqa: E501 + 'type': (str, none_type), # noqa: E501 + 'network': (str, none_type), # noqa: E501 + 'country': (str, none_type), # noqa: E501 + 'issuer': (str, none_type), # noqa: E501 } @cached_property @@ -223,7 +227,19 @@ def _from_openapi_data(cls, token_id, masked_card_number, expiry_month, expiry_y ]) @convert_js_args_to_python_args - def __init__(self, token_id, masked_card_number, expiry_month, expiry_year, *args, **kwargs): # noqa: E501 + def __init__(self, + token_id: str, + masked_card_number: str, + expiry_month: str, + expiry_year: str, + cardholder_name: str | None = None, + fingerprint: str | None = None, + type: str | None = None, + network: str | None = None, + country: str | None = None, + issuer: str | None = None, + *args, **kwargs + ): # noqa: E501 """CardInformation - a model defined in OpenAPI Args: @@ -232,6 +248,7 @@ def __init__(self, token_id, masked_card_number, expiry_month, expiry_year, *arg expiry_month (str): Card expiry month in MM format expiry_year (str): Card expiry month in YY format + Keyword Args: _check_type (bool): if True, values for parameters in openapi_types will be type checked and a TypeError will be @@ -304,6 +321,18 @@ def __init__(self, token_id, masked_card_number, expiry_month, expiry_year, *arg self.masked_card_number = masked_card_number self.expiry_month = expiry_month self.expiry_year = expiry_year + if cardholder_name is not None: + self.cardholder_name = cardholder_name + if fingerprint is not None: + self.fingerprint = fingerprint + if type is not None: + self.type = type + if network is not None: + self.network = network + if country is not None: + self.country = country + if issuer is not None: + self.issuer = issuer for var_name, var_value in kwargs.items(): if var_name not in self.attribute_map and \ self._configuration is not None and \ diff --git a/xendit/payment_request/model/card_verification_results.py b/xendit/payment_request/model/card_verification_results.py index 6c86636b..920a0532 100644 --- a/xendit/payment_request/model/card_verification_results.py +++ b/xendit/payment_request/model/card_verification_results.py @@ -5,6 +5,7 @@ import re # noqa: F401 import sys # noqa: F401 +from typing import List # noqa: F401 from xendit.model_utils import ( # noqa: F401 ApiTypeError, @@ -23,11 +24,12 @@ ) from xendit.exceptions import ApiAttributeError +from xendit.payment_request.model.card_verification_results_three_d_secure import CardVerificationResultsThreeDSecure +globals()['CardVerificationResultsThreeDSecure'] = CardVerificationResultsThreeDSecure -def lazy_import(): - from xendit.payment_request.model.card_verification_results_three_d_secure import CardVerificationResultsThreeDSecure - globals()['CardVerificationResultsThreeDSecure'] = CardVerificationResultsThreeDSecure +def lazy_import(): + pass class CardVerificationResults(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. @@ -82,9 +84,9 @@ def openapi_types(): """ lazy_import() return { - 'three_d_secure': (CardVerificationResultsThreeDSecure,), # noqa: E501 - 'cvv_result': (str, none_type,), # noqa: E501 - 'address_verification_result': (str, none_type,), # noqa: E501 + 'three_d_secure': (CardVerificationResultsThreeDSecure, none_type), # noqa: E501 + 'cvv_result': (str, none_type, none_type), # noqa: E501 + 'address_verification_result': (str, none_type, none_type), # noqa: E501 } @cached_property @@ -195,9 +197,15 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 ]) @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 + def __init__(self, + three_d_secure: CardVerificationResultsThreeDSecure | None = None, + cvv_result: str | None = None, + address_verification_result: str | None = None, + *args, **kwargs + ): # noqa: E501 """CardVerificationResults - a model defined in OpenAPI + Keyword Args: _check_type (bool): if True, values for parameters in openapi_types will be type checked and a TypeError will be @@ -263,6 +271,12 @@ def __init__(self, *args, **kwargs): # noqa: E501 self._configuration = _configuration self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + if three_d_secure is not None: + self.three_d_secure = three_d_secure + if cvv_result is not None: + self.cvv_result = cvv_result + if address_verification_result is not None: + self.address_verification_result = address_verification_result for var_name, var_value in kwargs.items(): if var_name not in self.attribute_map and \ self._configuration is not None and \ diff --git a/xendit/payment_request/model/card_verification_results_three_d_secure.py b/xendit/payment_request/model/card_verification_results_three_d_secure.py index 24ef28d1..e5196392 100644 --- a/xendit/payment_request/model/card_verification_results_three_d_secure.py +++ b/xendit/payment_request/model/card_verification_results_three_d_secure.py @@ -5,6 +5,7 @@ import re # noqa: F401 import sys # noqa: F401 +from typing import List # noqa: F401 from xendit.model_utils import ( # noqa: F401 ApiTypeError, @@ -25,6 +26,9 @@ +def lazy_import(): + pass + class CardVerificationResultsThreeDSecure(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -81,11 +85,11 @@ def openapi_types(): and the value is attribute type. """ return { - 'three_d_secure_flow': (str, none_type,), # noqa: E501 - 'eci_code': (str, none_type,), # noqa: E501 - 'three_d_secure_result': (str, none_type,), # noqa: E501 - 'three_d_secure_result_reason': (str, none_type,), # noqa: E501 - 'three_d_secure_version': (str, none_type,), # noqa: E501 + 'three_d_secure_flow': (str, none_type, none_type), # noqa: E501 + 'eci_code': (str, none_type, none_type), # noqa: E501 + 'three_d_secure_result': (str, none_type, none_type), # noqa: E501 + 'three_d_secure_result_reason': (str, none_type, none_type), # noqa: E501 + 'three_d_secure_version': (str, none_type, none_type), # noqa: E501 } @cached_property @@ -200,9 +204,17 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 ]) @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 + def __init__(self, + three_d_secure_flow: str | None = None, + eci_code: str | None = None, + three_d_secure_result: str | None = None, + three_d_secure_result_reason: str | None = None, + three_d_secure_version: str | None = None, + *args, **kwargs + ): # noqa: E501 """CardVerificationResultsThreeDSecure - a model defined in OpenAPI + Keyword Args: _check_type (bool): if True, values for parameters in openapi_types will be type checked and a TypeError will be @@ -270,6 +282,16 @@ def __init__(self, *args, **kwargs): # noqa: E501 self._configuration = _configuration self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + if three_d_secure_flow is not None: + self.three_d_secure_flow = three_d_secure_flow + if eci_code is not None: + self.eci_code = eci_code + if three_d_secure_result is not None: + self.three_d_secure_result = three_d_secure_result + if three_d_secure_result_reason is not None: + self.three_d_secure_result_reason = three_d_secure_result_reason + if three_d_secure_version is not None: + self.three_d_secure_version = three_d_secure_version for var_name, var_value in kwargs.items(): if var_name not in self.attribute_map and \ self._configuration is not None and \ diff --git a/xendit/payment_request/model/direct_debit.py b/xendit/payment_request/model/direct_debit.py index 7a23fa5a..962d3916 100644 --- a/xendit/payment_request/model/direct_debit.py +++ b/xendit/payment_request/model/direct_debit.py @@ -5,6 +5,7 @@ import re # noqa: F401 import sys # noqa: F401 +from typing import List # noqa: F401 from xendit.model_utils import ( # noqa: F401 ApiTypeError, @@ -23,23 +24,24 @@ ) from xendit.exceptions import ApiAttributeError +from xendit.payment_request.model.direct_debit_all_of import DirectDebitAllOf +from xendit.payment_request.model.direct_debit_bank_account import DirectDebitBankAccount +from xendit.payment_request.model.direct_debit_channel_code import DirectDebitChannelCode +from xendit.payment_request.model.direct_debit_channel_properties import DirectDebitChannelProperties +from xendit.payment_request.model.direct_debit_debit_card import DirectDebitDebitCard +from xendit.payment_request.model.direct_debit_parameters import DirectDebitParameters +from xendit.payment_request.model.direct_debit_type import DirectDebitType +globals()['DirectDebitAllOf'] = DirectDebitAllOf +globals()['DirectDebitBankAccount'] = DirectDebitBankAccount +globals()['DirectDebitChannelCode'] = DirectDebitChannelCode +globals()['DirectDebitChannelProperties'] = DirectDebitChannelProperties +globals()['DirectDebitDebitCard'] = DirectDebitDebitCard +globals()['DirectDebitParameters'] = DirectDebitParameters +globals()['DirectDebitType'] = DirectDebitType -def lazy_import(): - from xendit.payment_request.model.direct_debit_all_of import DirectDebitAllOf - from xendit.payment_request.model.direct_debit_bank_account import DirectDebitBankAccount - from xendit.payment_request.model.direct_debit_channel_code import DirectDebitChannelCode - from xendit.payment_request.model.direct_debit_channel_properties import DirectDebitChannelProperties - from xendit.payment_request.model.direct_debit_debit_card import DirectDebitDebitCard - from xendit.payment_request.model.direct_debit_parameters import DirectDebitParameters - from xendit.payment_request.model.direct_debit_type import DirectDebitType - globals()['DirectDebitAllOf'] = DirectDebitAllOf - globals()['DirectDebitBankAccount'] = DirectDebitBankAccount - globals()['DirectDebitChannelCode'] = DirectDebitChannelCode - globals()['DirectDebitChannelProperties'] = DirectDebitChannelProperties - globals()['DirectDebitDebitCard'] = DirectDebitDebitCard - globals()['DirectDebitParameters'] = DirectDebitParameters - globals()['DirectDebitType'] = DirectDebitType +def lazy_import(): + pass class DirectDebit(ModelComposed): """NOTE: This class is auto generated by OpenAPI Generator. @@ -97,8 +99,8 @@ def openapi_types(): 'channel_code': (DirectDebitChannelCode,), # noqa: E501 'channel_properties': (DirectDebitChannelProperties,), # noqa: E501 'type': (DirectDebitType,), # noqa: E501 - 'bank_account': (DirectDebitBankAccount,), # noqa: E501 - 'debit_card': (DirectDebitDebitCard,), # noqa: E501 + 'bank_account': (DirectDebitBankAccount, none_type), # noqa: E501 + 'debit_card': (DirectDebitDebitCard, none_type), # noqa: E501 } @cached_property diff --git a/xendit/payment_request/model/direct_debit_all_of.py b/xendit/payment_request/model/direct_debit_all_of.py index c6219297..4b04dcbe 100644 --- a/xendit/payment_request/model/direct_debit_all_of.py +++ b/xendit/payment_request/model/direct_debit_all_of.py @@ -5,6 +5,7 @@ import re # noqa: F401 import sys # noqa: F401 +from typing import List # noqa: F401 from xendit.model_utils import ( # noqa: F401 ApiTypeError, @@ -23,15 +24,16 @@ ) from xendit.exceptions import ApiAttributeError +from xendit.payment_request.model.direct_debit_bank_account import DirectDebitBankAccount +from xendit.payment_request.model.direct_debit_debit_card import DirectDebitDebitCard +from xendit.payment_request.model.direct_debit_type import DirectDebitType +globals()['DirectDebitBankAccount'] = DirectDebitBankAccount +globals()['DirectDebitDebitCard'] = DirectDebitDebitCard +globals()['DirectDebitType'] = DirectDebitType -def lazy_import(): - from xendit.payment_request.model.direct_debit_bank_account import DirectDebitBankAccount - from xendit.payment_request.model.direct_debit_debit_card import DirectDebitDebitCard - from xendit.payment_request.model.direct_debit_type import DirectDebitType - globals()['DirectDebitBankAccount'] = DirectDebitBankAccount - globals()['DirectDebitDebitCard'] = DirectDebitDebitCard - globals()['DirectDebitType'] = DirectDebitType +def lazy_import(): + pass class DirectDebitAllOf(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. @@ -87,8 +89,8 @@ def openapi_types(): lazy_import() return { 'type': (DirectDebitType,), # noqa: E501 - 'bank_account': (DirectDebitBankAccount,), # noqa: E501 - 'debit_card': (DirectDebitDebitCard,), # noqa: E501 + 'bank_account': (DirectDebitBankAccount, none_type), # noqa: E501 + 'debit_card': (DirectDebitDebitCard, none_type), # noqa: E501 } @cached_property @@ -202,12 +204,18 @@ def _from_openapi_data(cls, type, *args, **kwargs): # noqa: E501 ]) @convert_js_args_to_python_args - def __init__(self, type, *args, **kwargs): # noqa: E501 + def __init__(self, + type: DirectDebitType, + bank_account: DirectDebitBankAccount | None = None, + debit_card: DirectDebitDebitCard | None = None, + *args, **kwargs + ): # noqa: E501 """DirectDebitAllOf - a model defined in OpenAPI Args: type (DirectDebitType): + Keyword Args: _check_type (bool): if True, values for parameters in openapi_types will be type checked and a TypeError will be @@ -273,6 +281,10 @@ def __init__(self, type, *args, **kwargs): # noqa: E501 self._visited_composed_classes = _visited_composed_classes + (self.__class__,) self.type = type + if bank_account is not None: + self.bank_account = bank_account + if debit_card is not None: + self.debit_card = debit_card for var_name, var_value in kwargs.items(): if var_name not in self.attribute_map and \ self._configuration is not None and \ diff --git a/xendit/payment_request/model/direct_debit_bank_account.py b/xendit/payment_request/model/direct_debit_bank_account.py index 92e93f9a..a94101ae 100644 --- a/xendit/payment_request/model/direct_debit_bank_account.py +++ b/xendit/payment_request/model/direct_debit_bank_account.py @@ -5,6 +5,7 @@ import re # noqa: F401 import sys # noqa: F401 +from typing import List # noqa: F401 from xendit.model_utils import ( # noqa: F401 ApiTypeError, @@ -25,6 +26,9 @@ +def lazy_import(): + pass + class DirectDebitBankAccount(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -76,8 +80,8 @@ def openapi_types(): and the value is attribute type. """ return { - 'masked_bank_account_number': (str, none_type,), # noqa: E501 - 'bank_account_hash': (str, none_type,), # noqa: E501 + 'masked_bank_account_number': (str, none_type, none_type), # noqa: E501 + 'bank_account_hash': (str, none_type, none_type), # noqa: E501 } @cached_property @@ -186,9 +190,14 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 ]) @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 + def __init__(self, + masked_bank_account_number: str | None = None, + bank_account_hash: str | None = None, + *args, **kwargs + ): # noqa: E501 """DirectDebitBankAccount - a model defined in OpenAPI + Keyword Args: _check_type (bool): if True, values for parameters in openapi_types will be type checked and a TypeError will be @@ -253,6 +262,10 @@ def __init__(self, *args, **kwargs): # noqa: E501 self._configuration = _configuration self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + if masked_bank_account_number is not None: + self.masked_bank_account_number = masked_bank_account_number + if bank_account_hash is not None: + self.bank_account_hash = bank_account_hash for var_name, var_value in kwargs.items(): if var_name not in self.attribute_map and \ self._configuration is not None and \ diff --git a/xendit/payment_request/model/direct_debit_channel_code.py b/xendit/payment_request/model/direct_debit_channel_code.py index 8bfd56e7..61e5c20b 100644 --- a/xendit/payment_request/model/direct_debit_channel_code.py +++ b/xendit/payment_request/model/direct_debit_channel_code.py @@ -5,6 +5,7 @@ import re # noqa: F401 import sys # noqa: F401 +from typing import List # noqa: F401 from xendit.model_utils import ( # noqa: F401 ApiTypeError, @@ -25,6 +26,9 @@ +def lazy_import(): + pass + class DirectDebitChannelCode(ModelSimple): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech diff --git a/xendit/payment_request/model/direct_debit_channel_properties.py b/xendit/payment_request/model/direct_debit_channel_properties.py index ef55302c..cbc865d5 100644 --- a/xendit/payment_request/model/direct_debit_channel_properties.py +++ b/xendit/payment_request/model/direct_debit_channel_properties.py @@ -5,6 +5,7 @@ import re # noqa: F401 import sys # noqa: F401 +from typing import List # noqa: F401 from xendit.model_utils import ( # noqa: F401 ApiTypeError, @@ -23,15 +24,16 @@ ) from xendit.exceptions import ApiAttributeError +from xendit.payment_request.model.direct_debit_channel_properties_bank_account import DirectDebitChannelPropertiesBankAccount +from xendit.payment_request.model.direct_debit_channel_properties_bank_redirect import DirectDebitChannelPropertiesBankRedirect +from xendit.payment_request.model.direct_debit_channel_properties_debit_card import DirectDebitChannelPropertiesDebitCard +globals()['DirectDebitChannelPropertiesBankAccount'] = DirectDebitChannelPropertiesBankAccount +globals()['DirectDebitChannelPropertiesBankRedirect'] = DirectDebitChannelPropertiesBankRedirect +globals()['DirectDebitChannelPropertiesDebitCard'] = DirectDebitChannelPropertiesDebitCard -def lazy_import(): - from xendit.payment_request.model.direct_debit_channel_properties_bank_account import DirectDebitChannelPropertiesBankAccount - from xendit.payment_request.model.direct_debit_channel_properties_bank_redirect import DirectDebitChannelPropertiesBankRedirect - from xendit.payment_request.model.direct_debit_channel_properties_debit_card import DirectDebitChannelPropertiesDebitCard - globals()['DirectDebitChannelPropertiesBankAccount'] = DirectDebitChannelPropertiesBankAccount - globals()['DirectDebitChannelPropertiesBankRedirect'] = DirectDebitChannelPropertiesBankRedirect - globals()['DirectDebitChannelPropertiesDebitCard'] = DirectDebitChannelPropertiesDebitCard +def lazy_import(): + pass class DirectDebitChannelProperties(ModelComposed): """NOTE: This class is auto generated by OpenAPI Generator. @@ -86,14 +88,14 @@ def openapi_types(): """ lazy_import() return { - 'mobile_number': (str,), # noqa: E501 - 'success_return_url': (str,), # noqa: E501 - 'failure_return_url': (str,), # noqa: E501 - 'identity_document_number': (str,), # noqa: E501 - 'account_number': (str,), # noqa: E501 - 'card_last_four': (str,), # noqa: E501 - 'card_expiry': (str,), # noqa: E501 - 'email': (str,), # noqa: E501 + 'mobile_number': (str, none_type), # noqa: E501 + 'success_return_url': (str, none_type), # noqa: E501 + 'failure_return_url': (str, none_type), # noqa: E501 + 'identity_document_number': (str, none_type), # noqa: E501 + 'account_number': (str, none_type), # noqa: E501 + 'card_last_four': (str, none_type), # noqa: E501 + 'card_expiry': (str, none_type), # noqa: E501 + 'email': (str, none_type), # noqa: E501 } @cached_property diff --git a/xendit/payment_request/model/direct_debit_channel_properties_bank_account.py b/xendit/payment_request/model/direct_debit_channel_properties_bank_account.py index 84ea1806..ac8b1a77 100644 --- a/xendit/payment_request/model/direct_debit_channel_properties_bank_account.py +++ b/xendit/payment_request/model/direct_debit_channel_properties_bank_account.py @@ -5,6 +5,7 @@ import re # noqa: F401 import sys # noqa: F401 +from typing import List # noqa: F401 from xendit.model_utils import ( # noqa: F401 ApiTypeError, @@ -25,6 +26,9 @@ +def lazy_import(): + pass + class DirectDebitChannelPropertiesBankAccount(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -76,10 +80,10 @@ def openapi_types(): and the value is attribute type. """ return { - 'success_return_url': (str,), # noqa: E501 - 'failure_return_url': (str,), # noqa: E501 - 'mobile_number': (str,), # noqa: E501 - 'identity_document_number': (str,), # noqa: E501 + 'success_return_url': (str, none_type), # noqa: E501 + 'failure_return_url': (str, none_type), # noqa: E501 + 'mobile_number': (str, none_type), # noqa: E501 + 'identity_document_number': (str, none_type), # noqa: E501 } @cached_property @@ -192,9 +196,16 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 ]) @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 + def __init__(self, + success_return_url: str | None = None, + failure_return_url: str | None = None, + mobile_number: str | None = None, + identity_document_number: str | None = None, + *args, **kwargs + ): # noqa: E501 """DirectDebitChannelPropertiesBankAccount - a model defined in OpenAPI + Keyword Args: _check_type (bool): if True, values for parameters in openapi_types will be type checked and a TypeError will be @@ -261,6 +272,14 @@ def __init__(self, *args, **kwargs): # noqa: E501 self._configuration = _configuration self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + if success_return_url is not None: + self.success_return_url = success_return_url + if failure_return_url is not None: + self.failure_return_url = failure_return_url + if mobile_number is not None: + self.mobile_number = mobile_number + if identity_document_number is not None: + self.identity_document_number = identity_document_number for var_name, var_value in kwargs.items(): if var_name not in self.attribute_map and \ self._configuration is not None and \ diff --git a/xendit/payment_request/model/direct_debit_channel_properties_bank_redirect.py b/xendit/payment_request/model/direct_debit_channel_properties_bank_redirect.py index 6c7974e7..e391fced 100644 --- a/xendit/payment_request/model/direct_debit_channel_properties_bank_redirect.py +++ b/xendit/payment_request/model/direct_debit_channel_properties_bank_redirect.py @@ -5,6 +5,7 @@ import re # noqa: F401 import sys # noqa: F401 +from typing import List # noqa: F401 from xendit.model_utils import ( # noqa: F401 ApiTypeError, @@ -25,6 +26,9 @@ +def lazy_import(): + pass + class DirectDebitChannelPropertiesBankRedirect(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -76,9 +80,9 @@ def openapi_types(): and the value is attribute type. """ return { - 'mobile_number': (str,), # noqa: E501 - 'success_return_url': (str,), # noqa: E501 - 'failure_return_url': (str,), # noqa: E501 + 'mobile_number': (str, none_type), # noqa: E501 + 'success_return_url': (str, none_type), # noqa: E501 + 'failure_return_url': (str, none_type), # noqa: E501 } @cached_property @@ -189,9 +193,15 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 ]) @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 + def __init__(self, + mobile_number: str | None = None, + success_return_url: str | None = None, + failure_return_url: str | None = None, + *args, **kwargs + ): # noqa: E501 """DirectDebitChannelPropertiesBankRedirect - a model defined in OpenAPI + Keyword Args: _check_type (bool): if True, values for parameters in openapi_types will be type checked and a TypeError will be @@ -257,6 +267,12 @@ def __init__(self, *args, **kwargs): # noqa: E501 self._configuration = _configuration self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + if mobile_number is not None: + self.mobile_number = mobile_number + if success_return_url is not None: + self.success_return_url = success_return_url + if failure_return_url is not None: + self.failure_return_url = failure_return_url for var_name, var_value in kwargs.items(): if var_name not in self.attribute_map and \ self._configuration is not None and \ diff --git a/xendit/payment_request/model/direct_debit_channel_properties_debit_card.py b/xendit/payment_request/model/direct_debit_channel_properties_debit_card.py index 05147782..5d49548f 100644 --- a/xendit/payment_request/model/direct_debit_channel_properties_debit_card.py +++ b/xendit/payment_request/model/direct_debit_channel_properties_debit_card.py @@ -5,6 +5,7 @@ import re # noqa: F401 import sys # noqa: F401 +from typing import List # noqa: F401 from xendit.model_utils import ( # noqa: F401 ApiTypeError, @@ -25,6 +26,9 @@ +def lazy_import(): + pass + class DirectDebitChannelPropertiesDebitCard(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -76,11 +80,11 @@ def openapi_types(): and the value is attribute type. """ return { - 'mobile_number': (str,), # noqa: E501 - 'account_number': (str,), # noqa: E501 - 'card_last_four': (str,), # noqa: E501 - 'card_expiry': (str,), # noqa: E501 - 'email': (str,), # noqa: E501 + 'mobile_number': (str, none_type), # noqa: E501 + 'account_number': (str, none_type), # noqa: E501 + 'card_last_four': (str, none_type), # noqa: E501 + 'card_expiry': (str, none_type), # noqa: E501 + 'email': (str, none_type), # noqa: E501 } @cached_property @@ -195,9 +199,17 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 ]) @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 + def __init__(self, + mobile_number: str | None = None, + account_number: str | None = None, + card_last_four: str | None = None, + card_expiry: str | None = None, + email: str | None = None, + *args, **kwargs + ): # noqa: E501 """DirectDebitChannelPropertiesDebitCard - a model defined in OpenAPI + Keyword Args: _check_type (bool): if True, values for parameters in openapi_types will be type checked and a TypeError will be @@ -265,6 +277,16 @@ def __init__(self, *args, **kwargs): # noqa: E501 self._configuration = _configuration self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + if mobile_number is not None: + self.mobile_number = mobile_number + if account_number is not None: + self.account_number = account_number + if card_last_four is not None: + self.card_last_four = card_last_four + if card_expiry is not None: + self.card_expiry = card_expiry + if email is not None: + self.email = email for var_name, var_value in kwargs.items(): if var_name not in self.attribute_map and \ self._configuration is not None and \ diff --git a/xendit/payment_request/model/direct_debit_debit_card.py b/xendit/payment_request/model/direct_debit_debit_card.py index 02164452..ce4186f9 100644 --- a/xendit/payment_request/model/direct_debit_debit_card.py +++ b/xendit/payment_request/model/direct_debit_debit_card.py @@ -5,6 +5,7 @@ import re # noqa: F401 import sys # noqa: F401 +from typing import List # noqa: F401 from xendit.model_utils import ( # noqa: F401 ApiTypeError, @@ -25,6 +26,9 @@ +def lazy_import(): + pass + class DirectDebitDebitCard(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -76,11 +80,11 @@ def openapi_types(): and the value is attribute type. """ return { - 'mobile_number': (str, none_type,), # noqa: E501 - 'account_number': (str,), # noqa: E501 - 'card_last_four': (str, none_type,), # noqa: E501 - 'card_expiry': (str, none_type,), # noqa: E501 - 'email': (str, none_type,), # noqa: E501 + 'mobile_number': (str, none_type, none_type), # noqa: E501 + 'account_number': (str, none_type), # noqa: E501 + 'card_last_four': (str, none_type, none_type), # noqa: E501 + 'card_expiry': (str, none_type, none_type), # noqa: E501 + 'email': (str, none_type, none_type), # noqa: E501 } @cached_property @@ -195,9 +199,17 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 ]) @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 + def __init__(self, + mobile_number: str | None = None, + account_number: str | None = None, + card_last_four: str | None = None, + card_expiry: str | None = None, + email: str | None = None, + *args, **kwargs + ): # noqa: E501 """DirectDebitDebitCard - a model defined in OpenAPI + Keyword Args: _check_type (bool): if True, values for parameters in openapi_types will be type checked and a TypeError will be @@ -265,6 +277,16 @@ def __init__(self, *args, **kwargs): # noqa: E501 self._configuration = _configuration self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + if mobile_number is not None: + self.mobile_number = mobile_number + if account_number is not None: + self.account_number = account_number + if card_last_four is not None: + self.card_last_four = card_last_four + if card_expiry is not None: + self.card_expiry = card_expiry + if email is not None: + self.email = email for var_name, var_value in kwargs.items(): if var_name not in self.attribute_map and \ self._configuration is not None and \ diff --git a/xendit/payment_request/model/direct_debit_parameters.py b/xendit/payment_request/model/direct_debit_parameters.py index c03658cd..bd13b4a9 100644 --- a/xendit/payment_request/model/direct_debit_parameters.py +++ b/xendit/payment_request/model/direct_debit_parameters.py @@ -5,6 +5,7 @@ import re # noqa: F401 import sys # noqa: F401 +from typing import List # noqa: F401 from xendit.model_utils import ( # noqa: F401 ApiTypeError, @@ -23,15 +24,16 @@ ) from xendit.exceptions import ApiAttributeError +from xendit.payment_request.model.direct_debit_channel_code import DirectDebitChannelCode +from xendit.payment_request.model.direct_debit_channel_properties import DirectDebitChannelProperties +from xendit.payment_request.model.direct_debit_type import DirectDebitType +globals()['DirectDebitChannelCode'] = DirectDebitChannelCode +globals()['DirectDebitChannelProperties'] = DirectDebitChannelProperties +globals()['DirectDebitType'] = DirectDebitType -def lazy_import(): - from xendit.payment_request.model.direct_debit_channel_code import DirectDebitChannelCode - from xendit.payment_request.model.direct_debit_channel_properties import DirectDebitChannelProperties - from xendit.payment_request.model.direct_debit_type import DirectDebitType - globals()['DirectDebitChannelCode'] = DirectDebitChannelCode - globals()['DirectDebitChannelProperties'] = DirectDebitChannelProperties - globals()['DirectDebitType'] = DirectDebitType +def lazy_import(): + pass class DirectDebitParameters(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. @@ -88,7 +90,7 @@ def openapi_types(): return { 'channel_code': (DirectDebitChannelCode,), # noqa: E501 'channel_properties': (DirectDebitChannelProperties,), # noqa: E501 - 'type': (DirectDebitType,), # noqa: E501 + 'type': (DirectDebitType, none_type), # noqa: E501 } @cached_property @@ -203,13 +205,19 @@ def _from_openapi_data(cls, channel_code, channel_properties, *args, **kwargs): ]) @convert_js_args_to_python_args - def __init__(self, channel_code, channel_properties, *args, **kwargs): # noqa: E501 + def __init__(self, + channel_code: DirectDebitChannelCode, + channel_properties: DirectDebitChannelProperties, + type: DirectDebitType | None = None, + *args, **kwargs + ): # noqa: E501 """DirectDebitParameters - a model defined in OpenAPI Args: channel_code (DirectDebitChannelCode): channel_properties (DirectDebitChannelProperties): + Keyword Args: _check_type (bool): if True, values for parameters in openapi_types will be type checked and a TypeError will be @@ -275,6 +283,8 @@ def __init__(self, channel_code, channel_properties, *args, **kwargs): # noqa: self.channel_code = channel_code self.channel_properties = channel_properties + if type is not None: + self.type = type for var_name, var_value in kwargs.items(): if var_name not in self.attribute_map and \ self._configuration is not None and \ diff --git a/xendit/payment_request/model/direct_debit_type.py b/xendit/payment_request/model/direct_debit_type.py index 6b3e2942..c1fbc1eb 100644 --- a/xendit/payment_request/model/direct_debit_type.py +++ b/xendit/payment_request/model/direct_debit_type.py @@ -5,6 +5,7 @@ import re # noqa: F401 import sys # noqa: F401 +from typing import List # noqa: F401 from xendit.model_utils import ( # noqa: F401 ApiTypeError, @@ -25,6 +26,9 @@ +def lazy_import(): + pass + class DirectDebitType(ModelSimple): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech diff --git a/xendit/payment_request/model/e_wallet.py b/xendit/payment_request/model/e_wallet.py index a4474c7a..018710e3 100644 --- a/xendit/payment_request/model/e_wallet.py +++ b/xendit/payment_request/model/e_wallet.py @@ -5,6 +5,7 @@ import re # noqa: F401 import sys # noqa: F401 +from typing import List # noqa: F401 from xendit.model_utils import ( # noqa: F401 ApiTypeError, @@ -23,19 +24,20 @@ ) from xendit.exceptions import ApiAttributeError +from xendit.payment_request.model.e_wallet_account import EWalletAccount +from xendit.payment_request.model.e_wallet_all_of import EWalletAllOf +from xendit.payment_request.model.e_wallet_channel_code import EWalletChannelCode +from xendit.payment_request.model.e_wallet_channel_properties import EWalletChannelProperties +from xendit.payment_request.model.e_wallet_parameters import EWalletParameters +globals()['EWalletAccount'] = EWalletAccount +globals()['EWalletAllOf'] = EWalletAllOf +globals()['EWalletChannelCode'] = EWalletChannelCode +globals()['EWalletChannelProperties'] = EWalletChannelProperties +globals()['EWalletParameters'] = EWalletParameters -def lazy_import(): - from xendit.payment_request.model.e_wallet_account import EWalletAccount - from xendit.payment_request.model.e_wallet_all_of import EWalletAllOf - from xendit.payment_request.model.e_wallet_channel_code import EWalletChannelCode - from xendit.payment_request.model.e_wallet_channel_properties import EWalletChannelProperties - from xendit.payment_request.model.e_wallet_parameters import EWalletParameters - globals()['EWalletAccount'] = EWalletAccount - globals()['EWalletAllOf'] = EWalletAllOf - globals()['EWalletChannelCode'] = EWalletChannelCode - globals()['EWalletChannelProperties'] = EWalletChannelProperties - globals()['EWalletParameters'] = EWalletParameters +def lazy_import(): + pass class EWallet(ModelComposed): """NOTE: This class is auto generated by OpenAPI Generator. @@ -90,9 +92,9 @@ def openapi_types(): """ lazy_import() return { - 'channel_code': (EWalletChannelCode,), # noqa: E501 - 'channel_properties': (EWalletChannelProperties,), # noqa: E501 - 'account': (EWalletAccount,), # noqa: E501 + 'channel_code': (EWalletChannelCode, none_type), # noqa: E501 + 'channel_properties': (EWalletChannelProperties, none_type), # noqa: E501 + 'account': (EWalletAccount, none_type), # noqa: E501 } @cached_property diff --git a/xendit/payment_request/model/e_wallet_account.py b/xendit/payment_request/model/e_wallet_account.py index b2f5fdf8..290d93a7 100644 --- a/xendit/payment_request/model/e_wallet_account.py +++ b/xendit/payment_request/model/e_wallet_account.py @@ -5,6 +5,7 @@ import re # noqa: F401 import sys # noqa: F401 +from typing import List # noqa: F401 from xendit.model_utils import ( # noqa: F401 ApiTypeError, @@ -25,6 +26,9 @@ +def lazy_import(): + pass + class EWalletAccount(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -76,10 +80,10 @@ def openapi_types(): and the value is attribute type. """ return { - 'name': (str, none_type,), # noqa: E501 - 'account_details': (str, none_type,), # noqa: E501 - 'balance': (float, none_type,), # noqa: E501 - 'point_balance': (float, none_type,), # noqa: E501 + 'name': (str, none_type, none_type), # noqa: E501 + 'account_details': (str, none_type, none_type), # noqa: E501 + 'balance': (float, none_type, none_type), # noqa: E501 + 'point_balance': (float, none_type, none_type), # noqa: E501 } @cached_property @@ -192,9 +196,16 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 ]) @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 + def __init__(self, + name: str | None = None, + account_details: str | None = None, + balance: float | None = None, + point_balance: float | None = None, + *args, **kwargs + ): # noqa: E501 """EWalletAccount - a model defined in OpenAPI + Keyword Args: _check_type (bool): if True, values for parameters in openapi_types will be type checked and a TypeError will be @@ -261,6 +272,14 @@ def __init__(self, *args, **kwargs): # noqa: E501 self._configuration = _configuration self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + if name is not None: + self.name = name + if account_details is not None: + self.account_details = account_details + if balance is not None: + self.balance = balance + if point_balance is not None: + self.point_balance = point_balance for var_name, var_value in kwargs.items(): if var_name not in self.attribute_map and \ self._configuration is not None and \ diff --git a/xendit/payment_request/model/e_wallet_all_of.py b/xendit/payment_request/model/e_wallet_all_of.py index 0ea18bec..bad4519b 100644 --- a/xendit/payment_request/model/e_wallet_all_of.py +++ b/xendit/payment_request/model/e_wallet_all_of.py @@ -5,6 +5,7 @@ import re # noqa: F401 import sys # noqa: F401 +from typing import List # noqa: F401 from xendit.model_utils import ( # noqa: F401 ApiTypeError, @@ -23,11 +24,12 @@ ) from xendit.exceptions import ApiAttributeError +from xendit.payment_request.model.e_wallet_account import EWalletAccount +globals()['EWalletAccount'] = EWalletAccount -def lazy_import(): - from xendit.payment_request.model.e_wallet_account import EWalletAccount - globals()['EWalletAccount'] = EWalletAccount +def lazy_import(): + pass class EWalletAllOf(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. @@ -82,7 +84,7 @@ def openapi_types(): """ lazy_import() return { - 'account': (EWalletAccount,), # noqa: E501 + 'account': (EWalletAccount, none_type), # noqa: E501 } @cached_property @@ -189,9 +191,13 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 ]) @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 + def __init__(self, + account: EWalletAccount | None = None, + *args, **kwargs + ): # noqa: E501 """EWalletAllOf - a model defined in OpenAPI + Keyword Args: _check_type (bool): if True, values for parameters in openapi_types will be type checked and a TypeError will be @@ -255,6 +261,8 @@ def __init__(self, *args, **kwargs): # noqa: E501 self._configuration = _configuration self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + if account is not None: + self.account = account for var_name, var_value in kwargs.items(): if var_name not in self.attribute_map and \ self._configuration is not None and \ diff --git a/xendit/payment_request/model/e_wallet_channel_code.py b/xendit/payment_request/model/e_wallet_channel_code.py index 7398f0c7..2375f155 100644 --- a/xendit/payment_request/model/e_wallet_channel_code.py +++ b/xendit/payment_request/model/e_wallet_channel_code.py @@ -5,6 +5,7 @@ import re # noqa: F401 import sys # noqa: F401 +from typing import List # noqa: F401 from xendit.model_utils import ( # noqa: F401 ApiTypeError, @@ -25,6 +26,9 @@ +def lazy_import(): + pass + class EWalletChannelCode(ModelSimple): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech diff --git a/xendit/payment_request/model/e_wallet_channel_properties.py b/xendit/payment_request/model/e_wallet_channel_properties.py index 815c4d6f..6647fed9 100644 --- a/xendit/payment_request/model/e_wallet_channel_properties.py +++ b/xendit/payment_request/model/e_wallet_channel_properties.py @@ -5,6 +5,7 @@ import re # noqa: F401 import sys # noqa: F401 +from typing import List # noqa: F401 from xendit.model_utils import ( # noqa: F401 ApiTypeError, @@ -25,6 +26,9 @@ +def lazy_import(): + pass + class EWalletChannelProperties(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -91,12 +95,12 @@ def openapi_types(): and the value is attribute type. """ return { - 'success_return_url': (str,), # noqa: E501 - 'failure_return_url': (str,), # noqa: E501 - 'cancel_return_url': (str,), # noqa: E501 - 'redeem_points': (str,), # noqa: E501 - 'mobilenumber': (str,), # noqa: E501 - 'cashtag': (str,), # noqa: E501 + 'success_return_url': (str, none_type), # noqa: E501 + 'failure_return_url': (str, none_type), # noqa: E501 + 'cancel_return_url': (str, none_type), # noqa: E501 + 'redeem_points': (str, none_type), # noqa: E501 + 'mobilenumber': (str, none_type), # noqa: E501 + 'cashtag': (str, none_type), # noqa: E501 } @cached_property @@ -213,9 +217,18 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 ]) @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 + def __init__(self, + success_return_url: str | None = None, + failure_return_url: str | None = None, + cancel_return_url: str | None = None, + redeem_points: str | None = None, + mobilenumber: str | None = None, + cashtag: str | None = None, + *args, **kwargs + ): # noqa: E501 """EWalletChannelProperties - a model defined in OpenAPI + Keyword Args: _check_type (bool): if True, values for parameters in openapi_types will be type checked and a TypeError will be @@ -284,6 +297,18 @@ def __init__(self, *args, **kwargs): # noqa: E501 self._configuration = _configuration self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + if success_return_url is not None: + self.success_return_url = success_return_url + if failure_return_url is not None: + self.failure_return_url = failure_return_url + if cancel_return_url is not None: + self.cancel_return_url = cancel_return_url + if redeem_points is not None: + self.redeem_points = redeem_points + if mobilenumber is not None: + self.mobilenumber = mobilenumber + if cashtag is not None: + self.cashtag = cashtag for var_name, var_value in kwargs.items(): if var_name not in self.attribute_map and \ self._configuration is not None and \ diff --git a/xendit/payment_request/model/e_wallet_parameters.py b/xendit/payment_request/model/e_wallet_parameters.py index c4433c19..7432a73a 100644 --- a/xendit/payment_request/model/e_wallet_parameters.py +++ b/xendit/payment_request/model/e_wallet_parameters.py @@ -5,6 +5,7 @@ import re # noqa: F401 import sys # noqa: F401 +from typing import List # noqa: F401 from xendit.model_utils import ( # noqa: F401 ApiTypeError, @@ -23,13 +24,14 @@ ) from xendit.exceptions import ApiAttributeError +from xendit.payment_request.model.e_wallet_channel_code import EWalletChannelCode +from xendit.payment_request.model.e_wallet_channel_properties import EWalletChannelProperties +globals()['EWalletChannelCode'] = EWalletChannelCode +globals()['EWalletChannelProperties'] = EWalletChannelProperties -def lazy_import(): - from xendit.payment_request.model.e_wallet_channel_code import EWalletChannelCode - from xendit.payment_request.model.e_wallet_channel_properties import EWalletChannelProperties - globals()['EWalletChannelCode'] = EWalletChannelCode - globals()['EWalletChannelProperties'] = EWalletChannelProperties +def lazy_import(): + pass class EWalletParameters(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. @@ -84,8 +86,8 @@ def openapi_types(): """ lazy_import() return { - 'channel_code': (EWalletChannelCode,), # noqa: E501 - 'channel_properties': (EWalletChannelProperties,), # noqa: E501 + 'channel_code': (EWalletChannelCode, none_type), # noqa: E501 + 'channel_properties': (EWalletChannelProperties, none_type), # noqa: E501 } @cached_property @@ -194,9 +196,14 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 ]) @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 + def __init__(self, + channel_code: EWalletChannelCode | None = None, + channel_properties: EWalletChannelProperties | None = None, + *args, **kwargs + ): # noqa: E501 """EWalletParameters - a model defined in OpenAPI + Keyword Args: _check_type (bool): if True, values for parameters in openapi_types will be type checked and a TypeError will be @@ -261,6 +268,10 @@ def __init__(self, *args, **kwargs): # noqa: E501 self._configuration = _configuration self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + if channel_code is not None: + self.channel_code = channel_code + if channel_properties is not None: + self.channel_properties = channel_properties for var_name, var_value in kwargs.items(): if var_name not in self.attribute_map and \ self._configuration is not None and \ diff --git a/xendit/payment_request/model/error.py b/xendit/payment_request/model/error.py index b99357d4..9f6150d4 100644 --- a/xendit/payment_request/model/error.py +++ b/xendit/payment_request/model/error.py @@ -5,6 +5,7 @@ import re # noqa: F401 import sys # noqa: F401 +from typing import List # noqa: F401 from xendit.model_utils import ( # noqa: F401 ApiTypeError, @@ -25,6 +26,9 @@ +def lazy_import(): + pass + class Error(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -134,8 +138,8 @@ def openapi_types(): and the value is attribute type. """ return { - 'error_code': (str, none_type,), # noqa: E501 - 'message': (str, none_type,), # noqa: E501 + 'error_code': (str, none_type, none_type), # noqa: E501 + 'message': (str, none_type, none_type), # noqa: E501 } @cached_property @@ -244,9 +248,14 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 ]) @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 + def __init__(self, + error_code: str | None = None, + message: str | None = None, + *args, **kwargs + ): # noqa: E501 """Error - a model defined in OpenAPI + Keyword Args: _check_type (bool): if True, values for parameters in openapi_types will be type checked and a TypeError will be @@ -311,6 +320,10 @@ def __init__(self, *args, **kwargs): # noqa: E501 self._configuration = _configuration self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + if error_code is not None: + self.error_code = error_code + if message is not None: + self.message = message for var_name, var_value in kwargs.items(): if var_name not in self.attribute_map and \ self._configuration is not None and \ diff --git a/xendit/payment_request/model/over_the_counter.py b/xendit/payment_request/model/over_the_counter.py index cea6267e..1bcb75e8 100644 --- a/xendit/payment_request/model/over_the_counter.py +++ b/xendit/payment_request/model/over_the_counter.py @@ -5,6 +5,7 @@ import re # noqa: F401 import sys # noqa: F401 +from typing import List # noqa: F401 from xendit.model_utils import ( # noqa: F401 ApiTypeError, @@ -23,17 +24,18 @@ ) from xendit.exceptions import ApiAttributeError +from xendit.payment_request.model.over_the_counter_channel_code import OverTheCounterChannelCode +from xendit.payment_request.model.over_the_counter_channel_properties import OverTheCounterChannelProperties +from xendit.payment_request.model.over_the_counter_parameters import OverTheCounterParameters +from xendit.payment_request.model.payment_request_currency import PaymentRequestCurrency +globals()['OverTheCounterChannelCode'] = OverTheCounterChannelCode +globals()['OverTheCounterChannelProperties'] = OverTheCounterChannelProperties +globals()['OverTheCounterParameters'] = OverTheCounterParameters +globals()['PaymentRequestCurrency'] = PaymentRequestCurrency -def lazy_import(): - from xendit.payment_request.model.over_the_counter_channel_code import OverTheCounterChannelCode - from xendit.payment_request.model.over_the_counter_channel_properties import OverTheCounterChannelProperties - from xendit.payment_request.model.over_the_counter_parameters import OverTheCounterParameters - from xendit.payment_request.model.payment_request_currency import PaymentRequestCurrency - globals()['OverTheCounterChannelCode'] = OverTheCounterChannelCode - globals()['OverTheCounterChannelProperties'] = OverTheCounterChannelProperties - globals()['OverTheCounterParameters'] = OverTheCounterParameters - globals()['PaymentRequestCurrency'] = PaymentRequestCurrency +def lazy_import(): + pass class OverTheCounter(ModelComposed): """NOTE: This class is auto generated by OpenAPI Generator. @@ -90,8 +92,8 @@ def openapi_types(): return { 'channel_code': (OverTheCounterChannelCode,), # noqa: E501 'channel_properties': (OverTheCounterChannelProperties,), # noqa: E501 - 'amount': (float, none_type,), # noqa: E501 - 'currency': (PaymentRequestCurrency,), # noqa: E501 + 'amount': (float, none_type, none_type), # noqa: E501 + 'currency': (PaymentRequestCurrency, none_type), # noqa: E501 } @cached_property diff --git a/xendit/payment_request/model/over_the_counter_channel_code.py b/xendit/payment_request/model/over_the_counter_channel_code.py index 9e920512..53a16433 100644 --- a/xendit/payment_request/model/over_the_counter_channel_code.py +++ b/xendit/payment_request/model/over_the_counter_channel_code.py @@ -5,6 +5,7 @@ import re # noqa: F401 import sys # noqa: F401 +from typing import List # noqa: F401 from xendit.model_utils import ( # noqa: F401 ApiTypeError, @@ -25,6 +26,9 @@ +def lazy_import(): + pass + class OverTheCounterChannelCode(ModelSimple): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech diff --git a/xendit/payment_request/model/over_the_counter_channel_properties.py b/xendit/payment_request/model/over_the_counter_channel_properties.py index 6f43bca7..8a277fa8 100644 --- a/xendit/payment_request/model/over_the_counter_channel_properties.py +++ b/xendit/payment_request/model/over_the_counter_channel_properties.py @@ -5,6 +5,7 @@ import re # noqa: F401 import sys # noqa: F401 +from typing import List # noqa: F401 from xendit.model_utils import ( # noqa: F401 ApiTypeError, @@ -25,6 +26,9 @@ +def lazy_import(): + pass + class OverTheCounterChannelProperties(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -77,8 +81,8 @@ def openapi_types(): """ return { 'customer_name': (str,), # noqa: E501 - 'payment_code': (str,), # noqa: E501 - 'expires_at': (datetime,), # noqa: E501 + 'payment_code': (str, none_type), # noqa: E501 + 'expires_at': (datetime, none_type), # noqa: E501 } @cached_property @@ -192,12 +196,18 @@ def _from_openapi_data(cls, customer_name, *args, **kwargs): # noqa: E501 ]) @convert_js_args_to_python_args - def __init__(self, customer_name, *args, **kwargs): # noqa: E501 + def __init__(self, + customer_name: str, + payment_code: str | None = None, + expires_at: datetime | None = None, + *args, **kwargs + ): # noqa: E501 """OverTheCounterChannelProperties - a model defined in OpenAPI Args: customer_name (str): Name of customer. + Keyword Args: _check_type (bool): if True, values for parameters in openapi_types will be type checked and a TypeError will be @@ -263,6 +273,10 @@ def __init__(self, customer_name, *args, **kwargs): # noqa: E501 self._visited_composed_classes = _visited_composed_classes + (self.__class__,) self.customer_name = customer_name + if payment_code is not None: + self.payment_code = payment_code + if expires_at is not None: + self.expires_at = expires_at for var_name, var_value in kwargs.items(): if var_name not in self.attribute_map and \ self._configuration is not None and \ diff --git a/xendit/payment_request/model/over_the_counter_parameters.py b/xendit/payment_request/model/over_the_counter_parameters.py index b911b28f..1c581acc 100644 --- a/xendit/payment_request/model/over_the_counter_parameters.py +++ b/xendit/payment_request/model/over_the_counter_parameters.py @@ -5,6 +5,7 @@ import re # noqa: F401 import sys # noqa: F401 +from typing import List # noqa: F401 from xendit.model_utils import ( # noqa: F401 ApiTypeError, @@ -23,15 +24,16 @@ ) from xendit.exceptions import ApiAttributeError +from xendit.payment_request.model.over_the_counter_channel_code import OverTheCounterChannelCode +from xendit.payment_request.model.over_the_counter_channel_properties import OverTheCounterChannelProperties +from xendit.payment_request.model.payment_request_currency import PaymentRequestCurrency +globals()['OverTheCounterChannelCode'] = OverTheCounterChannelCode +globals()['OverTheCounterChannelProperties'] = OverTheCounterChannelProperties +globals()['PaymentRequestCurrency'] = PaymentRequestCurrency -def lazy_import(): - from xendit.payment_request.model.over_the_counter_channel_code import OverTheCounterChannelCode - from xendit.payment_request.model.over_the_counter_channel_properties import OverTheCounterChannelProperties - from xendit.payment_request.model.payment_request_currency import PaymentRequestCurrency - globals()['OverTheCounterChannelCode'] = OverTheCounterChannelCode - globals()['OverTheCounterChannelProperties'] = OverTheCounterChannelProperties - globals()['PaymentRequestCurrency'] = PaymentRequestCurrency +def lazy_import(): + pass class OverTheCounterParameters(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. @@ -88,8 +90,8 @@ def openapi_types(): return { 'channel_code': (OverTheCounterChannelCode,), # noqa: E501 'channel_properties': (OverTheCounterChannelProperties,), # noqa: E501 - 'amount': (float, none_type,), # noqa: E501 - 'currency': (PaymentRequestCurrency,), # noqa: E501 + 'amount': (float, none_type, none_type), # noqa: E501 + 'currency': (PaymentRequestCurrency, none_type), # noqa: E501 } @cached_property @@ -206,13 +208,20 @@ def _from_openapi_data(cls, channel_code, channel_properties, *args, **kwargs): ]) @convert_js_args_to_python_args - def __init__(self, channel_code, channel_properties, *args, **kwargs): # noqa: E501 + def __init__(self, + channel_code: OverTheCounterChannelCode, + channel_properties: OverTheCounterChannelProperties, + amount: float | None = None, + currency: PaymentRequestCurrency | None = None, + *args, **kwargs + ): # noqa: E501 """OverTheCounterParameters - a model defined in OpenAPI Args: channel_code (OverTheCounterChannelCode): channel_properties (OverTheCounterChannelProperties): + Keyword Args: _check_type (bool): if True, values for parameters in openapi_types will be type checked and a TypeError will be @@ -279,6 +288,10 @@ def __init__(self, channel_code, channel_properties, *args, **kwargs): # noqa: self.channel_code = channel_code self.channel_properties = channel_properties + if amount is not None: + self.amount = amount + if currency is not None: + self.currency = currency for var_name, var_value in kwargs.items(): if var_name not in self.attribute_map and \ self._configuration is not None and \ diff --git a/xendit/payment_request/model/payment_method.py b/xendit/payment_request/model/payment_method.py index 957bf87e..adfa6ccf 100644 --- a/xendit/payment_request/model/payment_method.py +++ b/xendit/payment_request/model/payment_method.py @@ -5,6 +5,7 @@ import re # noqa: F401 import sys # noqa: F401 +from typing import List # noqa: F401 from xendit.model_utils import ( # noqa: F401 ApiTypeError, @@ -23,27 +24,28 @@ ) from xendit.exceptions import ApiAttributeError +from xendit.payment_request.model.card import Card +from xendit.payment_request.model.direct_debit import DirectDebit +from xendit.payment_request.model.e_wallet import EWallet +from xendit.payment_request.model.over_the_counter import OverTheCounter +from xendit.payment_request.model.payment_method_reusability import PaymentMethodReusability +from xendit.payment_request.model.payment_method_status import PaymentMethodStatus +from xendit.payment_request.model.payment_method_type import PaymentMethodType +from xendit.payment_request.model.qr_code import QRCode +from xendit.payment_request.model.virtual_account import VirtualAccount +globals()['Card'] = Card +globals()['DirectDebit'] = DirectDebit +globals()['EWallet'] = EWallet +globals()['OverTheCounter'] = OverTheCounter +globals()['PaymentMethodReusability'] = PaymentMethodReusability +globals()['PaymentMethodStatus'] = PaymentMethodStatus +globals()['PaymentMethodType'] = PaymentMethodType +globals()['QRCode'] = QRCode +globals()['VirtualAccount'] = VirtualAccount -def lazy_import(): - from xendit.payment_request.model.card import Card - from xendit.payment_request.model.direct_debit import DirectDebit - from xendit.payment_request.model.e_wallet import EWallet - from xendit.payment_request.model.over_the_counter import OverTheCounter - from xendit.payment_request.model.payment_method_reusability import PaymentMethodReusability - from xendit.payment_request.model.payment_method_status import PaymentMethodStatus - from xendit.payment_request.model.payment_method_type import PaymentMethodType - from xendit.payment_request.model.qr_code import QRCode - from xendit.payment_request.model.virtual_account import VirtualAccount - globals()['Card'] = Card - globals()['DirectDebit'] = DirectDebit - globals()['EWallet'] = EWallet - globals()['OverTheCounter'] = OverTheCounter - globals()['PaymentMethodReusability'] = PaymentMethodReusability - globals()['PaymentMethodStatus'] = PaymentMethodStatus - globals()['PaymentMethodType'] = PaymentMethodType - globals()['QRCode'] = QRCode - globals()['VirtualAccount'] = VirtualAccount +def lazy_import(): + pass class PaymentMethod(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. @@ -102,17 +104,17 @@ def openapi_types(): 'type': (PaymentMethodType,), # noqa: E501 'reusability': (PaymentMethodReusability,), # noqa: E501 'status': (PaymentMethodStatus,), # noqa: E501 - 'created': (str,), # noqa: E501 - 'updated': (str,), # noqa: E501 - 'description': (str, none_type,), # noqa: E501 - 'reference_id': (str,), # noqa: E501 - 'card': (Card,), # noqa: E501 - 'direct_debit': (DirectDebit,), # noqa: E501 - 'ewallet': (EWallet,), # noqa: E501 - 'over_the_counter': (OverTheCounter,), # noqa: E501 - 'virtual_account': (VirtualAccount,), # noqa: E501 - 'qr_code': (QRCode,), # noqa: E501 - 'metadata': ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type,), # noqa: E501 + 'created': (str, none_type), # noqa: E501 + 'updated': (str, none_type), # noqa: E501 + 'description': (str, none_type, none_type), # noqa: E501 + 'reference_id': (str, none_type), # noqa: E501 + 'card': (Card, none_type), # noqa: E501 + 'direct_debit': (DirectDebit, none_type), # noqa: E501 + 'ewallet': (EWallet, none_type), # noqa: E501 + 'over_the_counter': (OverTheCounter, none_type), # noqa: E501 + 'virtual_account': (VirtualAccount, none_type), # noqa: E501 + 'qr_code': (QRCode, none_type), # noqa: E501 + 'metadata': ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type, none_type), # noqa: E501 } @cached_property @@ -253,7 +255,24 @@ def _from_openapi_data(cls, id, type, reusability, status, *args, **kwargs): # ]) @convert_js_args_to_python_args - def __init__(self, id, type, reusability, status, *args, **kwargs): # noqa: E501 + def __init__(self, + id: str, + type: PaymentMethodType, + reusability: PaymentMethodReusability, + status: PaymentMethodStatus, + created: str | None = None, + updated: str | None = None, + description: str | None = None, + reference_id: str | None = None, + card: Card | None = None, + direct_debit: DirectDebit | None = None, + ewallet: EWallet | None = None, + over_the_counter: OverTheCounter | None = None, + virtual_account: VirtualAccount | None = None, + qr_code: QRCode | None = None, + metadata: dict | None = None, + *args, **kwargs + ): # noqa: E501 """PaymentMethod - a model defined in OpenAPI Args: @@ -262,6 +281,7 @@ def __init__(self, id, type, reusability, status, *args, **kwargs): # noqa: E50 reusability (PaymentMethodReusability): status (PaymentMethodStatus): + Keyword Args: _check_type (bool): if True, values for parameters in openapi_types will be type checked and a TypeError will be @@ -339,6 +359,28 @@ def __init__(self, id, type, reusability, status, *args, **kwargs): # noqa: E50 self.type = type self.reusability = reusability self.status = status + if created is not None: + self.created = created + if updated is not None: + self.updated = updated + if description is not None: + self.description = description + if reference_id is not None: + self.reference_id = reference_id + if card is not None: + self.card = card + if direct_debit is not None: + self.direct_debit = direct_debit + if ewallet is not None: + self.ewallet = ewallet + if over_the_counter is not None: + self.over_the_counter = over_the_counter + if virtual_account is not None: + self.virtual_account = virtual_account + if qr_code is not None: + self.qr_code = qr_code + if metadata is not None: + self.metadata = metadata for var_name, var_value in kwargs.items(): if var_name not in self.attribute_map and \ self._configuration is not None and \ diff --git a/xendit/payment_request/model/payment_method_parameters.py b/xendit/payment_request/model/payment_method_parameters.py index cbaa1f23..ea58ca15 100644 --- a/xendit/payment_request/model/payment_method_parameters.py +++ b/xendit/payment_request/model/payment_method_parameters.py @@ -5,6 +5,7 @@ import re # noqa: F401 import sys # noqa: F401 +from typing import List # noqa: F401 from xendit.model_utils import ( # noqa: F401 ApiTypeError, @@ -23,23 +24,24 @@ ) from xendit.exceptions import ApiAttributeError +from xendit.payment_request.model.direct_debit_parameters import DirectDebitParameters +from xendit.payment_request.model.e_wallet_parameters import EWalletParameters +from xendit.payment_request.model.over_the_counter_parameters import OverTheCounterParameters +from xendit.payment_request.model.payment_method_reusability import PaymentMethodReusability +from xendit.payment_request.model.payment_method_type import PaymentMethodType +from xendit.payment_request.model.qr_code_parameters import QRCodeParameters +from xendit.payment_request.model.virtual_account_parameters import VirtualAccountParameters +globals()['DirectDebitParameters'] = DirectDebitParameters +globals()['EWalletParameters'] = EWalletParameters +globals()['OverTheCounterParameters'] = OverTheCounterParameters +globals()['PaymentMethodReusability'] = PaymentMethodReusability +globals()['PaymentMethodType'] = PaymentMethodType +globals()['QRCodeParameters'] = QRCodeParameters +globals()['VirtualAccountParameters'] = VirtualAccountParameters -def lazy_import(): - from xendit.payment_request.model.direct_debit_parameters import DirectDebitParameters - from xendit.payment_request.model.e_wallet_parameters import EWalletParameters - from xendit.payment_request.model.over_the_counter_parameters import OverTheCounterParameters - from xendit.payment_request.model.payment_method_reusability import PaymentMethodReusability - from xendit.payment_request.model.payment_method_type import PaymentMethodType - from xendit.payment_request.model.qr_code_parameters import QRCodeParameters - from xendit.payment_request.model.virtual_account_parameters import VirtualAccountParameters - globals()['DirectDebitParameters'] = DirectDebitParameters - globals()['EWalletParameters'] = EWalletParameters - globals()['OverTheCounterParameters'] = OverTheCounterParameters - globals()['PaymentMethodReusability'] = PaymentMethodReusability - globals()['PaymentMethodType'] = PaymentMethodType - globals()['QRCodeParameters'] = QRCodeParameters - globals()['VirtualAccountParameters'] = VirtualAccountParameters +def lazy_import(): + pass class PaymentMethodParameters(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. @@ -96,13 +98,13 @@ def openapi_types(): return { 'type': (PaymentMethodType,), # noqa: E501 'reusability': (PaymentMethodReusability,), # noqa: E501 - 'description': (str, none_type,), # noqa: E501 - 'reference_id': (str,), # noqa: E501 - 'direct_debit': (DirectDebitParameters,), # noqa: E501 - 'ewallet': (EWalletParameters,), # noqa: E501 - 'over_the_counter': (OverTheCounterParameters,), # noqa: E501 - 'virtual_account': (VirtualAccountParameters,), # noqa: E501 - 'qr_code': (QRCodeParameters,), # noqa: E501 + 'description': (str, none_type, none_type), # noqa: E501 + 'reference_id': (str, none_type), # noqa: E501 + 'direct_debit': (DirectDebitParameters, none_type), # noqa: E501 + 'ewallet': (EWalletParameters, none_type), # noqa: E501 + 'over_the_counter': (OverTheCounterParameters, none_type), # noqa: E501 + 'virtual_account': (VirtualAccountParameters, none_type), # noqa: E501 + 'qr_code': (QRCodeParameters, none_type), # noqa: E501 } @cached_property @@ -229,13 +231,25 @@ def _from_openapi_data(cls, type, reusability, *args, **kwargs): # noqa: E501 ]) @convert_js_args_to_python_args - def __init__(self, type, reusability, *args, **kwargs): # noqa: E501 + def __init__(self, + type: PaymentMethodType, + reusability: PaymentMethodReusability, + description: str | None = None, + reference_id: str | None = None, + direct_debit: DirectDebitParameters | None = None, + ewallet: EWalletParameters | None = None, + over_the_counter: OverTheCounterParameters | None = None, + virtual_account: VirtualAccountParameters | None = None, + qr_code: QRCodeParameters | None = None, + *args, **kwargs + ): # noqa: E501 """PaymentMethodParameters - a model defined in OpenAPI Args: type (PaymentMethodType): reusability (PaymentMethodReusability): + Keyword Args: _check_type (bool): if True, values for parameters in openapi_types will be type checked and a TypeError will be @@ -307,6 +321,20 @@ def __init__(self, type, reusability, *args, **kwargs): # noqa: E501 self.type = type self.reusability = reusability + if description is not None: + self.description = description + if reference_id is not None: + self.reference_id = reference_id + if direct_debit is not None: + self.direct_debit = direct_debit + if ewallet is not None: + self.ewallet = ewallet + if over_the_counter is not None: + self.over_the_counter = over_the_counter + if virtual_account is not None: + self.virtual_account = virtual_account + if qr_code is not None: + self.qr_code = qr_code for var_name, var_value in kwargs.items(): if var_name not in self.attribute_map and \ self._configuration is not None and \ diff --git a/xendit/payment_request/model/payment_method_reusability.py b/xendit/payment_request/model/payment_method_reusability.py index 1474a990..4c9b81e1 100644 --- a/xendit/payment_request/model/payment_method_reusability.py +++ b/xendit/payment_request/model/payment_method_reusability.py @@ -5,6 +5,7 @@ import re # noqa: F401 import sys # noqa: F401 +from typing import List # noqa: F401 from xendit.model_utils import ( # noqa: F401 ApiTypeError, @@ -25,6 +26,9 @@ +def lazy_import(): + pass + class PaymentMethodReusability(ModelSimple): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech diff --git a/xendit/payment_request/model/payment_method_status.py b/xendit/payment_request/model/payment_method_status.py index 16ba4e1f..4661773a 100644 --- a/xendit/payment_request/model/payment_method_status.py +++ b/xendit/payment_request/model/payment_method_status.py @@ -5,6 +5,7 @@ import re # noqa: F401 import sys # noqa: F401 +from typing import List # noqa: F401 from xendit.model_utils import ( # noqa: F401 ApiTypeError, @@ -25,6 +26,9 @@ +def lazy_import(): + pass + class PaymentMethodStatus(ModelSimple): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech diff --git a/xendit/payment_request/model/payment_method_type.py b/xendit/payment_request/model/payment_method_type.py index 872aedb8..6543eb90 100644 --- a/xendit/payment_request/model/payment_method_type.py +++ b/xendit/payment_request/model/payment_method_type.py @@ -5,6 +5,7 @@ import re # noqa: F401 import sys # noqa: F401 +from typing import List # noqa: F401 from xendit.model_utils import ( # noqa: F401 ApiTypeError, @@ -25,6 +26,9 @@ +def lazy_import(): + pass + class PaymentMethodType(ModelSimple): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech diff --git a/xendit/payment_request/model/payment_request.py b/xendit/payment_request/model/payment_request.py index 80829a98..a7f00525 100644 --- a/xendit/payment_request/model/payment_request.py +++ b/xendit/payment_request/model/payment_request.py @@ -5,6 +5,7 @@ import re # noqa: F401 import sys # noqa: F401 +from typing import List # noqa: F401 from xendit.model_utils import ( # noqa: F401 ApiTypeError, @@ -23,29 +24,30 @@ ) from xendit.exceptions import ApiAttributeError +from xendit.payment_request.model.payment_method import PaymentMethod +from xendit.payment_request.model.payment_request_action import PaymentRequestAction +from xendit.payment_request.model.payment_request_basket import PaymentRequestBasket +from xendit.payment_request.model.payment_request_capture_method import PaymentRequestCaptureMethod +from xendit.payment_request.model.payment_request_card_verification_results import PaymentRequestCardVerificationResults +from xendit.payment_request.model.payment_request_country import PaymentRequestCountry +from xendit.payment_request.model.payment_request_currency import PaymentRequestCurrency +from xendit.payment_request.model.payment_request_initiator import PaymentRequestInitiator +from xendit.payment_request.model.payment_request_shipping_information import PaymentRequestShippingInformation +from xendit.payment_request.model.payment_request_status import PaymentRequestStatus +globals()['PaymentMethod'] = PaymentMethod +globals()['PaymentRequestAction'] = PaymentRequestAction +globals()['PaymentRequestBasket'] = PaymentRequestBasket +globals()['PaymentRequestCaptureMethod'] = PaymentRequestCaptureMethod +globals()['PaymentRequestCardVerificationResults'] = PaymentRequestCardVerificationResults +globals()['PaymentRequestCountry'] = PaymentRequestCountry +globals()['PaymentRequestCurrency'] = PaymentRequestCurrency +globals()['PaymentRequestInitiator'] = PaymentRequestInitiator +globals()['PaymentRequestShippingInformation'] = PaymentRequestShippingInformation +globals()['PaymentRequestStatus'] = PaymentRequestStatus -def lazy_import(): - from xendit.payment_request.model.payment_method import PaymentMethod - from xendit.payment_request.model.payment_request_action import PaymentRequestAction - from xendit.payment_request.model.payment_request_basket import PaymentRequestBasket - from xendit.payment_request.model.payment_request_capture_method import PaymentRequestCaptureMethod - from xendit.payment_request.model.payment_request_card_verification_results import PaymentRequestCardVerificationResults - from xendit.payment_request.model.payment_request_country import PaymentRequestCountry - from xendit.payment_request.model.payment_request_currency import PaymentRequestCurrency - from xendit.payment_request.model.payment_request_initiator import PaymentRequestInitiator - from xendit.payment_request.model.payment_request_shipping_information import PaymentRequestShippingInformation - from xendit.payment_request.model.payment_request_status import PaymentRequestStatus - globals()['PaymentMethod'] = PaymentMethod - globals()['PaymentRequestAction'] = PaymentRequestAction - globals()['PaymentRequestBasket'] = PaymentRequestBasket - globals()['PaymentRequestCaptureMethod'] = PaymentRequestCaptureMethod - globals()['PaymentRequestCardVerificationResults'] = PaymentRequestCardVerificationResults - globals()['PaymentRequestCountry'] = PaymentRequestCountry - globals()['PaymentRequestCurrency'] = PaymentRequestCurrency - globals()['PaymentRequestInitiator'] = PaymentRequestInitiator - globals()['PaymentRequestShippingInformation'] = PaymentRequestShippingInformation - globals()['PaymentRequestStatus'] = PaymentRequestStatus +def lazy_import(): + pass class PaymentRequest(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. @@ -108,21 +110,21 @@ def openapi_types(): 'currency': (PaymentRequestCurrency,), # noqa: E501 'payment_method': (PaymentMethod,), # noqa: E501 'status': (PaymentRequestStatus,), # noqa: E501 - 'customer_id': (str, none_type,), # noqa: E501 - 'customer': ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type,), # noqa: E501 - 'amount': (float,), # noqa: E501 - 'min_amount': (float, none_type,), # noqa: E501 - 'max_amount': (float, none_type,), # noqa: E501 - 'country': (PaymentRequestCountry,), # noqa: E501 - 'description': (str, none_type,), # noqa: E501 - 'failure_code': (str, none_type,), # noqa: E501 - 'capture_method': (PaymentRequestCaptureMethod,), # noqa: E501 - 'initiator': (PaymentRequestInitiator,), # noqa: E501 - 'card_verification_results': (PaymentRequestCardVerificationResults,), # noqa: E501 - 'actions': ([PaymentRequestAction],), # noqa: E501 - 'metadata': ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type,), # noqa: E501 - 'shipping_information': (PaymentRequestShippingInformation,), # noqa: E501 - 'items': (PaymentRequestBasket,), # noqa: E501 + 'customer_id': (str, none_type, none_type), # noqa: E501 + 'customer': ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type, none_type), # noqa: E501 + 'amount': (float, none_type), # noqa: E501 + 'min_amount': (float, none_type, none_type), # noqa: E501 + 'max_amount': (float, none_type, none_type), # noqa: E501 + 'country': (PaymentRequestCountry, none_type), # noqa: E501 + 'description': (str, none_type, none_type), # noqa: E501 + 'failure_code': (str, none_type, none_type), # noqa: E501 + 'capture_method': (PaymentRequestCaptureMethod, none_type), # noqa: E501 + 'initiator': (PaymentRequestInitiator, none_type), # noqa: E501 + 'card_verification_results': (PaymentRequestCardVerificationResults, none_type), # noqa: E501 + 'actions': ([PaymentRequestAction], none_type), # noqa: E501 + 'metadata': ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type, none_type), # noqa: E501 + 'shipping_information': (PaymentRequestShippingInformation, none_type), # noqa: E501 + 'items': (PaymentRequestBasket, none_type), # noqa: E501 } @cached_property @@ -283,7 +285,32 @@ def _from_openapi_data(cls, id, created, updated, reference_id, business_id, cur ]) @convert_js_args_to_python_args - def __init__(self, id, created, updated, reference_id, business_id, currency, payment_method, status, *args, **kwargs): # noqa: E501 + def __init__(self, + id: str, + created: str, + updated: str, + reference_id: str, + business_id: str, + currency: PaymentRequestCurrency, + payment_method: PaymentMethod, + status: PaymentRequestStatus, + customer_id: str | None = None, + customer: dict | None = None, + amount: float | None = None, + min_amount: float | None = None, + max_amount: float | None = None, + country: PaymentRequestCountry | None = None, + description: str | None = None, + failure_code: str | None = None, + capture_method: PaymentRequestCaptureMethod | None = None, + initiator: PaymentRequestInitiator | None = None, + card_verification_results: PaymentRequestCardVerificationResults | None = None, + actions: list | None = None, + metadata: dict | None = None, + shipping_information: PaymentRequestShippingInformation | None = None, + items: PaymentRequestBasket | None = None, + *args, **kwargs + ): # noqa: E501 """PaymentRequest - a model defined in OpenAPI Args: @@ -296,6 +323,7 @@ def __init__(self, id, created, updated, reference_id, business_id, currency, pa payment_method (PaymentMethod): status (PaymentRequestStatus): + Keyword Args: _check_type (bool): if True, values for parameters in openapi_types will be type checked and a TypeError will be @@ -381,6 +409,36 @@ def __init__(self, id, created, updated, reference_id, business_id, currency, pa self.currency = currency self.payment_method = payment_method self.status = status + if customer_id is not None: + self.customer_id = customer_id + if customer is not None: + self.customer = customer + if amount is not None: + self.amount = amount + if min_amount is not None: + self.min_amount = min_amount + if max_amount is not None: + self.max_amount = max_amount + if country is not None: + self.country = country + if description is not None: + self.description = description + if failure_code is not None: + self.failure_code = failure_code + if capture_method is not None: + self.capture_method = capture_method + if initiator is not None: + self.initiator = initiator + if card_verification_results is not None: + self.card_verification_results = card_verification_results + if actions is not None: + self.actions = actions + if metadata is not None: + self.metadata = metadata + if shipping_information is not None: + self.shipping_information = shipping_information + if items is not None: + self.items = items for var_name, var_value in kwargs.items(): if var_name not in self.attribute_map and \ self._configuration is not None and \ diff --git a/xendit/payment_request/model/payment_request_action.py b/xendit/payment_request/model/payment_request_action.py index 6e6d33d7..cdeac356 100644 --- a/xendit/payment_request/model/payment_request_action.py +++ b/xendit/payment_request/model/payment_request_action.py @@ -5,6 +5,7 @@ import re # noqa: F401 import sys # noqa: F401 +from typing import List # noqa: F401 from xendit.model_utils import ( # noqa: F401 ApiTypeError, @@ -25,6 +26,9 @@ +def lazy_import(): + pass + class PaymentRequestAction(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -215,7 +219,14 @@ def _from_openapi_data(cls, action, url_type, method, url, qr_code, *args, **kwa ]) @convert_js_args_to_python_args - def __init__(self, action, url_type, method, url, qr_code, *args, **kwargs): # noqa: E501 + def __init__(self, + action: str, + url_type: str, + method: str, + url: str, + qr_code: str, + *args, **kwargs + ): # noqa: E501 """PaymentRequestAction - a model defined in OpenAPI Args: @@ -225,6 +236,7 @@ def __init__(self, action, url_type, method, url, qr_code, *args, **kwargs): # url (str, none_type): qr_code (str, none_type): + Keyword Args: _check_type (bool): if True, values for parameters in openapi_types will be type checked and a TypeError will be diff --git a/xendit/payment_request/model/payment_request_auth_parameters.py b/xendit/payment_request/model/payment_request_auth_parameters.py index 39b08788..11a34994 100644 --- a/xendit/payment_request/model/payment_request_auth_parameters.py +++ b/xendit/payment_request/model/payment_request_auth_parameters.py @@ -5,6 +5,7 @@ import re # noqa: F401 import sys # noqa: F401 +from typing import List # noqa: F401 from xendit.model_utils import ( # noqa: F401 ApiTypeError, @@ -25,6 +26,9 @@ +def lazy_import(): + pass + class PaymentRequestAuthParameters(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -186,12 +190,16 @@ def _from_openapi_data(cls, auth_code, *args, **kwargs): # noqa: E501 ]) @convert_js_args_to_python_args - def __init__(self, auth_code, *args, **kwargs): # noqa: E501 + def __init__(self, + auth_code: str, + *args, **kwargs + ): # noqa: E501 """PaymentRequestAuthParameters - a model defined in OpenAPI Args: auth_code (str): + Keyword Args: _check_type (bool): if True, values for parameters in openapi_types will be type checked and a TypeError will be diff --git a/xendit/payment_request/model/payment_request_basket.py b/xendit/payment_request/model/payment_request_basket.py index 733b2ca3..6a663db8 100644 --- a/xendit/payment_request/model/payment_request_basket.py +++ b/xendit/payment_request/model/payment_request_basket.py @@ -5,6 +5,7 @@ import re # noqa: F401 import sys # noqa: F401 +from typing import List # noqa: F401 from xendit.model_utils import ( # noqa: F401 ApiTypeError, @@ -23,11 +24,12 @@ ) from xendit.exceptions import ApiAttributeError +from xendit.payment_request.model.payment_request_basket_item import PaymentRequestBasketItem +globals()['PaymentRequestBasketItem'] = PaymentRequestBasketItem -def lazy_import(): - from xendit.payment_request.model.payment_request_basket_item import PaymentRequestBasketItem - globals()['PaymentRequestBasketItem'] = PaymentRequestBasketItem +def lazy_import(): + pass class PaymentRequestBasket(ModelSimple): """NOTE: This class is auto generated by OpenAPI Generator. diff --git a/xendit/payment_request/model/payment_request_basket_item.py b/xendit/payment_request/model/payment_request_basket_item.py index 6cb3c5e1..ee3abb5b 100644 --- a/xendit/payment_request/model/payment_request_basket_item.py +++ b/xendit/payment_request/model/payment_request_basket_item.py @@ -5,6 +5,7 @@ import re # noqa: F401 import sys # noqa: F401 +from typing import List # noqa: F401 from xendit.model_utils import ( # noqa: F401 ApiTypeError, @@ -25,6 +26,9 @@ +def lazy_import(): + pass + class PaymentRequestBasketItem(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -81,14 +85,14 @@ def openapi_types(): 'currency': (str,), # noqa: E501 'quantity': (float,), # noqa: E501 'price': (float,), # noqa: E501 - 'reference_id': (str,), # noqa: E501 - 'description': (str,), # noqa: E501 - 'type': (str,), # noqa: E501 - 'sub_category': (str,), # noqa: E501 - 'payer_charged_currency': (str,), # noqa: E501 - 'payer_charged_price': (float,), # noqa: E501 - 'url': (str,), # noqa: E501 - 'metadata': ({str: (bool, date, datetime, dict, float, int, list, str, none_type)},), # noqa: E501 + 'reference_id': (str, none_type), # noqa: E501 + 'description': (str, none_type), # noqa: E501 + 'type': (str, none_type), # noqa: E501 + 'sub_category': (str, none_type), # noqa: E501 + 'payer_charged_currency': (str, none_type), # noqa: E501 + 'payer_charged_price': (float, none_type), # noqa: E501 + 'url': (str, none_type), # noqa: E501 + 'metadata': ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type), # noqa: E501 } @cached_property @@ -226,7 +230,22 @@ def _from_openapi_data(cls, name, category, currency, quantity, price, *args, ** ]) @convert_js_args_to_python_args - def __init__(self, name, category, currency, quantity, price, *args, **kwargs): # noqa: E501 + def __init__(self, + name: str, + category: str, + currency: str, + quantity: float, + price: float, + reference_id: str | None = None, + description: str | None = None, + type: str | None = None, + sub_category: str | None = None, + payer_charged_currency: str | None = None, + payer_charged_price: float | None = None, + url: str | None = None, + metadata: dict | None = None, + *args, **kwargs + ): # noqa: E501 """PaymentRequestBasketItem - a model defined in OpenAPI Args: @@ -236,6 +255,7 @@ def __init__(self, name, category, currency, quantity, price, *args, **kwargs): quantity (float): price (float): + Keyword Args: _check_type (bool): if True, values for parameters in openapi_types will be type checked and a TypeError will be @@ -311,6 +331,22 @@ def __init__(self, name, category, currency, quantity, price, *args, **kwargs): self.currency = currency self.quantity = quantity self.price = price + if reference_id is not None: + self.reference_id = reference_id + if description is not None: + self.description = description + if type is not None: + self.type = type + if sub_category is not None: + self.sub_category = sub_category + if payer_charged_currency is not None: + self.payer_charged_currency = payer_charged_currency + if payer_charged_price is not None: + self.payer_charged_price = payer_charged_price + if url is not None: + self.url = url + if metadata is not None: + self.metadata = metadata for var_name, var_value in kwargs.items(): if var_name not in self.attribute_map and \ self._configuration is not None and \ diff --git a/xendit/payment_request/model/payment_request_capture_method.py b/xendit/payment_request/model/payment_request_capture_method.py index 1f8f935e..202d13f2 100644 --- a/xendit/payment_request/model/payment_request_capture_method.py +++ b/xendit/payment_request/model/payment_request_capture_method.py @@ -5,6 +5,7 @@ import re # noqa: F401 import sys # noqa: F401 +from typing import List # noqa: F401 from xendit.model_utils import ( # noqa: F401 ApiTypeError, @@ -25,6 +26,9 @@ +def lazy_import(): + pass + class PaymentRequestCaptureMethod(ModelSimple): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech diff --git a/xendit/payment_request/model/payment_request_card_verification_results.py b/xendit/payment_request/model/payment_request_card_verification_results.py index afafa729..e460ee67 100644 --- a/xendit/payment_request/model/payment_request_card_verification_results.py +++ b/xendit/payment_request/model/payment_request_card_verification_results.py @@ -5,6 +5,7 @@ import re # noqa: F401 import sys # noqa: F401 +from typing import List # noqa: F401 from xendit.model_utils import ( # noqa: F401 ApiTypeError, @@ -23,11 +24,12 @@ ) from xendit.exceptions import ApiAttributeError +from xendit.payment_request.model.payment_request_card_verification_results_three_dee_secure import PaymentRequestCardVerificationResultsThreeDeeSecure +globals()['PaymentRequestCardVerificationResultsThreeDeeSecure'] = PaymentRequestCardVerificationResultsThreeDeeSecure -def lazy_import(): - from xendit.payment_request.model.payment_request_card_verification_results_three_dee_secure import PaymentRequestCardVerificationResultsThreeDeeSecure - globals()['PaymentRequestCardVerificationResultsThreeDeeSecure'] = PaymentRequestCardVerificationResultsThreeDeeSecure +def lazy_import(): + pass class PaymentRequestCardVerificationResults(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. @@ -83,8 +85,8 @@ def openapi_types(): lazy_import() return { 'three_d_secure': (PaymentRequestCardVerificationResultsThreeDeeSecure,), # noqa: E501 - 'cvv_result': (str, none_type,), # noqa: E501 - 'address_verification_result': (str, none_type,), # noqa: E501 + 'cvv_result': (str, none_type, none_type), # noqa: E501 + 'address_verification_result': (str, none_type, none_type), # noqa: E501 } @cached_property @@ -198,12 +200,18 @@ def _from_openapi_data(cls, three_d_secure, *args, **kwargs): # noqa: E501 ]) @convert_js_args_to_python_args - def __init__(self, three_d_secure, *args, **kwargs): # noqa: E501 + def __init__(self, + three_d_secure: PaymentRequestCardVerificationResultsThreeDeeSecure, + cvv_result: str | None = None, + address_verification_result: str | None = None, + *args, **kwargs + ): # noqa: E501 """PaymentRequestCardVerificationResults - a model defined in OpenAPI Args: three_d_secure (PaymentRequestCardVerificationResultsThreeDeeSecure): + Keyword Args: _check_type (bool): if True, values for parameters in openapi_types will be type checked and a TypeError will be @@ -269,6 +277,10 @@ def __init__(self, three_d_secure, *args, **kwargs): # noqa: E501 self._visited_composed_classes = _visited_composed_classes + (self.__class__,) self.three_d_secure = three_d_secure + if cvv_result is not None: + self.cvv_result = cvv_result + if address_verification_result is not None: + self.address_verification_result = address_verification_result for var_name, var_value in kwargs.items(): if var_name not in self.attribute_map and \ self._configuration is not None and \ diff --git a/xendit/payment_request/model/payment_request_card_verification_results_three_dee_secure.py b/xendit/payment_request/model/payment_request_card_verification_results_three_dee_secure.py index ac6c85af..89ce927a 100644 --- a/xendit/payment_request/model/payment_request_card_verification_results_three_dee_secure.py +++ b/xendit/payment_request/model/payment_request_card_verification_results_three_dee_secure.py @@ -5,6 +5,7 @@ import re # noqa: F401 import sys # noqa: F401 +from typing import List # noqa: F401 from xendit.model_utils import ( # noqa: F401 ApiTypeError, @@ -25,6 +26,9 @@ +def lazy_import(): + pass + class PaymentRequestCardVerificationResultsThreeDeeSecure(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -76,11 +80,11 @@ def openapi_types(): and the value is attribute type. """ return { - 'three_d_secure_flow': (str,), # noqa: E501 - 'eci_code': (str,), # noqa: E501 - 'three_d_secure_result': (str,), # noqa: E501 - 'three_d_secure_result_reason': (str, none_type,), # noqa: E501 - 'three_d_secure_version': (str,), # noqa: E501 + 'three_d_secure_flow': (str, none_type), # noqa: E501 + 'eci_code': (str, none_type), # noqa: E501 + 'three_d_secure_result': (str, none_type), # noqa: E501 + 'three_d_secure_result_reason': (str, none_type, none_type), # noqa: E501 + 'three_d_secure_version': (str, none_type), # noqa: E501 } @cached_property @@ -195,9 +199,17 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 ]) @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 + def __init__(self, + three_d_secure_flow: str | None = None, + eci_code: str | None = None, + three_d_secure_result: str | None = None, + three_d_secure_result_reason: str | None = None, + three_d_secure_version: str | None = None, + *args, **kwargs + ): # noqa: E501 """PaymentRequestCardVerificationResultsThreeDeeSecure - a model defined in OpenAPI + Keyword Args: _check_type (bool): if True, values for parameters in openapi_types will be type checked and a TypeError will be @@ -265,6 +277,16 @@ def __init__(self, *args, **kwargs): # noqa: E501 self._configuration = _configuration self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + if three_d_secure_flow is not None: + self.three_d_secure_flow = three_d_secure_flow + if eci_code is not None: + self.eci_code = eci_code + if three_d_secure_result is not None: + self.three_d_secure_result = three_d_secure_result + if three_d_secure_result_reason is not None: + self.three_d_secure_result_reason = three_d_secure_result_reason + if three_d_secure_version is not None: + self.three_d_secure_version = three_d_secure_version for var_name, var_value in kwargs.items(): if var_name not in self.attribute_map and \ self._configuration is not None and \ diff --git a/xendit/payment_request/model/payment_request_channel_properties.py b/xendit/payment_request/model/payment_request_channel_properties.py index f4cd5b65..2d1af100 100644 --- a/xendit/payment_request/model/payment_request_channel_properties.py +++ b/xendit/payment_request/model/payment_request_channel_properties.py @@ -5,6 +5,7 @@ import re # noqa: F401 import sys # noqa: F401 +from typing import List # noqa: F401 from xendit.model_utils import ( # noqa: F401 ApiTypeError, @@ -25,6 +26,9 @@ +def lazy_import(): + pass + class PaymentRequestChannelProperties(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -91,13 +95,13 @@ def openapi_types(): and the value is attribute type. """ return { - 'success_return_url': (str,), # noqa: E501 - 'failure_return_url': (str,), # noqa: E501 - 'cancel_return_url': (str,), # noqa: E501 - 'redeem_points': (str,), # noqa: E501 - 'require_auth': (bool,), # noqa: E501 - 'merchant_id_tag': (str,), # noqa: E501 - 'cardonfile_type': (str, none_type,), # noqa: E501 + 'success_return_url': (str, none_type), # noqa: E501 + 'failure_return_url': (str, none_type), # noqa: E501 + 'cancel_return_url': (str, none_type), # noqa: E501 + 'redeem_points': (str, none_type), # noqa: E501 + 'require_auth': (bool, none_type), # noqa: E501 + 'merchant_id_tag': (str, none_type), # noqa: E501 + 'cardonfile_type': (str, none_type, none_type), # noqa: E501 } @cached_property @@ -216,9 +220,19 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 ]) @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 + def __init__(self, + success_return_url: str | None = None, + failure_return_url: str | None = None, + cancel_return_url: str | None = None, + redeem_points: str | None = None, + require_auth: bool | None = None, + merchant_id_tag: str | None = None, + cardonfile_type: str | None = None, + *args, **kwargs + ): # noqa: E501 """PaymentRequestChannelProperties - a model defined in OpenAPI + Keyword Args: _check_type (bool): if True, values for parameters in openapi_types will be type checked and a TypeError will be @@ -288,6 +302,20 @@ def __init__(self, *args, **kwargs): # noqa: E501 self._configuration = _configuration self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + if success_return_url is not None: + self.success_return_url = success_return_url + if failure_return_url is not None: + self.failure_return_url = failure_return_url + if cancel_return_url is not None: + self.cancel_return_url = cancel_return_url + if redeem_points is not None: + self.redeem_points = redeem_points + if require_auth is not None: + self.require_auth = require_auth + if merchant_id_tag is not None: + self.merchant_id_tag = merchant_id_tag + if cardonfile_type is not None: + self.cardonfile_type = cardonfile_type for var_name, var_value in kwargs.items(): if var_name not in self.attribute_map and \ self._configuration is not None and \ diff --git a/xendit/payment_request/model/payment_request_country.py b/xendit/payment_request/model/payment_request_country.py index 992c9249..0d4dbf20 100644 --- a/xendit/payment_request/model/payment_request_country.py +++ b/xendit/payment_request/model/payment_request_country.py @@ -5,6 +5,7 @@ import re # noqa: F401 import sys # noqa: F401 +from typing import List # noqa: F401 from xendit.model_utils import ( # noqa: F401 ApiTypeError, @@ -25,6 +26,9 @@ +def lazy_import(): + pass + class PaymentRequestCountry(ModelSimple): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech diff --git a/xendit/payment_request/model/payment_request_currency.py b/xendit/payment_request/model/payment_request_currency.py index 6be65349..ec5a9727 100644 --- a/xendit/payment_request/model/payment_request_currency.py +++ b/xendit/payment_request/model/payment_request_currency.py @@ -5,6 +5,7 @@ import re # noqa: F401 import sys # noqa: F401 +from typing import List # noqa: F401 from xendit.model_utils import ( # noqa: F401 ApiTypeError, @@ -25,6 +26,9 @@ +def lazy_import(): + pass + class PaymentRequestCurrency(ModelSimple): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech diff --git a/xendit/payment_request/model/payment_request_initiator.py b/xendit/payment_request/model/payment_request_initiator.py index f6ea9929..d2f6daf7 100644 --- a/xendit/payment_request/model/payment_request_initiator.py +++ b/xendit/payment_request/model/payment_request_initiator.py @@ -5,6 +5,7 @@ import re # noqa: F401 import sys # noqa: F401 +from typing import List # noqa: F401 from xendit.model_utils import ( # noqa: F401 ApiTypeError, @@ -25,6 +26,9 @@ +def lazy_import(): + pass + class PaymentRequestInitiator(ModelSimple): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech diff --git a/xendit/payment_request/model/payment_request_list_response.py b/xendit/payment_request/model/payment_request_list_response.py index 80a94ed0..9480dd12 100644 --- a/xendit/payment_request/model/payment_request_list_response.py +++ b/xendit/payment_request/model/payment_request_list_response.py @@ -5,6 +5,7 @@ import re # noqa: F401 import sys # noqa: F401 +from typing import List # noqa: F401 from xendit.model_utils import ( # noqa: F401 ApiTypeError, @@ -23,11 +24,12 @@ ) from xendit.exceptions import ApiAttributeError +from xendit.payment_request.model.payment_request import PaymentRequest +globals()['PaymentRequest'] = PaymentRequest -def lazy_import(): - from xendit.payment_request.model.payment_request import PaymentRequest - globals()['PaymentRequest'] = PaymentRequest +def lazy_import(): + pass class PaymentRequestListResponse(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. @@ -196,13 +198,18 @@ def _from_openapi_data(cls, data, has_more, *args, **kwargs): # noqa: E501 ]) @convert_js_args_to_python_args - def __init__(self, data, has_more, *args, **kwargs): # noqa: E501 + def __init__(self, + data: list, + has_more: bool, + *args, **kwargs + ): # noqa: E501 """PaymentRequestListResponse - a model defined in OpenAPI Args: data ([PaymentRequest]): has_more (bool): + Keyword Args: _check_type (bool): if True, values for parameters in openapi_types will be type checked and a TypeError will be diff --git a/xendit/payment_request/model/payment_request_parameters.py b/xendit/payment_request/model/payment_request_parameters.py index 4a5b88d4..6afcdb07 100644 --- a/xendit/payment_request/model/payment_request_parameters.py +++ b/xendit/payment_request/model/payment_request_parameters.py @@ -5,6 +5,7 @@ import re # noqa: F401 import sys # noqa: F401 +from typing import List # noqa: F401 from xendit.model_utils import ( # noqa: F401 ApiTypeError, @@ -23,23 +24,24 @@ ) from xendit.exceptions import ApiAttributeError +from xendit.payment_request.model.payment_method_parameters import PaymentMethodParameters +from xendit.payment_request.model.payment_request_basket import PaymentRequestBasket +from xendit.payment_request.model.payment_request_capture_method import PaymentRequestCaptureMethod +from xendit.payment_request.model.payment_request_currency import PaymentRequestCurrency +from xendit.payment_request.model.payment_request_initiator import PaymentRequestInitiator +from xendit.payment_request.model.payment_request_parameters_channel_properties import PaymentRequestParametersChannelProperties +from xendit.payment_request.model.payment_request_shipping_information import PaymentRequestShippingInformation +globals()['PaymentMethodParameters'] = PaymentMethodParameters +globals()['PaymentRequestBasket'] = PaymentRequestBasket +globals()['PaymentRequestCaptureMethod'] = PaymentRequestCaptureMethod +globals()['PaymentRequestCurrency'] = PaymentRequestCurrency +globals()['PaymentRequestInitiator'] = PaymentRequestInitiator +globals()['PaymentRequestParametersChannelProperties'] = PaymentRequestParametersChannelProperties +globals()['PaymentRequestShippingInformation'] = PaymentRequestShippingInformation -def lazy_import(): - from xendit.payment_request.model.payment_method_parameters import PaymentMethodParameters - from xendit.payment_request.model.payment_request_basket import PaymentRequestBasket - from xendit.payment_request.model.payment_request_capture_method import PaymentRequestCaptureMethod - from xendit.payment_request.model.payment_request_currency import PaymentRequestCurrency - from xendit.payment_request.model.payment_request_initiator import PaymentRequestInitiator - from xendit.payment_request.model.payment_request_parameters_channel_properties import PaymentRequestParametersChannelProperties - from xendit.payment_request.model.payment_request_shipping_information import PaymentRequestShippingInformation - globals()['PaymentMethodParameters'] = PaymentMethodParameters - globals()['PaymentRequestBasket'] = PaymentRequestBasket - globals()['PaymentRequestCaptureMethod'] = PaymentRequestCaptureMethod - globals()['PaymentRequestCurrency'] = PaymentRequestCurrency - globals()['PaymentRequestInitiator'] = PaymentRequestInitiator - globals()['PaymentRequestParametersChannelProperties'] = PaymentRequestParametersChannelProperties - globals()['PaymentRequestShippingInformation'] = PaymentRequestShippingInformation +def lazy_import(): + pass class PaymentRequestParameters(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. @@ -95,19 +97,19 @@ def openapi_types(): lazy_import() return { 'currency': (PaymentRequestCurrency,), # noqa: E501 - 'reference_id': (str,), # noqa: E501 - 'amount': (float,), # noqa: E501 - 'payment_method': (PaymentMethodParameters,), # noqa: E501 - 'description': (str, none_type,), # noqa: E501 - 'capture_method': (PaymentRequestCaptureMethod,), # noqa: E501 - 'initiator': (PaymentRequestInitiator,), # noqa: E501 - 'payment_method_id': (str,), # noqa: E501 - 'channel_properties': (PaymentRequestParametersChannelProperties,), # noqa: E501 - 'shipping_information': (PaymentRequestShippingInformation,), # noqa: E501 - 'items': (PaymentRequestBasket,), # noqa: E501 - 'customer_id': (str, none_type,), # noqa: E501 - 'customer': ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type,), # noqa: E501 - 'metadata': ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type,), # noqa: E501 + 'reference_id': (str, none_type), # noqa: E501 + 'amount': (float, none_type), # noqa: E501 + 'payment_method': (PaymentMethodParameters, none_type), # noqa: E501 + 'description': (str, none_type, none_type), # noqa: E501 + 'capture_method': (PaymentRequestCaptureMethod, none_type), # noqa: E501 + 'initiator': (PaymentRequestInitiator, none_type), # noqa: E501 + 'payment_method_id': (str, none_type), # noqa: E501 + 'channel_properties': (PaymentRequestParametersChannelProperties, none_type), # noqa: E501 + 'shipping_information': (PaymentRequestShippingInformation, none_type), # noqa: E501 + 'items': (PaymentRequestBasket, none_type), # noqa: E501 + 'customer_id': (str, none_type, none_type), # noqa: E501 + 'customer': ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type, none_type), # noqa: E501 + 'metadata': ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type, none_type), # noqa: E501 } @cached_property @@ -243,12 +245,29 @@ def _from_openapi_data(cls, currency, *args, **kwargs): # noqa: E501 ]) @convert_js_args_to_python_args - def __init__(self, currency, *args, **kwargs): # noqa: E501 + def __init__(self, + currency: PaymentRequestCurrency, + reference_id: str | None = None, + amount: float | None = None, + payment_method: PaymentMethodParameters | None = None, + description: str | None = None, + capture_method: PaymentRequestCaptureMethod | None = None, + initiator: PaymentRequestInitiator | None = None, + payment_method_id: str | None = None, + channel_properties: PaymentRequestParametersChannelProperties | None = None, + shipping_information: PaymentRequestShippingInformation | None = None, + items: PaymentRequestBasket | None = None, + customer_id: str | None = None, + customer: dict | None = None, + metadata: dict | None = None, + *args, **kwargs + ): # noqa: E501 """PaymentRequestParameters - a model defined in OpenAPI Args: currency (PaymentRequestCurrency): + Keyword Args: _check_type (bool): if True, values for parameters in openapi_types will be type checked and a TypeError will be @@ -325,6 +344,32 @@ def __init__(self, currency, *args, **kwargs): # noqa: E501 self._visited_composed_classes = _visited_composed_classes + (self.__class__,) self.currency = currency + if reference_id is not None: + self.reference_id = reference_id + if amount is not None: + self.amount = amount + if payment_method is not None: + self.payment_method = payment_method + if description is not None: + self.description = description + if capture_method is not None: + self.capture_method = capture_method + if initiator is not None: + self.initiator = initiator + if payment_method_id is not None: + self.payment_method_id = payment_method_id + if channel_properties is not None: + self.channel_properties = channel_properties + if shipping_information is not None: + self.shipping_information = shipping_information + if items is not None: + self.items = items + if customer_id is not None: + self.customer_id = customer_id + if customer is not None: + self.customer = customer + if metadata is not None: + self.metadata = metadata for var_name, var_value in kwargs.items(): if var_name not in self.attribute_map and \ self._configuration is not None and \ diff --git a/xendit/payment_request/model/payment_request_parameters_channel_properties.py b/xendit/payment_request/model/payment_request_parameters_channel_properties.py index abcfea63..5930b7ec 100644 --- a/xendit/payment_request/model/payment_request_parameters_channel_properties.py +++ b/xendit/payment_request/model/payment_request_parameters_channel_properties.py @@ -5,6 +5,7 @@ import re # noqa: F401 import sys # noqa: F401 +from typing import List # noqa: F401 from xendit.model_utils import ( # noqa: F401 ApiTypeError, @@ -23,13 +24,14 @@ ) from xendit.exceptions import ApiAttributeError +from xendit.payment_request.model.payment_request_channel_properties import PaymentRequestChannelProperties +from xendit.payment_request.model.payment_request_parameters_channel_properties_all_of import PaymentRequestParametersChannelPropertiesAllOf +globals()['PaymentRequestChannelProperties'] = PaymentRequestChannelProperties +globals()['PaymentRequestParametersChannelPropertiesAllOf'] = PaymentRequestParametersChannelPropertiesAllOf -def lazy_import(): - from xendit.payment_request.model.payment_request_channel_properties import PaymentRequestChannelProperties - from xendit.payment_request.model.payment_request_parameters_channel_properties_all_of import PaymentRequestParametersChannelPropertiesAllOf - globals()['PaymentRequestChannelProperties'] = PaymentRequestChannelProperties - globals()['PaymentRequestParametersChannelPropertiesAllOf'] = PaymentRequestParametersChannelPropertiesAllOf +def lazy_import(): + pass class PaymentRequestParametersChannelProperties(ModelComposed): """NOTE: This class is auto generated by OpenAPI Generator. @@ -99,14 +101,14 @@ def openapi_types(): """ lazy_import() return { - 'success_return_url': (str,), # noqa: E501 - 'failure_return_url': (str,), # noqa: E501 - 'cancel_return_url': (str,), # noqa: E501 - 'redeem_points': (str,), # noqa: E501 - 'require_auth': (bool,), # noqa: E501 - 'merchant_id_tag': (str,), # noqa: E501 - 'cardonfile_type': (str, none_type,), # noqa: E501 - 'cvv': (str,), # noqa: E501 + 'success_return_url': (str, none_type), # noqa: E501 + 'failure_return_url': (str, none_type), # noqa: E501 + 'cancel_return_url': (str, none_type), # noqa: E501 + 'redeem_points': (str, none_type), # noqa: E501 + 'require_auth': (bool, none_type), # noqa: E501 + 'merchant_id_tag': (str, none_type), # noqa: E501 + 'cardonfile_type': (str, none_type, none_type), # noqa: E501 + 'cvv': (str, none_type), # noqa: E501 } @cached_property diff --git a/xendit/payment_request/model/payment_request_parameters_channel_properties_all_of.py b/xendit/payment_request/model/payment_request_parameters_channel_properties_all_of.py index 3066cbe1..d0dfe67f 100644 --- a/xendit/payment_request/model/payment_request_parameters_channel_properties_all_of.py +++ b/xendit/payment_request/model/payment_request_parameters_channel_properties_all_of.py @@ -5,6 +5,7 @@ import re # noqa: F401 import sys # noqa: F401 +from typing import List # noqa: F401 from xendit.model_utils import ( # noqa: F401 ApiTypeError, @@ -25,6 +26,9 @@ +def lazy_import(): + pass + class PaymentRequestParametersChannelPropertiesAllOf(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -76,7 +80,7 @@ def openapi_types(): and the value is attribute type. """ return { - 'cvv': (str,), # noqa: E501 + 'cvv': (str, none_type), # noqa: E501 } @cached_property @@ -183,9 +187,13 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 ]) @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 + def __init__(self, + cvv: str | None = None, + *args, **kwargs + ): # noqa: E501 """PaymentRequestParametersChannelPropertiesAllOf - a model defined in OpenAPI + Keyword Args: _check_type (bool): if True, values for parameters in openapi_types will be type checked and a TypeError will be @@ -249,6 +257,8 @@ def __init__(self, *args, **kwargs): # noqa: E501 self._configuration = _configuration self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + if cvv is not None: + self.cvv = cvv for var_name, var_value in kwargs.items(): if var_name not in self.attribute_map and \ self._configuration is not None and \ diff --git a/xendit/payment_request/model/payment_request_shipping_information.py b/xendit/payment_request/model/payment_request_shipping_information.py index 06016f64..b0535f5f 100644 --- a/xendit/payment_request/model/payment_request_shipping_information.py +++ b/xendit/payment_request/model/payment_request_shipping_information.py @@ -5,6 +5,7 @@ import re # noqa: F401 import sys # noqa: F401 +from typing import List # noqa: F401 from xendit.model_utils import ( # noqa: F401 ApiTypeError, @@ -25,6 +26,9 @@ +def lazy_import(): + pass + class PaymentRequestShippingInformation(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -77,11 +81,11 @@ def openapi_types(): """ return { 'country': (str,), # noqa: E501 - 'street_line1': (str,), # noqa: E501 - 'street_line2': (str,), # noqa: E501 - 'city': (str,), # noqa: E501 - 'province_state': (str,), # noqa: E501 - 'postal_code': (str,), # noqa: E501 + 'street_line1': (str, none_type), # noqa: E501 + 'street_line2': (str, none_type), # noqa: E501 + 'city': (str, none_type), # noqa: E501 + 'province_state': (str, none_type), # noqa: E501 + 'postal_code': (str, none_type), # noqa: E501 } @cached_property @@ -201,12 +205,21 @@ def _from_openapi_data(cls, country, *args, **kwargs): # noqa: E501 ]) @convert_js_args_to_python_args - def __init__(self, country, *args, **kwargs): # noqa: E501 + def __init__(self, + country: str, + street_line1: str | None = None, + street_line2: str | None = None, + city: str | None = None, + province_state: str | None = None, + postal_code: str | None = None, + *args, **kwargs + ): # noqa: E501 """PaymentRequestShippingInformation - a model defined in OpenAPI Args: country (str): + Keyword Args: _check_type (bool): if True, values for parameters in openapi_types will be type checked and a TypeError will be @@ -275,6 +288,16 @@ def __init__(self, country, *args, **kwargs): # noqa: E501 self._visited_composed_classes = _visited_composed_classes + (self.__class__,) self.country = country + if street_line1 is not None: + self.street_line1 = street_line1 + if street_line2 is not None: + self.street_line2 = street_line2 + if city is not None: + self.city = city + if province_state is not None: + self.province_state = province_state + if postal_code is not None: + self.postal_code = postal_code for var_name, var_value in kwargs.items(): if var_name not in self.attribute_map and \ self._configuration is not None and \ diff --git a/xendit/payment_request/model/payment_request_status.py b/xendit/payment_request/model/payment_request_status.py index 19d8a8ab..c2ff324c 100644 --- a/xendit/payment_request/model/payment_request_status.py +++ b/xendit/payment_request/model/payment_request_status.py @@ -5,6 +5,7 @@ import re # noqa: F401 import sys # noqa: F401 +from typing import List # noqa: F401 from xendit.model_utils import ( # noqa: F401 ApiTypeError, @@ -25,6 +26,9 @@ +def lazy_import(): + pass + class PaymentRequestStatus(ModelSimple): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech diff --git a/xendit/payment_request/model/qr_code.py b/xendit/payment_request/model/qr_code.py index 0bfac9c0..b0480599 100644 --- a/xendit/payment_request/model/qr_code.py +++ b/xendit/payment_request/model/qr_code.py @@ -5,6 +5,7 @@ import re # noqa: F401 import sys # noqa: F401 +from typing import List # noqa: F401 from xendit.model_utils import ( # noqa: F401 ApiTypeError, @@ -23,15 +24,16 @@ ) from xendit.exceptions import ApiAttributeError +from xendit.payment_request.model.qr_code_channel_code import QRCodeChannelCode +from xendit.payment_request.model.qr_code_channel_properties import QRCodeChannelProperties +from xendit.payment_request.model.qr_code_parameters import QRCodeParameters +globals()['QRCodeChannelCode'] = QRCodeChannelCode +globals()['QRCodeChannelProperties'] = QRCodeChannelProperties +globals()['QRCodeParameters'] = QRCodeParameters -def lazy_import(): - from xendit.payment_request.model.qr_code_channel_code import QRCodeChannelCode - from xendit.payment_request.model.qr_code_channel_properties import QRCodeChannelProperties - from xendit.payment_request.model.qr_code_parameters import QRCodeParameters - globals()['QRCodeChannelCode'] = QRCodeChannelCode - globals()['QRCodeChannelProperties'] = QRCodeChannelProperties - globals()['QRCodeParameters'] = QRCodeParameters +def lazy_import(): + pass class QRCode(ModelComposed): """NOTE: This class is auto generated by OpenAPI Generator. @@ -86,8 +88,8 @@ def openapi_types(): """ lazy_import() return { - 'channel_code': (QRCodeChannelCode,), # noqa: E501 - 'channel_properties': (QRCodeChannelProperties,), # noqa: E501 + 'channel_code': (QRCodeChannelCode, none_type), # noqa: E501 + 'channel_properties': (QRCodeChannelProperties, none_type), # noqa: E501 } @cached_property diff --git a/xendit/payment_request/model/qr_code_channel_code.py b/xendit/payment_request/model/qr_code_channel_code.py index 8cd310b6..f4841f5c 100644 --- a/xendit/payment_request/model/qr_code_channel_code.py +++ b/xendit/payment_request/model/qr_code_channel_code.py @@ -5,6 +5,7 @@ import re # noqa: F401 import sys # noqa: F401 +from typing import List # noqa: F401 from xendit.model_utils import ( # noqa: F401 ApiTypeError, @@ -25,6 +26,9 @@ +def lazy_import(): + pass + class QRCodeChannelCode(ModelSimple): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech diff --git a/xendit/payment_request/model/qr_code_channel_properties.py b/xendit/payment_request/model/qr_code_channel_properties.py index 36ed45a3..52735beb 100644 --- a/xendit/payment_request/model/qr_code_channel_properties.py +++ b/xendit/payment_request/model/qr_code_channel_properties.py @@ -5,6 +5,7 @@ import re # noqa: F401 import sys # noqa: F401 +from typing import List # noqa: F401 from xendit.model_utils import ( # noqa: F401 ApiTypeError, @@ -25,6 +26,9 @@ +def lazy_import(): + pass + class QRCodeChannelProperties(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -76,8 +80,8 @@ def openapi_types(): and the value is attribute type. """ return { - 'qr_string': (str,), # noqa: E501 - 'expires_at': (datetime,), # noqa: E501 + 'qr_string': (str, none_type), # noqa: E501 + 'expires_at': (datetime, none_type), # noqa: E501 } @cached_property @@ -186,9 +190,14 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 ]) @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 + def __init__(self, + qr_string: str | None = None, + expires_at: datetime | None = None, + *args, **kwargs + ): # noqa: E501 """QRCodeChannelProperties - a model defined in OpenAPI + Keyword Args: _check_type (bool): if True, values for parameters in openapi_types will be type checked and a TypeError will be @@ -253,6 +262,10 @@ def __init__(self, *args, **kwargs): # noqa: E501 self._configuration = _configuration self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + if qr_string is not None: + self.qr_string = qr_string + if expires_at is not None: + self.expires_at = expires_at for var_name, var_value in kwargs.items(): if var_name not in self.attribute_map and \ self._configuration is not None and \ diff --git a/xendit/payment_request/model/qr_code_parameters.py b/xendit/payment_request/model/qr_code_parameters.py index 611b50a5..5cbb40c6 100644 --- a/xendit/payment_request/model/qr_code_parameters.py +++ b/xendit/payment_request/model/qr_code_parameters.py @@ -5,6 +5,7 @@ import re # noqa: F401 import sys # noqa: F401 +from typing import List # noqa: F401 from xendit.model_utils import ( # noqa: F401 ApiTypeError, @@ -23,13 +24,14 @@ ) from xendit.exceptions import ApiAttributeError +from xendit.payment_request.model.qr_code_channel_code import QRCodeChannelCode +from xendit.payment_request.model.qr_code_channel_properties import QRCodeChannelProperties +globals()['QRCodeChannelCode'] = QRCodeChannelCode +globals()['QRCodeChannelProperties'] = QRCodeChannelProperties -def lazy_import(): - from xendit.payment_request.model.qr_code_channel_code import QRCodeChannelCode - from xendit.payment_request.model.qr_code_channel_properties import QRCodeChannelProperties - globals()['QRCodeChannelCode'] = QRCodeChannelCode - globals()['QRCodeChannelProperties'] = QRCodeChannelProperties +def lazy_import(): + pass class QRCodeParameters(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. @@ -84,8 +86,8 @@ def openapi_types(): """ lazy_import() return { - 'channel_code': (QRCodeChannelCode,), # noqa: E501 - 'channel_properties': (QRCodeChannelProperties,), # noqa: E501 + 'channel_code': (QRCodeChannelCode, none_type), # noqa: E501 + 'channel_properties': (QRCodeChannelProperties, none_type), # noqa: E501 } @cached_property @@ -194,9 +196,14 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 ]) @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 + def __init__(self, + channel_code: QRCodeChannelCode | None = None, + channel_properties: QRCodeChannelProperties | None = None, + *args, **kwargs + ): # noqa: E501 """QRCodeParameters - a model defined in OpenAPI + Keyword Args: _check_type (bool): if True, values for parameters in openapi_types will be type checked and a TypeError will be @@ -261,6 +268,10 @@ def __init__(self, *args, **kwargs): # noqa: E501 self._configuration = _configuration self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + if channel_code is not None: + self.channel_code = channel_code + if channel_properties is not None: + self.channel_properties = channel_properties for var_name, var_value in kwargs.items(): if var_name not in self.attribute_map and \ self._configuration is not None and \ diff --git a/xendit/payment_request/model/virtual_account.py b/xendit/payment_request/model/virtual_account.py index 87394466..fe8a3035 100644 --- a/xendit/payment_request/model/virtual_account.py +++ b/xendit/payment_request/model/virtual_account.py @@ -5,6 +5,7 @@ import re # noqa: F401 import sys # noqa: F401 +from typing import List # noqa: F401 from xendit.model_utils import ( # noqa: F401 ApiTypeError, @@ -23,21 +24,22 @@ ) from xendit.exceptions import ApiAttributeError +from xendit.payment_request.model.payment_request_currency import PaymentRequestCurrency +from xendit.payment_request.model.virtual_account_all_of import VirtualAccountAllOf +from xendit.payment_request.model.virtual_account_alternative_display import VirtualAccountAlternativeDisplay +from xendit.payment_request.model.virtual_account_channel_code import VirtualAccountChannelCode +from xendit.payment_request.model.virtual_account_channel_properties import VirtualAccountChannelProperties +from xendit.payment_request.model.virtual_account_parameters import VirtualAccountParameters +globals()['PaymentRequestCurrency'] = PaymentRequestCurrency +globals()['VirtualAccountAllOf'] = VirtualAccountAllOf +globals()['VirtualAccountAlternativeDisplay'] = VirtualAccountAlternativeDisplay +globals()['VirtualAccountChannelCode'] = VirtualAccountChannelCode +globals()['VirtualAccountChannelProperties'] = VirtualAccountChannelProperties +globals()['VirtualAccountParameters'] = VirtualAccountParameters -def lazy_import(): - from xendit.payment_request.model.payment_request_currency import PaymentRequestCurrency - from xendit.payment_request.model.virtual_account_all_of import VirtualAccountAllOf - from xendit.payment_request.model.virtual_account_alternative_display import VirtualAccountAlternativeDisplay - from xendit.payment_request.model.virtual_account_channel_code import VirtualAccountChannelCode - from xendit.payment_request.model.virtual_account_channel_properties import VirtualAccountChannelProperties - from xendit.payment_request.model.virtual_account_parameters import VirtualAccountParameters - globals()['PaymentRequestCurrency'] = PaymentRequestCurrency - globals()['VirtualAccountAllOf'] = VirtualAccountAllOf - globals()['VirtualAccountAlternativeDisplay'] = VirtualAccountAlternativeDisplay - globals()['VirtualAccountChannelCode'] = VirtualAccountChannelCode - globals()['VirtualAccountChannelProperties'] = VirtualAccountChannelProperties - globals()['VirtualAccountParameters'] = VirtualAccountParameters +def lazy_import(): + pass class VirtualAccount(ModelComposed): """NOTE: This class is auto generated by OpenAPI Generator. @@ -97,12 +99,12 @@ def openapi_types(): return { 'channel_code': (VirtualAccountChannelCode,), # noqa: E501 'channel_properties': (VirtualAccountChannelProperties,), # noqa: E501 - 'min_amount': (float, none_type,), # noqa: E501 - 'max_amount': (float, none_type,), # noqa: E501 - 'amount': (float, none_type,), # noqa: E501 - 'currency': (PaymentRequestCurrency,), # noqa: E501 - 'alternative_display_types': ([str],), # noqa: E501 - 'alternative_displays': ([VirtualAccountAlternativeDisplay],), # noqa: E501 + 'min_amount': (float, none_type, none_type), # noqa: E501 + 'max_amount': (float, none_type, none_type), # noqa: E501 + 'amount': (float, none_type, none_type), # noqa: E501 + 'currency': (PaymentRequestCurrency, none_type), # noqa: E501 + 'alternative_display_types': ([str], none_type), # noqa: E501 + 'alternative_displays': ([VirtualAccountAlternativeDisplay], none_type), # noqa: E501 } @cached_property diff --git a/xendit/payment_request/model/virtual_account_all_of.py b/xendit/payment_request/model/virtual_account_all_of.py index dc044ffc..1c2e997c 100644 --- a/xendit/payment_request/model/virtual_account_all_of.py +++ b/xendit/payment_request/model/virtual_account_all_of.py @@ -5,6 +5,7 @@ import re # noqa: F401 import sys # noqa: F401 +from typing import List # noqa: F401 from xendit.model_utils import ( # noqa: F401 ApiTypeError, @@ -23,11 +24,12 @@ ) from xendit.exceptions import ApiAttributeError +from xendit.payment_request.model.virtual_account_alternative_display import VirtualAccountAlternativeDisplay +globals()['VirtualAccountAlternativeDisplay'] = VirtualAccountAlternativeDisplay -def lazy_import(): - from xendit.payment_request.model.virtual_account_alternative_display import VirtualAccountAlternativeDisplay - globals()['VirtualAccountAlternativeDisplay'] = VirtualAccountAlternativeDisplay +def lazy_import(): + pass class VirtualAccountAllOf(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. @@ -82,7 +84,7 @@ def openapi_types(): """ lazy_import() return { - 'alternative_displays': ([VirtualAccountAlternativeDisplay],), # noqa: E501 + 'alternative_displays': ([VirtualAccountAlternativeDisplay], none_type), # noqa: E501 } @cached_property @@ -189,9 +191,13 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 ]) @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 + def __init__(self, + alternative_displays: list | None = None, + *args, **kwargs + ): # noqa: E501 """VirtualAccountAllOf - a model defined in OpenAPI + Keyword Args: _check_type (bool): if True, values for parameters in openapi_types will be type checked and a TypeError will be @@ -255,6 +261,8 @@ def __init__(self, *args, **kwargs): # noqa: E501 self._configuration = _configuration self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + if alternative_displays is not None: + self.alternative_displays = alternative_displays for var_name, var_value in kwargs.items(): if var_name not in self.attribute_map and \ self._configuration is not None and \ diff --git a/xendit/payment_request/model/virtual_account_alternative_display.py b/xendit/payment_request/model/virtual_account_alternative_display.py index ee8a4c5c..b9523b57 100644 --- a/xendit/payment_request/model/virtual_account_alternative_display.py +++ b/xendit/payment_request/model/virtual_account_alternative_display.py @@ -5,6 +5,7 @@ import re # noqa: F401 import sys # noqa: F401 +from typing import List # noqa: F401 from xendit.model_utils import ( # noqa: F401 ApiTypeError, @@ -25,6 +26,9 @@ +def lazy_import(): + pass + class VirtualAccountAlternativeDisplay(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -79,8 +83,8 @@ def openapi_types(): and the value is attribute type. """ return { - 'type': (str,), # noqa: E501 - 'data': (str,), # noqa: E501 + 'type': (str, none_type), # noqa: E501 + 'data': (str, none_type), # noqa: E501 } @cached_property @@ -190,9 +194,13 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 ]) @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 + def __init__(self, + data: str | None = None, + *args, **kwargs + ): # noqa: E501 """VirtualAccountAlternativeDisplay - a model defined in OpenAPI + Keyword Args: _check_type (bool): if True, values for parameters in openapi_types will be type checked and a TypeError will be @@ -257,6 +265,8 @@ def __init__(self, *args, **kwargs): # noqa: E501 self._configuration = _configuration self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + if data is not None: + self.data = data for var_name, var_value in kwargs.items(): if var_name not in self.attribute_map and \ self._configuration is not None and \ diff --git a/xendit/payment_request/model/virtual_account_channel_code.py b/xendit/payment_request/model/virtual_account_channel_code.py index da97f25e..51f99153 100644 --- a/xendit/payment_request/model/virtual_account_channel_code.py +++ b/xendit/payment_request/model/virtual_account_channel_code.py @@ -5,6 +5,7 @@ import re # noqa: F401 import sys # noqa: F401 +from typing import List # noqa: F401 from xendit.model_utils import ( # noqa: F401 ApiTypeError, @@ -25,6 +26,9 @@ +def lazy_import(): + pass + class VirtualAccountChannelCode(ModelSimple): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech diff --git a/xendit/payment_request/model/virtual_account_channel_properties.py b/xendit/payment_request/model/virtual_account_channel_properties.py index fa9ec7e9..41af5ffd 100644 --- a/xendit/payment_request/model/virtual_account_channel_properties.py +++ b/xendit/payment_request/model/virtual_account_channel_properties.py @@ -5,6 +5,7 @@ import re # noqa: F401 import sys # noqa: F401 +from typing import List # noqa: F401 from xendit.model_utils import ( # noqa: F401 ApiTypeError, @@ -25,6 +26,9 @@ +def lazy_import(): + pass + class VirtualAccountChannelProperties(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -77,9 +81,9 @@ def openapi_types(): """ return { 'customer_name': (str,), # noqa: E501 - 'virtual_account_number': (str,), # noqa: E501 - 'expires_at': (datetime,), # noqa: E501 - 'suggested_amount': (float,), # noqa: E501 + 'virtual_account_number': (str, none_type), # noqa: E501 + 'expires_at': (datetime, none_type), # noqa: E501 + 'suggested_amount': (float, none_type), # noqa: E501 } @cached_property @@ -195,12 +199,19 @@ def _from_openapi_data(cls, customer_name, *args, **kwargs): # noqa: E501 ]) @convert_js_args_to_python_args - def __init__(self, customer_name, *args, **kwargs): # noqa: E501 + def __init__(self, + customer_name: str, + virtual_account_number: str | None = None, + expires_at: datetime | None = None, + suggested_amount: float | None = None, + *args, **kwargs + ): # noqa: E501 """VirtualAccountChannelProperties - a model defined in OpenAPI Args: customer_name (str): Name of customer. + Keyword Args: _check_type (bool): if True, values for parameters in openapi_types will be type checked and a TypeError will be @@ -267,6 +278,12 @@ def __init__(self, customer_name, *args, **kwargs): # noqa: E501 self._visited_composed_classes = _visited_composed_classes + (self.__class__,) self.customer_name = customer_name + if virtual_account_number is not None: + self.virtual_account_number = virtual_account_number + if expires_at is not None: + self.expires_at = expires_at + if suggested_amount is not None: + self.suggested_amount = suggested_amount for var_name, var_value in kwargs.items(): if var_name not in self.attribute_map and \ self._configuration is not None and \ diff --git a/xendit/payment_request/model/virtual_account_parameters.py b/xendit/payment_request/model/virtual_account_parameters.py index 5d4f7ab8..213723d3 100644 --- a/xendit/payment_request/model/virtual_account_parameters.py +++ b/xendit/payment_request/model/virtual_account_parameters.py @@ -5,6 +5,7 @@ import re # noqa: F401 import sys # noqa: F401 +from typing import List # noqa: F401 from xendit.model_utils import ( # noqa: F401 ApiTypeError, @@ -23,15 +24,16 @@ ) from xendit.exceptions import ApiAttributeError +from xendit.payment_request.model.payment_request_currency import PaymentRequestCurrency +from xendit.payment_request.model.virtual_account_channel_code import VirtualAccountChannelCode +from xendit.payment_request.model.virtual_account_channel_properties import VirtualAccountChannelProperties +globals()['PaymentRequestCurrency'] = PaymentRequestCurrency +globals()['VirtualAccountChannelCode'] = VirtualAccountChannelCode +globals()['VirtualAccountChannelProperties'] = VirtualAccountChannelProperties -def lazy_import(): - from xendit.payment_request.model.payment_request_currency import PaymentRequestCurrency - from xendit.payment_request.model.virtual_account_channel_code import VirtualAccountChannelCode - from xendit.payment_request.model.virtual_account_channel_properties import VirtualAccountChannelProperties - globals()['PaymentRequestCurrency'] = PaymentRequestCurrency - globals()['VirtualAccountChannelCode'] = VirtualAccountChannelCode - globals()['VirtualAccountChannelProperties'] = VirtualAccountChannelProperties +def lazy_import(): + pass class VirtualAccountParameters(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. @@ -91,11 +93,11 @@ def openapi_types(): return { 'channel_code': (VirtualAccountChannelCode,), # noqa: E501 'channel_properties': (VirtualAccountChannelProperties,), # noqa: E501 - 'min_amount': (float, none_type,), # noqa: E501 - 'max_amount': (float, none_type,), # noqa: E501 - 'amount': (float, none_type,), # noqa: E501 - 'currency': (PaymentRequestCurrency,), # noqa: E501 - 'alternative_display_types': ([str],), # noqa: E501 + 'min_amount': (float, none_type, none_type), # noqa: E501 + 'max_amount': (float, none_type, none_type), # noqa: E501 + 'amount': (float, none_type, none_type), # noqa: E501 + 'currency': (PaymentRequestCurrency, none_type), # noqa: E501 + 'alternative_display_types': ([str], none_type), # noqa: E501 } @cached_property @@ -218,13 +220,23 @@ def _from_openapi_data(cls, channel_code, channel_properties, *args, **kwargs): ]) @convert_js_args_to_python_args - def __init__(self, channel_code, channel_properties, *args, **kwargs): # noqa: E501 + def __init__(self, + channel_code: VirtualAccountChannelCode, + channel_properties: VirtualAccountChannelProperties, + min_amount: float | None = None, + max_amount: float | None = None, + amount: float | None = None, + currency: PaymentRequestCurrency | None = None, + alternative_display_types: list | None = None, + *args, **kwargs + ): # noqa: E501 """VirtualAccountParameters - a model defined in OpenAPI Args: channel_code (VirtualAccountChannelCode): channel_properties (VirtualAccountChannelProperties): + Keyword Args: _check_type (bool): if True, values for parameters in openapi_types will be type checked and a TypeError will be @@ -294,6 +306,16 @@ def __init__(self, channel_code, channel_properties, *args, **kwargs): # noqa: self.channel_code = channel_code self.channel_properties = channel_properties + if min_amount is not None: + self.min_amount = min_amount + if max_amount is not None: + self.max_amount = max_amount + if amount is not None: + self.amount = amount + if currency is not None: + self.currency = currency + if alternative_display_types is not None: + self.alternative_display_types = alternative_display_types for var_name, var_value in kwargs.items(): if var_name not in self.attribute_map and \ self._configuration is not None and \ diff --git a/xendit/payment_request/payment_request_api.py b/xendit/payment_request/payment_request_api.py index 8d155b16..4d179046 100644 --- a/xendit/payment_request/payment_request_api.py +++ b/xendit/payment_request/payment_request_api.py @@ -19,6 +19,7 @@ none_type, validate_and_convert_types ) +from typing import Optional, List # noqa: F401 from xendit.payment_request.model import * # noqa: F401,E501 @@ -331,8 +332,6 @@ def __init__(self, api_client=None): 'all': [ 'payment_request_id', 'limit', - 'after_id', - 'before_id', ], 'required': [ 'payment_request_id', @@ -354,22 +353,14 @@ def __init__(self, api_client=None): (str,), 'limit': (int,), - 'after_id': - (str,), - 'before_id': - (str,), }, 'attribute_map': { 'payment_request_id': 'paymentRequestId', 'limit': 'limit', - 'after_id': 'after_id', - 'before_id': 'before_id', }, 'location_map': { 'payment_request_id': 'path', 'limit': 'query', - 'after_id': 'query', - 'before_id': 'query', }, 'collection_format_map': { } @@ -434,16 +425,17 @@ def __init__(self, api_client=None): def authorize_payment_request( self, - payment_request_id, + payment_request_id: str, + payment_request_auth_parameters: Optional[PaymentRequestAuthParameters] = None, **kwargs - ): + ) -> PaymentRequest: """Payment Request Authorize # noqa: E501 Payment Request Authorize # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.authorize_payment_request(payment_request_id, async_req=True) + >>> thread = api.authorize_payment_request(payment_request_id, payment_request_auth_parameters, async_req=True) >>> result = thread.get() Args: @@ -512,22 +504,24 @@ def authorize_payment_request( '_content_type') kwargs['_host_index'] = kwargs.get('_host_index') kwargs['_request_auths'] = kwargs.get('_request_auths', None) - kwargs['payment_request_id'] = \ - payment_request_id + kwargs['payment_request_id'] = payment_request_id + if payment_request_auth_parameters is not None: + kwargs['payment_request_auth_parameters'] = payment_request_auth_parameters return self.authorize_payment_request_endpoint.call_with_http_info(**kwargs) def capture_payment_request( self, - payment_request_id, + payment_request_id: str, + capture_parameters: Optional[CaptureParameters] = None, **kwargs - ): + ) -> Capture: """Payment Request Capture # noqa: E501 Payment Request Capture # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.capture_payment_request(payment_request_id, async_req=True) + >>> thread = api.capture_payment_request(payment_request_id, capture_parameters, async_req=True) >>> result = thread.get() Args: @@ -596,21 +590,24 @@ def capture_payment_request( '_content_type') kwargs['_host_index'] = kwargs.get('_host_index') kwargs['_request_auths'] = kwargs.get('_request_auths', None) - kwargs['payment_request_id'] = \ - payment_request_id + kwargs['payment_request_id'] = payment_request_id + if capture_parameters is not None: + kwargs['capture_parameters'] = capture_parameters return self.capture_payment_request_endpoint.call_with_http_info(**kwargs) def create_payment_request( self, + idempotency_key: Optional[str] = None, + payment_request_parameters: Optional[PaymentRequestParameters] = None, **kwargs - ): + ) -> PaymentRequest: """Create Payment Request # noqa: E501 Create Payment Request # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.create_payment_request(async_req=True) + >>> thread = api.create_payment_request(idempotency_key, payment_request_parameters, async_req=True) >>> result = thread.get() @@ -678,19 +675,29 @@ def create_payment_request( '_content_type') kwargs['_host_index'] = kwargs.get('_host_index') kwargs['_request_auths'] = kwargs.get('_request_auths', None) + if idempotency_key is not None: + kwargs['idempotency_key'] = idempotency_key + if payment_request_parameters is not None: + kwargs['payment_request_parameters'] = payment_request_parameters return self.create_payment_request_endpoint.call_with_http_info(**kwargs) def get_all_payment_requests( self, + reference_id: Optional[List[str]] = None, + id: Optional[List[str]] = None, + customer_id: Optional[List[str]] = None, + limit: Optional[int] = None, + before_id: Optional[str] = None, + after_id: Optional[str] = None, **kwargs - ): + ) -> PaymentRequestListResponse: """Get all payment requests by filter # noqa: E501 Get all payment requests by filter # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_all_payment_requests(async_req=True) + >>> thread = api.get_all_payment_requests(reference_id, id, customer_id, limit, before_id, after_id, async_req=True) >>> result = thread.get() @@ -762,13 +769,25 @@ def get_all_payment_requests( '_content_type') kwargs['_host_index'] = kwargs.get('_host_index') kwargs['_request_auths'] = kwargs.get('_request_auths', None) + if reference_id is not None: + kwargs['reference_id'] = reference_id + if id is not None: + kwargs['id'] = id + if customer_id is not None: + kwargs['customer_id'] = customer_id + if limit is not None: + kwargs['limit'] = limit + if before_id is not None: + kwargs['before_id'] = before_id + if after_id is not None: + kwargs['after_id'] = after_id return self.get_all_payment_requests_endpoint.call_with_http_info(**kwargs) def get_payment_request_by_id( self, - payment_request_id, + payment_request_id: str, **kwargs - ): + ) -> PaymentRequest: """Get payment request by ID # noqa: E501 Get payment request by ID # noqa: E501 @@ -843,22 +862,22 @@ def get_payment_request_by_id( '_content_type') kwargs['_host_index'] = kwargs.get('_host_index') kwargs['_request_auths'] = kwargs.get('_request_auths', None) - kwargs['payment_request_id'] = \ - payment_request_id + kwargs['payment_request_id'] = payment_request_id return self.get_payment_request_by_id_endpoint.call_with_http_info(**kwargs) def get_payment_request_captures( self, - payment_request_id, + payment_request_id: str, + limit: Optional[int] = None, **kwargs - ): + ) -> CaptureListResponse: """Get Payment Request Capture # noqa: E501 Get Payment Request Capture # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_payment_request_captures(payment_request_id, async_req=True) + >>> thread = api.get_payment_request_captures(payment_request_id, limit, async_req=True) >>> result = thread.get() Args: @@ -866,8 +885,6 @@ def get_payment_request_captures( Keyword Args: limit (int): [optional] - after_id (str): [optional] - before_id (str): [optional] _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object @@ -929,15 +946,16 @@ def get_payment_request_captures( '_content_type') kwargs['_host_index'] = kwargs.get('_host_index') kwargs['_request_auths'] = kwargs.get('_request_auths', None) - kwargs['payment_request_id'] = \ - payment_request_id + kwargs['payment_request_id'] = payment_request_id + if limit is not None: + kwargs['limit'] = limit return self.get_payment_request_captures_endpoint.call_with_http_info(**kwargs) def resend_payment_request_auth( self, - payment_request_id, + payment_request_id: str, **kwargs - ): + ) -> PaymentRequest: """Payment Request Resend Auth # noqa: E501 Payment Request Resend Auth # noqa: E501 @@ -1012,7 +1030,6 @@ def resend_payment_request_auth( '_content_type') kwargs['_host_index'] = kwargs.get('_host_index') kwargs['_request_auths'] = kwargs.get('_request_auths', None) - kwargs['payment_request_id'] = \ - payment_request_id + kwargs['payment_request_id'] = payment_request_id return self.resend_payment_request_auth_endpoint.call_with_http_info(**kwargs) diff --git a/xendit/payout/model/channel.py b/xendit/payout/model/channel.py index a62f2efc..aabf0371 100644 --- a/xendit/payout/model/channel.py +++ b/xendit/payout/model/channel.py @@ -5,6 +5,7 @@ import re # noqa: F401 import sys # noqa: F401 +from typing import List # noqa: F401 from xendit.model_utils import ( # noqa: F401 ApiTypeError, @@ -23,13 +24,14 @@ ) from xendit.exceptions import ApiAttributeError +from xendit.payout.model.channel_amount_limits import ChannelAmountLimits +from xendit.payout.model.channel_category import ChannelCategory +globals()['ChannelAmountLimits'] = ChannelAmountLimits +globals()['ChannelCategory'] = ChannelCategory -def lazy_import(): - from xendit.payout.model.channel_amount_limits import ChannelAmountLimits - from xendit.payout.model.channel_category import ChannelCategory - globals()['ChannelAmountLimits'] = ChannelAmountLimits - globals()['ChannelCategory'] = ChannelCategory +def lazy_import(): + pass class Channel(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. @@ -210,7 +212,14 @@ def _from_openapi_data(cls, channel_code, channel_category, currency, channel_na ]) @convert_js_args_to_python_args - def __init__(self, channel_code, channel_category, currency, channel_name, amount_limits, *args, **kwargs): # noqa: E501 + def __init__(self, + channel_code: str, + channel_category: ChannelCategory, + currency: str, + channel_name: str, + amount_limits: ChannelAmountLimits, + *args, **kwargs + ): # noqa: E501 """Channel - a model defined in OpenAPI Args: @@ -220,6 +229,7 @@ def __init__(self, channel_code, channel_category, currency, channel_name, amoun channel_name (str): Name of the destination channel amount_limits (ChannelAmountLimits): + Keyword Args: _check_type (bool): if True, values for parameters in openapi_types will be type checked and a TypeError will be diff --git a/xendit/payout/model/channel_account_type.py b/xendit/payout/model/channel_account_type.py index 748d4e51..816d3fb4 100644 --- a/xendit/payout/model/channel_account_type.py +++ b/xendit/payout/model/channel_account_type.py @@ -5,6 +5,7 @@ import re # noqa: F401 import sys # noqa: F401 +from typing import List # noqa: F401 from xendit.model_utils import ( # noqa: F401 ApiTypeError, @@ -25,6 +26,9 @@ +def lazy_import(): + pass + class ChannelAccountType(ModelSimple): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech diff --git a/xendit/payout/model/channel_amount_limits.py b/xendit/payout/model/channel_amount_limits.py index 9b0be153..5e7cd357 100644 --- a/xendit/payout/model/channel_amount_limits.py +++ b/xendit/payout/model/channel_amount_limits.py @@ -5,6 +5,7 @@ import re # noqa: F401 import sys # noqa: F401 +from typing import List # noqa: F401 from xendit.model_utils import ( # noqa: F401 ApiTypeError, @@ -25,6 +26,9 @@ +def lazy_import(): + pass + class ChannelAmountLimits(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -194,7 +198,12 @@ def _from_openapi_data(cls, minimum, maximum, minimum_increment, *args, **kwargs ]) @convert_js_args_to_python_args - def __init__(self, minimum, maximum, minimum_increment, *args, **kwargs): # noqa: E501 + def __init__(self, + minimum: float, + maximum: float, + minimum_increment: float, + *args, **kwargs + ): # noqa: E501 """ChannelAmountLimits - a model defined in OpenAPI Args: @@ -202,6 +211,7 @@ def __init__(self, minimum, maximum, minimum_increment, *args, **kwargs): # noq maximum (float): Highest amount supported for a payout to this channel minimum_increment (float): Supported increments + Keyword Args: _check_type (bool): if True, values for parameters in openapi_types will be type checked and a TypeError will be diff --git a/xendit/payout/model/channel_category.py b/xendit/payout/model/channel_category.py index e6001aed..ab1017c7 100644 --- a/xendit/payout/model/channel_category.py +++ b/xendit/payout/model/channel_category.py @@ -5,6 +5,7 @@ import re # noqa: F401 import sys # noqa: F401 +from typing import List # noqa: F401 from xendit.model_utils import ( # noqa: F401 ApiTypeError, @@ -25,6 +26,9 @@ +def lazy_import(): + pass + class ChannelCategory(ModelSimple): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech diff --git a/xendit/payout/model/create_payout_request.py b/xendit/payout/model/create_payout_request.py index 5be7b56f..600b8b20 100644 --- a/xendit/payout/model/create_payout_request.py +++ b/xendit/payout/model/create_payout_request.py @@ -5,6 +5,7 @@ import re # noqa: F401 import sys # noqa: F401 +from typing import List # noqa: F401 from xendit.model_utils import ( # noqa: F401 ApiTypeError, @@ -23,13 +24,14 @@ ) from xendit.exceptions import ApiAttributeError +from xendit.payout.model.digital_payout_channel_properties import DigitalPayoutChannelProperties +from xendit.payout.model.receipt_notification import ReceiptNotification +globals()['DigitalPayoutChannelProperties'] = DigitalPayoutChannelProperties +globals()['ReceiptNotification'] = ReceiptNotification -def lazy_import(): - from xendit.payout.model.digital_payout_channel_properties import DigitalPayoutChannelProperties - from xendit.payout.model.receipt_notification import ReceiptNotification - globals()['DigitalPayoutChannelProperties'] = DigitalPayoutChannelProperties - globals()['ReceiptNotification'] = ReceiptNotification +def lazy_import(): + pass class CreatePayoutRequest(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. @@ -92,9 +94,9 @@ def openapi_types(): 'channel_properties': (DigitalPayoutChannelProperties,), # noqa: E501 'amount': (float,), # noqa: E501 'currency': (str,), # noqa: E501 - 'description': (str,), # noqa: E501 - 'receipt_notification': (ReceiptNotification,), # noqa: E501 - 'metadata': ({str: (bool, date, datetime, dict, float, int, list, str, none_type)},), # noqa: E501 + 'description': (str, none_type), # noqa: E501 + 'receipt_notification': (ReceiptNotification, none_type), # noqa: E501 + 'metadata': ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type), # noqa: E501 } @cached_property @@ -222,7 +224,17 @@ def _from_openapi_data(cls, reference_id, channel_code, channel_properties, amou ]) @convert_js_args_to_python_args - def __init__(self, reference_id, channel_code, channel_properties, amount, currency, *args, **kwargs): # noqa: E501 + def __init__(self, + reference_id: str, + channel_code: str, + channel_properties: DigitalPayoutChannelProperties, + amount: float, + currency: str, + description: str | None = None, + receipt_notification: ReceiptNotification | None = None, + metadata: dict | None = None, + *args, **kwargs + ): # noqa: E501 """CreatePayoutRequest - a model defined in OpenAPI Args: @@ -232,6 +244,7 @@ def __init__(self, reference_id, channel_code, channel_properties, amount, curre amount (float): Amount to be sent to the destination account and should be a multiple of the minimum increment for the selected channel currency (str): Currency of the destination channel using ISO-4217 currency code + Keyword Args: _check_type (bool): if True, values for parameters in openapi_types will be type checked and a TypeError will be @@ -302,6 +315,12 @@ def __init__(self, reference_id, channel_code, channel_properties, amount, curre self.channel_properties = channel_properties self.amount = amount self.currency = currency + if description is not None: + self.description = description + if receipt_notification is not None: + self.receipt_notification = receipt_notification + if metadata is not None: + self.metadata = metadata for var_name, var_value in kwargs.items(): if var_name not in self.attribute_map and \ self._configuration is not None and \ diff --git a/xendit/payout/model/digital_payout_channel_properties.py b/xendit/payout/model/digital_payout_channel_properties.py index bc3c045b..d288588f 100644 --- a/xendit/payout/model/digital_payout_channel_properties.py +++ b/xendit/payout/model/digital_payout_channel_properties.py @@ -5,6 +5,7 @@ import re # noqa: F401 import sys # noqa: F401 +from typing import List # noqa: F401 from xendit.model_utils import ( # noqa: F401 ApiTypeError, @@ -23,11 +24,12 @@ ) from xendit.exceptions import ApiAttributeError +from xendit.payout.model.channel_account_type import ChannelAccountType +globals()['ChannelAccountType'] = ChannelAccountType -def lazy_import(): - from xendit.payout.model.channel_account_type import ChannelAccountType - globals()['ChannelAccountType'] = ChannelAccountType +def lazy_import(): + pass class DigitalPayoutChannelProperties(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. @@ -83,8 +85,8 @@ def openapi_types(): lazy_import() return { 'account_number': (str,), # noqa: E501 - 'account_holder_name': (str, none_type,), # noqa: E501 - 'account_type': (ChannelAccountType,), # noqa: E501 + 'account_holder_name': (str, none_type, none_type), # noqa: E501 + 'account_type': (ChannelAccountType, none_type), # noqa: E501 } @cached_property @@ -198,12 +200,18 @@ def _from_openapi_data(cls, account_number, *args, **kwargs): # noqa: E501 ]) @convert_js_args_to_python_args - def __init__(self, account_number, *args, **kwargs): # noqa: E501 + def __init__(self, + account_number: str, + account_holder_name: str | None = None, + account_type: ChannelAccountType | None = None, + *args, **kwargs + ): # noqa: E501 """DigitalPayoutChannelProperties - a model defined in OpenAPI Args: account_number (str): Registered account number + Keyword Args: _check_type (bool): if True, values for parameters in openapi_types will be type checked and a TypeError will be @@ -269,6 +277,10 @@ def __init__(self, account_number, *args, **kwargs): # noqa: E501 self._visited_composed_classes = _visited_composed_classes + (self.__class__,) self.account_number = account_number + if account_holder_name is not None: + self.account_holder_name = account_holder_name + if account_type is not None: + self.account_type = account_type for var_name, var_value in kwargs.items(): if var_name not in self.attribute_map and \ self._configuration is not None and \ diff --git a/xendit/payout/model/error.py b/xendit/payout/model/error.py index 6e3bf141..7349cb5f 100644 --- a/xendit/payout/model/error.py +++ b/xendit/payout/model/error.py @@ -5,6 +5,7 @@ import re # noqa: F401 import sys # noqa: F401 +from typing import List # noqa: F401 from xendit.model_utils import ( # noqa: F401 ApiTypeError, @@ -23,11 +24,12 @@ ) from xendit.exceptions import ApiAttributeError +from xendit.payout.model.error_errors_inner import ErrorErrorsInner +globals()['ErrorErrorsInner'] = ErrorErrorsInner -def lazy_import(): - from xendit.payout.model.error_errors_inner import ErrorErrorsInner - globals()['ErrorErrorsInner'] = ErrorErrorsInner +def lazy_import(): + pass class Error(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. @@ -84,7 +86,7 @@ def openapi_types(): return { 'error_code': (str,), # noqa: E501 'message': (str,), # noqa: E501 - 'errors': ([ErrorErrorsInner],), # noqa: E501 + 'errors': ([ErrorErrorsInner], none_type), # noqa: E501 } @cached_property @@ -199,13 +201,19 @@ def _from_openapi_data(cls, error_code, message, *args, **kwargs): # noqa: E501 ]) @convert_js_args_to_python_args - def __init__(self, error_code, message, *args, **kwargs): # noqa: E501 + def __init__(self, + error_code: str, + message: str, + errors: list | None = None, + *args, **kwargs + ): # noqa: E501 """Error - a model defined in OpenAPI Args: error_code (str): Specific error encountered when processing the request, can refer to the API documentation on proper handling of each available error code https://developers.xendit.co/api-reference/#payouts message (str): Human readable error message + Keyword Args: _check_type (bool): if True, values for parameters in openapi_types will be type checked and a TypeError will be @@ -271,6 +279,8 @@ def __init__(self, error_code, message, *args, **kwargs): # noqa: E501 self.error_code = error_code self.message = message + if errors is not None: + self.errors = errors for var_name, var_value in kwargs.items(): if var_name not in self.attribute_map and \ self._configuration is not None and \ diff --git a/xendit/payout/model/error_errors_inner.py b/xendit/payout/model/error_errors_inner.py index 97d4739d..a20d52e8 100644 --- a/xendit/payout/model/error_errors_inner.py +++ b/xendit/payout/model/error_errors_inner.py @@ -5,6 +5,7 @@ import re # noqa: F401 import sys # noqa: F401 +from typing import List # noqa: F401 from xendit.model_utils import ( # noqa: F401 ApiTypeError, @@ -25,6 +26,9 @@ +def lazy_import(): + pass + class ErrorErrorsInner(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -190,13 +194,18 @@ def _from_openapi_data(cls, path, message, *args, **kwargs): # noqa: E501 ]) @convert_js_args_to_python_args - def __init__(self, path, message, *args, **kwargs): # noqa: E501 + def __init__(self, + path: str, + message: str, + *args, **kwargs + ): # noqa: E501 """ErrorErrorsInner - a model defined in OpenAPI Args: path (str): Precise location of the error message (str): Specific description of the error + Keyword Args: _check_type (bool): if True, values for parameters in openapi_types will be type checked and a TypeError will be diff --git a/xendit/payout/model/get_payouts200_response.py b/xendit/payout/model/get_payouts200_response.py index dd81e0cb..54e6b9d8 100644 --- a/xendit/payout/model/get_payouts200_response.py +++ b/xendit/payout/model/get_payouts200_response.py @@ -5,6 +5,7 @@ import re # noqa: F401 import sys # noqa: F401 +from typing import List # noqa: F401 from xendit.model_utils import ( # noqa: F401 ApiTypeError, @@ -23,13 +24,14 @@ ) from xendit.exceptions import ApiAttributeError +from xendit.payout.model.get_payouts200_response_data_inner import GetPayouts200ResponseDataInner +from xendit.payout.model.get_payouts200_response_links import GetPayouts200ResponseLinks +globals()['GetPayouts200ResponseDataInner'] = GetPayouts200ResponseDataInner +globals()['GetPayouts200ResponseLinks'] = GetPayouts200ResponseLinks -def lazy_import(): - from xendit.payout.model.get_payouts200_response_data_inner import GetPayouts200ResponseDataInner - from xendit.payout.model.get_payouts200_response_links import GetPayouts200ResponseLinks - globals()['GetPayouts200ResponseDataInner'] = GetPayouts200ResponseDataInner - globals()['GetPayouts200ResponseLinks'] = GetPayouts200ResponseLinks +def lazy_import(): + pass class GetPayouts200Response(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. @@ -84,9 +86,9 @@ def openapi_types(): """ lazy_import() return { - 'data': ([GetPayouts200ResponseDataInner],), # noqa: E501 - 'has_more': (bool,), # noqa: E501 - 'links': (GetPayouts200ResponseLinks,), # noqa: E501 + 'data': ([GetPayouts200ResponseDataInner], none_type), # noqa: E501 + 'has_more': (bool, none_type), # noqa: E501 + 'links': (GetPayouts200ResponseLinks, none_type), # noqa: E501 } @cached_property @@ -197,9 +199,15 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 ]) @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 + def __init__(self, + data: list | None = None, + has_more: bool | None = None, + links: GetPayouts200ResponseLinks | None = None, + *args, **kwargs + ): # noqa: E501 """GetPayouts200Response - a model defined in OpenAPI + Keyword Args: _check_type (bool): if True, values for parameters in openapi_types will be type checked and a TypeError will be @@ -265,6 +273,12 @@ def __init__(self, *args, **kwargs): # noqa: E501 self._configuration = _configuration self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + if data is not None: + self.data = data + if has_more is not None: + self.has_more = has_more + if links is not None: + self.links = links for var_name, var_value in kwargs.items(): if var_name not in self.attribute_map and \ self._configuration is not None and \ diff --git a/xendit/payout/model/get_payouts200_response_data_inner.py b/xendit/payout/model/get_payouts200_response_data_inner.py index 3c9e5d8a..228221b9 100644 --- a/xendit/payout/model/get_payouts200_response_data_inner.py +++ b/xendit/payout/model/get_payouts200_response_data_inner.py @@ -5,6 +5,7 @@ import re # noqa: F401 import sys # noqa: F401 +from typing import List # noqa: F401 from xendit.model_utils import ( # noqa: F401 ApiTypeError, @@ -23,15 +24,16 @@ ) from xendit.exceptions import ApiAttributeError +from xendit.payout.model.digital_payout_channel_properties import DigitalPayoutChannelProperties +from xendit.payout.model.payout import Payout +from xendit.payout.model.receipt_notification import ReceiptNotification +globals()['DigitalPayoutChannelProperties'] = DigitalPayoutChannelProperties +globals()['Payout'] = Payout +globals()['ReceiptNotification'] = ReceiptNotification -def lazy_import(): - from xendit.payout.model.digital_payout_channel_properties import DigitalPayoutChannelProperties - from xendit.payout.model.payout import Payout - from xendit.payout.model.receipt_notification import ReceiptNotification - globals()['DigitalPayoutChannelProperties'] = DigitalPayoutChannelProperties - globals()['Payout'] = Payout - globals()['ReceiptNotification'] = ReceiptNotification +def lazy_import(): + pass class GetPayouts200ResponseDataInner(ModelComposed): """NOTE: This class is auto generated by OpenAPI Generator. @@ -105,21 +107,21 @@ def openapi_types(): """ lazy_import() return { - 'description': (str,), # noqa: E501 - 'receipt_notification': (ReceiptNotification,), # noqa: E501 - 'metadata': ({str: (bool, date, datetime, dict, float, int, list, str, none_type)},), # noqa: E501 - 'failure_code': (str,), # noqa: E501 - 'estimated_arrival_time': (datetime,), # noqa: E501 - 'reference_id': (str,), # noqa: E501 - 'channel_code': (str,), # noqa: E501 - 'channel_properties': (DigitalPayoutChannelProperties,), # noqa: E501 - 'amount': (float,), # noqa: E501 - 'currency': (str,), # noqa: E501 - 'id': (str,), # noqa: E501 - 'created': (datetime,), # noqa: E501 - 'updated': (datetime,), # noqa: E501 - 'business_id': (str,), # noqa: E501 - 'status': (str,), # noqa: E501 + 'description': (str, none_type), # noqa: E501 + 'receipt_notification': (ReceiptNotification, none_type), # noqa: E501 + 'metadata': ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type), # noqa: E501 + 'failure_code': (str, none_type), # noqa: E501 + 'estimated_arrival_time': (datetime, none_type), # noqa: E501 + 'reference_id': (str, none_type), # noqa: E501 + 'channel_code': (str, none_type), # noqa: E501 + 'channel_properties': (DigitalPayoutChannelProperties, none_type), # noqa: E501 + 'amount': (float, none_type), # noqa: E501 + 'currency': (str, none_type), # noqa: E501 + 'id': (str, none_type), # noqa: E501 + 'created': (datetime, none_type), # noqa: E501 + 'updated': (datetime, none_type), # noqa: E501 + 'business_id': (str, none_type), # noqa: E501 + 'status': (str, none_type), # noqa: E501 } @cached_property diff --git a/xendit/payout/model/get_payouts200_response_links.py b/xendit/payout/model/get_payouts200_response_links.py index 8f42b2eb..4e2eb39b 100644 --- a/xendit/payout/model/get_payouts200_response_links.py +++ b/xendit/payout/model/get_payouts200_response_links.py @@ -5,6 +5,7 @@ import re # noqa: F401 import sys # noqa: F401 +from typing import List # noqa: F401 from xendit.model_utils import ( # noqa: F401 ApiTypeError, @@ -25,6 +26,9 @@ +def lazy_import(): + pass + class GetPayouts200ResponseLinks(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -76,9 +80,9 @@ def openapi_types(): and the value is attribute type. """ return { - 'href': (str,), # noqa: E501 - 'rel': (str,), # noqa: E501 - 'method': (str,), # noqa: E501 + 'href': (str, none_type), # noqa: E501 + 'rel': (str, none_type), # noqa: E501 + 'method': (str, none_type), # noqa: E501 } @cached_property @@ -189,9 +193,15 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 ]) @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 + def __init__(self, + href: str | None = None, + rel: str | None = None, + method: str | None = None, + *args, **kwargs + ): # noqa: E501 """GetPayouts200ResponseLinks - a model defined in OpenAPI + Keyword Args: _check_type (bool): if True, values for parameters in openapi_types will be type checked and a TypeError will be @@ -257,6 +267,12 @@ def __init__(self, *args, **kwargs): # noqa: E501 self._configuration = _configuration self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + if href is not None: + self.href = href + if rel is not None: + self.rel = rel + if method is not None: + self.method = method for var_name, var_value in kwargs.items(): if var_name not in self.attribute_map and \ self._configuration is not None and \ diff --git a/xendit/payout/model/payout.py b/xendit/payout/model/payout.py index 5473bed3..ac7b9dd9 100644 --- a/xendit/payout/model/payout.py +++ b/xendit/payout/model/payout.py @@ -5,6 +5,7 @@ import re # noqa: F401 import sys # noqa: F401 +from typing import List # noqa: F401 from xendit.model_utils import ( # noqa: F401 ApiTypeError, @@ -23,17 +24,18 @@ ) from xendit.exceptions import ApiAttributeError +from xendit.payout.model.create_payout_request import CreatePayoutRequest +from xendit.payout.model.digital_payout_channel_properties import DigitalPayoutChannelProperties +from xendit.payout.model.payout_all_of import PayoutAllOf +from xendit.payout.model.receipt_notification import ReceiptNotification +globals()['CreatePayoutRequest'] = CreatePayoutRequest +globals()['DigitalPayoutChannelProperties'] = DigitalPayoutChannelProperties +globals()['PayoutAllOf'] = PayoutAllOf +globals()['ReceiptNotification'] = ReceiptNotification -def lazy_import(): - from xendit.payout.model.create_payout_request import CreatePayoutRequest - from xendit.payout.model.digital_payout_channel_properties import DigitalPayoutChannelProperties - from xendit.payout.model.payout_all_of import PayoutAllOf - from xendit.payout.model.receipt_notification import ReceiptNotification - globals()['CreatePayoutRequest'] = CreatePayoutRequest - globals()['DigitalPayoutChannelProperties'] = DigitalPayoutChannelProperties - globals()['PayoutAllOf'] = PayoutAllOf - globals()['ReceiptNotification'] = ReceiptNotification +def lazy_import(): + pass class Payout(ModelComposed): """NOTE: This class is auto generated by OpenAPI Generator. @@ -117,11 +119,11 @@ def openapi_types(): 'updated': (datetime,), # noqa: E501 'business_id': (str,), # noqa: E501 'status': (str,), # noqa: E501 - 'description': (str,), # noqa: E501 - 'receipt_notification': (ReceiptNotification,), # noqa: E501 - 'metadata': ({str: (bool, date, datetime, dict, float, int, list, str, none_type)},), # noqa: E501 - 'failure_code': (str,), # noqa: E501 - 'estimated_arrival_time': (datetime,), # noqa: E501 + 'description': (str, none_type), # noqa: E501 + 'receipt_notification': (ReceiptNotification, none_type), # noqa: E501 + 'metadata': ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type), # noqa: E501 + 'failure_code': (str, none_type), # noqa: E501 + 'estimated_arrival_time': (datetime, none_type), # noqa: E501 } @cached_property diff --git a/xendit/payout/model/payout_all_of.py b/xendit/payout/model/payout_all_of.py index 3b95353d..09909cec 100644 --- a/xendit/payout/model/payout_all_of.py +++ b/xendit/payout/model/payout_all_of.py @@ -5,6 +5,7 @@ import re # noqa: F401 import sys # noqa: F401 +from typing import List # noqa: F401 from xendit.model_utils import ( # noqa: F401 ApiTypeError, @@ -25,6 +26,9 @@ +def lazy_import(): + pass + class PayoutAllOf(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -97,8 +101,8 @@ def openapi_types(): 'updated': (datetime,), # noqa: E501 'business_id': (str,), # noqa: E501 'status': (str,), # noqa: E501 - 'failure_code': (str,), # noqa: E501 - 'estimated_arrival_time': (datetime,), # noqa: E501 + 'failure_code': (str, none_type), # noqa: E501 + 'estimated_arrival_time': (datetime, none_type), # noqa: E501 } @cached_property @@ -224,7 +228,16 @@ def _from_openapi_data(cls, id, created, updated, business_id, status, *args, ** ]) @convert_js_args_to_python_args - def __init__(self, id, created, updated, business_id, status, *args, **kwargs): # noqa: E501 + def __init__(self, + id: str, + created: datetime, + updated: datetime, + business_id: str, + status: str, + failure_code: str | None = None, + estimated_arrival_time: datetime | None = None, + *args, **kwargs + ): # noqa: E501 """PayoutAllOf - a model defined in OpenAPI Args: @@ -234,6 +247,7 @@ def __init__(self, id, created, updated, business_id, status, *args, **kwargs): business_id (str): Xendit Business ID status (str): Status of payout + Keyword Args: _check_type (bool): if True, values for parameters in openapi_types will be type checked and a TypeError will be @@ -303,6 +317,10 @@ def __init__(self, id, created, updated, business_id, status, *args, **kwargs): self.updated = updated self.business_id = business_id self.status = status + if failure_code is not None: + self.failure_code = failure_code + if estimated_arrival_time is not None: + self.estimated_arrival_time = estimated_arrival_time for var_name, var_value in kwargs.items(): if var_name not in self.attribute_map and \ self._configuration is not None and \ diff --git a/xendit/payout/model/receipt_notification.py b/xendit/payout/model/receipt_notification.py index 240d3a8e..52c9b6ed 100644 --- a/xendit/payout/model/receipt_notification.py +++ b/xendit/payout/model/receipt_notification.py @@ -5,6 +5,7 @@ import re # noqa: F401 import sys # noqa: F401 +from typing import List # noqa: F401 from xendit.model_utils import ( # noqa: F401 ApiTypeError, @@ -25,6 +26,9 @@ +def lazy_import(): + pass + class ReceiptNotification(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -76,9 +80,9 @@ def openapi_types(): and the value is attribute type. """ return { - 'email_to': ([str], none_type,), # noqa: E501 - 'email_cc': ([str], none_type,), # noqa: E501 - 'email_bcc': ([str], none_type,), # noqa: E501 + 'email_to': ([str], none_type, none_type), # noqa: E501 + 'email_cc': ([str], none_type, none_type), # noqa: E501 + 'email_bcc': ([str], none_type, none_type), # noqa: E501 } @cached_property @@ -189,9 +193,15 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 ]) @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 + def __init__(self, + email_to: list | None = None, + email_cc: list | None = None, + email_bcc: list | None = None, + *args, **kwargs + ): # noqa: E501 """ReceiptNotification - a model defined in OpenAPI + Keyword Args: _check_type (bool): if True, values for parameters in openapi_types will be type checked and a TypeError will be @@ -257,6 +267,12 @@ def __init__(self, *args, **kwargs): # noqa: E501 self._configuration = _configuration self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + if email_to is not None: + self.email_to = email_to + if email_cc is not None: + self.email_cc = email_cc + if email_bcc is not None: + self.email_bcc = email_bcc for var_name, var_value in kwargs.items(): if var_name not in self.attribute_map and \ self._configuration is not None and \ diff --git a/xendit/payout/payout_api.py b/xendit/payout/payout_api.py index f39a8c39..c055676b 100644 --- a/xendit/payout/payout_api.py +++ b/xendit/payout/payout_api.py @@ -19,6 +19,7 @@ none_type, validate_and_convert_types ) +from typing import Optional, List # noqa: F401 from xendit.payout.model import * # noqa: F401,E501 @@ -314,9 +315,9 @@ def __init__(self, api_client=None): def cancel_payout( self, - id, + id: str, **kwargs - ): + ) -> GetPayouts200ResponseDataInner: """API to cancel requested payouts that have not yet been sent to partner banks and e-wallets. Cancellation is possible if the payout has not been sent out via our partner and when payout status is ACCEPTED. # noqa: E501 This method makes a synchronous HTTP request by default. To make an @@ -390,21 +391,22 @@ def cancel_payout( '_content_type') kwargs['_host_index'] = kwargs.get('_host_index') kwargs['_request_auths'] = kwargs.get('_request_auths', None) - kwargs['id'] = \ - id + kwargs['id'] = id return self.cancel_payout_endpoint.call_with_http_info(**kwargs) def create_payout( self, - idempotency_key, + idempotency_key: str, + for_user_id: Optional[str] = None, + create_payout_request: Optional[CreatePayoutRequest] = None, **kwargs - ): + ) -> GetPayouts200ResponseDataInner: """API to send money at scale to bank accounts & eWallets # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.create_payout(idempotency_key, async_req=True) + >>> thread = api.create_payout(idempotency_key, for_user_id, create_payout_request, async_req=True) >>> result = thread.get() Args: @@ -474,15 +476,18 @@ def create_payout( '_content_type') kwargs['_host_index'] = kwargs.get('_host_index') kwargs['_request_auths'] = kwargs.get('_request_auths', None) - kwargs['idempotency_key'] = \ - idempotency_key + kwargs['idempotency_key'] = idempotency_key + if for_user_id is not None: + kwargs['for_user_id'] = for_user_id + if create_payout_request is not None: + kwargs['create_payout_request'] = create_payout_request return self.create_payout_endpoint.call_with_http_info(**kwargs) def get_payout_by_id( self, - id, + id: str, **kwargs - ): + ) -> GetPayouts200ResponseDataInner: """API to fetch the current status, or details of the payout # noqa: E501 This method makes a synchronous HTTP request by default. To make an @@ -556,20 +561,22 @@ def get_payout_by_id( '_content_type') kwargs['_host_index'] = kwargs.get('_host_index') kwargs['_request_auths'] = kwargs.get('_request_auths', None) - kwargs['id'] = \ - id + kwargs['id'] = id return self.get_payout_by_id_endpoint.call_with_http_info(**kwargs) def get_payout_channels( self, + currency: Optional[str] = None, + channel_category: Optional[List[ChannelCategory]] = None, + channel_code: Optional[str] = None, **kwargs - ): + ) -> [Channel]: """API providing the current list of banks and e-wallets we support for payouts for both regions # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_payout_channels(async_req=True) + >>> thread = api.get_payout_channels(currency, channel_category, channel_code, async_req=True) >>> result = thread.get() @@ -638,19 +645,28 @@ def get_payout_channels( '_content_type') kwargs['_host_index'] = kwargs.get('_host_index') kwargs['_request_auths'] = kwargs.get('_request_auths', None) + if currency is not None: + kwargs['currency'] = currency + if channel_category is not None: + kwargs['channel_category'] = channel_category + if channel_code is not None: + kwargs['channel_code'] = channel_code return self.get_payout_channels_endpoint.call_with_http_info(**kwargs) def get_payouts( self, - reference_id, + reference_id: str, + limit: Optional[float] = None, + after_id: Optional[str] = None, + before_id: Optional[str] = None, **kwargs - ): + ) -> GetPayouts200Response: """API to retrieve all matching payouts with reference ID # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_payouts(reference_id, async_req=True) + >>> thread = api.get_payouts(reference_id, limit, after_id, before_id, async_req=True) >>> result = thread.get() Args: @@ -721,7 +737,12 @@ def get_payouts( '_content_type') kwargs['_host_index'] = kwargs.get('_host_index') kwargs['_request_auths'] = kwargs.get('_request_auths', None) - kwargs['reference_id'] = \ - reference_id + kwargs['reference_id'] = reference_id + if limit is not None: + kwargs['limit'] = limit + if after_id is not None: + kwargs['after_id'] = after_id + if before_id is not None: + kwargs['before_id'] = before_id return self.get_payouts_endpoint.call_with_http_info(**kwargs) diff --git a/xendit/refund/model/create_refund.py b/xendit/refund/model/create_refund.py index 1688b4c8..fe978efd 100644 --- a/xendit/refund/model/create_refund.py +++ b/xendit/refund/model/create_refund.py @@ -5,6 +5,7 @@ import re # noqa: F401 import sys # noqa: F401 +from typing import List # noqa: F401 from xendit.model_utils import ( # noqa: F401 ApiTypeError, @@ -25,6 +26,9 @@ +def lazy_import(): + pass + class CreateRefund(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -83,13 +87,13 @@ def openapi_types(): and the value is attribute type. """ return { - 'payment_request_id': (str,), # noqa: E501 - 'invoice_id': (str,), # noqa: E501 - 'reference_id': (str,), # noqa: E501 - 'amount': (float,), # noqa: E501 - 'currency': (str,), # noqa: E501 - 'reason': (str,), # noqa: E501 - 'metadata': ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type,), # noqa: E501 + 'payment_request_id': (str, none_type), # noqa: E501 + 'invoice_id': (str, none_type), # noqa: E501 + 'reference_id': (str, none_type), # noqa: E501 + 'amount': (float, none_type), # noqa: E501 + 'currency': (str, none_type), # noqa: E501 + 'reason': (str, none_type), # noqa: E501 + 'metadata': ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type, none_type), # noqa: E501 } @cached_property @@ -208,9 +212,19 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 ]) @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 + def __init__(self, + payment_request_id: str | None = None, + invoice_id: str | None = None, + reference_id: str | None = None, + amount: float | None = None, + currency: str | None = None, + reason: str | None = None, + metadata: dict | None = None, + *args, **kwargs + ): # noqa: E501 """CreateRefund - a model defined in OpenAPI + Keyword Args: _check_type (bool): if True, values for parameters in openapi_types will be type checked and a TypeError will be @@ -280,6 +294,20 @@ def __init__(self, *args, **kwargs): # noqa: E501 self._configuration = _configuration self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + if payment_request_id is not None: + self.payment_request_id = payment_request_id + if invoice_id is not None: + self.invoice_id = invoice_id + if reference_id is not None: + self.reference_id = reference_id + if amount is not None: + self.amount = amount + if currency is not None: + self.currency = currency + if reason is not None: + self.reason = reason + if metadata is not None: + self.metadata = metadata for var_name, var_value in kwargs.items(): if var_name not in self.attribute_map and \ self._configuration is not None and \ diff --git a/xendit/refund/model/create_refund400_response.py b/xendit/refund/model/create_refund400_response.py index 1dcb8322..b81d50ab 100644 --- a/xendit/refund/model/create_refund400_response.py +++ b/xendit/refund/model/create_refund400_response.py @@ -5,6 +5,7 @@ import re # noqa: F401 import sys # noqa: F401 +from typing import List # noqa: F401 from xendit.model_utils import ( # noqa: F401 ApiTypeError, @@ -25,6 +26,9 @@ +def lazy_import(): + pass + class CreateRefund400Response(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -85,8 +89,8 @@ def openapi_types(): and the value is attribute type. """ return { - 'error_code': (str,), # noqa: E501 - 'message': (str,), # noqa: E501 + 'error_code': (str, none_type), # noqa: E501 + 'message': (str, none_type), # noqa: E501 } @cached_property @@ -195,9 +199,14 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 ]) @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 + def __init__(self, + error_code: str | None = None, + message: str | None = None, + *args, **kwargs + ): # noqa: E501 """CreateRefund400Response - a model defined in OpenAPI + Keyword Args: _check_type (bool): if True, values for parameters in openapi_types will be type checked and a TypeError will be @@ -262,6 +271,10 @@ def __init__(self, *args, **kwargs): # noqa: E501 self._configuration = _configuration self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + if error_code is not None: + self.error_code = error_code + if message is not None: + self.message = message for var_name, var_value in kwargs.items(): if var_name not in self.attribute_map and \ self._configuration is not None and \ diff --git a/xendit/refund/model/create_refund403_response.py b/xendit/refund/model/create_refund403_response.py index 63878000..b6eb8773 100644 --- a/xendit/refund/model/create_refund403_response.py +++ b/xendit/refund/model/create_refund403_response.py @@ -5,6 +5,7 @@ import re # noqa: F401 import sys # noqa: F401 +from typing import List # noqa: F401 from xendit.model_utils import ( # noqa: F401 ApiTypeError, @@ -25,6 +26,9 @@ +def lazy_import(): + pass + class CreateRefund403Response(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -79,8 +83,8 @@ def openapi_types(): and the value is attribute type. """ return { - 'error_code': (str,), # noqa: E501 - 'message': (str,), # noqa: E501 + 'error_code': (str, none_type), # noqa: E501 + 'message': (str, none_type), # noqa: E501 } @cached_property @@ -189,9 +193,14 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 ]) @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 + def __init__(self, + message: str | None = None, + error_code: str | None = "UNAUTHORIZED", + *args, **kwargs + ): # noqa: E501 """CreateRefund403Response - a model defined in OpenAPI + Keyword Args: _check_type (bool): if True, values for parameters in openapi_types will be type checked and a TypeError will be @@ -256,6 +265,10 @@ def __init__(self, *args, **kwargs): # noqa: E501 self._configuration = _configuration self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + if error_code is not None: + self.error_code = error_code + if message is not None: + self.message = message for var_name, var_value in kwargs.items(): if var_name not in self.attribute_map and \ self._configuration is not None and \ diff --git a/xendit/refund/model/create_refund404_response.py b/xendit/refund/model/create_refund404_response.py index 135020c4..cb9f9a49 100644 --- a/xendit/refund/model/create_refund404_response.py +++ b/xendit/refund/model/create_refund404_response.py @@ -5,6 +5,7 @@ import re # noqa: F401 import sys # noqa: F401 +from typing import List # noqa: F401 from xendit.model_utils import ( # noqa: F401 ApiTypeError, @@ -25,6 +26,9 @@ +def lazy_import(): + pass + class CreateRefund404Response(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -79,8 +83,8 @@ def openapi_types(): and the value is attribute type. """ return { - 'error_code': (str,), # noqa: E501 - 'message': (str,), # noqa: E501 + 'error_code': (str, none_type), # noqa: E501 + 'message': (str, none_type), # noqa: E501 } @cached_property @@ -189,9 +193,14 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 ]) @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 + def __init__(self, + message: str | None = None, + error_code: str | None = "DATA_NOT_FOUND", + *args, **kwargs + ): # noqa: E501 """CreateRefund404Response - a model defined in OpenAPI + Keyword Args: _check_type (bool): if True, values for parameters in openapi_types will be type checked and a TypeError will be @@ -256,6 +265,10 @@ def __init__(self, *args, **kwargs): # noqa: E501 self._configuration = _configuration self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + if error_code is not None: + self.error_code = error_code + if message is not None: + self.message = message for var_name, var_value in kwargs.items(): if var_name not in self.attribute_map and \ self._configuration is not None and \ diff --git a/xendit/refund/model/create_refund409_response.py b/xendit/refund/model/create_refund409_response.py index ef067803..4c2e69cb 100644 --- a/xendit/refund/model/create_refund409_response.py +++ b/xendit/refund/model/create_refund409_response.py @@ -5,6 +5,7 @@ import re # noqa: F401 import sys # noqa: F401 +from typing import List # noqa: F401 from xendit.model_utils import ( # noqa: F401 ApiTypeError, @@ -25,6 +26,9 @@ +def lazy_import(): + pass + class CreateRefund409Response(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -80,8 +84,8 @@ def openapi_types(): and the value is attribute type. """ return { - 'error_code': (str,), # noqa: E501 - 'message': (str,), # noqa: E501 + 'error_code': (str, none_type), # noqa: E501 + 'message': (str, none_type), # noqa: E501 } @cached_property @@ -190,9 +194,14 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 ]) @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 + def __init__(self, + error_code: str | None = None, + message: str | None = None, + *args, **kwargs + ): # noqa: E501 """CreateRefund409Response - a model defined in OpenAPI + Keyword Args: _check_type (bool): if True, values for parameters in openapi_types will be type checked and a TypeError will be @@ -257,6 +266,10 @@ def __init__(self, *args, **kwargs): # noqa: E501 self._configuration = _configuration self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + if error_code is not None: + self.error_code = error_code + if message is not None: + self.message = message for var_name, var_value in kwargs.items(): if var_name not in self.attribute_map and \ self._configuration is not None and \ diff --git a/xendit/refund/model/create_refund503_response.py b/xendit/refund/model/create_refund503_response.py index 05265044..28c5822b 100644 --- a/xendit/refund/model/create_refund503_response.py +++ b/xendit/refund/model/create_refund503_response.py @@ -5,6 +5,7 @@ import re # noqa: F401 import sys # noqa: F401 +from typing import List # noqa: F401 from xendit.model_utils import ( # noqa: F401 ApiTypeError, @@ -25,6 +26,9 @@ +def lazy_import(): + pass + class CreateRefund503Response(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -80,8 +84,8 @@ def openapi_types(): and the value is attribute type. """ return { - 'error_code': (str,), # noqa: E501 - 'message': (str,), # noqa: E501 + 'error_code': (str, none_type), # noqa: E501 + 'message': (str, none_type), # noqa: E501 } @cached_property @@ -190,9 +194,14 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 ]) @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 + def __init__(self, + error_code: str | None = None, + message: str | None = None, + *args, **kwargs + ): # noqa: E501 """CreateRefund503Response - a model defined in OpenAPI + Keyword Args: _check_type (bool): if True, values for parameters in openapi_types will be type checked and a TypeError will be @@ -257,6 +266,10 @@ def __init__(self, *args, **kwargs): # noqa: E501 self._configuration = _configuration self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + if error_code is not None: + self.error_code = error_code + if message is not None: + self.message = message for var_name, var_value in kwargs.items(): if var_name not in self.attribute_map and \ self._configuration is not None and \ diff --git a/xendit/refund/model/create_refund_default_response.py b/xendit/refund/model/create_refund_default_response.py index c124efcd..547af60c 100644 --- a/xendit/refund/model/create_refund_default_response.py +++ b/xendit/refund/model/create_refund_default_response.py @@ -5,6 +5,7 @@ import re # noqa: F401 import sys # noqa: F401 +from typing import List # noqa: F401 from xendit.model_utils import ( # noqa: F401 ApiTypeError, @@ -25,6 +26,9 @@ +def lazy_import(): + pass + class CreateRefundDefaultResponse(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -76,8 +80,8 @@ def openapi_types(): and the value is attribute type. """ return { - 'error_code': (str,), # noqa: E501 - 'message': (str,), # noqa: E501 + 'error_code': (str, none_type), # noqa: E501 + 'message': (str, none_type), # noqa: E501 } @cached_property @@ -186,9 +190,14 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 ]) @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 + def __init__(self, + error_code: str | None = None, + message: str | None = None, + *args, **kwargs + ): # noqa: E501 """CreateRefundDefaultResponse - a model defined in OpenAPI + Keyword Args: _check_type (bool): if True, values for parameters in openapi_types will be type checked and a TypeError will be @@ -253,6 +262,10 @@ def __init__(self, *args, **kwargs): # noqa: E501 self._configuration = _configuration self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + if error_code is not None: + self.error_code = error_code + if message is not None: + self.message = message for var_name, var_value in kwargs.items(): if var_name not in self.attribute_map and \ self._configuration is not None and \ diff --git a/xendit/refund/model/refund.py b/xendit/refund/model/refund.py index 7adfdd37..642e019a 100644 --- a/xendit/refund/model/refund.py +++ b/xendit/refund/model/refund.py @@ -5,6 +5,7 @@ import re # noqa: F401 import sys # noqa: F401 +from typing import List # noqa: F401 from xendit.model_utils import ( # noqa: F401 ApiTypeError, @@ -25,6 +26,9 @@ +def lazy_import(): + pass + class Refund(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -76,18 +80,18 @@ def openapi_types(): and the value is attribute type. """ return { - 'id': (str,), # noqa: E501 - 'payment_request_id': (str,), # noqa: E501 - 'amount': (float,), # noqa: E501 - 'channel_code': (str,), # noqa: E501 - 'country': (str,), # noqa: E501 - 'currency': (str,), # noqa: E501 - 'reference_id': (str, none_type,), # noqa: E501 - 'failure_code': (str, none_type,), # noqa: E501 - 'refund_fee_amount': (float, none_type,), # noqa: E501 - 'created': (str,), # noqa: E501 - 'updated': (str,), # noqa: E501 - 'metadata': ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type,), # noqa: E501 + 'id': (str, none_type), # noqa: E501 + 'payment_request_id': (str, none_type), # noqa: E501 + 'amount': (float, none_type), # noqa: E501 + 'channel_code': (str, none_type), # noqa: E501 + 'country': (str, none_type), # noqa: E501 + 'currency': (str, none_type), # noqa: E501 + 'reference_id': (str, none_type, none_type), # noqa: E501 + 'failure_code': (str, none_type, none_type), # noqa: E501 + 'refund_fee_amount': (float, none_type, none_type), # noqa: E501 + 'created': (str, none_type), # noqa: E501 + 'updated': (str, none_type), # noqa: E501 + 'metadata': ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type, none_type), # noqa: E501 } @cached_property @@ -216,9 +220,24 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 ]) @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 + def __init__(self, + id: str | None = None, + payment_request_id: str | None = None, + amount: float | None = None, + channel_code: str | None = None, + country: str | None = None, + currency: str | None = None, + reference_id: str | None = None, + failure_code: str | None = None, + refund_fee_amount: float | None = None, + created: str | None = None, + updated: str | None = None, + metadata: dict | None = None, + *args, **kwargs + ): # noqa: E501 """Refund - a model defined in OpenAPI + Keyword Args: _check_type (bool): if True, values for parameters in openapi_types will be type checked and a TypeError will be @@ -293,6 +312,30 @@ def __init__(self, *args, **kwargs): # noqa: E501 self._configuration = _configuration self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + if id is not None: + self.id = id + if payment_request_id is not None: + self.payment_request_id = payment_request_id + if amount is not None: + self.amount = amount + if channel_code is not None: + self.channel_code = channel_code + if country is not None: + self.country = country + if currency is not None: + self.currency = currency + if reference_id is not None: + self.reference_id = reference_id + if failure_code is not None: + self.failure_code = failure_code + if refund_fee_amount is not None: + self.refund_fee_amount = refund_fee_amount + if created is not None: + self.created = created + if updated is not None: + self.updated = updated + if metadata is not None: + self.metadata = metadata for var_name, var_value in kwargs.items(): if var_name not in self.attribute_map and \ self._configuration is not None and \ diff --git a/xendit/refund/model/refund_list.py b/xendit/refund/model/refund_list.py index 4d20f01a..7cd8d94d 100644 --- a/xendit/refund/model/refund_list.py +++ b/xendit/refund/model/refund_list.py @@ -5,6 +5,7 @@ import re # noqa: F401 import sys # noqa: F401 +from typing import List # noqa: F401 from xendit.model_utils import ( # noqa: F401 ApiTypeError, @@ -23,11 +24,12 @@ ) from xendit.exceptions import ApiAttributeError +from xendit.refund.model.refund import Refund +globals()['Refund'] = Refund -def lazy_import(): - from xendit.refund.model.refund import Refund - globals()['Refund'] = Refund +def lazy_import(): + pass class RefundList(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. @@ -83,7 +85,7 @@ def openapi_types(): lazy_import() return { 'data': ([Refund],), # noqa: E501 - 'has_more': (bool,), # noqa: E501 + 'has_more': (bool, none_type), # noqa: E501 } @cached_property @@ -195,12 +197,17 @@ def _from_openapi_data(cls, data, *args, **kwargs): # noqa: E501 ]) @convert_js_args_to_python_args - def __init__(self, data, *args, **kwargs): # noqa: E501 + def __init__(self, + data: list, + has_more: bool | None = None, + *args, **kwargs + ): # noqa: E501 """RefundList - a model defined in OpenAPI Args: data ([Refund]): + Keyword Args: _check_type (bool): if True, values for parameters in openapi_types will be type checked and a TypeError will be @@ -265,6 +272,8 @@ def __init__(self, data, *args, **kwargs): # noqa: E501 self._visited_composed_classes = _visited_composed_classes + (self.__class__,) self.data = data + if has_more is not None: + self.has_more = has_more for var_name, var_value in kwargs.items(): if var_name not in self.attribute_map and \ self._configuration is not None and \ diff --git a/xendit/refund/refund_api.py b/xendit/refund/refund_api.py index ac154f33..272def9a 100644 --- a/xendit/refund/refund_api.py +++ b/xendit/refund/refund_api.py @@ -19,6 +19,7 @@ none_type, validate_and_convert_types ) +from typing import Optional, List # noqa: F401 from xendit.refund.model import * # noqa: F401,E501 @@ -237,15 +238,16 @@ def __init__(self, api_client=None): def cancel_refund( self, - refund_id, + refund_id: str, + idempotency_key: Optional[str] = None, **kwargs - ): + ) -> Refund: """cancel_refund # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.cancel_refund(refund_id, async_req=True) + >>> thread = api.cancel_refund(refund_id, idempotency_key, async_req=True) >>> result = thread.get() Args: @@ -314,20 +316,23 @@ def cancel_refund( '_content_type') kwargs['_host_index'] = kwargs.get('_host_index') kwargs['_request_auths'] = kwargs.get('_request_auths', None) - kwargs['refund_id'] = \ - refund_id + kwargs['refund_id'] = refund_id + if idempotency_key is not None: + kwargs['idempotency_key'] = idempotency_key return self.cancel_refund_endpoint.call_with_http_info(**kwargs) def create_refund( self, + idempotency_key: Optional[str] = None, + create_refund: Optional[CreateRefund] = None, **kwargs - ): + ) -> Refund: """create_refund # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.create_refund(async_req=True) + >>> thread = api.create_refund(idempotency_key, create_refund, async_req=True) >>> result = thread.get() @@ -395,12 +400,16 @@ def create_refund( '_content_type') kwargs['_host_index'] = kwargs.get('_host_index') kwargs['_request_auths'] = kwargs.get('_request_auths', None) + if idempotency_key is not None: + kwargs['idempotency_key'] = idempotency_key + if create_refund is not None: + kwargs['create_refund'] = create_refund return self.create_refund_endpoint.call_with_http_info(**kwargs) def get_all_refunds( self, **kwargs - ): + ) -> RefundList: """get_all_refunds # noqa: E501 This method makes a synchronous HTTP request by default. To make an @@ -476,15 +485,16 @@ def get_all_refunds( def get_refund( self, - refund_id, + refund_id: str, + idempotency_key: Optional[str] = None, **kwargs - ): + ) -> Refund: """get_refund # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_refund(refund_id, async_req=True) + >>> thread = api.get_refund(refund_id, idempotency_key, async_req=True) >>> result = thread.get() Args: @@ -553,7 +563,8 @@ def get_refund( '_content_type') kwargs['_host_index'] = kwargs.get('_host_index') kwargs['_request_auths'] = kwargs.get('_request_auths', None) - kwargs['refund_id'] = \ - refund_id + kwargs['refund_id'] = refund_id + if idempotency_key is not None: + kwargs['idempotency_key'] = idempotency_key return self.get_refund_endpoint.call_with_http_info(**kwargs) diff --git a/xendit/rest.py b/xendit/rest.py index b0c89e9a..2e05ff4a 100644 --- a/xendit/rest.py +++ b/xendit/rest.py @@ -14,7 +14,7 @@ import urllib3 import ipaddress -from xendit.exceptions import ApiException, UnauthorizedException, ForbiddenException, NotFoundException, ServiceException, ApiValueError +from xendit.exceptions import ApiValueError, XenditSdkException logger = logging.getLogger(__name__) @@ -196,7 +196,10 @@ def request(self, method, url, query_params=None, headers=None, msg = """Cannot prepare a request message for provided arguments. Please check that your arguments match declared content type.""" - raise ApiException(status=0, reason=msg) + raise XenditSdkException( + param_status="0", + param_status_text=msg + ) # For `GET`, `HEAD` else: r = self.pool_manager.request(method, url, @@ -206,7 +209,10 @@ def request(self, method, url, query_params=None, headers=None, headers=headers) except urllib3.exceptions.SSLError as e: msg = "{0}\n{1}".format(type(e).__name__, str(e)) - raise ApiException(status=0, reason=msg) + raise XenditSdkException( + param_status="0", + param_status_text=msg + ) if _preload_content: r = RESTResponse(r) @@ -215,20 +221,11 @@ def request(self, method, url, query_params=None, headers=None, logger.debug("response body: %s", r.data) if not 200 <= r.status <= 299: - if r.status == 401: - raise UnauthorizedException(http_resp=r) - - if r.status == 403: - raise ForbiddenException(http_resp=r) - - if r.status == 404: - raise NotFoundException(http_resp=r) - - if 500 <= r.status <= 599: - raise ServiceException(http_resp=r) - - raise ApiException(http_resp=r) - + raise XenditSdkException( + raw_response=r.data, + param_status=str(r.status), + param_status_text=r.reason, + ) return r def GET(self, url, headers=None, query_params=None, _preload_content=True,