From 64751e0131eac662728326e4742319d77062d434 Mon Sep 17 00:00:00 2001 From: Dmitriy Date: Wed, 5 Mar 2025 20:19:47 +0100 Subject: [PATCH 01/13] Update SDK to version 1.5.0 with multiple enhancements - Upgrade OpenAPI generator version from 4.3.1 to 6.0.1 - Add support for new payment methods (alipay, mbway) - Update phone number handling to use E.164 format - Add metadata support for various models - Remove Python 2.7 support and update dependencies - Add new fields like `storeId`, `expireAt`, and `retrySchedule` - Update API documentation and model descriptions --- .openapi-generator/FILES | 64 +- .openapi-generator/VERSION | 2 +- Monei/__init__.py | 78 +- Monei/api/__init__.py | 12 +- Monei/api/apple_pay_domain_api.py | 269 +- Monei/api/bizum_api.py | 267 +- Monei/api/payment_methods_api.py | 175 + Monei/api/payments_api.py | 2501 ++++++------ Monei/api/subscriptions_api.py | 2003 +++++---- Monei/api_client.py | 750 ++-- Monei/apis/__init__.py | 2 + Monei/configuration.py | 132 +- Monei/exceptions.py | 56 +- Monei/model/activate_subscription_request.py | 8 +- Monei/model/address.py | 4 +- .../apple_pay_domain_register200_response.py | 263 ++ .../apple_pay_domain_register400_response.py | 335 ++ .../apple_pay_domain_register401_response.py | 335 ++ .../apple_pay_domain_register404_response.py | 335 ++ .../apple_pay_domain_register422_response.py | 335 ++ .../apple_pay_domain_register500_response.py | 335 ++ .../apple_pay_domain_register503_response.py | 335 ++ .../model/bizum_validate_phone200_response.py | 263 ++ Monei/model/cancel_payment_request.py | 4 +- Monei/model/cancel_subscription_request.py | 4 +- Monei/model/capture_payment_request.py | 4 +- Monei/model/confirm_payment_request.py | 8 +- .../confirm_payment_request_payment_method.py | 4 +- ...irm_payment_request_payment_method_card.py | 4 +- Monei/model/create_payment_request.py | 16 +- Monei/model/create_subscription_request.py | 44 +- Monei/model/error.py | 40 +- Monei/model/pause_subscription_request.py | 4 +- Monei/model/payment.py | 12 +- Monei/model/payment_billing_details.py | 20 +- Monei/model/payment_cancellation_reason.py | 4 +- Monei/model/payment_customer.py | 16 +- Monei/model/payment_last_refund_reason.py | 4 +- Monei/model/payment_message_channel.py | 13 +- Monei/model/payment_message_language.py | 4 +- Monei/model/payment_methods.py | 303 ++ Monei/model/payment_methods_metadata.py | 363 ++ .../model/payment_methods_metadata_alipay.py | 263 ++ .../payment_methods_metadata_apple_pay.py | 263 ++ .../payment_methods_metadata_bancontact.py | 263 ++ Monei/model/payment_methods_metadata_bizum.py | 263 ++ Monei/model/payment_methods_metadata_blik.py | 263 ++ Monei/model/payment_methods_metadata_card.py | 263 ++ .../payment_methods_metadata_click_to_pay.py | 289 ++ ..._methods_metadata_click_to_pay_discover.py | 267 ++ ...ethods_metadata_click_to_pay_mastercard.py | 267 ++ ...ment_methods_metadata_click_to_pay_visa.py | 267 ++ Monei/model/payment_methods_metadata_eps.py | 263 ++ .../model/payment_methods_metadata_giropay.py | 263 ++ .../payment_methods_metadata_google_pay.py | 267 ++ .../model/payment_methods_metadata_i_deal.py | 263 ++ .../model/payment_methods_metadata_klarna.py | 263 ++ Monei/model/payment_methods_metadata_mbway.py | 263 ++ Monei/model/payment_methods_metadata_sepa.py | 263 ++ .../model/payment_methods_metadata_sofort.py | 263 ++ .../model/payment_methods_metadata_trustly.py | 263 ++ Monei/model/payment_methods_methods.py | 286 ++ Monei/model/payment_next_action.py | 9 +- Monei/model/payment_payment_method.py | 48 +- Monei/model/payment_payment_method_bizum.py | 8 +- .../payment_payment_method_bizum_input.py | 263 ++ Monei/model/payment_payment_method_card.py | 4 +- .../payment_payment_method_card_input.py | 283 ++ Monei/model/payment_payment_method_cofidis.py | 4 +- Monei/model/payment_payment_method_input.py | 20 +- Monei/model/payment_payment_method_klarna.py | 285 ++ Monei/model/payment_payment_method_mbway.py | 263 ++ Monei/model/payment_payment_method_paypal.py | 4 +- Monei/model/payment_payment_method_sepa.py | 295 ++ Monei/model/payment_payment_method_trustly.py | 263 ++ Monei/model/payment_payment_methods.py | 12 +- Monei/model/payment_refund_reason.py | 4 +- Monei/model/payment_sequence.py | 4 +- Monei/model/payment_sequence_recurring.py | 4 +- Monei/model/payment_session_details.py | 4 +- Monei/model/payment_shipping_details.py | 20 +- Monei/model/payment_shop.py | 4 +- Monei/model/payment_status.py | 4 +- Monei/model/payment_trace_details.py | 4 +- Monei/model/payment_transaction_type.py | 14 +- Monei/model/recurring_payment_request.py | 8 +- Monei/model/refund_payment_request.py | 4 +- .../register_apple_pay_domain_request.py | 269 ++ Monei/model/send_payment_link_request.py | 4 +- Monei/model/send_payment_receipt_request.py | 4 +- Monei/model/send_payment_request_request.py | 279 ++ Monei/model/send_subscription_link_request.py | 279 ++ .../model/send_subscription_status_request.py | 279 ++ Monei/model/subscription.py | 22 +- Monei/model/subscription_interval.py | 4 +- Monei/model/subscription_last_payment.py | 4 +- Monei/model/subscription_payment_method.py | 4 +- .../model/subscription_payment_method_card.py | 4 +- Monei/model/subscription_retry_schedule.py | 291 ++ .../subscription_retry_schedule_inner.py | 285 ++ Monei/model/subscription_status.py | 4 +- Monei/model/update_subscription_request.py | 22 +- Monei/model/validate_bizum_phone_request.py | 279 ++ Monei/model_utils.py | 4 +- Monei/models/__init__.py | 168 +- Monei/models/activate_subscription_request.py | 4 +- Monei/models/address.py | 4 +- Monei/models/cancel_payment_request.py | 4 +- Monei/models/cancel_subscription_request.py | 4 +- Monei/models/capture_payment_request.py | 4 +- Monei/models/confirm_payment_request.py | 4 +- .../confirm_payment_request_payment_method.py | 4 +- ...irm_payment_request_payment_method_card.py | 4 +- Monei/models/create_payment_request.py | 4 +- Monei/models/create_subscription_request.py | 34 +- Monei/models/error.py | 130 +- Monei/models/inline_response200.py | 4 +- Monei/models/inline_response2001.py | 4 +- Monei/models/pause_subscription_request.py | 4 +- Monei/models/payment.py | 4 +- Monei/models/payment_billing_details.py | 16 +- Monei/models/payment_cancellation_reason.py | 4 +- Monei/models/payment_customer.py | 16 +- Monei/models/payment_last_refund_reason.py | 4 +- Monei/models/payment_message_channel.py | 4 +- Monei/models/payment_message_language.py | 4 +- Monei/models/payment_methods.py | 352 ++ Monei/models/payment_methods_metadata.py | 536 +++ .../models/payment_methods_metadata_alipay.py | 122 + .../payment_methods_metadata_apple_pay.py | 122 + .../payment_methods_metadata_bancontact.py | 122 + .../models/payment_methods_metadata_bizum.py | 122 + Monei/models/payment_methods_metadata_blik.py | 122 + Monei/models/payment_methods_metadata_card.py | 122 + .../payment_methods_metadata_click_to_pay.py | 228 ++ ..._methods_metadata_click_to_pay_discover.py | 146 + ...ethods_metadata_click_to_pay_mastercard.py | 146 + ...ment_methods_metadata_click_to_pay_visa.py | 146 + Monei/models/payment_methods_metadata_eps.py | 122 + .../payment_methods_metadata_giropay.py | 122 + .../payment_methods_metadata_google_pay.py | 150 + .../models/payment_methods_metadata_i_deal.py | 122 + .../models/payment_methods_metadata_klarna.py | 122 + .../models/payment_methods_metadata_mbway.py | 122 + Monei/models/payment_methods_metadata_sepa.py | 122 + .../models/payment_methods_metadata_sofort.py | 122 + .../payment_methods_metadata_trustly.py | 122 + Monei/models/payment_next_action.py | 4 +- Monei/models/payment_payment_method.py | 4 +- Monei/models/payment_payment_method_bizum.py | 8 +- .../payment_payment_method_bizum_input.py | 8 +- Monei/models/payment_payment_method_card.py | 4 +- .../payment_payment_method_card_input.py | 12 +- .../models/payment_payment_method_cofidis.py | 4 +- Monei/models/payment_payment_method_input.py | 4 +- Monei/models/payment_payment_method_klarna.py | 20 +- Monei/models/payment_payment_method_mbway.py | 8 +- Monei/models/payment_payment_method_paypal.py | 4 +- Monei/models/payment_payment_method_sepa.py | 4 +- .../models/payment_payment_method_trustly.py | 4 +- Monei/models/payment_refund_reason.py | 4 +- Monei/models/payment_sequence.py | 4 +- Monei/models/payment_sequence_recurring.py | 4 +- Monei/models/payment_session_details.py | 4 +- Monei/models/payment_shipping_details.py | 16 +- Monei/models/payment_shop.py | 4 +- Monei/models/payment_status.py | 4 +- Monei/models/payment_trace_details.py | 4 +- Monei/models/payment_transaction_type.py | 4 +- Monei/models/recurring_payment_request.py | 4 +- Monei/models/refund_payment_request.py | 4 +- .../register_apple_pay_domain_request.py | 123 + Monei/models/send_payment_link_request.py | 4 +- Monei/models/send_payment_receipt_request.py | 4 +- Monei/models/send_payment_request_request.py | 149 + .../models/send_subscription_link_request.py | 212 + .../send_subscription_status_request.py | 212 + Monei/models/subscription.py | 34 +- Monei/models/subscription_interval.py | 4 +- Monei/models/subscription_last_payment.py | 4 +- Monei/models/subscription_payment_method.py | 4 +- .../subscription_payment_method_card.py | 4 +- Monei/models/subscription_status.py | 4 +- Monei/models/update_subscription_request.py | 34 +- Monei/models/validate_bizum_phone_request.py | 4 +- Monei/rest.py | 115 +- build/package.json | 12 +- build/yarn.lock | 3575 +++++++++-------- requirements.txt | 5 +- test-requirements.txt | 2 - ...t_apple_pay_domain_register200_response.py | 35 + ...t_apple_pay_domain_register400_response.py | 37 + ...t_apple_pay_domain_register401_response.py | 37 + ...t_apple_pay_domain_register404_response.py | 37 + ...t_apple_pay_domain_register422_response.py | 37 + ...t_apple_pay_domain_register500_response.py | 37 + ...t_apple_pay_domain_register503_response.py | 37 + test/test_bizum_validate_phone200_response.py | 35 + test/test_payment_methods.py | 105 + test/test_payment_methods_api.py | 40 + test/test_payment_methods_metadata.py | 96 + test/test_payment_methods_metadata_alipay.py | 52 + ...test_payment_methods_metadata_apple_pay.py | 52 + ...est_payment_methods_metadata_bancontact.py | 52 + test/test_payment_methods_metadata_bizum.py | 52 + test/test_payment_methods_metadata_blik.py | 52 + test/test_payment_methods_metadata_card.py | 52 + ...t_payment_methods_metadata_click_to_pay.py | 62 + ..._methods_metadata_click_to_pay_discover.py | 53 + ...ethods_metadata_click_to_pay_mastercard.py | 53 + ...ment_methods_metadata_click_to_pay_visa.py | 53 + test/test_payment_methods_metadata_eps.py | 52 + test/test_payment_methods_metadata_giropay.py | 52 + ...est_payment_methods_metadata_google_pay.py | 53 + test/test_payment_methods_metadata_i_deal.py | 52 + test/test_payment_methods_metadata_klarna.py | 52 + test/test_payment_methods_metadata_mbway.py | 52 + test/test_payment_methods_metadata_sepa.py | 52 + test/test_payment_methods_metadata_sofort.py | 52 + test/test_payment_methods_metadata_trustly.py | 52 + test/test_payment_methods_methods.py | 35 + .../test_register_apple_pay_domain_request.py | 53 + test/test_send_payment_request_request.py | 54 + test/test_send_subscription_link_request.py | 55 + test/test_send_subscription_status_request.py | 55 + test/test_subscription_retry_schedule.py | 37 + .../test_subscription_retry_schedule_inner.py | 35 + tox.ini | 2 +- 228 files changed, 24651 insertions(+), 4630 deletions(-) create mode 100644 Monei/api/payment_methods_api.py create mode 100644 Monei/model/apple_pay_domain_register200_response.py create mode 100644 Monei/model/apple_pay_domain_register400_response.py create mode 100644 Monei/model/apple_pay_domain_register401_response.py create mode 100644 Monei/model/apple_pay_domain_register404_response.py create mode 100644 Monei/model/apple_pay_domain_register422_response.py create mode 100644 Monei/model/apple_pay_domain_register500_response.py create mode 100644 Monei/model/apple_pay_domain_register503_response.py create mode 100644 Monei/model/bizum_validate_phone200_response.py create mode 100644 Monei/model/payment_methods.py create mode 100644 Monei/model/payment_methods_metadata.py create mode 100644 Monei/model/payment_methods_metadata_alipay.py create mode 100644 Monei/model/payment_methods_metadata_apple_pay.py create mode 100644 Monei/model/payment_methods_metadata_bancontact.py create mode 100644 Monei/model/payment_methods_metadata_bizum.py create mode 100644 Monei/model/payment_methods_metadata_blik.py create mode 100644 Monei/model/payment_methods_metadata_card.py create mode 100644 Monei/model/payment_methods_metadata_click_to_pay.py create mode 100644 Monei/model/payment_methods_metadata_click_to_pay_discover.py create mode 100644 Monei/model/payment_methods_metadata_click_to_pay_mastercard.py create mode 100644 Monei/model/payment_methods_metadata_click_to_pay_visa.py create mode 100644 Monei/model/payment_methods_metadata_eps.py create mode 100644 Monei/model/payment_methods_metadata_giropay.py create mode 100644 Monei/model/payment_methods_metadata_google_pay.py create mode 100644 Monei/model/payment_methods_metadata_i_deal.py create mode 100644 Monei/model/payment_methods_metadata_klarna.py create mode 100644 Monei/model/payment_methods_metadata_mbway.py create mode 100644 Monei/model/payment_methods_metadata_sepa.py create mode 100644 Monei/model/payment_methods_metadata_sofort.py create mode 100644 Monei/model/payment_methods_metadata_trustly.py create mode 100644 Monei/model/payment_methods_methods.py create mode 100644 Monei/model/payment_payment_method_bizum_input.py create mode 100644 Monei/model/payment_payment_method_card_input.py create mode 100644 Monei/model/payment_payment_method_klarna.py create mode 100644 Monei/model/payment_payment_method_mbway.py create mode 100644 Monei/model/payment_payment_method_sepa.py create mode 100644 Monei/model/payment_payment_method_trustly.py create mode 100644 Monei/model/register_apple_pay_domain_request.py create mode 100644 Monei/model/send_payment_request_request.py create mode 100644 Monei/model/send_subscription_link_request.py create mode 100644 Monei/model/send_subscription_status_request.py create mode 100644 Monei/model/subscription_retry_schedule.py create mode 100644 Monei/model/subscription_retry_schedule_inner.py create mode 100644 Monei/model/validate_bizum_phone_request.py create mode 100644 Monei/models/payment_methods.py create mode 100644 Monei/models/payment_methods_metadata.py create mode 100644 Monei/models/payment_methods_metadata_alipay.py create mode 100644 Monei/models/payment_methods_metadata_apple_pay.py create mode 100644 Monei/models/payment_methods_metadata_bancontact.py create mode 100644 Monei/models/payment_methods_metadata_bizum.py create mode 100644 Monei/models/payment_methods_metadata_blik.py create mode 100644 Monei/models/payment_methods_metadata_card.py create mode 100644 Monei/models/payment_methods_metadata_click_to_pay.py create mode 100644 Monei/models/payment_methods_metadata_click_to_pay_discover.py create mode 100644 Monei/models/payment_methods_metadata_click_to_pay_mastercard.py create mode 100644 Monei/models/payment_methods_metadata_click_to_pay_visa.py create mode 100644 Monei/models/payment_methods_metadata_eps.py create mode 100644 Monei/models/payment_methods_metadata_giropay.py create mode 100644 Monei/models/payment_methods_metadata_google_pay.py create mode 100644 Monei/models/payment_methods_metadata_i_deal.py create mode 100644 Monei/models/payment_methods_metadata_klarna.py create mode 100644 Monei/models/payment_methods_metadata_mbway.py create mode 100644 Monei/models/payment_methods_metadata_sepa.py create mode 100644 Monei/models/payment_methods_metadata_sofort.py create mode 100644 Monei/models/payment_methods_metadata_trustly.py create mode 100644 Monei/models/register_apple_pay_domain_request.py create mode 100644 Monei/models/send_payment_request_request.py create mode 100644 Monei/models/send_subscription_link_request.py create mode 100644 Monei/models/send_subscription_status_request.py create mode 100644 test/test_apple_pay_domain_register200_response.py create mode 100644 test/test_apple_pay_domain_register400_response.py create mode 100644 test/test_apple_pay_domain_register401_response.py create mode 100644 test/test_apple_pay_domain_register404_response.py create mode 100644 test/test_apple_pay_domain_register422_response.py create mode 100644 test/test_apple_pay_domain_register500_response.py create mode 100644 test/test_apple_pay_domain_register503_response.py create mode 100644 test/test_bizum_validate_phone200_response.py create mode 100644 test/test_payment_methods.py create mode 100644 test/test_payment_methods_api.py create mode 100644 test/test_payment_methods_metadata.py create mode 100644 test/test_payment_methods_metadata_alipay.py create mode 100644 test/test_payment_methods_metadata_apple_pay.py create mode 100644 test/test_payment_methods_metadata_bancontact.py create mode 100644 test/test_payment_methods_metadata_bizum.py create mode 100644 test/test_payment_methods_metadata_blik.py create mode 100644 test/test_payment_methods_metadata_card.py create mode 100644 test/test_payment_methods_metadata_click_to_pay.py create mode 100644 test/test_payment_methods_metadata_click_to_pay_discover.py create mode 100644 test/test_payment_methods_metadata_click_to_pay_mastercard.py create mode 100644 test/test_payment_methods_metadata_click_to_pay_visa.py create mode 100644 test/test_payment_methods_metadata_eps.py create mode 100644 test/test_payment_methods_metadata_giropay.py create mode 100644 test/test_payment_methods_metadata_google_pay.py create mode 100644 test/test_payment_methods_metadata_i_deal.py create mode 100644 test/test_payment_methods_metadata_klarna.py create mode 100644 test/test_payment_methods_metadata_mbway.py create mode 100644 test/test_payment_methods_metadata_sepa.py create mode 100644 test/test_payment_methods_metadata_sofort.py create mode 100644 test/test_payment_methods_metadata_trustly.py create mode 100644 test/test_payment_methods_methods.py create mode 100644 test/test_register_apple_pay_domain_request.py create mode 100644 test/test_send_payment_request_request.py create mode 100644 test/test_send_subscription_link_request.py create mode 100644 test/test_send_subscription_status_request.py create mode 100644 test/test_subscription_retry_schedule.py create mode 100644 test/test_subscription_retry_schedule_inner.py diff --git a/.openapi-generator/FILES b/.openapi-generator/FILES index f869133..d36cda9 100644 --- a/.openapi-generator/FILES +++ b/.openapi-generator/FILES @@ -1,8 +1,8 @@ -.gitlab-ci.yml -.travis.yml Monei/__init__.py Monei/api/__init__.py Monei/api/apple_pay_domain_api.py +Monei/api/bizum_api.py +Monei/api/payment_methods_api.py Monei/api/payments_api.py Monei/api/subscriptions_api.py Monei/api_client.py @@ -12,16 +12,22 @@ Monei/exceptions.py Monei/model/__init__.py Monei/model/activate_subscription_request.py Monei/model/address.py +Monei/model/apple_pay_domain_register200_response.py +Monei/model/apple_pay_domain_register400_response.py +Monei/model/apple_pay_domain_register401_response.py +Monei/model/apple_pay_domain_register404_response.py +Monei/model/apple_pay_domain_register422_response.py +Monei/model/apple_pay_domain_register500_response.py +Monei/model/apple_pay_domain_register503_response.py +Monei/model/bizum_validate_phone200_response.py Monei/model/cancel_payment_request.py Monei/model/cancel_subscription_request.py Monei/model/capture_payment_request.py -Monei/model/card.py Monei/model/confirm_payment_request.py Monei/model/confirm_payment_request_payment_method.py Monei/model/confirm_payment_request_payment_method_card.py Monei/model/create_payment_request.py Monei/model/create_subscription_request.py -Monei/model/domain_register200_response.py Monei/model/error.py Monei/model/pause_subscription_request.py Monei/model/payment.py @@ -31,13 +37,41 @@ Monei/model/payment_customer.py Monei/model/payment_last_refund_reason.py Monei/model/payment_message_channel.py Monei/model/payment_message_language.py +Monei/model/payment_methods.py +Monei/model/payment_methods_metadata.py +Monei/model/payment_methods_metadata_alipay.py +Monei/model/payment_methods_metadata_apple_pay.py +Monei/model/payment_methods_metadata_bancontact.py +Monei/model/payment_methods_metadata_bizum.py +Monei/model/payment_methods_metadata_blik.py +Monei/model/payment_methods_metadata_card.py +Monei/model/payment_methods_metadata_click_to_pay.py +Monei/model/payment_methods_metadata_click_to_pay_discover.py +Monei/model/payment_methods_metadata_click_to_pay_mastercard.py +Monei/model/payment_methods_metadata_click_to_pay_visa.py +Monei/model/payment_methods_metadata_eps.py +Monei/model/payment_methods_metadata_giropay.py +Monei/model/payment_methods_metadata_google_pay.py +Monei/model/payment_methods_metadata_i_deal.py +Monei/model/payment_methods_metadata_klarna.py +Monei/model/payment_methods_metadata_mbway.py +Monei/model/payment_methods_metadata_sepa.py +Monei/model/payment_methods_metadata_sofort.py +Monei/model/payment_methods_metadata_trustly.py +Monei/model/payment_methods_methods.py Monei/model/payment_next_action.py Monei/model/payment_payment_method.py Monei/model/payment_payment_method_bizum.py +Monei/model/payment_payment_method_bizum_input.py Monei/model/payment_payment_method_card.py +Monei/model/payment_payment_method_card_input.py Monei/model/payment_payment_method_cofidis.py Monei/model/payment_payment_method_input.py +Monei/model/payment_payment_method_klarna.py +Monei/model/payment_payment_method_mbway.py Monei/model/payment_payment_method_paypal.py +Monei/model/payment_payment_method_sepa.py +Monei/model/payment_payment_method_trustly.py Monei/model/payment_payment_methods.py Monei/model/payment_refund_reason.py Monei/model/payment_sequence.py @@ -50,23 +84,37 @@ Monei/model/payment_trace_details.py Monei/model/payment_transaction_type.py Monei/model/recurring_payment_request.py Monei/model/refund_payment_request.py -Monei/model/register_domain_request.py +Monei/model/register_apple_pay_domain_request.py Monei/model/send_payment_link_request.py Monei/model/send_payment_receipt_request.py +Monei/model/send_payment_request_request.py +Monei/model/send_subscription_link_request.py +Monei/model/send_subscription_status_request.py Monei/model/subscription.py Monei/model/subscription_interval.py Monei/model/subscription_last_payment.py Monei/model/subscription_payment_method.py Monei/model/subscription_payment_method_card.py +Monei/model/subscription_retry_schedule.py +Monei/model/subscription_retry_schedule_inner.py Monei/model/subscription_status.py Monei/model/update_subscription_request.py +Monei/model/validate_bizum_phone_request.py Monei/model_utils.py Monei/models/__init__.py Monei/rest.py -git_push.sh requirements.txt test-requirements.txt test/__init__.py -test/test_domain_register200_response.py -test/test_payment_payment_methods.py +test/test_apple_pay_domain_register200_response.py +test/test_apple_pay_domain_register400_response.py +test/test_apple_pay_domain_register401_response.py +test/test_apple_pay_domain_register404_response.py +test/test_apple_pay_domain_register422_response.py +test/test_apple_pay_domain_register500_response.py +test/test_apple_pay_domain_register503_response.py +test/test_bizum_validate_phone200_response.py +test/test_payment_methods_methods.py +test/test_subscription_retry_schedule.py +test/test_subscription_retry_schedule_inner.py tox.ini diff --git a/.openapi-generator/VERSION b/.openapi-generator/VERSION index ecedc98..6d54bbd 100644 --- a/.openapi-generator/VERSION +++ b/.openapi-generator/VERSION @@ -1 +1 @@ -4.3.1 \ No newline at end of file +6.0.1 \ No newline at end of file diff --git a/Monei/__init__.py b/Monei/__init__.py index d94aa6f..4dc34ca 100644 --- a/Monei/__init__.py +++ b/Monei/__init__.py @@ -1,93 +1,29 @@ -# coding: utf-8 - # flake8: noqa """ MONEI API v1 -

The MONEI API is organized around REST. Our API has predictable resource-oriented URLs, accepts JSON-encoded request bodies, returns JSON-encoded responses, and uses standard HTTP response codes, authentication, and verbs.

Base URL:

https://api.monei.com/v1

Client libraries:

Important:

If you are not using our official SDKs, you need to provide a valid User-Agent header in each request, otherwise your requests will be rejected.

# noqa: E501 +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - The version of the OpenAPI document: 1.4.6 + The version of the OpenAPI document: 1.5.0 Generated by: https://openapi-generator.tech """ -from __future__ import absolute_import - __version__ = "1.2.6" -# import apis into sdk package -from Monei.api.apple_pay_domain_api import ApplePayDomainApi -from Monei.api.bizum_api import BizumApi -from Monei.api.payments_api import PaymentsApi -from Monei.api.subscriptions_api import SubscriptionsApi - # import ApiClient from Monei.api_client import ApiClient + +# import Configuration from Monei.configuration import Configuration + +# import exceptions from Monei.exceptions import OpenApiException +from Monei.exceptions import ApiAttributeError from Monei.exceptions import ApiTypeError from Monei.exceptions import ApiValueError from Monei.exceptions import ApiKeyError from Monei.exceptions import ApiException -# import models into sdk package -from Monei.models.activate_subscription_request import ActivateSubscriptionRequest -from Monei.models.address import Address -from Monei.models.cancel_payment_request import CancelPaymentRequest -from Monei.models.cancel_subscription_request import CancelSubscriptionRequest -from Monei.models.capture_payment_request import CapturePaymentRequest -from Monei.models.confirm_payment_request import ConfirmPaymentRequest -from Monei.models.confirm_payment_request_payment_method import ConfirmPaymentRequestPaymentMethod -from Monei.models.confirm_payment_request_payment_method_card import ConfirmPaymentRequestPaymentMethodCard -from Monei.models.create_payment_request import CreatePaymentRequest -from Monei.models.create_subscription_request import CreateSubscriptionRequest -from Monei.models.error import Error -from Monei.models.inline_response200 import InlineResponse200 -from Monei.models.inline_response2001 import InlineResponse2001 -from Monei.models.pause_subscription_request import PauseSubscriptionRequest -from Monei.models.payment import Payment -from Monei.models.payment_billing_details import PaymentBillingDetails -from Monei.models.payment_cancellation_reason import PaymentCancellationReason -from Monei.models.payment_customer import PaymentCustomer -from Monei.models.payment_last_refund_reason import PaymentLastRefundReason -from Monei.models.payment_message_channel import PaymentMessageChannel -from Monei.models.payment_message_language import PaymentMessageLanguage -from Monei.models.payment_next_action import PaymentNextAction -from Monei.models.payment_payment_method import PaymentPaymentMethod -from Monei.models.payment_payment_method_bizum import PaymentPaymentMethodBizum -from Monei.models.payment_payment_method_bizum_input import PaymentPaymentMethodBizumInput -from Monei.models.payment_payment_method_card import PaymentPaymentMethodCard -from Monei.models.payment_payment_method_card_input import PaymentPaymentMethodCardInput -from Monei.models.payment_payment_method_cofidis import PaymentPaymentMethodCofidis -from Monei.models.payment_payment_method_input import PaymentPaymentMethodInput -from Monei.models.payment_payment_method_klarna import PaymentPaymentMethodKlarna -from Monei.models.payment_payment_method_mbway import PaymentPaymentMethodMbway -from Monei.models.payment_payment_method_paypal import PaymentPaymentMethodPaypal -from Monei.models.payment_payment_method_sepa import PaymentPaymentMethodSepa -from Monei.models.payment_payment_method_trustly import PaymentPaymentMethodTrustly -from Monei.models.payment_refund_reason import PaymentRefundReason -from Monei.models.payment_sequence import PaymentSequence -from Monei.models.payment_sequence_recurring import PaymentSequenceRecurring -from Monei.models.payment_session_details import PaymentSessionDetails -from Monei.models.payment_shipping_details import PaymentShippingDetails -from Monei.models.payment_shop import PaymentShop -from Monei.models.payment_status import PaymentStatus -from Monei.models.payment_trace_details import PaymentTraceDetails -from Monei.models.payment_transaction_type import PaymentTransactionType -from Monei.models.recurring_payment_request import RecurringPaymentRequest -from Monei.models.refund_payment_request import RefundPaymentRequest -from Monei.models.register_domain_request import RegisterDomainRequest -from Monei.models.send_payment_link_request import SendPaymentLinkRequest -from Monei.models.send_payment_receipt_request import SendPaymentReceiptRequest -from Monei.models.send_payment_request import SendPaymentRequest -from Monei.models.subscription import Subscription -from Monei.models.subscription_interval import SubscriptionInterval -from Monei.models.subscription_last_payment import SubscriptionLastPayment -from Monei.models.subscription_payment_method import SubscriptionPaymentMethod -from Monei.models.subscription_payment_method_card import SubscriptionPaymentMethodCard -from Monei.models.subscription_status import SubscriptionStatus -from Monei.models.update_subscription_request import UpdateSubscriptionRequest -from Monei.models.validate_bizum_phone_request import ValidateBizumPhoneRequest - # import custom MoneiClient from Monei.monei_client import MoneiClient diff --git a/Monei/api/__init__.py b/Monei/api/__init__.py index 59aa406..fc05745 100644 --- a/Monei/api/__init__.py +++ b/Monei/api/__init__.py @@ -1,9 +1,3 @@ -from __future__ import absolute_import - -# flake8: noqa - -# import apis into api package -from Monei.api.apple_pay_domain_api import ApplePayDomainApi -from Monei.api.bizum_api import BizumApi -from Monei.api.payments_api import PaymentsApi -from Monei.api.subscriptions_api import SubscriptionsApi +# do not import all apis into this module because that uses a lot of memory and stack frames +# if you need the ability to import all apis from one package, import them with +# from Monei.apis import ApplePayDomainApi diff --git a/Monei/api/apple_pay_domain_api.py b/Monei/api/apple_pay_domain_api.py index a634c24..50a6ff3 100644 --- a/Monei/api/apple_pay_domain_api.py +++ b/Monei/api/apple_pay_domain_api.py @@ -1,27 +1,34 @@ -# coding: utf-8 - """ MONEI API v1 -

The MONEI API is organized around REST. Our API has predictable resource-oriented URLs, accepts JSON-encoded request bodies, returns JSON-encoded responses, and uses standard HTTP response codes, authentication, and verbs.

Base URL:

https://api.monei.com/v1

Client libraries:

Important:

If you are not using our official SDKs, you need to provide a valid User-Agent header in each request, otherwise your requests will be rejected.

# noqa: E501 +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - The version of the OpenAPI document: 1.4.6 + The version of the OpenAPI document: 1.5.0 Generated by: https://openapi-generator.tech """ -from __future__ import absolute_import - import re # noqa: F401 - -# python 2 and python 3 compatibility library -import six - -from Monei.api_client import ApiClient -from Monei.exceptions import ( # noqa: F401 - ApiTypeError, - ApiValueError +import sys # noqa: F401 + +from Monei.api_client import ApiClient, Endpoint as _Endpoint +from Monei.model_utils import ( # noqa: F401 + check_allowed_values, + check_validations, + date, + datetime, + file_type, + none_type, + validate_and_convert_types ) +from Monei.model.apple_pay_domain_register200_response import ApplePayDomainRegister200Response +from Monei.model.apple_pay_domain_register400_response import ApplePayDomainRegister400Response +from Monei.model.apple_pay_domain_register401_response import ApplePayDomainRegister401Response +from Monei.model.apple_pay_domain_register404_response import ApplePayDomainRegister404Response +from Monei.model.apple_pay_domain_register422_response import ApplePayDomainRegister422Response +from Monei.model.apple_pay_domain_register500_response import ApplePayDomainRegister500Response +from Monei.model.apple_pay_domain_register503_response import ApplePayDomainRegister503Response +from Monei.model.register_apple_pay_domain_request import RegisterApplePayDomainRequest class ApplePayDomainApi(object): @@ -35,121 +42,139 @@ def __init__(self, api_client=None): if api_client is None: api_client = ApiClient() self.api_client = api_client + self.register_endpoint = _Endpoint( + settings={ + 'response_type': (ApplePayDomainRegister200Response,), + 'auth': [ + 'APIKey' + ], + 'endpoint_path': '/apple-pay/domains', + 'operation_id': 'register', + 'http_method': 'POST', + 'servers': None, + }, + params_map={ + 'all': [ + 'register_apple_pay_domain_request', + ], + 'required': [ + 'register_apple_pay_domain_request', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + 'register_apple_pay_domain_request': + (RegisterApplePayDomainRequest,), + }, + 'attribute_map': { + }, + 'location_map': { + 'register_apple_pay_domain_request': 'body', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [ + 'application/json' + ] + }, + api_client=api_client + ) - def register(self, register_domain_request, **kwargs): # noqa: E501 - """Register # noqa: E501 + def register( + self, + register_apple_pay_domain_request, + **kwargs + ): + """Register Domain # noqa: E501 -

Registers custom domain for Apple Pay.

Download this domain association file and host it at /.well-known/apple-developer-merchantid-domain-association on your site.

For example, if you’re registering example.com, make that file available at https://example.com/.well-known/apple-developer-merchantid-domain-association.

# noqa: E501 +

Registers a domain with Apple Pay.

This endpoint allows you to register your website domain with Apple Pay, which is required before you can accept Apple Pay payments on your website. The domain must be accessible via HTTPS and have a valid SSL certificate.

Before registering, you must download this domain association file and host it at /.well-known/apple-developer-merchantid-domain-association on your site.

For example, if you're registering example.com, make that file available at https://example.com/.well-known/apple-developer-merchantid-domain-association.

After registration, Apple will verify your domain. Once verified, you can display Apple Pay buttons and process Apple Pay payments on your website.

# noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.register(register_domain_request, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param RegisterDomainRequest register_domain_request: (required) - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: InlineResponse200 - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.register_with_http_info(register_domain_request, **kwargs) # noqa: E501 - - def register_with_http_info(self, register_domain_request, **kwargs): # noqa: E501 - """Register # noqa: E501 -

Registers custom domain for Apple Pay.

Download this domain association file and host it at /.well-known/apple-developer-merchantid-domain-association on your site.

For example, if you’re registering example.com, make that file available at https://example.com/.well-known/apple-developer-merchantid-domain-association.

# noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.register_with_http_info(register_domain_request, async_req=True) + >>> thread = api.register(register_apple_pay_domain_request, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param RegisterDomainRequest register_domain_request: (required) - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: tuple(InlineResponse200, status_code(int), headers(HTTPHeaderDict)) - If the method is called asynchronously, - returns the request thread. + Args: + register_apple_pay_domain_request (RegisterApplePayDomainRequest): + + Keyword Args: + _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 + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None + async_req (bool): execute request asynchronously + + Returns: + ApplePayDomainRegister200Response + If the method is called asynchronously, returns the request + thread. """ - - local_var_params = locals() - - all_params = [ - 'register_domain_request' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + kwargs['register_apple_pay_domain_request'] = \ + register_apple_pay_domain_request + return self.register_endpoint.call_with_http_info(**kwargs) - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method register" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'register_domain_request' is set - if self.api_client.client_side_validation and ('register_domain_request' not in local_var_params or # noqa: E501 - local_var_params['register_domain_request'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `register_domain_request` when calling `register`") # noqa: E501 - - collection_formats = {} - - path_params = {} - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - if 'register_domain_request' in local_var_params: - body_params = local_var_params['register_domain_request'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['APIKey'] # noqa: E501 - - return self.api_client.call_api( - '/apple-pay/domains', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='InlineResponse200', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) diff --git a/Monei/api/bizum_api.py b/Monei/api/bizum_api.py index e905142..00766e1 100644 --- a/Monei/api/bizum_api.py +++ b/Monei/api/bizum_api.py @@ -1,27 +1,34 @@ -# coding: utf-8 - """ MONEI API v1 -

The MONEI API is organized around REST. Our API has predictable resource-oriented URLs, accepts JSON-encoded request bodies, returns JSON-encoded responses, and uses standard HTTP response codes, authentication, and verbs.

Base URL:

https://api.monei.com/v1

Client libraries:

Important:

If you are not using our official SDKs, you need to provide a valid User-Agent header in each request, otherwise your requests will be rejected.

# noqa: E501 +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - The version of the OpenAPI document: 1.4.6 + The version of the OpenAPI document: 1.5.0 Generated by: https://openapi-generator.tech """ -from __future__ import absolute_import - import re # noqa: F401 - -# python 2 and python 3 compatibility library -import six - -from Monei.api_client import ApiClient -from Monei.exceptions import ( # noqa: F401 - ApiTypeError, - ApiValueError +import sys # noqa: F401 + +from Monei.api_client import ApiClient, Endpoint as _Endpoint +from Monei.model_utils import ( # noqa: F401 + check_allowed_values, + check_validations, + date, + datetime, + file_type, + none_type, + validate_and_convert_types ) +from Monei.model.apple_pay_domain_register400_response import ApplePayDomainRegister400Response +from Monei.model.apple_pay_domain_register401_response import ApplePayDomainRegister401Response +from Monei.model.apple_pay_domain_register404_response import ApplePayDomainRegister404Response +from Monei.model.apple_pay_domain_register422_response import ApplePayDomainRegister422Response +from Monei.model.apple_pay_domain_register500_response import ApplePayDomainRegister500Response +from Monei.model.apple_pay_domain_register503_response import ApplePayDomainRegister503Response +from Monei.model.bizum_validate_phone200_response import BizumValidatePhone200Response +from Monei.model.validate_bizum_phone_request import ValidateBizumPhoneRequest class BizumApi(object): @@ -35,121 +42,139 @@ def __init__(self, api_client=None): if api_client is None: api_client = ApiClient() self.api_client = api_client + self.validate_phone_endpoint = _Endpoint( + settings={ + 'response_type': (BizumValidatePhone200Response,), + 'auth': [ + 'APIKey' + ], + 'endpoint_path': '/bizum/validate-phone', + 'operation_id': 'validate_phone', + 'http_method': 'POST', + 'servers': None, + }, + params_map={ + 'all': [ + 'validate_bizum_phone_request', + ], + 'required': [ + 'validate_bizum_phone_request', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + 'validate_bizum_phone_request': + (ValidateBizumPhoneRequest,), + }, + 'attribute_map': { + }, + 'location_map': { + 'validate_bizum_phone_request': 'body', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [ + 'application/json' + ] + }, + api_client=api_client + ) - def validate_phone(self, validate_bizum_phone_request, **kwargs): # noqa: E501 + def validate_phone( + self, + validate_bizum_phone_request, + **kwargs + ): """Validate Phone # noqa: E501 -

Verifies if the provided phone number is registered in Bizum. This method does not require authentication. Either accountId or paymentId must be provided in the request body.

# noqa: E501 +

Validates if a phone number is registered with Bizum.

Use this endpoint to check if a customer's phone number can be used for Bizum payments before attempting to process a payment. This helps provide a better user experience by preventing failed payment attempts for non-registered numbers.

The response will indicate whether the phone number is valid for Bizum payments.

# noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.validate_phone(validate_bizum_phone_request, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param ValidateBizumPhoneRequest validate_bizum_phone_request: (required) - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: InlineResponse2001 - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.validate_phone_with_http_info(validate_bizum_phone_request, **kwargs) # noqa: E501 - - def validate_phone_with_http_info(self, validate_bizum_phone_request, **kwargs): # noqa: E501 - """Validate Phone # noqa: E501 -

Verifies if the provided phone number is registered in Bizum. This method does not require authentication. Either accountId or paymentId must be provided in the request body.

# noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.validate_phone_with_http_info(validate_bizum_phone_request, async_req=True) + >>> thread = api.validate_phone(validate_bizum_phone_request, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param ValidateBizumPhoneRequest validate_bizum_phone_request: (required) - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: tuple(InlineResponse2001, status_code(int), headers(HTTPHeaderDict)) - If the method is called asynchronously, - returns the request thread. + Args: + validate_bizum_phone_request (ValidateBizumPhoneRequest): + + Keyword Args: + _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 + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None + async_req (bool): execute request asynchronously + + Returns: + BizumValidatePhone200Response + If the method is called asynchronously, returns the request + thread. """ - - local_var_params = locals() - - all_params = [ - 'validate_bizum_phone_request' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + kwargs['validate_bizum_phone_request'] = \ + validate_bizum_phone_request + return self.validate_phone_endpoint.call_with_http_info(**kwargs) - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method validate_phone" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'validate_bizum_phone_request' is set - if self.api_client.client_side_validation and ('validate_bizum_phone_request' not in local_var_params or # noqa: E501 - local_var_params['validate_bizum_phone_request'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `validate_bizum_phone_request` when calling `validate_phone`") # noqa: E501 - - collection_formats = {} - - path_params = {} - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - if 'validate_bizum_phone_request' in local_var_params: - body_params = local_var_params['validate_bizum_phone_request'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = [] # noqa: E501 - - return self.api_client.call_api( - '/bizum/validate-phone', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='InlineResponse2001', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) diff --git a/Monei/api/payment_methods_api.py b/Monei/api/payment_methods_api.py new file mode 100644 index 0000000..b0b615e --- /dev/null +++ b/Monei/api/payment_methods_api.py @@ -0,0 +1,175 @@ +""" + MONEI API v1 + +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 + + The version of the OpenAPI document: 1.5.0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from Monei.api_client import ApiClient, Endpoint as _Endpoint +from Monei.model_utils import ( # noqa: F401 + check_allowed_values, + check_validations, + date, + datetime, + file_type, + none_type, + validate_and_convert_types +) +from Monei.model.apple_pay_domain_register400_response import ApplePayDomainRegister400Response +from Monei.model.apple_pay_domain_register404_response import ApplePayDomainRegister404Response +from Monei.model.apple_pay_domain_register422_response import ApplePayDomainRegister422Response +from Monei.model.apple_pay_domain_register500_response import ApplePayDomainRegister500Response +from Monei.model.apple_pay_domain_register503_response import ApplePayDomainRegister503Response +from Monei.model.payment_methods import PaymentMethods + + +class PaymentMethodsApi(object): + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None): + if api_client is None: + api_client = ApiClient() + self.api_client = api_client + self.get_endpoint = _Endpoint( + settings={ + 'response_type': (PaymentMethods,), + 'auth': [], + 'endpoint_path': '/payment-methods', + 'operation_id': 'get', + 'http_method': 'GET', + 'servers': None, + }, + params_map={ + 'all': [ + 'account_id', + 'payment_id', + ], + 'required': [], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + 'account_id': + (str,), + 'payment_id': + (str,), + }, + 'attribute_map': { + 'account_id': 'accountId', + 'payment_id': 'paymentId', + }, + 'location_map': { + 'account_id': 'query', + 'payment_id': 'query', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [], + }, + api_client=api_client + ) + + def get( + self, + **kwargs + ): + """Get Payment Methods # noqa: E501 + +

Retrieve available payment methods for an account or a specific payment.

You can provide either an accountId or a paymentId as a query parameter to get the available payment methods.

When providing a paymentId, the response will include additional payment-specific information such as amount and currency. This is useful when you want to show payment options that are specifically available for a particular transaction.

When providing an accountId, the response will include all payment methods available for that account based on the merchant's configuration and supported payment methods.

# 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(async_req=True) + >>> result = thread.get() + + + Keyword Args: + account_id (str): The ID of the account to get payment methods for. [optional] + payment_id (str): The ID of the payment to get payment methods for. [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 + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None + async_req (bool): execute request asynchronously + + Returns: + PaymentMethods + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + return self.get_endpoint.call_with_http_info(**kwargs) + diff --git a/Monei/api/payments_api.py b/Monei/api/payments_api.py index 9950890..68c73a5 100644 --- a/Monei/api/payments_api.py +++ b/Monei/api/payments_api.py @@ -1,27 +1,42 @@ -# coding: utf-8 - """ MONEI API v1 -

The MONEI API is organized around REST. Our API has predictable resource-oriented URLs, accepts JSON-encoded request bodies, returns JSON-encoded responses, and uses standard HTTP response codes, authentication, and verbs.

Base URL:

https://api.monei.com/v1

Client libraries:

Important:

If you are not using our official SDKs, you need to provide a valid User-Agent header in each request, otherwise your requests will be rejected.

# noqa: E501 +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - The version of the OpenAPI document: 1.4.6 + The version of the OpenAPI document: 1.5.0 Generated by: https://openapi-generator.tech """ -from __future__ import absolute_import - import re # noqa: F401 - -# python 2 and python 3 compatibility library -import six - -from Monei.api_client import ApiClient -from Monei.exceptions import ( # noqa: F401 - ApiTypeError, - ApiValueError +import sys # noqa: F401 + +from Monei.api_client import ApiClient, Endpoint as _Endpoint +from Monei.model_utils import ( # noqa: F401 + check_allowed_values, + check_validations, + date, + datetime, + file_type, + none_type, + validate_and_convert_types ) +from Monei.model.apple_pay_domain_register400_response import ApplePayDomainRegister400Response +from Monei.model.apple_pay_domain_register401_response import ApplePayDomainRegister401Response +from Monei.model.apple_pay_domain_register404_response import ApplePayDomainRegister404Response +from Monei.model.apple_pay_domain_register422_response import ApplePayDomainRegister422Response +from Monei.model.apple_pay_domain_register500_response import ApplePayDomainRegister500Response +from Monei.model.apple_pay_domain_register503_response import ApplePayDomainRegister503Response +from Monei.model.cancel_payment_request import CancelPaymentRequest +from Monei.model.capture_payment_request import CapturePaymentRequest +from Monei.model.confirm_payment_request import ConfirmPaymentRequest +from Monei.model.create_payment_request import CreatePaymentRequest +from Monei.model.payment import Payment +from Monei.model.recurring_payment_request import RecurringPaymentRequest +from Monei.model.refund_payment_request import RefundPaymentRequest +from Monei.model.send_payment_link_request import SendPaymentLinkRequest +from Monei.model.send_payment_receipt_request import SendPaymentReceiptRequest +from Monei.model.send_payment_request_request import SendPaymentRequestRequest class PaymentsApi(object): @@ -35,1223 +50,1405 @@ def __init__(self, api_client=None): if api_client is None: api_client = ApiClient() self.api_client = api_client + self.cancel_endpoint = _Endpoint( + settings={ + 'response_type': (Payment,), + 'auth': [ + 'APIKey' + ], + 'endpoint_path': '/payments/{id}/cancel', + 'operation_id': 'cancel', + 'http_method': 'POST', + 'servers': None, + }, + params_map={ + 'all': [ + 'id', + 'cancel_payment_request', + ], + 'required': [ + 'id', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + 'id': + (str,), + 'cancel_payment_request': + (CancelPaymentRequest,), + }, + 'attribute_map': { + 'id': 'id', + }, + 'location_map': { + 'id': 'path', + 'cancel_payment_request': 'body', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [ + 'application/json' + ] + }, + api_client=api_client + ) + self.capture_endpoint = _Endpoint( + settings={ + 'response_type': (Payment,), + 'auth': [ + 'APIKey' + ], + 'endpoint_path': '/payments/{id}/capture', + 'operation_id': 'capture', + 'http_method': 'POST', + 'servers': None, + }, + params_map={ + 'all': [ + 'id', + 'capture_payment_request', + ], + 'required': [ + 'id', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + 'id': + (str,), + 'capture_payment_request': + (CapturePaymentRequest,), + }, + 'attribute_map': { + 'id': 'id', + }, + 'location_map': { + 'id': 'path', + 'capture_payment_request': 'body', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [ + 'application/json' + ] + }, + api_client=api_client + ) + self.confirm_endpoint = _Endpoint( + settings={ + 'response_type': (Payment,), + 'auth': [ + 'APIKey' + ], + 'endpoint_path': '/payments/{id}/confirm', + 'operation_id': 'confirm', + 'http_method': 'POST', + 'servers': None, + }, + params_map={ + 'all': [ + 'id', + 'confirm_payment_request', + ], + 'required': [ + 'id', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + 'id': + (str,), + 'confirm_payment_request': + (ConfirmPaymentRequest,), + }, + 'attribute_map': { + 'id': 'id', + }, + 'location_map': { + 'id': 'path', + 'confirm_payment_request': 'body', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [ + 'application/json' + ] + }, + api_client=api_client + ) + self.create_endpoint = _Endpoint( + settings={ + 'response_type': (Payment,), + 'auth': [ + 'APIKey' + ], + 'endpoint_path': '/payments', + 'operation_id': 'create', + 'http_method': 'POST', + 'servers': None, + }, + params_map={ + 'all': [ + 'create_payment_request', + ], + 'required': [ + 'create_payment_request', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + 'create_payment_request': + (CreatePaymentRequest,), + }, + 'attribute_map': { + }, + 'location_map': { + 'create_payment_request': 'body', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [ + 'application/json' + ] + }, + api_client=api_client + ) + self.get_endpoint = _Endpoint( + settings={ + 'response_type': (Payment,), + 'auth': [ + 'APIKey' + ], + 'endpoint_path': '/payments/{id}', + 'operation_id': 'get', + 'http_method': 'GET', + 'servers': None, + }, + params_map={ + 'all': [ + 'id', + ], + 'required': [ + 'id', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + 'id': + (str,), + }, + 'attribute_map': { + 'id': 'id', + }, + 'location_map': { + 'id': 'path', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [], + }, + api_client=api_client + ) + self.recurring_endpoint = _Endpoint( + settings={ + 'response_type': (Payment,), + 'auth': [ + 'APIKey' + ], + 'endpoint_path': '/payments/{sequenceId}/recurring', + 'operation_id': 'recurring', + 'http_method': 'POST', + 'servers': None, + }, + params_map={ + 'all': [ + 'sequence_id', + 'recurring_payment_request', + ], + 'required': [ + 'sequence_id', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + 'sequence_id': + (str,), + 'recurring_payment_request': + (RecurringPaymentRequest,), + }, + 'attribute_map': { + 'sequence_id': 'sequenceId', + }, + 'location_map': { + 'sequence_id': 'path', + 'recurring_payment_request': 'body', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [ + 'application/json' + ] + }, + api_client=api_client + ) + self.refund_endpoint = _Endpoint( + settings={ + 'response_type': (Payment,), + 'auth': [ + 'APIKey' + ], + 'endpoint_path': '/payments/{id}/refund', + 'operation_id': 'refund', + 'http_method': 'POST', + 'servers': None, + }, + params_map={ + 'all': [ + 'id', + 'refund_payment_request', + ], + 'required': [ + 'id', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + 'id': + (str,), + 'refund_payment_request': + (RefundPaymentRequest,), + }, + 'attribute_map': { + 'id': 'id', + }, + 'location_map': { + 'id': 'path', + 'refund_payment_request': 'body', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [ + 'application/json' + ] + }, + api_client=api_client + ) + self.send_link_endpoint = _Endpoint( + settings={ + 'response_type': (Payment,), + 'auth': [ + 'APIKey' + ], + 'endpoint_path': '/payments/{id}/link', + 'operation_id': 'send_link', + 'http_method': 'POST', + 'servers': None, + }, + params_map={ + 'all': [ + 'id', + 'send_payment_link_request', + ], + 'required': [ + 'id', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + 'id': + (str,), + 'send_payment_link_request': + (SendPaymentLinkRequest,), + }, + 'attribute_map': { + 'id': 'id', + }, + 'location_map': { + 'id': 'path', + 'send_payment_link_request': 'body', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [ + 'application/json' + ] + }, + api_client=api_client + ) + self.send_receipt_endpoint = _Endpoint( + settings={ + 'response_type': (Payment,), + 'auth': [ + 'APIKey' + ], + 'endpoint_path': '/payments/{id}/receipt', + 'operation_id': 'send_receipt', + 'http_method': 'POST', + 'servers': None, + }, + params_map={ + 'all': [ + 'id', + 'send_payment_receipt_request', + ], + 'required': [ + 'id', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + 'id': + (str,), + 'send_payment_receipt_request': + (SendPaymentReceiptRequest,), + }, + 'attribute_map': { + 'id': 'id', + }, + 'location_map': { + 'id': 'path', + 'send_payment_receipt_request': 'body', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [ + 'application/json' + ] + }, + api_client=api_client + ) + self.send_request_endpoint = _Endpoint( + settings={ + 'response_type': (Payment,), + 'auth': [ + 'APIKey' + ], + 'endpoint_path': '/payments/{id}/rtp', + 'operation_id': 'send_request', + 'http_method': 'POST', + 'servers': None, + }, + params_map={ + 'all': [ + 'id', + 'send_payment_request_request', + ], + 'required': [ + 'id', + 'send_payment_request_request', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + 'id': + (str,), + 'send_payment_request_request': + (SendPaymentRequestRequest,), + }, + 'attribute_map': { + 'id': 'id', + }, + 'location_map': { + 'id': 'path', + 'send_payment_request_request': 'body', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [ + 'application/json' + ] + }, + api_client=api_client + ) - def cancel(self, id, **kwargs): # noqa: E501 + def cancel( + self, + id, + **kwargs + ): """Cancel Payment # noqa: E501 - Release customer's funds that were reserved earlier. You can only cancel a payment with the `AUTHORIZED` status. This is the second half of the two-step payment flow, where first you created a payment with the `transactionType` set to `AUTH`. # noqa: E501 +

Releases reserved funds from a previously authorized payment. This endpoint can only be used with payments in AUTHORIZED status.

This operation is part of the two-step authorization flow:

  1. Authorize: Create a payment with transactionType: AUTH to reserve funds
  2. Cancel: Release the reserved funds if you decide not to capture the payment

Cancellation makes the reserved funds available to the customer again and prevents you from being able to capture those funds in the future. Once cancelled, an authorization cannot be reactivated.

# 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(id, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str id: The payment ID (required) - :param CancelPaymentRequest cancel_payment_request: - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: Payment - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.cancel_with_http_info(id, **kwargs) # noqa: E501 - def cancel_with_http_info(self, id, **kwargs): # noqa: E501 - """Cancel Payment # noqa: E501 - - Release customer's funds that were reserved earlier. You can only cancel a payment with the `AUTHORIZED` status. This is the second half of the two-step payment flow, where first you created a payment with the `transactionType` set to `AUTH`. # 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_with_http_info(id, async_req=True) + >>> thread = api.cancel(id, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str id: The payment ID (required) - :param CancelPaymentRequest cancel_payment_request: - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: tuple(Payment, status_code(int), headers(HTTPHeaderDict)) - If the method is called asynchronously, - returns the request thread. + Args: + id (str): The payment ID + + Keyword Args: + cancel_payment_request (CancelPaymentRequest): [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 + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None + async_req (bool): execute request asynchronously + + Returns: + Payment + If the method is called asynchronously, returns the request + thread. """ - - local_var_params = locals() - - all_params = [ - 'id', - 'cancel_payment_request' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method cancel" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'id' is set - if self.api_client.client_side_validation and ('id' not in local_var_params or # noqa: E501 - local_var_params['id'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `id` when calling `cancel`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'id' in local_var_params: - path_params['id'] = local_var_params['id'] # noqa: E501 - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - if 'cancel_payment_request' in local_var_params: - body_params = local_var_params['cancel_payment_request'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['APIKey'] # noqa: E501 - - return self.api_client.call_api( - '/payments/{id}/cancel', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='Payment', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def capture(self, id, **kwargs): # noqa: E501 + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + kwargs['id'] = \ + id + return self.cancel_endpoint.call_with_http_info(**kwargs) + + def capture( + self, + id, + **kwargs + ): """Capture Payment # noqa: E501 - Capture the payment of an existing, uncaptured, payment. This is the second half of the two-step payment flow, where first you created a payment with the `transactionType` set to `AUTH`. Uncaptured payments expire exactly seven days after they are created. If they are not captured by that point in time, they will be marked as expired and will no longer be capturable. # noqa: E501 +

Captures funds from a previously authorized payment. This endpoint can only be used with payments in AUTHORIZED status.

This operation completes the two-step authorization flow:

  1. Authorize: Create a payment with transactionType: AUTH to reserve funds
  2. Capture: Transfer the reserved funds to your account when ready to fulfill the order

Important: Authorized payments expire after exactly seven days. After expiration, they will be marked as EXPIRED and can no longer be captured. Be sure to capture funds within this timeframe or communicate with your customer about a new payment.

# 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(id, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str id: The payment ID (required) - :param CapturePaymentRequest capture_payment_request: - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: Payment - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.capture_with_http_info(id, **kwargs) # noqa: E501 - def capture_with_http_info(self, id, **kwargs): # noqa: E501 - """Capture Payment # noqa: E501 - - Capture the payment of an existing, uncaptured, payment. This is the second half of the two-step payment flow, where first you created a payment with the `transactionType` set to `AUTH`. Uncaptured payments expire exactly seven days after they are created. If they are not captured by that point in time, they will be marked as expired and will no longer be capturable. # 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_with_http_info(id, async_req=True) + >>> thread = api.capture(id, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str id: The payment ID (required) - :param CapturePaymentRequest capture_payment_request: - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: tuple(Payment, status_code(int), headers(HTTPHeaderDict)) - If the method is called asynchronously, - returns the request thread. + Args: + id (str): The payment ID + + Keyword Args: + capture_payment_request (CapturePaymentRequest): [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 + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None + async_req (bool): execute request asynchronously + + Returns: + Payment + If the method is called asynchronously, returns the request + thread. """ - - local_var_params = locals() - - all_params = [ - 'id', - 'capture_payment_request' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method capture" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'id' is set - if self.api_client.client_side_validation and ('id' not in local_var_params or # noqa: E501 - local_var_params['id'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `id` when calling `capture`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'id' in local_var_params: - path_params['id'] = local_var_params['id'] # noqa: E501 - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - if 'capture_payment_request' in local_var_params: - body_params = local_var_params['capture_payment_request'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['APIKey'] # noqa: E501 - - return self.api_client.call_api( - '/payments/{id}/capture', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='Payment', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def confirm(self, id, **kwargs): # noqa: E501 + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + kwargs['id'] = \ + id + return self.capture_endpoint.call_with_http_info(**kwargs) + + def confirm( + self, + id, + **kwargs + ): """Confirm Payment # noqa: E501 - Confirm a payment that was created without a `paymentToken` or `paymentMethod`. You can only confirm a payment with the `PENDING` status. You can charge a customer in two steps. First create a payment without payment details and then confirm it after you generate a `paymentToken` on the front-end with monei.js [Components](https://docs.monei.com/docs/monei-js-overview). You can provide additional customer information, it will override the information passed in **create payment** request. # noqa: E501 +

Confirms a payment that was created without payment details. This endpoint can only be used with payments in PENDING status.

The two-step payment flow:

  1. Create: First, create a payment without payment details (status: PENDING)
  2. Confirm: Then provide payment details to complete the transaction

When confirming a payment, you can use:

Using permanent payment tokens enables one-click checkout experiences for returning customers without requiring them to re-enter their payment information.

You can provide additional customer information during confirmation, which will override any corresponding information originally passed in the payment creation 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.confirm(id, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str id: The payment ID (required) - :param ConfirmPaymentRequest confirm_payment_request: - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: Payment - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.confirm_with_http_info(id, **kwargs) # noqa: E501 - def confirm_with_http_info(self, id, **kwargs): # noqa: E501 - """Confirm Payment # noqa: E501 - - Confirm a payment that was created without a `paymentToken` or `paymentMethod`. You can only confirm a payment with the `PENDING` status. You can charge a customer in two steps. First create a payment without payment details and then confirm it after you generate a `paymentToken` on the front-end with monei.js [Components](https://docs.monei.com/docs/monei-js-overview). You can provide additional customer information, it will override the information passed in **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.confirm_with_http_info(id, async_req=True) + >>> thread = api.confirm(id, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str id: The payment ID (required) - :param ConfirmPaymentRequest confirm_payment_request: - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: tuple(Payment, status_code(int), headers(HTTPHeaderDict)) - If the method is called asynchronously, - returns the request thread. + Args: + id (str): The payment ID + + Keyword Args: + confirm_payment_request (ConfirmPaymentRequest): [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 + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None + async_req (bool): execute request asynchronously + + Returns: + Payment + If the method is called asynchronously, returns the request + thread. """ - - local_var_params = locals() - - all_params = [ - 'id', - 'confirm_payment_request' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method confirm" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'id' is set - if self.api_client.client_side_validation and ('id' not in local_var_params or # noqa: E501 - local_var_params['id'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `id` when calling `confirm`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'id' in local_var_params: - path_params['id'] = local_var_params['id'] # noqa: E501 - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - if 'confirm_payment_request' in local_var_params: - body_params = local_var_params['confirm_payment_request'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['APIKey'] # noqa: E501 - - return self.api_client.call_api( - '/payments/{id}/confirm', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='Payment', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def create(self, create_payment_request, **kwargs): # noqa: E501 + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + kwargs['id'] = \ + id + return self.confirm_endpoint.call_with_http_info(**kwargs) + + def create( + self, + create_payment_request, + **kwargs + ): """Create Payment # noqa: E501 - To charge a credit card or other payment method, you create a Payment. Payment can also be created without a payment method to initiate a payment process and redirect a customer to the hosted payment page. # noqa: E501 +

Creates a new payment with the specified parameters.

You can create a payment in two ways:

  1. Immediate processing: Provide a paymentToken or paymentMethod - The payment will be processed instantly
  2. Deferred processing: Create without payment details - The payment remains in PENDING status until you confirm it later using the confirm endpoint

When creating a payment without payment details, you can redirect customers to the hosted payment page where they can select their preferred payment method and complete the transaction.

For immediate processing, use one of these token options:

Permanent tokens enable one-click checkout experiences for returning customers by allowing you to securely store and reuse payment details without requiring customers to re-enter their information.

# 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(create_payment_request, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param CreatePaymentRequest create_payment_request: (required) - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: Payment - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.create_with_http_info(create_payment_request, **kwargs) # noqa: E501 - def create_with_http_info(self, create_payment_request, **kwargs): # noqa: E501 - """Create Payment # noqa: E501 - - To charge a credit card or other payment method, you create a Payment. Payment can also be created without a payment method to initiate a payment process and redirect a customer to the hosted payment page. # 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_with_http_info(create_payment_request, async_req=True) + >>> thread = api.create(create_payment_request, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param CreatePaymentRequest create_payment_request: (required) - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: tuple(Payment, status_code(int), headers(HTTPHeaderDict)) - If the method is called asynchronously, - returns the request thread. + Args: + create_payment_request (CreatePaymentRequest): + + Keyword Args: + _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 + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None + async_req (bool): execute request asynchronously + + Returns: + Payment + If the method is called asynchronously, returns the request + thread. """ - - local_var_params = locals() - - all_params = [ - 'create_payment_request' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method create" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'create_payment_request' is set - if self.api_client.client_side_validation and ('create_payment_request' not in local_var_params or # noqa: E501 - local_var_params['create_payment_request'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `create_payment_request` when calling `create`") # noqa: E501 - - collection_formats = {} - - path_params = {} - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - if 'create_payment_request' in local_var_params: - body_params = local_var_params['create_payment_request'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['APIKey'] # noqa: E501 - - return self.api_client.call_api( - '/payments', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='Payment', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def get(self, id, **kwargs): # noqa: E501 + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + kwargs['create_payment_request'] = \ + create_payment_request + return self.create_endpoint.call_with_http_info(**kwargs) + + def get( + self, + id, + **kwargs + ): """Get Payment # noqa: E501 - Get the details of a payment that has previously been created. Supply the unique payment ID that was returned from your previous request. # noqa: E501 +

Retrieves the complete details of an existing payment by its unique ID.

This endpoint returns all available information about the payment, including its current status, amount, customer details, timestamps, and transaction history. Use this to check the status of a payment, verify payment details, or retrieve information for your records.

Supply the unique payment ID that was returned from your previous 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.get(id, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str id: The payment ID (required) - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: Payment - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.get_with_http_info(id, **kwargs) # noqa: E501 - def get_with_http_info(self, id, **kwargs): # noqa: E501 - """Get Payment # noqa: E501 - - Get the details of a payment that has previously been created. Supply the unique payment ID that was returned from your previous 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.get_with_http_info(id, async_req=True) + >>> thread = api.get(id, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str id: The payment ID (required) - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: tuple(Payment, status_code(int), headers(HTTPHeaderDict)) - If the method is called asynchronously, - returns the request thread. + Args: + id (str): The payment ID + + Keyword Args: + _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 + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None + async_req (bool): execute request asynchronously + + Returns: + Payment + If the method is called asynchronously, returns the request + thread. """ - - local_var_params = locals() - - all_params = [ - 'id' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method get" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'id' is set - if self.api_client.client_side_validation and ('id' not in local_var_params or # noqa: E501 - local_var_params['id'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `id` when calling `get`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'id' in local_var_params: - path_params['id'] = local_var_params['id'] # noqa: E501 - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['APIKey'] # noqa: E501 - - return self.api_client.call_api( - '/payments/{id}', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='Payment', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def recurring(self, sequence_id, **kwargs): # noqa: E501 + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + kwargs['id'] = \ + id + return self.get_endpoint.call_with_http_info(**kwargs) + + def recurring( + self, + sequence_id, + **kwargs + ): """Recurring Payment # noqa: E501 - Creates a subsequent operation for a recurring payment, previously created. The specified amount will be charged to the same credit or debit card of the originally payment. If amount is not specified, it will default to the same amount from the original payment. # noqa: E501 +

Creates a subsequent charge using the payment details from a previous transaction.

This endpoint enables recurring billing and subscription payments by:

Prerequisites:

  1. The initial payment must be created with the sequence parameter
  2. The initial payment will return a sequenceId in the response
  3. This sequenceId must be provided in the URL path when making subsequent recurring charges

Ideal for subscription services, membership renewals, and installment payments.

Need more advanced subscription management? For comprehensive subscription management with features like billing cycles, trial periods, and automatic recurring billing, consider using the Subscriptions API instead. It provides a complete solution for creating and managing subscription-based services.

# noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.recurring(sequence_id, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str sequence_id: The sequence ID (required) - :param RecurringPaymentRequest recurring_payment_request: - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: Payment - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.recurring_with_http_info(sequence_id, **kwargs) # noqa: E501 - def recurring_with_http_info(self, sequence_id, **kwargs): # noqa: E501 - """Recurring Payment # noqa: E501 - - Creates a subsequent operation for a recurring payment, previously created. The specified amount will be charged to the same credit or debit card of the originally payment. If amount is not specified, it will default to the same amount from the original payment. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.recurring_with_http_info(sequence_id, async_req=True) + >>> thread = api.recurring(sequence_id, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str sequence_id: The sequence ID (required) - :param RecurringPaymentRequest recurring_payment_request: - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: tuple(Payment, status_code(int), headers(HTTPHeaderDict)) - If the method is called asynchronously, - returns the request thread. + Args: + sequence_id (str): The sequence ID + + Keyword Args: + recurring_payment_request (RecurringPaymentRequest): [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 + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None + async_req (bool): execute request asynchronously + + Returns: + Payment + If the method is called asynchronously, returns the request + thread. """ - - local_var_params = locals() - - all_params = [ - 'sequence_id', - 'recurring_payment_request' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method recurring" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'sequence_id' is set - if self.api_client.client_side_validation and ('sequence_id' not in local_var_params or # noqa: E501 - local_var_params['sequence_id'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `sequence_id` when calling `recurring`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'sequence_id' in local_var_params: - path_params['sequenceId'] = local_var_params['sequence_id'] # noqa: E501 - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - if 'recurring_payment_request' in local_var_params: - body_params = local_var_params['recurring_payment_request'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['APIKey'] # noqa: E501 - - return self.api_client.call_api( - '/payments/{sequenceId}/recurring', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='Payment', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def refund(self, id, **kwargs): # noqa: E501 + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + kwargs['sequence_id'] = \ + sequence_id + return self.recurring_endpoint.call_with_http_info(**kwargs) + + def refund( + self, + id, + **kwargs + ): """Refund Payment # noqa: E501 - Refund a payment that has previously been created but not yet refunded. Funds will be refunded to the credit or debit card that was originally charged. You can optionally refund only part of a payment. You can do so multiple times, until the entire payment has been refunded. Once entirely refunded, a payment can’t be refunded again. This method will throw an error when called on an already-refunded payment, or when trying to refund more money than is left on a payment. # noqa: E501 +

Returns funds from a completed payment back to the customer's original payment method.

Refund options:

Limitations:

# noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.refund(id, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str id: The payment ID (required) - :param RefundPaymentRequest refund_payment_request: - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: Payment - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.refund_with_http_info(id, **kwargs) # noqa: E501 - def refund_with_http_info(self, id, **kwargs): # noqa: E501 - """Refund Payment # noqa: E501 - - Refund a payment that has previously been created but not yet refunded. Funds will be refunded to the credit or debit card that was originally charged. You can optionally refund only part of a payment. You can do so multiple times, until the entire payment has been refunded. Once entirely refunded, a payment can’t be refunded again. This method will throw an error when called on an already-refunded payment, or when trying to refund more money than is left on a payment. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.refund_with_http_info(id, async_req=True) + >>> thread = api.refund(id, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str id: The payment ID (required) - :param RefundPaymentRequest refund_payment_request: - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: tuple(Payment, status_code(int), headers(HTTPHeaderDict)) - If the method is called asynchronously, - returns the request thread. + Args: + id (str): The payment ID + + Keyword Args: + refund_payment_request (RefundPaymentRequest): [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 + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None + async_req (bool): execute request asynchronously + + Returns: + Payment + If the method is called asynchronously, returns the request + thread. """ - - local_var_params = locals() - - all_params = [ - 'id', - 'refund_payment_request' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method refund" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'id' is set - if self.api_client.client_side_validation and ('id' not in local_var_params or # noqa: E501 - local_var_params['id'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `id` when calling `refund`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'id' in local_var_params: - path_params['id'] = local_var_params['id'] # noqa: E501 - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - if 'refund_payment_request' in local_var_params: - body_params = local_var_params['refund_payment_request'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['APIKey'] # noqa: E501 - - return self.api_client.call_api( - '/payments/{id}/refund', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='Payment', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def send_link(self, id, **kwargs): # noqa: E501 + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + kwargs['id'] = \ + id + return self.refund_endpoint.call_with_http_info(**kwargs) + + def send_link( + self, + id, + **kwargs + ): """Send Payment Link # noqa: E501 - Sends a payment link to the customer. If payment has customer email, the link is sent via email. If payment has customer phone, the link is sent via WhatsApp, if the phone number is not registered in WhatsApp, the link is sent via SMS. # noqa: E501 +

Sends a payment link to the customer through their preferred communication channel.

This API can only be used for payments with the following status:

Delivery channels are automatically selected based on available customer information:

The payment link allows customers to complete the payment at their convenience using their preferred payment method on the secure MONEI payment page. If no customer contact information is provided, the system will use the details stored in the payment record.

# noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.send_link(id, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str id: The payment ID (required) - :param SendPaymentLinkRequest send_payment_link_request: - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: Payment - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.send_link_with_http_info(id, **kwargs) # noqa: E501 - - def send_link_with_http_info(self, id, **kwargs): # noqa: E501 - """Send Payment Link # noqa: E501 - Sends a payment link to the customer. If payment has customer email, the link is sent via email. If payment has customer phone, the link is sent via WhatsApp, if the phone number is not registered in WhatsApp, the link is sent via SMS. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.send_link_with_http_info(id, async_req=True) + >>> thread = api.send_link(id, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str id: The payment ID (required) - :param SendPaymentLinkRequest send_payment_link_request: - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: tuple(Payment, status_code(int), headers(HTTPHeaderDict)) - If the method is called asynchronously, - returns the request thread. + Args: + id (str): The payment ID + + Keyword Args: + send_payment_link_request (SendPaymentLinkRequest): [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 + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None + async_req (bool): execute request asynchronously + + Returns: + Payment + If the method is called asynchronously, returns the request + thread. """ - - local_var_params = locals() - - all_params = [ - 'id', - 'send_payment_link_request' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method send_link" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'id' is set - if self.api_client.client_side_validation and ('id' not in local_var_params or # noqa: E501 - local_var_params['id'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `id` when calling `send_link`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'id' in local_var_params: - path_params['id'] = local_var_params['id'] # noqa: E501 - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - if 'send_payment_link_request' in local_var_params: - body_params = local_var_params['send_payment_link_request'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['APIKey'] # noqa: E501 - - return self.api_client.call_api( - '/payments/{id}/link', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='Payment', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def send_receipt(self, id, **kwargs): # noqa: E501 + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + kwargs['id'] = \ + id + return self.send_link_endpoint.call_with_http_info(**kwargs) + + def send_receipt( + self, + id, + **kwargs + ): """Send Payment Receipt # noqa: E501 - Sends a payment receipt to the customer. If payment has customer email, the receipt is sent via email. If payment has customer phone, the receipt is sent via WhatsApp, if the phone number is not registered in WhatsApp, the receipt is sent via SMS. # noqa: E501 +

Sends a payment receipt to the customer through their preferred communication channel.

This API can only be used for payments with the following status:

Delivery channels are automatically selected based on available customer information:

The receipt includes payment details such as amount, date, transaction ID, and merchant information, providing customers with a record of their successful transaction. If no customer contact information is provided, the system will use the details stored in the payment record.

# noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.send_receipt(id, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str id: The payment ID (required) - :param SendPaymentReceiptRequest send_payment_receipt_request: - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: Payment - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.send_receipt_with_http_info(id, **kwargs) # noqa: E501 - def send_receipt_with_http_info(self, id, **kwargs): # noqa: E501 - """Send Payment Receipt # noqa: E501 - - Sends a payment receipt to the customer. If payment has customer email, the receipt is sent via email. If payment has customer phone, the receipt is sent via WhatsApp, if the phone number is not registered in WhatsApp, the receipt is sent via SMS. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.send_receipt_with_http_info(id, async_req=True) + >>> thread = api.send_receipt(id, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str id: The payment ID (required) - :param SendPaymentReceiptRequest send_payment_receipt_request: - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: tuple(Payment, status_code(int), headers(HTTPHeaderDict)) - If the method is called asynchronously, - returns the request thread. + Args: + id (str): The payment ID + + Keyword Args: + send_payment_receipt_request (SendPaymentReceiptRequest): [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 + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None + async_req (bool): execute request asynchronously + + Returns: + Payment + If the method is called asynchronously, returns the request + thread. """ - - local_var_params = locals() - - all_params = [ - 'id', - 'send_payment_receipt_request' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method send_receipt" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'id' is set - if self.api_client.client_side_validation and ('id' not in local_var_params or # noqa: E501 - local_var_params['id'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `id` when calling `send_receipt`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'id' in local_var_params: - path_params['id'] = local_var_params['id'] # noqa: E501 - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - if 'send_payment_receipt_request' in local_var_params: - body_params = local_var_params['send_payment_receipt_request'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['APIKey'] # noqa: E501 - - return self.api_client.call_api( - '/payments/{id}/receipt', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='Payment', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def send_request(self, id, send_payment_request, **kwargs): # noqa: E501 + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + kwargs['id'] = \ + id + return self.send_receipt_endpoint.call_with_http_info(**kwargs) + + def send_request( + self, + id, + send_payment_request_request, + **kwargs + ): """Send Payment Request # noqa: E501 - Sends a payment request directly to the customer's phone. If Bizum payment method is available and the phone number is registered in Bizum, the customer will get a push notification to confirm the payment directly in the banking app, otherwise, he will receive a link to pay via WhatsApp. # noqa: E501 +

Sends a direct payment request to the customer's phone with smart channel selection.

Smart delivery logic based on customer phone capabilities:

This endpoint provides a streamlined payment experience, especially for Spanish customers with Bizum integration, enabling quick and convenient mobile payments.

# noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.send_request(id, send_payment_request, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str id: The payment ID (required) - :param SendPaymentRequest send_payment_request: (required) - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: Payment - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.send_request_with_http_info(id, send_payment_request, **kwargs) # noqa: E501 - def send_request_with_http_info(self, id, send_payment_request, **kwargs): # noqa: E501 - """Send Payment Request # noqa: E501 - - Sends a payment request directly to the customer's phone. If Bizum payment method is available and the phone number is registered in Bizum, the customer will get a push notification to confirm the payment directly in the banking app, otherwise, he will receive a link to pay via WhatsApp. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.send_request_with_http_info(id, send_payment_request, async_req=True) + >>> thread = api.send_request(id, send_payment_request_request, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str id: The payment ID (required) - :param SendPaymentRequest send_payment_request: (required) - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: tuple(Payment, status_code(int), headers(HTTPHeaderDict)) - If the method is called asynchronously, - returns the request thread. + Args: + id (str): The payment ID + send_payment_request_request (SendPaymentRequestRequest): + + Keyword Args: + _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 + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None + async_req (bool): execute request asynchronously + + Returns: + Payment + If the method is called asynchronously, returns the request + thread. """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + kwargs['id'] = \ + id + kwargs['send_payment_request_request'] = \ + send_payment_request_request + return self.send_request_endpoint.call_with_http_info(**kwargs) - local_var_params = locals() - - all_params = [ - 'id', - 'send_payment_request' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method send_request" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'id' is set - if self.api_client.client_side_validation and ('id' not in local_var_params or # noqa: E501 - local_var_params['id'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `id` when calling `send_request`") # noqa: E501 - # verify the required parameter 'send_payment_request' is set - if self.api_client.client_side_validation and ('send_payment_request' not in local_var_params or # noqa: E501 - local_var_params['send_payment_request'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `send_payment_request` when calling `send_request`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'id' in local_var_params: - path_params['id'] = local_var_params['id'] # noqa: E501 - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - if 'send_payment_request' in local_var_params: - body_params = local_var_params['send_payment_request'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['APIKey'] # noqa: E501 - - return self.api_client.call_api( - '/payments/{id}/rtp', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='Payment', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) diff --git a/Monei/api/subscriptions_api.py b/Monei/api/subscriptions_api.py index 2895703..17f1bf1 100644 --- a/Monei/api/subscriptions_api.py +++ b/Monei/api/subscriptions_api.py @@ -1,27 +1,40 @@ -# coding: utf-8 - """ MONEI API v1 -

The MONEI API is organized around REST. Our API has predictable resource-oriented URLs, accepts JSON-encoded request bodies, returns JSON-encoded responses, and uses standard HTTP response codes, authentication, and verbs.

Base URL:

https://api.monei.com/v1

Client libraries:

Important:

If you are not using our official SDKs, you need to provide a valid User-Agent header in each request, otherwise your requests will be rejected.

# noqa: E501 +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - The version of the OpenAPI document: 1.4.6 + The version of the OpenAPI document: 1.5.0 Generated by: https://openapi-generator.tech """ -from __future__ import absolute_import - import re # noqa: F401 - -# python 2 and python 3 compatibility library -import six - -from Monei.api_client import ApiClient -from Monei.exceptions import ( # noqa: F401 - ApiTypeError, - ApiValueError +import sys # noqa: F401 + +from Monei.api_client import ApiClient, Endpoint as _Endpoint +from Monei.model_utils import ( # noqa: F401 + check_allowed_values, + check_validations, + date, + datetime, + file_type, + none_type, + validate_and_convert_types ) +from Monei.model.activate_subscription_request import ActivateSubscriptionRequest +from Monei.model.apple_pay_domain_register400_response import ApplePayDomainRegister400Response +from Monei.model.apple_pay_domain_register401_response import ApplePayDomainRegister401Response +from Monei.model.apple_pay_domain_register404_response import ApplePayDomainRegister404Response +from Monei.model.apple_pay_domain_register422_response import ApplePayDomainRegister422Response +from Monei.model.apple_pay_domain_register500_response import ApplePayDomainRegister500Response +from Monei.model.apple_pay_domain_register503_response import ApplePayDomainRegister503Response +from Monei.model.cancel_subscription_request import CancelSubscriptionRequest +from Monei.model.create_subscription_request import CreateSubscriptionRequest +from Monei.model.pause_subscription_request import PauseSubscriptionRequest +from Monei.model.send_subscription_link_request import SendSubscriptionLinkRequest +from Monei.model.send_subscription_status_request import SendSubscriptionStatusRequest +from Monei.model.subscription import Subscription +from Monei.model.update_subscription_request import UpdateSubscriptionRequest class SubscriptionsApi(object): @@ -35,845 +48,1257 @@ def __init__(self, api_client=None): if api_client is None: api_client = ApiClient() self.api_client = api_client + self.activate_endpoint = _Endpoint( + settings={ + 'response_type': (Subscription,), + 'auth': [ + 'APIKey' + ], + 'endpoint_path': '/subscriptions/{id}/activate', + 'operation_id': 'activate', + 'http_method': 'POST', + 'servers': None, + }, + params_map={ + 'all': [ + 'id', + 'activate_subscription_request', + ], + 'required': [ + 'id', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + 'id': + (str,), + 'activate_subscription_request': + (ActivateSubscriptionRequest,), + }, + 'attribute_map': { + 'id': 'id', + }, + 'location_map': { + 'id': 'path', + 'activate_subscription_request': 'body', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [ + 'application/json' + ] + }, + api_client=api_client + ) + self.cancel_endpoint = _Endpoint( + settings={ + 'response_type': (Subscription,), + 'auth': [ + 'APIKey' + ], + 'endpoint_path': '/subscriptions/{id}/cancel', + 'operation_id': 'cancel', + 'http_method': 'POST', + 'servers': None, + }, + params_map={ + 'all': [ + 'id', + 'cancel_subscription_request', + ], + 'required': [ + 'id', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + 'id': + (str,), + 'cancel_subscription_request': + (CancelSubscriptionRequest,), + }, + 'attribute_map': { + 'id': 'id', + }, + 'location_map': { + 'id': 'path', + 'cancel_subscription_request': 'body', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [ + 'application/json' + ] + }, + api_client=api_client + ) + self.create_endpoint = _Endpoint( + settings={ + 'response_type': (Subscription,), + 'auth': [ + 'APIKey' + ], + 'endpoint_path': '/subscriptions', + 'operation_id': 'create', + 'http_method': 'POST', + 'servers': None, + }, + params_map={ + 'all': [ + 'create_subscription_request', + ], + 'required': [ + 'create_subscription_request', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + 'create_subscription_request': + (CreateSubscriptionRequest,), + }, + 'attribute_map': { + }, + 'location_map': { + 'create_subscription_request': 'body', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [ + 'application/json' + ] + }, + api_client=api_client + ) + self.get_endpoint = _Endpoint( + settings={ + 'response_type': (Subscription,), + 'auth': [ + 'APIKey' + ], + 'endpoint_path': '/subscriptions/{id}', + 'operation_id': 'get', + 'http_method': 'GET', + 'servers': None, + }, + params_map={ + 'all': [ + 'id', + ], + 'required': [ + 'id', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + 'id': + (str,), + }, + 'attribute_map': { + 'id': 'id', + }, + 'location_map': { + 'id': 'path', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [], + }, + api_client=api_client + ) + self.pause_endpoint = _Endpoint( + settings={ + 'response_type': (Subscription,), + 'auth': [ + 'APIKey' + ], + 'endpoint_path': '/subscriptions/{id}/pause', + 'operation_id': 'pause', + 'http_method': 'POST', + 'servers': None, + }, + params_map={ + 'all': [ + 'id', + 'pause_subscription_request', + ], + 'required': [ + 'id', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + 'id': + (str,), + 'pause_subscription_request': + (PauseSubscriptionRequest,), + }, + 'attribute_map': { + 'id': 'id', + }, + 'location_map': { + 'id': 'path', + 'pause_subscription_request': 'body', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [ + 'application/json' + ] + }, + api_client=api_client + ) + self.resume_endpoint = _Endpoint( + settings={ + 'response_type': (Subscription,), + 'auth': [ + 'APIKey' + ], + 'endpoint_path': '/subscriptions/{id}/resume', + 'operation_id': 'resume', + 'http_method': 'POST', + 'servers': None, + }, + params_map={ + 'all': [ + 'id', + ], + 'required': [ + 'id', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + 'id': + (str,), + }, + 'attribute_map': { + 'id': 'id', + }, + 'location_map': { + 'id': 'path', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [], + }, + api_client=api_client + ) + self.send_link_endpoint = _Endpoint( + settings={ + 'response_type': (Subscription,), + 'auth': [ + 'APIKey' + ], + 'endpoint_path': '/subscriptions/{id}/link', + 'operation_id': 'send_link', + 'http_method': 'POST', + 'servers': None, + }, + params_map={ + 'all': [ + 'id', + 'send_subscription_link_request', + ], + 'required': [ + 'id', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + 'id': + (str,), + 'send_subscription_link_request': + (SendSubscriptionLinkRequest,), + }, + 'attribute_map': { + 'id': 'id', + }, + 'location_map': { + 'id': 'path', + 'send_subscription_link_request': 'body', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [ + 'application/json' + ] + }, + api_client=api_client + ) + self.send_status_endpoint = _Endpoint( + settings={ + 'response_type': (Subscription,), + 'auth': [ + 'APIKey' + ], + 'endpoint_path': '/subscriptions/{id}/status', + 'operation_id': 'send_status', + 'http_method': 'POST', + 'servers': None, + }, + params_map={ + 'all': [ + 'id', + 'send_subscription_status_request', + ], + 'required': [ + 'id', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + 'id': + (str,), + 'send_subscription_status_request': + (SendSubscriptionStatusRequest,), + }, + 'attribute_map': { + 'id': 'id', + }, + 'location_map': { + 'id': 'path', + 'send_subscription_status_request': 'body', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [ + 'application/json' + ] + }, + api_client=api_client + ) + self.update_endpoint = _Endpoint( + settings={ + 'response_type': (Subscription,), + 'auth': [ + 'APIKey' + ], + 'endpoint_path': '/subscriptions/{id}', + 'operation_id': 'update', + 'http_method': 'PUT', + 'servers': None, + }, + params_map={ + 'all': [ + 'id', + 'update_subscription_request', + ], + 'required': [ + 'id', + 'update_subscription_request', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + 'id': + (str,), + 'update_subscription_request': + (UpdateSubscriptionRequest,), + }, + 'attribute_map': { + 'id': 'id', + }, + 'location_map': { + 'id': 'path', + 'update_subscription_request': 'body', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [ + 'application/json' + ] + }, + api_client=api_client + ) - def activate(self, id, **kwargs): # noqa: E501 + def activate( + self, + id, + **kwargs + ): """Activate Subscription # noqa: E501 - Activates the subscription that was previously created. Activation of the subscription will create an initial payment. If the subscription has trial period, the initial payment will have zero amount. The subscription is automatically activated when initial payment is confirmed. If the subscription is already activated, this endpoint can be used to update payment method. This will also generate zero amount payment. # noqa: E501 +

Activates a subscription by attaching a payment method and initiating the billing cycle.

Activation Process:

  1. This endpoint transitions a PENDING subscription to ACTIVE status
  2. An initial payment is created to validate the payment method:
    • For regular subscriptions: First billing cycle payment is processed immediately
    • For trial subscriptions: A zero-amount payment is created to verify the payment method

Payment Method Updates: If the subscription is already active, this endpoint can be used to update the payment method. The update process creates a zero-amount payment to verify the new payment method works correctly.

Important Notes:

# noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.activate(id, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str id: The subscription ID (required) - :param ActivateSubscriptionRequest activate_subscription_request: - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: Payment - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.activate_with_http_info(id, **kwargs) # noqa: E501 - def activate_with_http_info(self, id, **kwargs): # noqa: E501 - """Activate Subscription # noqa: E501 - - Activates the subscription that was previously created. Activation of the subscription will create an initial payment. If the subscription has trial period, the initial payment will have zero amount. The subscription is automatically activated when initial payment is confirmed. If the subscription is already activated, this endpoint can be used to update payment method. This will also generate zero amount payment. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.activate_with_http_info(id, async_req=True) + >>> thread = api.activate(id, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str id: The subscription ID (required) - :param ActivateSubscriptionRequest activate_subscription_request: - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: tuple(Payment, status_code(int), headers(HTTPHeaderDict)) - If the method is called asynchronously, - returns the request thread. + Args: + id (str): The subscription ID + + Keyword Args: + activate_subscription_request (ActivateSubscriptionRequest): [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 + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None + async_req (bool): execute request asynchronously + + Returns: + Subscription + If the method is called asynchronously, returns the request + thread. """ - - local_var_params = locals() - - all_params = [ - 'id', - 'activate_subscription_request' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method activate" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'id' is set - if self.api_client.client_side_validation and ('id' not in local_var_params or # noqa: E501 - local_var_params['id'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `id` when calling `activate`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'id' in local_var_params: - path_params['id'] = local_var_params['id'] # noqa: E501 - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - if 'activate_subscription_request' in local_var_params: - body_params = local_var_params['activate_subscription_request'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['APIKey'] # noqa: E501 - - return self.api_client.call_api( - '/subscriptions/{id}/activate', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='Payment', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def cancel(self, id, **kwargs): # noqa: E501 + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + kwargs['id'] = \ + id + return self.activate_endpoint.call_with_http_info(**kwargs) + + def cancel( + self, + id, + **kwargs + ): """Cancel Subscription # noqa: E501 - Cancels the activate subscription. # noqa: E501 +

Cancels an active subscription, permanently stopping the billing cycle.

Cancellation Effects:

Important Notes:

Use this endpoint when a customer wishes to completely terminate their subscription.

# 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(id, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str id: The subscription ID (required) - :param CancelSubscriptionRequest cancel_subscription_request: - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: Subscription - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.cancel_with_http_info(id, **kwargs) # noqa: E501 - - def cancel_with_http_info(self, id, **kwargs): # noqa: E501 - """Cancel Subscription # noqa: E501 - Cancels the activate subscription. # 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_with_http_info(id, async_req=True) + >>> thread = api.cancel(id, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str id: The subscription ID (required) - :param CancelSubscriptionRequest cancel_subscription_request: - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: tuple(Subscription, status_code(int), headers(HTTPHeaderDict)) - If the method is called asynchronously, - returns the request thread. + Args: + id (str): The subscription ID + + Keyword Args: + cancel_subscription_request (CancelSubscriptionRequest): [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 + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None + async_req (bool): execute request asynchronously + + Returns: + Subscription + If the method is called asynchronously, returns the request + thread. """ - - local_var_params = locals() - - all_params = [ - 'id', - 'cancel_subscription_request' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method cancel" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'id' is set - if self.api_client.client_side_validation and ('id' not in local_var_params or # noqa: E501 - local_var_params['id'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `id` when calling `cancel`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'id' in local_var_params: - path_params['id'] = local_var_params['id'] # noqa: E501 - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - if 'cancel_subscription_request' in local_var_params: - body_params = local_var_params['cancel_subscription_request'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['APIKey'] # noqa: E501 - - return self.api_client.call_api( - '/subscriptions/{id}/cancel', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='Subscription', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def create(self, create_subscription_request, **kwargs): # noqa: E501 + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + kwargs['id'] = \ + id + return self.cancel_endpoint.call_with_http_info(**kwargs) + + def create( + self, + create_subscription_request, + **kwargs + ): """Create Subscription # noqa: E501 - Creates a new subscription. Subscription is created with status: `PENDING`. In order to activate it you need to call [activate endpoint](#operation/subscriptions_activate). # noqa: E501 +

Creates a new subscription with the specified parameters.

Subscription Lifecycle:

  1. When first created, the subscription has a PENDING status
  2. To initiate billing, you must call the activate endpoint with payment details
  3. Once activated, the subscription will automatically bill according to the configured interval

Key Configuration Parameters:

Best Practices:

# 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(create_subscription_request, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param CreateSubscriptionRequest create_subscription_request: (required) - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: Subscription - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.create_with_http_info(create_subscription_request, **kwargs) # noqa: E501 - - def create_with_http_info(self, create_subscription_request, **kwargs): # noqa: E501 - """Create Subscription # noqa: E501 - Creates a new subscription. Subscription is created with status: `PENDING`. In order to activate it you need to call [activate endpoint](#operation/subscriptions_activate). # 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_with_http_info(create_subscription_request, async_req=True) + >>> thread = api.create(create_subscription_request, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param CreateSubscriptionRequest create_subscription_request: (required) - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: tuple(Subscription, status_code(int), headers(HTTPHeaderDict)) - If the method is called asynchronously, - returns the request thread. + Args: + create_subscription_request (CreateSubscriptionRequest): + + Keyword Args: + _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 + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None + async_req (bool): execute request asynchronously + + Returns: + Subscription + If the method is called asynchronously, returns the request + thread. """ - - local_var_params = locals() - - all_params = [ - 'create_subscription_request' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method create" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'create_subscription_request' is set - if self.api_client.client_side_validation and ('create_subscription_request' not in local_var_params or # noqa: E501 - local_var_params['create_subscription_request'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `create_subscription_request` when calling `create`") # noqa: E501 - - collection_formats = {} - - path_params = {} - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - if 'create_subscription_request' in local_var_params: - body_params = local_var_params['create_subscription_request'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['APIKey'] # noqa: E501 - - return self.api_client.call_api( - '/subscriptions', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='Subscription', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def get(self, id, **kwargs): # noqa: E501 + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + kwargs['create_subscription_request'] = \ + create_subscription_request + return self.create_endpoint.call_with_http_info(**kwargs) + + def get( + self, + id, + **kwargs + ): """Get Subscription # noqa: E501 - Get the details of a subscription that has previously been created. Supply the unique subscription ID that was returned from your previous request. # noqa: E501 +

Retrieves the complete details of an existing subscription by its unique ID.

This endpoint returns comprehensive information about the subscription, including:

Use this endpoint to check subscription status, verify billing details, or retrieve information needed for customer support inquiries.

# 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(id, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str id: The subscription ID (required) - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: Subscription - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.get_with_http_info(id, **kwargs) # noqa: E501 - - def get_with_http_info(self, id, **kwargs): # noqa: E501 - """Get Subscription # noqa: E501 - Get the details of a subscription that has previously been created. Supply the unique subscription ID that was returned from your previous 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.get_with_http_info(id, async_req=True) + >>> thread = api.get(id, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str id: The subscription ID (required) - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: tuple(Subscription, status_code(int), headers(HTTPHeaderDict)) - If the method is called asynchronously, - returns the request thread. + Args: + id (str): The subscription ID + + Keyword Args: + _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 + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None + async_req (bool): execute request asynchronously + + Returns: + Subscription + If the method is called asynchronously, returns the request + thread. """ - - local_var_params = locals() - - all_params = [ - 'id' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method get" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'id' is set - if self.api_client.client_side_validation and ('id' not in local_var_params or # noqa: E501 - local_var_params['id'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `id` when calling `get`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'id' in local_var_params: - path_params['id'] = local_var_params['id'] # noqa: E501 - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['APIKey'] # noqa: E501 - - return self.api_client.call_api( - '/subscriptions/{id}', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='Subscription', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def pause(self, id, **kwargs): # noqa: E501 + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + kwargs['id'] = \ + id + return self.get_endpoint.call_with_http_info(**kwargs) + + def pause( + self, + id, + **kwargs + ): """Pause Subscription # noqa: E501 - Pauses the active subscription. # noqa: E501 +

Pauses an active subscription, temporarily halting the billing cycle.

Pause Effects:

Use Cases:

To resume billing, use the resume endpoint.

# noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.pause(id, async_req=True) - >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str id: The subscription ID (required) - :param PauseSubscriptionRequest pause_subscription_request: - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: Subscription - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.pause_with_http_info(id, **kwargs) # noqa: E501 - - def pause_with_http_info(self, id, **kwargs): # noqa: E501 - """Pause Subscription # noqa: E501 - - Pauses the active subscription. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.pause_with_http_info(id, async_req=True) + >>> thread = api.pause(id, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str id: The subscription ID (required) - :param PauseSubscriptionRequest pause_subscription_request: - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: tuple(Subscription, status_code(int), headers(HTTPHeaderDict)) - If the method is called asynchronously, - returns the request thread. + Args: + id (str): The subscription ID + + Keyword Args: + pause_subscription_request (PauseSubscriptionRequest): [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 + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None + async_req (bool): execute request asynchronously + + Returns: + Subscription + If the method is called asynchronously, returns the request + thread. """ - - local_var_params = locals() - - all_params = [ - 'id', - 'pause_subscription_request' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method pause" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'id' is set - if self.api_client.client_side_validation and ('id' not in local_var_params or # noqa: E501 - local_var_params['id'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `id` when calling `pause`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'id' in local_var_params: - path_params['id'] = local_var_params['id'] # noqa: E501 - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - if 'pause_subscription_request' in local_var_params: - body_params = local_var_params['pause_subscription_request'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['APIKey'] # noqa: E501 - - return self.api_client.call_api( - '/subscriptions/{id}/pause', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='Subscription', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def resume(self, id, **kwargs): # noqa: E501 + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + kwargs['id'] = \ + id + return self.pause_endpoint.call_with_http_info(**kwargs) + + def resume( + self, + id, + **kwargs + ): """Resume Subscription # noqa: E501 - Resumes the paused subscription. # noqa: E501 +

Resumes a previously paused subscription, reactivating the billing cycle.

Resume Effects:

Important Notes:

# noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.resume(id, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str id: The subscription ID (required) - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: Subscription - If the method is called asynchronously, - returns the request thread. + Args: + id (str): The subscription ID + + Keyword Args: + _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 + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None + async_req (bool): execute request asynchronously + + Returns: + Subscription + If the method is called asynchronously, returns the request + thread. """ - kwargs['_return_http_data_only'] = True - return self.resume_with_http_info(id, **kwargs) # noqa: E501 - - def resume_with_http_info(self, id, **kwargs): # noqa: E501 - """Resume Subscription # noqa: E501 - - Resumes the paused subscription. # noqa: E501 + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + kwargs['id'] = \ + id + return self.resume_endpoint.call_with_http_info(**kwargs) + + def send_link( + self, + id, + **kwargs + ): + """Send Subscription Link # noqa: E501 + +

Sends a subscription activation link to the customer through their preferred communication channel.

This API can only be used for subscriptions with the following status:

Delivery channels are automatically selected based on available customer information:

The subscription activation link allows customers to complete their subscription setup by providing payment details on the secure MONEI payment page. If no customer contact information is provided, the system will use the details stored in the subscription record.

# noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.resume_with_http_info(id, async_req=True) + + >>> thread = api.send_link(id, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str id: The subscription ID (required) - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: tuple(Subscription, status_code(int), headers(HTTPHeaderDict)) - If the method is called asynchronously, - returns the request thread. + Args: + id (str): The subscription ID + + Keyword Args: + send_subscription_link_request (SendSubscriptionLinkRequest): [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 + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None + async_req (bool): execute request asynchronously + + Returns: + Subscription + If the method is called asynchronously, returns the request + thread. """ - - local_var_params = locals() - - all_params = [ - 'id' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method resume" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'id' is set - if self.api_client.client_side_validation and ('id' not in local_var_params or # noqa: E501 - local_var_params['id'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `id` when calling `resume`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'id' in local_var_params: - path_params['id'] = local_var_params['id'] # noqa: E501 - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['APIKey'] # noqa: E501 - - return self.api_client.call_api( - '/subscriptions/{id}/resume', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='Subscription', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def update(self, id, update_subscription_request, **kwargs): # noqa: E501 - """Update Subscription # noqa: E501 - - Updates an existing subscription. Supply the unique subscription ID that was returned from your previous request. # noqa: E501 + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + kwargs['id'] = \ + id + return self.send_link_endpoint.call_with_http_info(**kwargs) + + def send_status( + self, + id, + **kwargs + ): + """Send Subscription Status # noqa: E501 + +

Sends subscription status information to the customer through their preferred communication channel.

This API can only be used for subscriptions with the following statuses:

Delivery channels are automatically selected based on available customer information:

The status notification includes subscription details such as current status, upcoming payments, and recent changes. If no customer contact information is provided, the system will use the details stored in the subscription record.

Email notifications include contextual action links based on subscription status:

You can specify the customer's email or phone number, the preferred communication channel (email or SMS), and the language for the message.

# noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.update(id, update_subscription_request, async_req=True) + + >>> thread = api.send_status(id, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str id: The subscription ID (required) - :param UpdateSubscriptionRequest update_subscription_request: (required) - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: Subscription - If the method is called asynchronously, - returns the request thread. + Args: + id (str): The subscription ID + + Keyword Args: + send_subscription_status_request (SendSubscriptionStatusRequest): [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 + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None + async_req (bool): execute request asynchronously + + Returns: + Subscription + If the method is called asynchronously, returns the request + thread. """ - kwargs['_return_http_data_only'] = True - return self.update_with_http_info(id, update_subscription_request, **kwargs) # noqa: E501 - - def update_with_http_info(self, id, update_subscription_request, **kwargs): # noqa: E501 + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + kwargs['id'] = \ + id + return self.send_status_endpoint.call_with_http_info(**kwargs) + + def update( + self, + id, + update_subscription_request, + **kwargs + ): """Update Subscription # noqa: E501 - Updates an existing subscription. Supply the unique subscription ID that was returned from your previous request. # noqa: E501 +

Updates the configuration of an existing subscription.

Modifiable Parameters:

Update Effects:

Note: Some fundamental properties cannot be changed once a subscription is created, including currency and billing interval. To modify these, you would need to cancel the existing subscription and create a new one.

# noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.update_with_http_info(id, update_subscription_request, async_req=True) + + >>> thread = api.update(id, update_subscription_request, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str id: The subscription ID (required) - :param UpdateSubscriptionRequest update_subscription_request: (required) - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: tuple(Subscription, status_code(int), headers(HTTPHeaderDict)) - If the method is called asynchronously, - returns the request thread. + Args: + id (str): The subscription ID + update_subscription_request (UpdateSubscriptionRequest): + + Keyword Args: + _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 + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None + async_req (bool): execute request asynchronously + + Returns: + Subscription + If the method is called asynchronously, returns the request + thread. """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + kwargs['id'] = \ + id + kwargs['update_subscription_request'] = \ + update_subscription_request + return self.update_endpoint.call_with_http_info(**kwargs) - local_var_params = locals() - - all_params = [ - 'id', - 'update_subscription_request' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method update" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'id' is set - if self.api_client.client_side_validation and ('id' not in local_var_params or # noqa: E501 - local_var_params['id'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `id` when calling `update`") # noqa: E501 - # verify the required parameter 'update_subscription_request' is set - if self.api_client.client_side_validation and ('update_subscription_request' not in local_var_params or # noqa: E501 - local_var_params['update_subscription_request'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `update_subscription_request` when calling `update`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'id' in local_var_params: - path_params['id'] = local_var_params['id'] # noqa: E501 - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - if 'update_subscription_request' in local_var_params: - body_params = local_var_params['update_subscription_request'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['APIKey'] # noqa: E501 - - return self.api_client.call_api( - '/subscriptions/{id}', 'PUT', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='Subscription', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) diff --git a/Monei/api_client.py b/Monei/api_client.py index 36f175a..dbfed8b 100644 --- a/Monei/api_client.py +++ b/Monei/api_client.py @@ -1,33 +1,42 @@ -# coding: utf-8 """ MONEI API v1 -

The MONEI API is organized around REST. Our API has predictable resource-oriented URLs, accepts JSON-encoded request bodies, returns JSON-encoded responses, and uses standard HTTP response codes, authentication, and verbs.

Base URL:

https://api.monei.com/v1

Client libraries:

Important:

If you are not using our official SDKs, you need to provide a valid User-Agent header in each request, otherwise your requests will be rejected.

# noqa: E501 +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - The version of the OpenAPI document: 1.4.6 + The version of the OpenAPI document: 1.5.0 Generated by: https://openapi-generator.tech """ -from __future__ import absolute_import -import atexit -import datetime -from dateutil.parser import parse import json +import atexit import mimetypes from multiprocessing.pool import ThreadPool +import io import os import re -import tempfile +import typing +from urllib.parse import quote +from urllib3.fields import RequestField -# python 2 and python 3 compatibility library -import six -from six.moves.urllib.parse import quote -from Monei.configuration import Configuration -import Monei.models from Monei import rest -from Monei.exceptions import ApiValueError, ApiException +from Monei.configuration import Configuration +from Monei.exceptions import ApiTypeError, ApiValueError, ApiException +from Monei.model_utils import ( + ModelNormal, + ModelSimple, + ModelComposed, + check_allowed_values, + check_validations, + date, + datetime, + deserialize_file, + file_type, + model_to_dict, + none_type, + validate_and_convert_types +) class ApiClient(object): @@ -52,17 +61,6 @@ class ApiClient(object): to the API. More threads means more concurrent API requests. """ - PRIMITIVE_TYPES = (float, bool, bytes, six.text_type) + six.integer_types - NATIVE_TYPES_MAPPING = { - 'int': int, - 'long': int if six.PY3 else long, # noqa: F821 - 'float': float, - 'str': str, - 'bool': bool, - 'date': datetime.date, - 'datetime': datetime.datetime, - 'object': object, - } _pool = None def __init__(self, configuration=None, header_name=None, header_value=None, @@ -79,7 +77,6 @@ def __init__(self, configuration=None, header_name=None, header_value=None, self.cookie = cookie # Set default User-Agent. self.user_agent = 'OpenAPI-Generator/1.2.6/python' - self.client_side_validation = configuration.client_side_validation def __enter__(self): return self @@ -118,11 +115,26 @@ def set_default_header(self, header_name, header_value): self.default_headers[header_name] = header_value def __call_api( - self, resource_path, method, path_params=None, - query_params=None, header_params=None, body=None, post_params=None, - files=None, response_type=None, auth_settings=None, - _return_http_data_only=None, collection_formats=None, - _preload_content=True, _request_timeout=None, _host=None): + self, + resource_path: str, + method: str, + path_params: typing.Optional[typing.Dict[str, typing.Any]] = None, + query_params: typing.Optional[typing.List[typing.Tuple[str, typing.Any]]] = None, + header_params: typing.Optional[typing.Dict[str, typing.Any]] = None, + body: typing.Optional[typing.Any] = None, + post_params: typing.Optional[typing.List[typing.Tuple[str, typing.Any]]] = None, + files: typing.Optional[typing.Dict[str, typing.List[io.IOBase]]] = None, + response_type: typing.Optional[typing.Tuple[typing.Any]] = None, + auth_settings: typing.Optional[typing.List[str]] = None, + _return_http_data_only: typing.Optional[bool] = None, + collection_formats: typing.Optional[typing.Dict[str, str]] = None, + _preload_content: bool = True, + _request_timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + _host: typing.Optional[str] = None, + _check_type: typing.Optional[bool] = None, + _content_type: typing.Optional[str] = None, + _request_auths: typing.Optional[typing.List[typing.Dict[str, typing.Any]]] = None + ): config = self.configuration @@ -161,14 +173,19 @@ def __call_api( post_params = self.parameters_to_tuples(post_params, collection_formats) post_params.extend(self.files_parameters(files)) - - # auth setting - self.update_params_for_auth(header_params, query_params, auth_settings) + if header_params['Content-Type'].startswith("multipart"): + post_params = self.parameters_to_multipart(post_params, + (dict)) # body if body: body = self.sanitize_for_serialization(body) + # auth setting + self.update_params_for_auth(header_params, query_params, + auth_settings, resource_path, method, body, + request_auths=_request_auths) + # request url if _host is None: url = self.configuration.host + resource_path @@ -184,28 +201,33 @@ def __call_api( _preload_content=_preload_content, _request_timeout=_request_timeout) except ApiException as e: - e.body = e.body.decode('utf-8') if six.PY3 else e.body + e.body = e.body.decode('utf-8') raise e - content_type = response_data.getheader('content-type') - self.last_response = response_data return_data = response_data if not _preload_content: + return (return_data) return return_data - if six.PY3 and response_type not in ["file", "bytes"]: - match = None - if content_type is not None: - match = re.search(r"charset=([a-zA-Z\-\d]+)[\s\;]?", content_type) - encoding = match.group(1) if match else "utf-8" - response_data.data = response_data.data.decode(encoding) - # deserialize response data if response_type: - return_data = self.deserialize(response_data, response_type) + if response_type != (file_type,): + encoding = "utf-8" + content_type = response_data.getheader('content-type') + if content_type is not None: + match = re.search(r"charset=([a-zA-Z\-\d]+)[\s\;]?", content_type) + if match: + encoding = match.group(1) + response_data.data = response_data.data.decode(encoding) + + return_data = self.deserialize( + response_data, + response_type, + _check_type + ) else: return_data = None @@ -215,9 +237,30 @@ def __call_api( return (return_data, response_data.status, response_data.getheaders()) - def sanitize_for_serialization(self, obj): - """Builds a JSON POST object. + def parameters_to_multipart(self, params, collection_types): + """Get parameters as list of tuples, formatting as json if value is collection_types + :param params: Parameters as list of two-tuples + :param dict collection_types: Parameter collection types + :return: Parameters as list of tuple or urllib3.fields.RequestField + """ + new_params = [] + if collection_types is None: + collection_types = (dict) + for k, v in params.items() if isinstance(params, dict) else params: # noqa: E501 + if isinstance( + v, collection_types): # v is instance of collection_type, formatting as application/json + v = json.dumps(v, ensure_ascii=False).encode("utf-8") + field = RequestField(k, v) + field.make_multipart(content_type="application/json; charset=utf-8") + new_params.append(field) + else: + new_params.append((k, v)) + return new_params + + @classmethod + def sanitize_for_serialization(cls, obj): + """Prepares data for transmission before it is sent with the rest client If obj is None, return None. If obj is str, int, long, float, bool, return directly. If obj is datetime.datetime, datetime.date @@ -225,105 +268,98 @@ def sanitize_for_serialization(self, obj): If obj is list, sanitize each element in the list. If obj is dict, return the dict. If obj is OpenAPI model, return the properties dict. - + If obj is io.IOBase, return the bytes :param obj: The data to serialize. :return: The serialized form of data. """ - if obj is None: - return None - elif isinstance(obj, self.PRIMITIVE_TYPES): + if isinstance(obj, (ModelNormal, ModelComposed)): + return { + key: cls.sanitize_for_serialization(val) for key, + val in model_to_dict( + obj, + serialize=True).items()} + elif isinstance(obj, io.IOBase): + return cls.get_file_data_and_close_file(obj) + elif isinstance(obj, (str, int, float, none_type, bool)): return obj - elif isinstance(obj, list): - return [self.sanitize_for_serialization(sub_obj) - for sub_obj in obj] - elif isinstance(obj, tuple): - return tuple(self.sanitize_for_serialization(sub_obj) - for sub_obj in obj) - elif isinstance(obj, (datetime.datetime, datetime.date)): + elif isinstance(obj, (datetime, date)): return obj.isoformat() - + elif isinstance(obj, ModelSimple): + return cls.sanitize_for_serialization(obj.value) + elif isinstance(obj, (list, tuple)): + return [cls.sanitize_for_serialization(item) for item in obj] if isinstance(obj, dict): - obj_dict = obj - else: - # Convert model obj to dict except - # attributes `openapi_types`, `attribute_map` - # and attributes which value is not None. - # Convert attribute name to json key in - # model definition for request. - obj_dict = {obj.attribute_map[attr]: getattr(obj, attr) - for attr, _ in six.iteritems(obj.openapi_types) - if getattr(obj, attr) is not None} - - return {key: self.sanitize_for_serialization(val) - for key, val in six.iteritems(obj_dict)} - - def deserialize(self, response, response_type): + return {key: cls.sanitize_for_serialization(val) for key, val in obj.items()} + raise ApiValueError( + 'Unable to prepare type {} for serialization'.format( + obj.__class__.__name__)) + + def deserialize(self, response, response_type, _check_type): """Deserializes response into an object. :param response: RESTResponse object to be deserialized. - :param response_type: class literal for - deserialized object, or string of class name. + :param response_type: For the response, a tuple containing: + valid classes + a list containing valid classes (for list schemas) + a dict containing a tuple of valid classes as the value + Example values: + (str,) + (Pet,) + (float, none_type) + ([int, none_type],) + ({str: (bool, str, int, float, date, datetime, str, none_type)},) + :param _check_type: boolean, whether to check the types of the data + received from the server + :type _check_type: bool :return: deserialized object. """ # handle file downloading # save response body into a tmp file and return the instance - if response_type == "file": - return self.__deserialize_file(response) + if response_type == (file_type,): + content_disposition = response.getheader("Content-Disposition") + return deserialize_file(response.data, self.configuration, + content_disposition=content_disposition) # fetch data from response object try: - data = json.loads(response.data) + received_data = json.loads(response.data) except ValueError: - data = response.data - - return self.__deserialize(data, response_type) - - def __deserialize(self, data, klass): - """Deserializes dict, list, str into an object. - - :param data: dict, list or str. - :param klass: class literal, or string of class name. - - :return: object. - """ - if data is None: - return None - - if type(klass) == str: - if klass.startswith('list['): - sub_kls = re.match(r'list\[(.*)\]', klass).group(1) - return [self.__deserialize(sub_data, sub_kls) - for sub_data in data] - - if klass.startswith('dict('): - sub_kls = re.match(r'dict\(([^,]*), (.*)\)', klass).group(2) - return {k: self.__deserialize(v, sub_kls) - for k, v in six.iteritems(data)} - - # convert str to class - if klass in self.NATIVE_TYPES_MAPPING: - klass = self.NATIVE_TYPES_MAPPING[klass] - else: - klass = getattr(Monei.models, klass) - - if klass in self.PRIMITIVE_TYPES: - return self.__deserialize_primitive(data, klass) - elif klass == object: - return self.__deserialize_object(data) - elif klass == datetime.date: - return self.__deserialize_date(data) - elif klass == datetime.datetime: - return self.__deserialize_datetime(data) - else: - return self.__deserialize_model(data, klass) - - def call_api(self, resource_path, method, - path_params=None, query_params=None, header_params=None, - body=None, post_params=None, files=None, - response_type=None, auth_settings=None, async_req=None, - _return_http_data_only=None, collection_formats=None, - _preload_content=True, _request_timeout=None, _host=None): + received_data = response.data + + # store our data under the key of 'received_data' so users have some + # context if they are deserializing a string and the data type is wrong + deserialized_data = validate_and_convert_types( + received_data, + response_type, + ['received_data'], + True, + _check_type, + configuration=self.configuration + ) + return deserialized_data + + def call_api( + self, + resource_path: str, + method: str, + path_params: typing.Optional[typing.Dict[str, typing.Any]] = None, + query_params: typing.Optional[typing.List[typing.Tuple[str, typing.Any]]] = None, + header_params: typing.Optional[typing.Dict[str, typing.Any]] = None, + body: typing.Optional[typing.Any] = None, + post_params: typing.Optional[typing.List[typing.Tuple[str, typing.Any]]] = None, + files: typing.Optional[typing.Dict[str, typing.List[io.IOBase]]] = None, + response_type: typing.Optional[typing.Tuple[typing.Any]] = None, + auth_settings: typing.Optional[typing.List[str]] = None, + async_req: typing.Optional[bool] = None, + _return_http_data_only: typing.Optional[bool] = None, + collection_formats: typing.Optional[typing.Dict[str, str]] = None, + _preload_content: bool = True, + _request_timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + _host: typing.Optional[str] = None, + _check_type: typing.Optional[bool] = None, + _request_auths: typing.Optional[typing.List[typing.Dict[str, typing.Any]]] = None + ): """Makes the HTTP request (synchronous) and returns deserialized data. To make an async_req request, set the async_req parameter. @@ -338,21 +374,42 @@ def call_api(self, resource_path, method, :param post_params dict: Request post form parameters, for `application/x-www-form-urlencoded`, `multipart/form-data`. :param auth_settings list: Auth Settings names for the request. - :param response: Response data type. - :param files dict: key -> filename, value -> filepath, - for `multipart/form-data`. + :param response_type: For the response, a tuple containing: + valid classes + a list containing valid classes (for list schemas) + a dict containing a tuple of valid classes as the value + Example values: + (str,) + (Pet,) + (float, none_type) + ([int, none_type],) + ({str: (bool, str, int, float, date, datetime, str, none_type)},) + :param files: key -> field name, value -> a list of open file + objects for `multipart/form-data`. + :type files: dict :param async_req bool: execute request asynchronously + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param collection_formats: dict of collection formats for path, query, header, and post parameters. + :type collection_formats: dict, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. + :param _check_type: boolean describing if the data back from the server + should have its type checked. + :type _check_type: bool, optional + :param _request_auths: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auths: list, optional :return: If async_req parameter is True, the request will be called asynchronously. @@ -366,7 +423,8 @@ def call_api(self, resource_path, method, body, post_params, files, response_type, auth_settings, _return_http_data_only, collection_formats, - _preload_content, _request_timeout, _host) + _preload_content, _request_timeout, _host, + _check_type, _request_auths=_request_auths) return self.pool.apply_async(self.__call_api, (resource_path, method, path_params, @@ -379,7 +437,7 @@ def call_api(self, resource_path, method, collection_formats, _preload_content, _request_timeout, - _host)) + _host, _check_type, None, _request_auths)) def request(self, method, url, query_params=None, headers=None, post_params=None, body=None, _preload_content=True, @@ -401,8 +459,10 @@ def request(self, method, url, query_params=None, headers=None, return self.rest_client.OPTIONS(url, query_params=query_params, headers=headers, + post_params=post_params, _preload_content=_preload_content, - _request_timeout=_request_timeout) + _request_timeout=_request_timeout, + body=body) elif method == "POST": return self.rest_client.POST(url, query_params=query_params, @@ -450,7 +510,7 @@ def parameters_to_tuples(self, params, collection_formats): new_params = [] if collection_formats is None: collection_formats = {} - for k, v in six.iteritems(params) if isinstance(params, dict) else params: # noqa: E501 + for k, v in params.items() if isinstance(params, dict) else params: # noqa: E501 if k in collection_formats: collection_format = collection_formats[k] if collection_format == 'multi': @@ -470,27 +530,44 @@ def parameters_to_tuples(self, params, collection_formats): new_params.append((k, v)) return new_params - def files_parameters(self, files=None): + @staticmethod + def get_file_data_and_close_file(file_instance: io.IOBase) -> bytes: + file_data = file_instance.read() + file_instance.close() + return file_data + + def files_parameters(self, + files: typing.Optional[typing.Dict[str, + typing.List[io.IOBase]]] = None): """Builds form parameters. - :param files: File parameters. - :return: Form parameters with files. + :param files: None or a dict with key=param_name and + value is a list of open file objects + :return: List of tuples of form parameters with file data """ - params = [] + if files is None: + return [] - if files: - for k, v in six.iteritems(files): - if not v: + params = [] + for param_name, file_instances in files.items(): + if file_instances is None: + # if the file field is nullable, skip None values + continue + for file_instance in file_instances: + if file_instance is None: + # if the file field is nullable, skip None values continue - file_names = v if type(v) is list else [v] - for n in file_names: - with open(n, 'rb') as f: - filename = os.path.basename(f.name) - filedata = f.read() - mimetype = (mimetypes.guess_type(filename)[0] or - 'application/octet-stream') - params.append( - tuple([k, tuple([filename, filedata, mimetype])])) + if file_instance.closed is True: + raise ApiValueError( + "Cannot read a closed file. The passed in file_type " + "for %s must be open." % param_name + ) + filename = os.path.basename(file_instance.name) + filedata = self.get_file_data_and_close_file(file_instance) + mimetype = (mimetypes.guess_type(filename)[0] or + 'application/octet-stream') + params.append( + tuple([param_name, tuple([filename, filedata, mimetype])])) return params @@ -510,157 +587,310 @@ def select_header_accept(self, accepts): else: return ', '.join(accepts) - def select_header_content_type(self, content_types): + def select_header_content_type(self, content_types, method=None, body=None): """Returns `Content-Type` based on an array of content_types provided. :param content_types: List of content-types. + :param method: http method (e.g. POST, PATCH). + :param body: http body to send. :return: Content-Type (e.g. application/json). """ if not content_types: - return 'application/json' + return None content_types = [x.lower() for x in content_types] + if (method == 'PATCH' and + 'application/json-patch+json' in content_types and + isinstance(body, list)): + return 'application/json-patch+json' + if 'application/json' in content_types or '*/*' in content_types: return 'application/json' else: return content_types[0] - def update_params_for_auth(self, headers, querys, auth_settings): + def update_params_for_auth(self, headers, queries, auth_settings, + resource_path, method, body, request_auths=None): """Updates header and query params based on authentication setting. :param headers: Header parameters dict to be updated. - :param querys: Query parameters tuple list to be updated. + :param queries: Query parameters tuple list to be updated. :param auth_settings: Authentication setting identifiers list. + :param resource_path: A string representation of the HTTP request resource path. + :param method: A string representation of the HTTP request method. + :param body: A object representing the body of the HTTP request. + The object type is the return value of _encoder.default(). + :param request_auths: if set, the provided settings will + override the token in the configuration. """ if not auth_settings: return + if request_auths: + for auth_setting in request_auths: + self._apply_auth_params( + headers, queries, resource_path, method, body, auth_setting) + return + for auth in auth_settings: auth_setting = self.configuration.auth_settings().get(auth) if auth_setting: - if auth_setting['in'] == 'cookie': - headers['Cookie'] = auth_setting['value'] - elif auth_setting['in'] == 'header': - headers[auth_setting['key']] = auth_setting['value'] - elif auth_setting['in'] == 'query': - querys.append((auth_setting['key'], auth_setting['value'])) - else: - raise ApiValueError( - 'Authentication token must be in `query` or `header`' - ) - - def __deserialize_file(self, response): - """Deserializes body to file + self._apply_auth_params( + headers, queries, resource_path, method, body, auth_setting) + + def _apply_auth_params(self, headers, queries, resource_path, method, body, auth_setting): + if auth_setting['in'] == 'cookie': + headers['Cookie'] = auth_setting['key'] + "=" + auth_setting['value'] + elif auth_setting['in'] == 'header': + if auth_setting['type'] != 'http-signature': + headers[auth_setting['key']] = auth_setting['value'] + elif auth_setting['in'] == 'query': + queries.append((auth_setting['key'], auth_setting['value'])) + else: + raise ApiValueError( + 'Authentication token must be in `query` or `header`' + ) - Saves response body into a file in a temporary folder, - using the filename from the `Content-Disposition` header if provided. - :param response: RESTResponse. - :return: file path. +class Endpoint(object): + def __init__(self, settings=None, params_map=None, root_map=None, + headers_map=None, api_client=None, callable=None): + """Creates an endpoint + + Args: + settings (dict): see below key value pairs + 'response_type' (tuple/None): response type + 'auth' (list): a list of auth type keys + 'endpoint_path' (str): the endpoint path + 'operation_id' (str): endpoint string identifier + 'http_method' (str): POST/PUT/PATCH/GET etc + 'servers' (list): list of str servers that this endpoint is at + params_map (dict): see below key value pairs + 'all' (list): list of str endpoint parameter names + 'required' (list): list of required parameter names + 'nullable' (list): list of nullable parameter names + 'enum' (list): list of parameters with enum values + 'validation' (list): list of parameters with validations + root_map + 'validations' (dict): the dict mapping endpoint parameter tuple + paths to their validation dictionaries + 'allowed_values' (dict): the dict mapping endpoint parameter + tuple paths to their allowed_values (enum) dictionaries + 'openapi_types' (dict): param_name to openapi type + 'attribute_map' (dict): param_name to camelCase name + 'location_map' (dict): param_name to 'body', 'file', 'form', + 'header', 'path', 'query' + collection_format_map (dict): param_name to `csv` etc. + headers_map (dict): see below key value pairs + 'accept' (list): list of Accept header strings + 'content_type' (list): list of Content-Type header strings + api_client (ApiClient) api client instance + callable (function): the function which is invoked when the + Endpoint is called """ - fd, path = tempfile.mkstemp(dir=self.configuration.temp_folder_path) - os.close(fd) - os.remove(path) - - content_disposition = response.getheader("Content-Disposition") - if content_disposition: - filename = re.search(r'filename=[\'"]?([^\'"\s]+)[\'"]?', - content_disposition).group(1) - path = os.path.join(os.path.dirname(path), filename) + self.settings = settings + self.params_map = params_map + self.params_map['all'].extend([ + 'async_req', + '_host_index', + '_preload_content', + '_request_timeout', + '_return_http_data_only', + '_check_input_type', + '_check_return_type', + '_content_type', + '_spec_property_naming', + '_request_auths' + ]) + self.params_map['nullable'].extend(['_request_timeout']) + self.validations = root_map['validations'] + self.allowed_values = root_map['allowed_values'] + self.openapi_types = root_map['openapi_types'] + extra_types = { + 'async_req': (bool,), + '_host_index': (none_type, int), + '_preload_content': (bool,), + '_request_timeout': (none_type, float, (float,), [float], int, (int,), [int]), + '_return_http_data_only': (bool,), + '_check_input_type': (bool,), + '_check_return_type': (bool,), + '_spec_property_naming': (bool,), + '_content_type': (none_type, str), + '_request_auths': (none_type, list) + } + self.openapi_types.update(extra_types) + self.attribute_map = root_map['attribute_map'] + self.location_map = root_map['location_map'] + self.collection_format_map = root_map['collection_format_map'] + self.headers_map = headers_map + self.api_client = api_client + self.callable = callable + + def __validate_inputs(self, kwargs): + for param in self.params_map['enum']: + if param in kwargs: + check_allowed_values( + self.allowed_values, + (param,), + kwargs[param] + ) - with open(path, "wb") as f: - f.write(response.data) + for param in self.params_map['validation']: + if param in kwargs: + check_validations( + self.validations, + (param,), + kwargs[param], + configuration=self.api_client.configuration + ) - return path + if kwargs['_check_input_type'] is False: + return - def __deserialize_primitive(self, data, klass): - """Deserializes string to primitive type. + for key, value in kwargs.items(): + fixed_val = validate_and_convert_types( + value, + self.openapi_types[key], + [key], + kwargs['_spec_property_naming'], + kwargs['_check_input_type'], + configuration=self.api_client.configuration + ) + kwargs[key] = fixed_val + + def __gather_params(self, kwargs): + params = { + 'body': None, + 'collection_format': {}, + 'file': {}, + 'form': [], + 'header': {}, + 'path': {}, + 'query': [] + } + + for param_name, param_value in kwargs.items(): + param_location = self.location_map.get(param_name) + if param_location is None: + continue + if param_location: + if param_location == 'body': + params['body'] = param_value + continue + base_name = self.attribute_map[param_name] + if (param_location == 'form' and + self.openapi_types[param_name] == (file_type,)): + params['file'][base_name] = [param_value] + elif (param_location == 'form' and + self.openapi_types[param_name] == ([file_type],)): + # param_value is already a list + params['file'][base_name] = param_value + elif param_location in {'form', 'query'}: + param_value_full = (base_name, param_value) + params[param_location].append(param_value_full) + if param_location not in {'form', 'query'}: + params[param_location][base_name] = param_value + collection_format = self.collection_format_map.get(param_name) + if collection_format: + params['collection_format'][base_name] = collection_format - :param data: str. - :param klass: class literal. + return params - :return: int, long, float, str, bool. - """ - try: - return klass(data) - except UnicodeEncodeError: - return six.text_type(data) - except TypeError: - return data + def __call__(self, *args, **kwargs): + """ This method is invoked when endpoints are called + Example: - def __deserialize_object(self, value): - """Return an original value. + api_instance = ApplePayDomainApi() + api_instance.register # this is an instance of the class Endpoint + api_instance.register() # this invokes api_instance.register.__call__() + which then invokes the callable functions stored in that endpoint at + api_instance.register.callable or self.callable in this class - :return: object. """ - return value + return self.callable(self, *args, **kwargs) - def __deserialize_date(self, string): - """Deserializes string to date. + def call_with_http_info(self, **kwargs): - :param string: str. - :return: date. - """ try: - return parse(string).date() - except ImportError: - return string - except ValueError: - raise rest.ApiException( - status=0, - reason="Failed to parse `{0}` as date object".format(string) + index = self.api_client.configuration.server_operation_index.get( + self.settings['operation_id'], self.api_client.configuration.server_index + ) if kwargs['_host_index'] is None else kwargs['_host_index'] + server_variables = self.api_client.configuration.server_operation_variables.get( + self.settings['operation_id'], self.api_client.configuration.server_variables + ) + _host = self.api_client.configuration.get_host_from_settings( + index, variables=server_variables, servers=self.settings['servers'] ) + except IndexError: + if self.settings['servers']: + raise ApiValueError( + "Invalid host index. Must be 0 <= index < %s" % + len(self.settings['servers']) + ) + _host = None + + for key, value in kwargs.items(): + if key not in self.params_map['all']: + raise ApiTypeError( + "Got an unexpected parameter '%s'" + " to method `%s`" % + (key, self.settings['operation_id']) + ) + # only throw this nullable ApiValueError if _check_input_type + # is False, if _check_input_type==True we catch this case + # in self.__validate_inputs + if (key not in self.params_map['nullable'] and value is None + and kwargs['_check_input_type'] is False): + raise ApiValueError( + "Value may not be None for non-nullable parameter `%s`" + " when calling `%s`" % + (key, self.settings['operation_id']) + ) - def __deserialize_datetime(self, string): - """Deserializes string to datetime. + for key in self.params_map['required']: + if key not in kwargs.keys(): + raise ApiValueError( + "Missing the required parameter `%s` when calling " + "`%s`" % (key, self.settings['operation_id']) + ) - The string should be in iso8601 datetime format. + self.__validate_inputs(kwargs) - :param string: str. - :return: datetime. - """ - try: - return parse(string) - except ImportError: - return string - except ValueError: - raise rest.ApiException( - status=0, - reason=( - "Failed to parse `{0}` as datetime object" - .format(string) - ) - ) + params = self.__gather_params(kwargs) - def __deserialize_model(self, data, klass): - """Deserializes list or dict to model. + accept_headers_list = self.headers_map['accept'] + if accept_headers_list: + params['header']['Accept'] = self.api_client.select_header_accept( + accept_headers_list) - :param data: dict, list. - :param klass: class literal. - :return: model object. - """ - has_discriminator = False - if (hasattr(klass, 'get_real_child_model') - and klass.discriminator_value_class_map): - has_discriminator = True - - if not klass.openapi_types and has_discriminator is False: - return data - - kwargs = {} - if (data is not None and - klass.openapi_types is not None and - isinstance(data, (list, dict))): - for attr, attr_type in six.iteritems(klass.openapi_types): - if klass.attribute_map[attr] in data: - value = data[klass.attribute_map[attr]] - kwargs[attr] = self.__deserialize(value, attr_type) - - instance = klass(**kwargs) - - if has_discriminator: - klass_name = instance.get_real_child_model(data) - if klass_name: - instance = self.__deserialize(data, klass_name) - return instance + if kwargs.get('_content_type'): + params['header']['Content-Type'] = kwargs['_content_type'] + else: + content_type_headers_list = self.headers_map['content_type'] + if content_type_headers_list: + if params['body'] != "": + content_types_list = self.api_client.select_header_content_type( + content_type_headers_list, self.settings['http_method'], + params['body']) + if content_types_list: + params['header']['Content-Type'] = content_types_list + + return self.api_client.call_api( + self.settings['endpoint_path'], self.settings['http_method'], + params['path'], + params['query'], + params['header'], + body=params['body'], + post_params=params['form'], + files=params['file'], + response_type=self.settings['response_type'], + auth_settings=self.settings['auth'], + async_req=kwargs['async_req'], + _check_type=kwargs['_check_return_type'], + _return_http_data_only=kwargs['_return_http_data_only'], + _preload_content=kwargs['_preload_content'], + _request_timeout=kwargs['_request_timeout'], + _host=_host, + _request_auths=kwargs['_request_auths'], + collection_formats=params['collection_format']) diff --git a/Monei/apis/__init__.py b/Monei/apis/__init__.py index 2b620e1..1011fd6 100644 --- a/Monei/apis/__init__.py +++ b/Monei/apis/__init__.py @@ -15,5 +15,7 @@ # Import APIs into API package: from Monei.api.apple_pay_domain_api import ApplePayDomainApi +from Monei.api.bizum_api import BizumApi +from Monei.api.payment_methods_api import PaymentMethodsApi from Monei.api.payments_api import PaymentsApi from Monei.api.subscriptions_api import SubscriptionsApi diff --git a/Monei/configuration.py b/Monei/configuration.py index f5fc1be..1cf1e13 100644 --- a/Monei/configuration.py +++ b/Monei/configuration.py @@ -1,26 +1,28 @@ -# coding: utf-8 - """ MONEI API v1 -

The MONEI API is organized around REST. Our API has predictable resource-oriented URLs, accepts JSON-encoded request bodies, returns JSON-encoded responses, and uses standard HTTP response codes, authentication, and verbs.

Base URL:

https://api.monei.com/v1

Client libraries:

Important:

If you are not using our official SDKs, you need to provide a valid User-Agent header in each request, otherwise your requests will be rejected.

# noqa: E501 +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - The version of the OpenAPI document: 1.4.6 + The version of the OpenAPI document: 1.5.0 Generated by: https://openapi-generator.tech """ -from __future__ import absolute_import - import copy import logging import multiprocessing import sys import urllib3 -import six -from six.moves import http_client as httplib +from http import client as http_client +from Monei.exceptions import ApiValueError + +JSON_SCHEMA_VALIDATION_KEYWORDS = { + 'multipleOf', 'maximum', 'exclusiveMaximum', + 'minimum', 'exclusiveMinimum', 'maxLength', + 'minLength', 'pattern', 'maxItems', 'minItems' +} class Configuration(object): """NOTE: This class is auto generated by OpenAPI Generator @@ -49,6 +51,30 @@ class Configuration(object): then all undeclared properties received by the server are injected into the additional properties map. In that case, there are undeclared properties, and nothing to discard. + :param disabled_client_side_validations (string): Comma-separated list of + JSON schema validation keywords to disable JSON schema structural validation + rules. The following keywords may be specified: multipleOf, maximum, + exclusiveMaximum, minimum, exclusiveMinimum, maxLength, minLength, pattern, + maxItems, minItems. + By default, the validation is performed for data generated locally by the client + and data received from the server, independent of any validation performed by + the server side. If the input data does not satisfy the JSON schema validation + rules specified in the OpenAPI document, an exception is raised. + If disabled_client_side_validations is set, structural validation is + disabled. This can be useful to troubleshoot data validation problem, such as + when the OpenAPI document validation rules do not match the actual API data + received by the server. + :param server_index: Index to servers configuration. + :param server_variables: Mapping with string values to replace variables in + templated server configuration. The validation of enums is performed for + variables with defined enum values before. + :param server_operation_index: Mapping from operation ID to an index to server + configuration. + :param server_operation_variables: Mapping from operation ID to a mapping with + string values to replace variables in templated server configuration. + The validation of enums is performed for variables with defined enum values before. + :param ssl_ca_cert: str - the path to a file of concatenated CA certificates + in PEM format :Example: @@ -74,20 +100,34 @@ class Configuration(object): _default = None - def __init__(self, host="https://api.monei.com/v1", + def __init__(self, host=None, api_key=None, api_key_prefix=None, + access_token=None, username=None, password=None, discard_unknown_keys=False, + disabled_client_side_validations="", + server_index=None, server_variables=None, + server_operation_index=None, server_operation_variables=None, + ssl_ca_cert=None, ): """Constructor """ - self.host = host + self._base_path = "https://api.monei.com/v1" if host is None else host """Default Base url """ + self.server_index = 0 if server_index is None and host is None else server_index + self.server_operation_index = server_operation_index or {} + """Default server index + """ + self.server_variables = server_variables or {} + self.server_operation_variables = server_operation_variables or {} + """Default server variables + """ self.temp_folder_path = None """Temp file folder for downloading files """ # Authentication Settings + self.access_token = access_token self.api_key = {} if api_key: self.api_key = api_key @@ -108,6 +148,7 @@ def __init__(self, host="https://api.monei.com/v1", """Password for HTTP basic authentication """ self.discard_unknown_keys = discard_unknown_keys + self.disabled_client_side_validations = disabled_client_side_validations self.logger = {} """Logging Settings """ @@ -134,7 +175,7 @@ def __init__(self, host="https://api.monei.com/v1", Set this to false to skip verifying SSL certificate when calling API from https server. """ - self.ssl_ca_cert = None + self.ssl_ca_cert = ssl_ca_cert """Set this to customize the certificate file to verify the peer. """ self.cert_file = None @@ -158,6 +199,9 @@ def __init__(self, host="https://api.monei.com/v1", self.proxy = None """Proxy URL """ + self.no_proxy = None + """bypass proxy for host in the no_proxy list. + """ self.proxy_headers = None """Proxy headers """ @@ -167,9 +211,12 @@ def __init__(self, host="https://api.monei.com/v1", self.retries = None """Adding retries to override urllib3 default value 3 """ - # Disable client side validation + # Enable client side validation self.client_side_validation = True + # Options to pass down to the underlying urllib3 socket + self.socket_options = None + def __deepcopy__(self, memo): cls = self.__class__ result = cls.__new__(cls) @@ -186,6 +233,13 @@ def __deepcopy__(self, memo): def __setattr__(self, name, value): object.__setattr__(self, name, value) + if name == 'disabled_client_side_validations': + s = set(filter(None, value.split(','))) + for v in s: + if v not in JSON_SCHEMA_VALIDATION_KEYWORDS: + raise ApiValueError( + "Invalid keyword: '{0}''".format(v)) + self._disabled_client_side_validations = s @classmethod def set_default(cls, default): @@ -240,7 +294,7 @@ def logger_file(self, value): # then add file handler and remove stream handler. self.logger_file_handler = logging.FileHandler(self.__logger_file) self.logger_file_handler.setFormatter(self.logger_formatter) - for _, logger in six.iteritems(self.logger): + for _, logger in self.logger.items(): logger.addHandler(self.logger_file_handler) @property @@ -262,17 +316,17 @@ def debug(self, value): self.__debug = value if self.__debug: # if debug status is True, turn on debug logging - for _, logger in six.iteritems(self.logger): + for _, logger in self.logger.items(): logger.setLevel(logging.DEBUG) - # turn on httplib debug - httplib.HTTPConnection.debuglevel = 1 + # turn on http_client debug + http_client.HTTPConnection.debuglevel = 1 else: # if debug status is False, turn off debug logging, # setting log level to default `logging.WARNING` - for _, logger in six.iteritems(self.logger): + for _, logger in self.logger.items(): logger.setLevel(logging.WARNING) - # turn off httplib debug - httplib.HTTPConnection.debuglevel = 0 + # turn off http_client debug + http_client.HTTPConnection.debuglevel = 0 @property def logger_format(self): @@ -297,15 +351,16 @@ def logger_format(self, value): self.__logger_format = value self.logger_formatter = logging.Formatter(self.__logger_format) - def get_api_key_with_prefix(self, identifier): + def get_api_key_with_prefix(self, identifier, alias=None): """Gets API key (with prefix if set). :param identifier: The identifier of apiKey. + :param alias: The alternative identifier of apiKey. :return: The token for api key authentication. """ if self.refresh_api_key_hook is not None: self.refresh_api_key_hook(self) - key = self.api_key.get(identifier) + key = self.api_key.get(identifier, self.api_key.get(alias) if alias is not None else None) if key: prefix = self.api_key_prefix.get(identifier) if prefix: @@ -334,19 +389,23 @@ def auth_settings(self): :return: The Auth Settings information dict. """ auth = {} - if 'Authorization' in self.api_key: + if 'APIKey' in self.api_key: auth['APIKey'] = { 'type': 'api_key', 'in': 'header', 'key': 'Authorization', - 'value': self.get_api_key_with_prefix('Authorization') + 'value': self.get_api_key_with_prefix( + 'APIKey', + ), } - if 'MONEI-Account-ID' in self.api_key: + if 'AccountId' in self.api_key: auth['AccountId'] = { 'type': 'api_key', 'in': 'header', 'key': 'MONEI-Account-ID', - 'value': self.get_api_key_with_prefix('MONEI-Account-ID') + 'value': self.get_api_key_with_prefix( + 'AccountId', + ), } return auth @@ -358,7 +417,7 @@ def to_debug_report(self): return "Python SDK Debug Report:\n"\ "OS: {env}\n"\ "Python Version: {pyversion}\n"\ - "Version of the API: 1.4.6\n"\ + "Version of the API: 1.5.0\n"\ "SDK Package Version: 1.2.6".\ format(env=sys.platform, pyversion=sys.version) @@ -374,14 +433,18 @@ def get_host_settings(self): } ] - def get_host_from_settings(self, index, variables=None): + def get_host_from_settings(self, index, variables=None, servers=None): """Gets host URL based on the index and variables :param index: array index of the host settings :param variables: hash of variable and the corresponding value + :param servers: an array of host settings or None :return: URL based on host settings """ + if index is None: + return self._base_path + variables = {} if variables is None else variables - servers = self.get_host_settings() + servers = self.get_host_settings() if servers is None else servers try: server = servers[index] @@ -393,7 +456,7 @@ def get_host_from_settings(self, index, variables=None): url = server['url'] # go through variables and replace placeholders - for variable_name, variable in server['variables'].items(): + for variable_name, variable in server.get('variables', {}).items(): used_value = variables.get( variable_name, variable['default_value']) @@ -408,3 +471,14 @@ def get_host_from_settings(self, index, variables=None): url = url.replace("{" + variable_name + "}", used_value) return url + + @property + def host(self): + """Return generated host.""" + return self.get_host_from_settings(self.server_index, variables=self.server_variables) + + @host.setter + def host(self, value): + """Fix base path.""" + self._base_path = value + self.server_index = None diff --git a/Monei/exceptions.py b/Monei/exceptions.py index 8e05163..3d9af41 100644 --- a/Monei/exceptions.py +++ b/Monei/exceptions.py @@ -1,18 +1,13 @@ -# coding: utf-8 - """ MONEI API v1 -

The MONEI API is organized around REST. Our API has predictable resource-oriented URLs, accepts JSON-encoded request bodies, returns JSON-encoded responses, and uses standard HTTP response codes, authentication, and verbs.

Base URL:

https://api.monei.com/v1

Client libraries:

Important:

If you are not using our official SDKs, you need to provide a valid User-Agent header in each request, otherwise your requests will be rejected.

# noqa: E501 +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - The version of the OpenAPI document: 1.4.6 + The version of the OpenAPI document: 1.5.0 Generated by: https://openapi-generator.tech """ -import six - - class OpenApiException(Exception): """The base exception class for all OpenAPIExceptions""" @@ -64,6 +59,25 @@ def __init__(self, msg, path_to_item=None): super(ApiValueError, self).__init__(full_msg) +class ApiAttributeError(OpenApiException, AttributeError): + def __init__(self, msg, path_to_item=None): + """ + Raised when an attribute reference or assignment fails. + + Args: + msg (str): the exception message + + Keyword Args: + path_to_item (None/list) the path to the exception in the + received_data dict + """ + self.path_to_item = path_to_item + full_msg = msg + if path_to_item: + full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) + super(ApiAttributeError, self).__init__(full_msg) + + class ApiKeyError(OpenApiException, KeyError): def __init__(self, msg, path_to_item=None): """ @@ -97,7 +111,7 @@ def __init__(self, status=None, reason=None, http_resp=None): def __str__(self): """Custom error messages for exception""" - error_message = "({0})\n"\ + 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( @@ -109,11 +123,35 @@ def __str__(self): 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 = "" for pth in path_to_item: - if isinstance(pth, six.integer_types): + if isinstance(pth, int): result += "[{0}]".format(pth) else: result += "['{0}']".format(pth) diff --git a/Monei/model/activate_subscription_request.py b/Monei/model/activate_subscription_request.py index 1d48286..ce72e6c 100644 --- a/Monei/model/activate_subscription_request.py +++ b/Monei/model/activate_subscription_request.py @@ -1,9 +1,9 @@ """ MONEI API v1 -

The MONEI API is organized around REST. Our API has predictable resource-oriented URLs, accepts JSON-encoded request bodies, returns JSON-encoded responses, and uses standard HTTP response codes, authentication, and verbs.

Base URL:

https://api.monei.com/v1

Client libraries:

Important:

If you are not using our official SDKs, you need to provide a valid User-Agent header in each request, otherwise your requests will be rejected.

# noqa: E501 +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - The version of the OpenAPI document: 1.2.2 + The version of the OpenAPI document: 1.5.0 Generated by: https://openapi-generator.tech """ @@ -88,6 +88,7 @@ def openapi_types(): 'complete_url': (str,), # noqa: E501 'fail_url': (str,), # noqa: E501 'cancel_url': (str,), # noqa: E501 + 'metadata': ({str: (bool, date, datetime, dict, float, int, list, str, none_type)},), # noqa: E501 } @cached_property @@ -103,6 +104,7 @@ def discriminator(): 'complete_url': 'completeUrl', # noqa: E501 'fail_url': 'failUrl', # noqa: E501 'cancel_url': 'cancelUrl', # noqa: E501 + 'metadata': 'metadata', # noqa: E501 } read_only_vars = { @@ -153,6 +155,7 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 complete_url (str): The URL the customer will be directed to after transaction completed (successful or failed - except if `failUrl` is provided). . [optional] # noqa: E501 fail_url (str): The URL the customer will be directed to after transaction has failed, instead of `completeUrl` (used in hosted payment page). This allows to provide two different URLs for successful and failed payments. . [optional] # noqa: E501 cancel_url (str): The URL the customer will be directed to if they decide to cancel payment and return to your website (used in hosted payment page). . [optional] # noqa: E501 + metadata ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}): A set of key-value pairs that you can attach to a resource. This can be useful for storing additional information about the resource in a structured format.. [optional] # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) @@ -245,6 +248,7 @@ def __init__(self, *args, **kwargs): # noqa: E501 complete_url (str): The URL the customer will be directed to after transaction completed (successful or failed - except if `failUrl` is provided). . [optional] # noqa: E501 fail_url (str): The URL the customer will be directed to after transaction has failed, instead of `completeUrl` (used in hosted payment page). This allows to provide two different URLs for successful and failed payments. . [optional] # noqa: E501 cancel_url (str): The URL the customer will be directed to if they decide to cancel payment and return to your website (used in hosted payment page). . [optional] # noqa: E501 + metadata ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}): A set of key-value pairs that you can attach to a resource. This can be useful for storing additional information about the resource in a structured format.. [optional] # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) diff --git a/Monei/model/address.py b/Monei/model/address.py index c0691db..0319358 100644 --- a/Monei/model/address.py +++ b/Monei/model/address.py @@ -1,9 +1,9 @@ """ MONEI API v1 -

The MONEI API is organized around REST. Our API has predictable resource-oriented URLs, accepts JSON-encoded request bodies, returns JSON-encoded responses, and uses standard HTTP response codes, authentication, and verbs.

Base URL:

https://api.monei.com/v1

Client libraries:

Important:

If you are not using our official SDKs, you need to provide a valid User-Agent header in each request, otherwise your requests will be rejected.

# noqa: E501 +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - The version of the OpenAPI document: 1.2.2 + The version of the OpenAPI document: 1.5.0 Generated by: https://openapi-generator.tech """ diff --git a/Monei/model/apple_pay_domain_register200_response.py b/Monei/model/apple_pay_domain_register200_response.py new file mode 100644 index 0000000..974c1d5 --- /dev/null +++ b/Monei/model/apple_pay_domain_register200_response.py @@ -0,0 +1,263 @@ +""" + MONEI API v1 + +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 + + The version of the OpenAPI document: 1.5.0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from Monei.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from Monei.exceptions import ApiAttributeError + + + +class ApplePayDomainRegister200Response(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'success': (bool,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'success': 'success', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """ApplePayDomainRegister200Response - 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 + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + success (bool): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """ApplePayDomainRegister200Response - 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 + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + success (bool): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/Monei/model/apple_pay_domain_register400_response.py b/Monei/model/apple_pay_domain_register400_response.py new file mode 100644 index 0000000..0f0a423 --- /dev/null +++ b/Monei/model/apple_pay_domain_register400_response.py @@ -0,0 +1,335 @@ +""" + MONEI API v1 + +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 + + The version of the OpenAPI document: 1.5.0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from Monei.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from Monei.exceptions import ApiAttributeError + + +def lazy_import(): + from Monei.model.error import Error + globals()['Error'] = Error + + +class ApplePayDomainRegister400Response(ModelComposed): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'status': (str,), # noqa: E501 + 'status_code': (int,), # noqa: E501 + 'message': (str,), # noqa: E501 + 'request_id': (str,), # noqa: E501 + 'request_time': (datetime,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'status': 'status', # noqa: E501 + 'status_code': 'statusCode', # noqa: E501 + 'message': 'message', # noqa: E501 + 'request_id': 'requestId', # noqa: E501 + 'request_time': 'requestTime', # noqa: E501 + } + + read_only_vars = { + } + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """ApplePayDomainRegister400Response - a model defined in OpenAPI + + Keyword Args: + status (str): Error type identifier + status_code (int): HTTP status code + message (str): Human-readable error message + request_id (str): Unique identifier for the request + request_time (datetime): Timestamp when the request was processed + _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. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + constant_args = { + '_check_type': _check_type, + '_path_to_item': _path_to_item, + '_spec_property_naming': _spec_property_naming, + '_configuration': _configuration, + '_visited_composed_classes': self._visited_composed_classes, + } + composed_info = validate_get_composed_info( + constant_args, kwargs, self) + self._composed_instances = composed_info[0] + self._var_name_to_model_instances = composed_info[1] + self._additional_properties_model_instances = composed_info[2] + discarded_args = composed_info[3] + + for var_name, var_value in kwargs.items(): + if var_name in discarded_args and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self._additional_properties_model_instances: + # discard variable. + continue + setattr(self, var_name, var_value) + + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + '_composed_instances', + '_var_name_to_model_instances', + '_additional_properties_model_instances', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """ApplePayDomainRegister400Response - a model defined in OpenAPI + + Keyword Args: + status (str): Error type identifier + status_code (int): HTTP status code + message (str): Human-readable error message + request_id (str): Unique identifier for the request + request_time (datetime): Timestamp when the request was processed + _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. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + constant_args = { + '_check_type': _check_type, + '_path_to_item': _path_to_item, + '_spec_property_naming': _spec_property_naming, + '_configuration': _configuration, + '_visited_composed_classes': self._visited_composed_classes, + } + composed_info = validate_get_composed_info( + constant_args, kwargs, self) + self._composed_instances = composed_info[0] + self._var_name_to_model_instances = composed_info[1] + self._additional_properties_model_instances = composed_info[2] + discarded_args = composed_info[3] + + for var_name, var_value in kwargs.items(): + if var_name in discarded_args and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self._additional_properties_model_instances: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") + + @cached_property + def _composed_schemas(): + # we need this here to make our import statements work + # we must store _composed_schemas in here so the code is only run + # when we invoke this method. If we kept this at the class + # level we would get an error because the class level + # code would be run when this module is imported, and these composed + # classes don't exist yet because their module has not finished + # loading + lazy_import() + return { + 'anyOf': [ + ], + 'allOf': [ + Error, + ], + 'oneOf': [ + ], + } diff --git a/Monei/model/apple_pay_domain_register401_response.py b/Monei/model/apple_pay_domain_register401_response.py new file mode 100644 index 0000000..8ddaf06 --- /dev/null +++ b/Monei/model/apple_pay_domain_register401_response.py @@ -0,0 +1,335 @@ +""" + MONEI API v1 + +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 + + The version of the OpenAPI document: 1.5.0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from Monei.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from Monei.exceptions import ApiAttributeError + + +def lazy_import(): + from Monei.model.error import Error + globals()['Error'] = Error + + +class ApplePayDomainRegister401Response(ModelComposed): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'status': (str,), # noqa: E501 + 'status_code': (int,), # noqa: E501 + 'message': (str,), # noqa: E501 + 'request_id': (str,), # noqa: E501 + 'request_time': (datetime,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'status': 'status', # noqa: E501 + 'status_code': 'statusCode', # noqa: E501 + 'message': 'message', # noqa: E501 + 'request_id': 'requestId', # noqa: E501 + 'request_time': 'requestTime', # noqa: E501 + } + + read_only_vars = { + } + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """ApplePayDomainRegister401Response - a model defined in OpenAPI + + Keyword Args: + status (str): Error type identifier + status_code (int): HTTP status code + message (str): Human-readable error message + request_id (str): Unique identifier for the request + request_time (datetime): Timestamp when the request was processed + _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. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + constant_args = { + '_check_type': _check_type, + '_path_to_item': _path_to_item, + '_spec_property_naming': _spec_property_naming, + '_configuration': _configuration, + '_visited_composed_classes': self._visited_composed_classes, + } + composed_info = validate_get_composed_info( + constant_args, kwargs, self) + self._composed_instances = composed_info[0] + self._var_name_to_model_instances = composed_info[1] + self._additional_properties_model_instances = composed_info[2] + discarded_args = composed_info[3] + + for var_name, var_value in kwargs.items(): + if var_name in discarded_args and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self._additional_properties_model_instances: + # discard variable. + continue + setattr(self, var_name, var_value) + + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + '_composed_instances', + '_var_name_to_model_instances', + '_additional_properties_model_instances', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """ApplePayDomainRegister401Response - a model defined in OpenAPI + + Keyword Args: + status (str): Error type identifier + status_code (int): HTTP status code + message (str): Human-readable error message + request_id (str): Unique identifier for the request + request_time (datetime): Timestamp when the request was processed + _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. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + constant_args = { + '_check_type': _check_type, + '_path_to_item': _path_to_item, + '_spec_property_naming': _spec_property_naming, + '_configuration': _configuration, + '_visited_composed_classes': self._visited_composed_classes, + } + composed_info = validate_get_composed_info( + constant_args, kwargs, self) + self._composed_instances = composed_info[0] + self._var_name_to_model_instances = composed_info[1] + self._additional_properties_model_instances = composed_info[2] + discarded_args = composed_info[3] + + for var_name, var_value in kwargs.items(): + if var_name in discarded_args and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self._additional_properties_model_instances: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") + + @cached_property + def _composed_schemas(): + # we need this here to make our import statements work + # we must store _composed_schemas in here so the code is only run + # when we invoke this method. If we kept this at the class + # level we would get an error because the class level + # code would be run when this module is imported, and these composed + # classes don't exist yet because their module has not finished + # loading + lazy_import() + return { + 'anyOf': [ + ], + 'allOf': [ + Error, + ], + 'oneOf': [ + ], + } diff --git a/Monei/model/apple_pay_domain_register404_response.py b/Monei/model/apple_pay_domain_register404_response.py new file mode 100644 index 0000000..e7c8d08 --- /dev/null +++ b/Monei/model/apple_pay_domain_register404_response.py @@ -0,0 +1,335 @@ +""" + MONEI API v1 + +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 + + The version of the OpenAPI document: 1.5.0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from Monei.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from Monei.exceptions import ApiAttributeError + + +def lazy_import(): + from Monei.model.error import Error + globals()['Error'] = Error + + +class ApplePayDomainRegister404Response(ModelComposed): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'status': (str,), # noqa: E501 + 'status_code': (int,), # noqa: E501 + 'message': (str,), # noqa: E501 + 'request_id': (str,), # noqa: E501 + 'request_time': (datetime,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'status': 'status', # noqa: E501 + 'status_code': 'statusCode', # noqa: E501 + 'message': 'message', # noqa: E501 + 'request_id': 'requestId', # noqa: E501 + 'request_time': 'requestTime', # noqa: E501 + } + + read_only_vars = { + } + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """ApplePayDomainRegister404Response - a model defined in OpenAPI + + Keyword Args: + status (str): Error type identifier + status_code (int): HTTP status code + message (str): Human-readable error message + request_id (str): Unique identifier for the request + request_time (datetime): Timestamp when the request was processed + _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. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + constant_args = { + '_check_type': _check_type, + '_path_to_item': _path_to_item, + '_spec_property_naming': _spec_property_naming, + '_configuration': _configuration, + '_visited_composed_classes': self._visited_composed_classes, + } + composed_info = validate_get_composed_info( + constant_args, kwargs, self) + self._composed_instances = composed_info[0] + self._var_name_to_model_instances = composed_info[1] + self._additional_properties_model_instances = composed_info[2] + discarded_args = composed_info[3] + + for var_name, var_value in kwargs.items(): + if var_name in discarded_args and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self._additional_properties_model_instances: + # discard variable. + continue + setattr(self, var_name, var_value) + + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + '_composed_instances', + '_var_name_to_model_instances', + '_additional_properties_model_instances', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """ApplePayDomainRegister404Response - a model defined in OpenAPI + + Keyword Args: + status (str): Error type identifier + status_code (int): HTTP status code + message (str): Human-readable error message + request_id (str): Unique identifier for the request + request_time (datetime): Timestamp when the request was processed + _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. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + constant_args = { + '_check_type': _check_type, + '_path_to_item': _path_to_item, + '_spec_property_naming': _spec_property_naming, + '_configuration': _configuration, + '_visited_composed_classes': self._visited_composed_classes, + } + composed_info = validate_get_composed_info( + constant_args, kwargs, self) + self._composed_instances = composed_info[0] + self._var_name_to_model_instances = composed_info[1] + self._additional_properties_model_instances = composed_info[2] + discarded_args = composed_info[3] + + for var_name, var_value in kwargs.items(): + if var_name in discarded_args and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self._additional_properties_model_instances: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") + + @cached_property + def _composed_schemas(): + # we need this here to make our import statements work + # we must store _composed_schemas in here so the code is only run + # when we invoke this method. If we kept this at the class + # level we would get an error because the class level + # code would be run when this module is imported, and these composed + # classes don't exist yet because their module has not finished + # loading + lazy_import() + return { + 'anyOf': [ + ], + 'allOf': [ + Error, + ], + 'oneOf': [ + ], + } diff --git a/Monei/model/apple_pay_domain_register422_response.py b/Monei/model/apple_pay_domain_register422_response.py new file mode 100644 index 0000000..bd0a2ed --- /dev/null +++ b/Monei/model/apple_pay_domain_register422_response.py @@ -0,0 +1,335 @@ +""" + MONEI API v1 + +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 + + The version of the OpenAPI document: 1.5.0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from Monei.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from Monei.exceptions import ApiAttributeError + + +def lazy_import(): + from Monei.model.error import Error + globals()['Error'] = Error + + +class ApplePayDomainRegister422Response(ModelComposed): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'status': (str,), # noqa: E501 + 'status_code': (int,), # noqa: E501 + 'message': (str,), # noqa: E501 + 'request_id': (str,), # noqa: E501 + 'request_time': (datetime,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'status': 'status', # noqa: E501 + 'status_code': 'statusCode', # noqa: E501 + 'message': 'message', # noqa: E501 + 'request_id': 'requestId', # noqa: E501 + 'request_time': 'requestTime', # noqa: E501 + } + + read_only_vars = { + } + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """ApplePayDomainRegister422Response - a model defined in OpenAPI + + Keyword Args: + status (str): Error type identifier + status_code (int): HTTP status code + message (str): Human-readable error message + request_id (str): Unique identifier for the request + request_time (datetime): Timestamp when the request was processed + _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. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + constant_args = { + '_check_type': _check_type, + '_path_to_item': _path_to_item, + '_spec_property_naming': _spec_property_naming, + '_configuration': _configuration, + '_visited_composed_classes': self._visited_composed_classes, + } + composed_info = validate_get_composed_info( + constant_args, kwargs, self) + self._composed_instances = composed_info[0] + self._var_name_to_model_instances = composed_info[1] + self._additional_properties_model_instances = composed_info[2] + discarded_args = composed_info[3] + + for var_name, var_value in kwargs.items(): + if var_name in discarded_args and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self._additional_properties_model_instances: + # discard variable. + continue + setattr(self, var_name, var_value) + + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + '_composed_instances', + '_var_name_to_model_instances', + '_additional_properties_model_instances', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """ApplePayDomainRegister422Response - a model defined in OpenAPI + + Keyword Args: + status (str): Error type identifier + status_code (int): HTTP status code + message (str): Human-readable error message + request_id (str): Unique identifier for the request + request_time (datetime): Timestamp when the request was processed + _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. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + constant_args = { + '_check_type': _check_type, + '_path_to_item': _path_to_item, + '_spec_property_naming': _spec_property_naming, + '_configuration': _configuration, + '_visited_composed_classes': self._visited_composed_classes, + } + composed_info = validate_get_composed_info( + constant_args, kwargs, self) + self._composed_instances = composed_info[0] + self._var_name_to_model_instances = composed_info[1] + self._additional_properties_model_instances = composed_info[2] + discarded_args = composed_info[3] + + for var_name, var_value in kwargs.items(): + if var_name in discarded_args and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self._additional_properties_model_instances: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") + + @cached_property + def _composed_schemas(): + # we need this here to make our import statements work + # we must store _composed_schemas in here so the code is only run + # when we invoke this method. If we kept this at the class + # level we would get an error because the class level + # code would be run when this module is imported, and these composed + # classes don't exist yet because their module has not finished + # loading + lazy_import() + return { + 'anyOf': [ + ], + 'allOf': [ + Error, + ], + 'oneOf': [ + ], + } diff --git a/Monei/model/apple_pay_domain_register500_response.py b/Monei/model/apple_pay_domain_register500_response.py new file mode 100644 index 0000000..327227b --- /dev/null +++ b/Monei/model/apple_pay_domain_register500_response.py @@ -0,0 +1,335 @@ +""" + MONEI API v1 + +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 + + The version of the OpenAPI document: 1.5.0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from Monei.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from Monei.exceptions import ApiAttributeError + + +def lazy_import(): + from Monei.model.error import Error + globals()['Error'] = Error + + +class ApplePayDomainRegister500Response(ModelComposed): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'status': (str,), # noqa: E501 + 'status_code': (int,), # noqa: E501 + 'message': (str,), # noqa: E501 + 'request_id': (str,), # noqa: E501 + 'request_time': (datetime,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'status': 'status', # noqa: E501 + 'status_code': 'statusCode', # noqa: E501 + 'message': 'message', # noqa: E501 + 'request_id': 'requestId', # noqa: E501 + 'request_time': 'requestTime', # noqa: E501 + } + + read_only_vars = { + } + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """ApplePayDomainRegister500Response - a model defined in OpenAPI + + Keyword Args: + status (str): Error type identifier + status_code (int): HTTP status code + message (str): Human-readable error message + request_id (str): Unique identifier for the request + request_time (datetime): Timestamp when the request was processed + _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. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + constant_args = { + '_check_type': _check_type, + '_path_to_item': _path_to_item, + '_spec_property_naming': _spec_property_naming, + '_configuration': _configuration, + '_visited_composed_classes': self._visited_composed_classes, + } + composed_info = validate_get_composed_info( + constant_args, kwargs, self) + self._composed_instances = composed_info[0] + self._var_name_to_model_instances = composed_info[1] + self._additional_properties_model_instances = composed_info[2] + discarded_args = composed_info[3] + + for var_name, var_value in kwargs.items(): + if var_name in discarded_args and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self._additional_properties_model_instances: + # discard variable. + continue + setattr(self, var_name, var_value) + + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + '_composed_instances', + '_var_name_to_model_instances', + '_additional_properties_model_instances', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """ApplePayDomainRegister500Response - a model defined in OpenAPI + + Keyword Args: + status (str): Error type identifier + status_code (int): HTTP status code + message (str): Human-readable error message + request_id (str): Unique identifier for the request + request_time (datetime): Timestamp when the request was processed + _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. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + constant_args = { + '_check_type': _check_type, + '_path_to_item': _path_to_item, + '_spec_property_naming': _spec_property_naming, + '_configuration': _configuration, + '_visited_composed_classes': self._visited_composed_classes, + } + composed_info = validate_get_composed_info( + constant_args, kwargs, self) + self._composed_instances = composed_info[0] + self._var_name_to_model_instances = composed_info[1] + self._additional_properties_model_instances = composed_info[2] + discarded_args = composed_info[3] + + for var_name, var_value in kwargs.items(): + if var_name in discarded_args and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self._additional_properties_model_instances: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") + + @cached_property + def _composed_schemas(): + # we need this here to make our import statements work + # we must store _composed_schemas in here so the code is only run + # when we invoke this method. If we kept this at the class + # level we would get an error because the class level + # code would be run when this module is imported, and these composed + # classes don't exist yet because their module has not finished + # loading + lazy_import() + return { + 'anyOf': [ + ], + 'allOf': [ + Error, + ], + 'oneOf': [ + ], + } diff --git a/Monei/model/apple_pay_domain_register503_response.py b/Monei/model/apple_pay_domain_register503_response.py new file mode 100644 index 0000000..544952e --- /dev/null +++ b/Monei/model/apple_pay_domain_register503_response.py @@ -0,0 +1,335 @@ +""" + MONEI API v1 + +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 + + The version of the OpenAPI document: 1.5.0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from Monei.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from Monei.exceptions import ApiAttributeError + + +def lazy_import(): + from Monei.model.error import Error + globals()['Error'] = Error + + +class ApplePayDomainRegister503Response(ModelComposed): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'status': (str,), # noqa: E501 + 'status_code': (int,), # noqa: E501 + 'message': (str,), # noqa: E501 + 'request_id': (str,), # noqa: E501 + 'request_time': (datetime,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'status': 'status', # noqa: E501 + 'status_code': 'statusCode', # noqa: E501 + 'message': 'message', # noqa: E501 + 'request_id': 'requestId', # noqa: E501 + 'request_time': 'requestTime', # noqa: E501 + } + + read_only_vars = { + } + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """ApplePayDomainRegister503Response - a model defined in OpenAPI + + Keyword Args: + status (str): Error type identifier + status_code (int): HTTP status code + message (str): Human-readable error message + request_id (str): Unique identifier for the request + request_time (datetime): Timestamp when the request was processed + _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. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + constant_args = { + '_check_type': _check_type, + '_path_to_item': _path_to_item, + '_spec_property_naming': _spec_property_naming, + '_configuration': _configuration, + '_visited_composed_classes': self._visited_composed_classes, + } + composed_info = validate_get_composed_info( + constant_args, kwargs, self) + self._composed_instances = composed_info[0] + self._var_name_to_model_instances = composed_info[1] + self._additional_properties_model_instances = composed_info[2] + discarded_args = composed_info[3] + + for var_name, var_value in kwargs.items(): + if var_name in discarded_args and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self._additional_properties_model_instances: + # discard variable. + continue + setattr(self, var_name, var_value) + + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + '_composed_instances', + '_var_name_to_model_instances', + '_additional_properties_model_instances', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """ApplePayDomainRegister503Response - a model defined in OpenAPI + + Keyword Args: + status (str): Error type identifier + status_code (int): HTTP status code + message (str): Human-readable error message + request_id (str): Unique identifier for the request + request_time (datetime): Timestamp when the request was processed + _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. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + constant_args = { + '_check_type': _check_type, + '_path_to_item': _path_to_item, + '_spec_property_naming': _spec_property_naming, + '_configuration': _configuration, + '_visited_composed_classes': self._visited_composed_classes, + } + composed_info = validate_get_composed_info( + constant_args, kwargs, self) + self._composed_instances = composed_info[0] + self._var_name_to_model_instances = composed_info[1] + self._additional_properties_model_instances = composed_info[2] + discarded_args = composed_info[3] + + for var_name, var_value in kwargs.items(): + if var_name in discarded_args and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self._additional_properties_model_instances: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") + + @cached_property + def _composed_schemas(): + # we need this here to make our import statements work + # we must store _composed_schemas in here so the code is only run + # when we invoke this method. If we kept this at the class + # level we would get an error because the class level + # code would be run when this module is imported, and these composed + # classes don't exist yet because their module has not finished + # loading + lazy_import() + return { + 'anyOf': [ + ], + 'allOf': [ + Error, + ], + 'oneOf': [ + ], + } diff --git a/Monei/model/bizum_validate_phone200_response.py b/Monei/model/bizum_validate_phone200_response.py new file mode 100644 index 0000000..c6f62ea --- /dev/null +++ b/Monei/model/bizum_validate_phone200_response.py @@ -0,0 +1,263 @@ +""" + MONEI API v1 + +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 + + The version of the OpenAPI document: 1.5.0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from Monei.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from Monei.exceptions import ApiAttributeError + + + +class BizumValidatePhone200Response(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'is_valid': (bool,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'is_valid': 'isValid', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """BizumValidatePhone200Response - 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 + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + is_valid (bool): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """BizumValidatePhone200Response - 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 + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + is_valid (bool): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/Monei/model/cancel_payment_request.py b/Monei/model/cancel_payment_request.py index a738351..ff54bb7 100644 --- a/Monei/model/cancel_payment_request.py +++ b/Monei/model/cancel_payment_request.py @@ -1,9 +1,9 @@ """ MONEI API v1 -

The MONEI API is organized around REST. Our API has predictable resource-oriented URLs, accepts JSON-encoded request bodies, returns JSON-encoded responses, and uses standard HTTP response codes, authentication, and verbs.

Base URL:

https://api.monei.com/v1

Client libraries:

Important:

If you are not using our official SDKs, you need to provide a valid User-Agent header in each request, otherwise your requests will be rejected.

# noqa: E501 +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - The version of the OpenAPI document: 1.2.2 + The version of the OpenAPI document: 1.5.0 Generated by: https://openapi-generator.tech """ diff --git a/Monei/model/cancel_subscription_request.py b/Monei/model/cancel_subscription_request.py index 86c93a5..5f5f5fc 100644 --- a/Monei/model/cancel_subscription_request.py +++ b/Monei/model/cancel_subscription_request.py @@ -1,9 +1,9 @@ """ MONEI API v1 -

The MONEI API is organized around REST. Our API has predictable resource-oriented URLs, accepts JSON-encoded request bodies, returns JSON-encoded responses, and uses standard HTTP response codes, authentication, and verbs.

Base URL:

https://api.monei.com/v1

Client libraries:

Important:

If you are not using our official SDKs, you need to provide a valid User-Agent header in each request, otherwise your requests will be rejected.

# noqa: E501 +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - The version of the OpenAPI document: 1.2.2 + The version of the OpenAPI document: 1.5.0 Generated by: https://openapi-generator.tech """ diff --git a/Monei/model/capture_payment_request.py b/Monei/model/capture_payment_request.py index 8eb3cac..4ee8517 100644 --- a/Monei/model/capture_payment_request.py +++ b/Monei/model/capture_payment_request.py @@ -1,9 +1,9 @@ """ MONEI API v1 -

The MONEI API is organized around REST. Our API has predictable resource-oriented URLs, accepts JSON-encoded request bodies, returns JSON-encoded responses, and uses standard HTTP response codes, authentication, and verbs.

Base URL:

https://api.monei.com/v1

Client libraries:

Important:

If you are not using our official SDKs, you need to provide a valid User-Agent header in each request, otherwise your requests will be rejected.

# noqa: E501 +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - The version of the OpenAPI document: 1.2.2 + The version of the OpenAPI document: 1.5.0 Generated by: https://openapi-generator.tech """ diff --git a/Monei/model/confirm_payment_request.py b/Monei/model/confirm_payment_request.py index a514bc8..8ceb9ac 100644 --- a/Monei/model/confirm_payment_request.py +++ b/Monei/model/confirm_payment_request.py @@ -1,9 +1,9 @@ """ MONEI API v1 -

The MONEI API is organized around REST. Our API has predictable resource-oriented URLs, accepts JSON-encoded request bodies, returns JSON-encoded responses, and uses standard HTTP response codes, authentication, and verbs.

Base URL:

https://api.monei.com/v1

Client libraries:

Important:

If you are not using our official SDKs, you need to provide a valid User-Agent header in each request, otherwise your requests will be rejected.

# noqa: E501 +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - The version of the OpenAPI document: 1.2.2 + The version of the OpenAPI document: 1.5.0 Generated by: https://openapi-generator.tech """ @@ -99,6 +99,7 @@ def openapi_types(): 'customer': (PaymentCustomer,), # noqa: E501 'billing_details': (PaymentBillingDetails,), # noqa: E501 'shipping_details': (PaymentShippingDetails,), # noqa: E501 + 'metadata': ({str: (bool, date, datetime, dict, float, int, list, str, none_type)},), # noqa: E501 } @cached_property @@ -113,6 +114,7 @@ def discriminator(): 'customer': 'customer', # noqa: E501 'billing_details': 'billingDetails', # noqa: E501 'shipping_details': 'shippingDetails', # noqa: E501 + 'metadata': 'metadata', # noqa: E501 } read_only_vars = { @@ -164,6 +166,7 @@ def _from_openapi_data(cls, payment_token, *args, **kwargs): # noqa: E501 customer (PaymentCustomer): [optional] # noqa: E501 billing_details (PaymentBillingDetails): [optional] # noqa: E501 shipping_details (PaymentShippingDetails): [optional] # noqa: E501 + metadata ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}): A set of key-value pairs that you can attach to a resource. This can be useful for storing additional information about the resource in a structured format.. [optional] # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) @@ -258,6 +261,7 @@ def __init__(self, payment_token, *args, **kwargs): # noqa: E501 customer (PaymentCustomer): [optional] # noqa: E501 billing_details (PaymentBillingDetails): [optional] # noqa: E501 shipping_details (PaymentShippingDetails): [optional] # noqa: E501 + metadata ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}): A set of key-value pairs that you can attach to a resource. This can be useful for storing additional information about the resource in a structured format.. [optional] # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) diff --git a/Monei/model/confirm_payment_request_payment_method.py b/Monei/model/confirm_payment_request_payment_method.py index 9a3adfd..0a35481 100644 --- a/Monei/model/confirm_payment_request_payment_method.py +++ b/Monei/model/confirm_payment_request_payment_method.py @@ -1,9 +1,9 @@ """ MONEI API v1 -

The MONEI API is organized around REST. Our API has predictable resource-oriented URLs, accepts JSON-encoded request bodies, returns JSON-encoded responses, and uses standard HTTP response codes, authentication, and verbs.

Base URL:

https://api.monei.com/v1

Client libraries:

Important:

If you are not using our official SDKs, you need to provide a valid User-Agent header in each request, otherwise your requests will be rejected.

# noqa: E501 +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - The version of the OpenAPI document: 1.2.2 + The version of the OpenAPI document: 1.5.0 Generated by: https://openapi-generator.tech """ diff --git a/Monei/model/confirm_payment_request_payment_method_card.py b/Monei/model/confirm_payment_request_payment_method_card.py index 4a2ca11..92432b9 100644 --- a/Monei/model/confirm_payment_request_payment_method_card.py +++ b/Monei/model/confirm_payment_request_payment_method_card.py @@ -1,9 +1,9 @@ """ MONEI API v1 -

The MONEI API is organized around REST. Our API has predictable resource-oriented URLs, accepts JSON-encoded request bodies, returns JSON-encoded responses, and uses standard HTTP response codes, authentication, and verbs.

Base URL:

https://api.monei.com/v1

Client libraries:

Important:

If you are not using our official SDKs, you need to provide a valid User-Agent header in each request, otherwise your requests will be rejected.

# noqa: E501 +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - The version of the OpenAPI document: 1.2.2 + The version of the OpenAPI document: 1.5.0 Generated by: https://openapi-generator.tech """ diff --git a/Monei/model/create_payment_request.py b/Monei/model/create_payment_request.py index 23a7ad8..1d2ebba 100644 --- a/Monei/model/create_payment_request.py +++ b/Monei/model/create_payment_request.py @@ -1,9 +1,9 @@ """ MONEI API v1 -

The MONEI API is organized around REST. Our API has predictable resource-oriented URLs, accepts JSON-encoded request bodies, returns JSON-encoded responses, and uses standard HTTP response codes, authentication, and verbs.

Base URL:

https://api.monei.com/v1

Client libraries:

Important:

If you are not using our official SDKs, you need to provide a valid User-Agent header in each request, otherwise your requests will be rejected.

# noqa: E501 +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - The version of the OpenAPI document: 1.2.2 + The version of the OpenAPI document: 1.5.0 Generated by: https://openapi-generator.tech """ @@ -115,6 +115,7 @@ def openapi_types(): 'allowed_payment_methods': (PaymentPaymentMethods,), # noqa: E501 'transaction_type': (PaymentTransactionType,), # noqa: E501 'sequence': (PaymentSequence,), # noqa: E501 + 'store_id': (str,), # noqa: E501 'point_of_sale_id': (str,), # noqa: E501 'subscription_id': (str,), # noqa: E501 'auto_recover': (bool,), # noqa: E501 @@ -123,6 +124,8 @@ def openapi_types(): 'billing_details': (PaymentBillingDetails,), # noqa: E501 'shipping_details': (PaymentShippingDetails,), # noqa: E501 'session_details': (PaymentSessionDetails,), # noqa: E501 + 'expire_at': (float,), # noqa: E501 + 'metadata': ({str: (bool, date, datetime, dict, float, int, list, str, none_type)},), # noqa: E501 } @cached_property @@ -145,6 +148,7 @@ def discriminator(): 'allowed_payment_methods': 'allowedPaymentMethods', # noqa: E501 'transaction_type': 'transactionType', # noqa: E501 'sequence': 'sequence', # noqa: E501 + 'store_id': 'storeId', # noqa: E501 'point_of_sale_id': 'pointOfSaleId', # noqa: E501 'subscription_id': 'subscriptionId', # noqa: E501 'auto_recover': 'autoRecover', # noqa: E501 @@ -153,6 +157,8 @@ def discriminator(): 'billing_details': 'billingDetails', # noqa: E501 'shipping_details': 'shippingDetails', # noqa: E501 'session_details': 'sessionDetails', # noqa: E501 + 'expire_at': 'expireAt', # noqa: E501 + 'metadata': 'metadata', # noqa: E501 } read_only_vars = { @@ -212,6 +218,7 @@ def _from_openapi_data(cls, amount, currency, order_id, *args, **kwargs): # noq allowed_payment_methods (PaymentPaymentMethods): [optional] # noqa: E501 transaction_type (PaymentTransactionType): [optional] # noqa: E501 sequence (PaymentSequence): [optional] # noqa: E501 + store_id (str): A unique identifier of the Store. If specified the payment is attached to this Store. . [optional] # noqa: E501 point_of_sale_id (str): A unique identifier of the Point of Sale. If specified the payment is attached to this Point of Sale. If there is a QR code attached to the same Point of Sale, this payment will be available by scanning the QR code. . [optional] # noqa: E501 subscription_id (str): A unique identifier of the Subscription. If specified the payment is attached to this Subscription. . [optional] # noqa: E501 auto_recover (bool): If set to `true`, the new payment will be automatically created when customer visits the payment link of the previously failed payment. Is automatically set to `true` if `completeUrl` is not provided.(set this value to `true` to create \"Pay By Link\" payments).. [optional] # noqa: E501 @@ -220,6 +227,8 @@ def _from_openapi_data(cls, amount, currency, order_id, *args, **kwargs): # noq billing_details (PaymentBillingDetails): [optional] # noqa: E501 shipping_details (PaymentShippingDetails): [optional] # noqa: E501 session_details (PaymentSessionDetails): [optional] # noqa: E501 + expire_at (float): Payment expiration time.. [optional] # noqa: E501 + metadata ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}): A set of key-value pairs that you can attach to a resource. This can be useful for storing additional information about the resource in a structured format.. [optional] # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) @@ -324,6 +333,7 @@ def __init__(self, amount, currency, order_id, *args, **kwargs): # noqa: E501 allowed_payment_methods (PaymentPaymentMethods): [optional] # noqa: E501 transaction_type (PaymentTransactionType): [optional] # noqa: E501 sequence (PaymentSequence): [optional] # noqa: E501 + store_id (str): A unique identifier of the Store. If specified the payment is attached to this Store. . [optional] # noqa: E501 point_of_sale_id (str): A unique identifier of the Point of Sale. If specified the payment is attached to this Point of Sale. If there is a QR code attached to the same Point of Sale, this payment will be available by scanning the QR code. . [optional] # noqa: E501 subscription_id (str): A unique identifier of the Subscription. If specified the payment is attached to this Subscription. . [optional] # noqa: E501 auto_recover (bool): If set to `true`, the new payment will be automatically created when customer visits the payment link of the previously failed payment. Is automatically set to `true` if `completeUrl` is not provided.(set this value to `true` to create \"Pay By Link\" payments).. [optional] # noqa: E501 @@ -332,6 +342,8 @@ def __init__(self, amount, currency, order_id, *args, **kwargs): # noqa: E501 billing_details (PaymentBillingDetails): [optional] # noqa: E501 shipping_details (PaymentShippingDetails): [optional] # noqa: E501 session_details (PaymentSessionDetails): [optional] # noqa: E501 + expire_at (float): Payment expiration time.. [optional] # noqa: E501 + metadata ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}): A set of key-value pairs that you can attach to a resource. This can be useful for storing additional information about the resource in a structured format.. [optional] # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) diff --git a/Monei/model/create_subscription_request.py b/Monei/model/create_subscription_request.py index 94ca052..d2c3e20 100644 --- a/Monei/model/create_subscription_request.py +++ b/Monei/model/create_subscription_request.py @@ -1,9 +1,9 @@ """ MONEI API v1 -

The MONEI API is organized around REST. Our API has predictable resource-oriented URLs, accepts JSON-encoded request bodies, returns JSON-encoded responses, and uses standard HTTP response codes, authentication, and verbs.

Base URL:

https://api.monei.com/v1

Client libraries:

Important:

If you are not using our official SDKs, you need to provide a valid User-Agent header in each request, otherwise your requests will be rejected.

# noqa: E501 +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - The version of the OpenAPI document: 1.2.2 + The version of the OpenAPI document: 1.5.0 Generated by: https://openapi-generator.tech """ @@ -34,10 +34,12 @@ def lazy_import(): from Monei.model.payment_customer import PaymentCustomer from Monei.model.payment_shipping_details import PaymentShippingDetails from Monei.model.subscription_interval import SubscriptionInterval + from Monei.model.subscription_retry_schedule import SubscriptionRetrySchedule globals()['PaymentBillingDetails'] = PaymentBillingDetails globals()['PaymentCustomer'] = PaymentCustomer globals()['PaymentShippingDetails'] = PaymentShippingDetails globals()['SubscriptionInterval'] = SubscriptionInterval + globals()['SubscriptionRetrySchedule'] = SubscriptionRetrySchedule class CreateSubscriptionRequest(ModelNormal): @@ -97,14 +99,16 @@ def openapi_types(): 'currency': (str,), # noqa: E501 'interval': (SubscriptionInterval,), # noqa: E501 'interval_count': (int,), # noqa: E501 - 'callback_url': (str,), # noqa: E501 - 'payment_callback_url': (str,), # noqa: E501 'description': (str,), # noqa: E501 'customer': (PaymentCustomer,), # noqa: E501 'billing_details': (PaymentBillingDetails,), # noqa: E501 'shipping_details': (PaymentShippingDetails,), # noqa: E501 'trial_period_end': (float,), # noqa: E501 'trial_period_days': (int,), # noqa: E501 + 'retry_schedule': (SubscriptionRetrySchedule,), # noqa: E501 + 'callback_url': (str,), # noqa: E501 + 'payment_callback_url': (str,), # noqa: E501 + 'metadata': ({str: (bool, date, datetime, dict, float, int, list, str, none_type)},), # noqa: E501 } @cached_property @@ -117,14 +121,16 @@ def discriminator(): 'currency': 'currency', # noqa: E501 'interval': 'interval', # noqa: E501 'interval_count': 'intervalCount', # noqa: E501 - 'callback_url': 'callbackUrl', # noqa: E501 - 'payment_callback_url': 'paymentCallbackUrl', # noqa: E501 'description': 'description', # noqa: E501 'customer': 'customer', # noqa: E501 'billing_details': 'billingDetails', # noqa: E501 'shipping_details': 'shippingDetails', # noqa: E501 'trial_period_end': 'trialPeriodEnd', # noqa: E501 'trial_period_days': 'trialPeriodDays', # noqa: E501 + 'retry_schedule': 'retrySchedule', # noqa: E501 + 'callback_url': 'callbackUrl', # noqa: E501 + 'payment_callback_url': 'paymentCallbackUrl', # noqa: E501 + 'metadata': 'metadata', # noqa: E501 } read_only_vars = { @@ -134,16 +140,13 @@ def discriminator(): @classmethod @convert_js_args_to_python_args - def _from_openapi_data(cls, amount, currency, interval, interval_count, callback_url, payment_callback_url, *args, **kwargs): # noqa: E501 + def _from_openapi_data(cls, amount, currency, interval, *args, **kwargs): # noqa: E501 """CreateSubscriptionRequest - a model defined in OpenAPI Args: amount (int): Amount intended to be collected by this payment. A positive integer representing how much to charge in the smallest currency unit (e.g., 100 cents to charge 1.00 USD). currency (str): Three-letter [ISO currency code](https://en.wikipedia.org/wiki/ISO_4217), in uppercase. Must be a supported currency. interval (SubscriptionInterval): - interval_count (int): Number of intervals between subscription payments. - callback_url (str): The URL will be called each time subscription status changes. - payment_callback_url (str): The URL will be called each time subscription creates a new payments. Keyword Args: _check_type (bool): if True, values for parameters in openapi_types @@ -176,12 +179,17 @@ def _from_openapi_data(cls, amount, currency, interval, interval_count, callback Animal class but this time we won't travel through its discriminator because we passed in _visited_composed_classes = (Animal,) + interval_count (int): Number of intervals between subscription payments.. [optional] # noqa: E501 description (str): An arbitrary string attached to the subscription. Often useful for displaying to users. . [optional] # noqa: E501 customer (PaymentCustomer): [optional] # noqa: E501 billing_details (PaymentBillingDetails): [optional] # noqa: E501 shipping_details (PaymentShippingDetails): [optional] # noqa: E501 trial_period_end (float): The end date of the trial period. Measured in seconds since the Unix epoch.. [optional] # noqa: E501 trial_period_days (int): Number of days the trial period lasts.. [optional] # noqa: E501 + retry_schedule (SubscriptionRetrySchedule): [optional] # noqa: E501 + callback_url (str): The URL will be called each time subscription status changes. You will receive a subscription object in the body of the request. . [optional] # noqa: E501 + payment_callback_url (str): The URL will be called each time subscription creates a new payments. You will receive the payment object in the body of the request. . [optional] # noqa: E501 + metadata ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}): A set of key-value pairs that you can attach to a resource. This can be useful for storing additional information about the resource in a structured format.. [optional] # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) @@ -216,9 +224,6 @@ def _from_openapi_data(cls, amount, currency, interval, interval_count, callback self.amount = amount self.currency = currency self.interval = interval - self.interval_count = interval_count - self.callback_url = callback_url - self.payment_callback_url = payment_callback_url for var_name, var_value in kwargs.items(): if var_name not in self.attribute_map and \ self._configuration is not None and \ @@ -239,16 +244,13 @@ def _from_openapi_data(cls, amount, currency, interval, interval_count, callback ]) @convert_js_args_to_python_args - def __init__(self, amount, currency, interval, interval_count, callback_url, payment_callback_url, *args, **kwargs): # noqa: E501 + def __init__(self, amount, currency, interval, *args, **kwargs): # noqa: E501 """CreateSubscriptionRequest - a model defined in OpenAPI Args: amount (int): Amount intended to be collected by this payment. A positive integer representing how much to charge in the smallest currency unit (e.g., 100 cents to charge 1.00 USD). currency (str): Three-letter [ISO currency code](https://en.wikipedia.org/wiki/ISO_4217), in uppercase. Must be a supported currency. interval (SubscriptionInterval): - interval_count (int): Number of intervals between subscription payments. - callback_url (str): The URL will be called each time subscription status changes. - payment_callback_url (str): The URL will be called each time subscription creates a new payments. Keyword Args: _check_type (bool): if True, values for parameters in openapi_types @@ -281,12 +283,17 @@ def __init__(self, amount, currency, interval, interval_count, callback_url, pay Animal class but this time we won't travel through its discriminator because we passed in _visited_composed_classes = (Animal,) + interval_count (int): Number of intervals between subscription payments.. [optional] # noqa: E501 description (str): An arbitrary string attached to the subscription. Often useful for displaying to users. . [optional] # noqa: E501 customer (PaymentCustomer): [optional] # noqa: E501 billing_details (PaymentBillingDetails): [optional] # noqa: E501 shipping_details (PaymentShippingDetails): [optional] # noqa: E501 trial_period_end (float): The end date of the trial period. Measured in seconds since the Unix epoch.. [optional] # noqa: E501 trial_period_days (int): Number of days the trial period lasts.. [optional] # noqa: E501 + retry_schedule (SubscriptionRetrySchedule): [optional] # noqa: E501 + callback_url (str): The URL will be called each time subscription status changes. You will receive a subscription object in the body of the request. . [optional] # noqa: E501 + payment_callback_url (str): The URL will be called each time subscription creates a new payments. You will receive the payment object in the body of the request. . [optional] # noqa: E501 + metadata ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}): A set of key-value pairs that you can attach to a resource. This can be useful for storing additional information about the resource in a structured format.. [optional] # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) @@ -319,9 +326,6 @@ def __init__(self, amount, currency, interval, interval_count, callback_url, pay self.amount = amount self.currency = currency self.interval = interval - self.interval_count = interval_count - self.callback_url = callback_url - self.payment_callback_url = payment_callback_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/Monei/model/error.py b/Monei/model/error.py index f019d86..d2d363d 100644 --- a/Monei/model/error.py +++ b/Monei/model/error.py @@ -1,9 +1,9 @@ """ MONEI API v1 -

The MONEI API is organized around REST. Our API has predictable resource-oriented URLs, accepts JSON-encoded request bodies, returns JSON-encoded responses, and uses standard HTTP response codes, authentication, and verbs.

Base URL:

https://api.monei.com/v1

Client libraries:

Important:

If you are not using our official SDKs, you need to provide a valid User-Agent header in each request, otherwise your requests will be rejected.

# noqa: E501 +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - The version of the OpenAPI document: 1.2.2 + The version of the OpenAPI document: 1.5.0 Generated by: https://openapi-generator.tech """ @@ -81,8 +81,11 @@ def openapi_types(): and the value is attribute type. """ return { + 'status': (str,), # noqa: E501 + 'status_code': (int,), # noqa: E501 'message': (str,), # noqa: E501 - 'code': (int,), # noqa: E501 + 'request_id': (str,), # noqa: E501 + 'request_time': (datetime,), # noqa: E501 } @cached_property @@ -91,8 +94,11 @@ def discriminator(): attribute_map = { + 'status': 'status', # noqa: E501 + 'status_code': 'statusCode', # noqa: E501 'message': 'message', # noqa: E501 - 'code': 'code', # noqa: E501 + 'request_id': 'requestId', # noqa: E501 + 'request_time': 'requestTime', # noqa: E501 } read_only_vars = { @@ -102,11 +108,15 @@ def discriminator(): @classmethod @convert_js_args_to_python_args - def _from_openapi_data(cls, message, *args, **kwargs): # noqa: E501 + def _from_openapi_data(cls, status, status_code, message, request_id, request_time, *args, **kwargs): # noqa: E501 """Error - a model defined in OpenAPI Args: - message (str): + status (str): Error type identifier + status_code (int): HTTP status code + message (str): Human-readable error message + request_id (str): Unique identifier for the request + request_time (datetime): Timestamp when the request was processed Keyword Args: _check_type (bool): if True, values for parameters in openapi_types @@ -139,7 +149,6 @@ def _from_openapi_data(cls, message, *args, **kwargs): # noqa: E501 Animal class but this time we won't travel through its discriminator because we passed in _visited_composed_classes = (Animal,) - code (int): [optional] # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) @@ -171,7 +180,11 @@ def _from_openapi_data(cls, message, *args, **kwargs): # noqa: E501 self._configuration = _configuration self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + self.status = status + self.status_code = status_code self.message = message + self.request_id = request_id + self.request_time = request_time for var_name, var_value in kwargs.items(): if var_name not in self.attribute_map and \ self._configuration is not None and \ @@ -192,11 +205,15 @@ 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, status, status_code, message, request_id, request_time, *args, **kwargs): # noqa: E501 """Error - a model defined in OpenAPI Args: - message (str): + status (str): Error type identifier + status_code (int): HTTP status code + message (str): Human-readable error message + request_id (str): Unique identifier for the request + request_time (datetime): Timestamp when the request was processed Keyword Args: _check_type (bool): if True, values for parameters in openapi_types @@ -229,7 +246,6 @@ def __init__(self, message, *args, **kwargs): # noqa: E501 Animal class but this time we won't travel through its discriminator because we passed in _visited_composed_classes = (Animal,) - code (int): [optional] # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) @@ -259,7 +275,11 @@ def __init__(self, message, *args, **kwargs): # noqa: E501 self._configuration = _configuration self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + self.status = status + self.status_code = status_code self.message = message + self.request_id = request_id + self.request_time = request_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/Monei/model/pause_subscription_request.py b/Monei/model/pause_subscription_request.py index d84a70d..657a497 100644 --- a/Monei/model/pause_subscription_request.py +++ b/Monei/model/pause_subscription_request.py @@ -1,9 +1,9 @@ """ MONEI API v1 -

The MONEI API is organized around REST. Our API has predictable resource-oriented URLs, accepts JSON-encoded request bodies, returns JSON-encoded responses, and uses standard HTTP response codes, authentication, and verbs.

Base URL:

https://api.monei.com/v1

Client libraries:

Important:

If you are not using our official SDKs, you need to provide a valid User-Agent header in each request, otherwise your requests will be rejected.

# noqa: E501 +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - The version of the OpenAPI document: 1.2.2 + The version of the OpenAPI document: 1.5.0 Generated by: https://openapi-generator.tech """ diff --git a/Monei/model/payment.py b/Monei/model/payment.py index 3326c7b..ce43276 100644 --- a/Monei/model/payment.py +++ b/Monei/model/payment.py @@ -1,9 +1,9 @@ """ MONEI API v1 -

The MONEI API is organized around REST. Our API has predictable resource-oriented URLs, accepts JSON-encoded request bodies, returns JSON-encoded responses, and uses standard HTTP response codes, authentication, and verbs.

Base URL:

https://api.monei.com/v1

Client libraries:

Important:

If you are not using our official SDKs, you need to provide a valid User-Agent header in each request, otherwise your requests will be rejected.

# noqa: E501 +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - The version of the OpenAPI document: 1.2.2 + The version of the OpenAPI document: 1.5.0 Generated by: https://openapi-generator.tech """ @@ -134,7 +134,9 @@ def openapi_types(): 'payment_method': (PaymentPaymentMethod,), # noqa: E501 'sequence': (PaymentSequence,), # noqa: E501 'sequence_id': (str,), # noqa: E501 + 'store_id': (str,), # noqa: E501 'point_of_sale_id': (str,), # noqa: E501 + 'metadata': ({str: (bool, date, datetime, dict, float, int, list, str, none_type)},), # noqa: E501 'next_action': (PaymentNextAction,), # noqa: E501 'created_at': (int,), # noqa: E501 'updated_at': (int,), # noqa: E501 @@ -171,7 +173,9 @@ def discriminator(): 'payment_method': 'paymentMethod', # noqa: E501 'sequence': 'sequence', # noqa: E501 'sequence_id': 'sequenceId', # noqa: E501 + 'store_id': 'storeId', # noqa: E501 'point_of_sale_id': 'pointOfSaleId', # noqa: E501 + 'metadata': 'metadata', # noqa: E501 'next_action': 'nextAction', # noqa: E501 'created_at': 'createdAt', # noqa: E501 'updated_at': 'updatedAt', # noqa: E501 @@ -243,7 +247,9 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 payment_method (PaymentPaymentMethod): [optional] # noqa: E501 sequence (PaymentSequence): [optional] # noqa: E501 sequence_id (str): A permanent identifier that refers to the initial payment of a sequence of payments. This value needs to be sent in the path for `RECURRING` payments. . [optional] # noqa: E501 + store_id (str): A unique identifier of the Store. If specified the payment is attached to this Store. . [optional] # noqa: E501 point_of_sale_id (str): A unique identifier of the Point of Sale. If specified the payment is attached to this Point of Sale. If there is a QR code attached to the same Point of Sale, this payment will be available by scanning the QR code. . [optional] # noqa: E501 + metadata ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}): A set of key-value pairs that you can attach to a resource. This can be useful for storing additional information about the resource in a structured format.. [optional] # noqa: E501 next_action (PaymentNextAction): [optional] # noqa: E501 created_at (int): Time at which the resource was created. Measured in seconds since the Unix epoch.. [optional] # noqa: E501 updated_at (int): Time at which the resource updated last time. Measured in seconds since the Unix epoch.. [optional] # noqa: E501 @@ -357,7 +363,9 @@ def __init__(self, *args, **kwargs): # noqa: E501 payment_method (PaymentPaymentMethod): [optional] # noqa: E501 sequence (PaymentSequence): [optional] # noqa: E501 sequence_id (str): A permanent identifier that refers to the initial payment of a sequence of payments. This value needs to be sent in the path for `RECURRING` payments. . [optional] # noqa: E501 + store_id (str): A unique identifier of the Store. If specified the payment is attached to this Store. . [optional] # noqa: E501 point_of_sale_id (str): A unique identifier of the Point of Sale. If specified the payment is attached to this Point of Sale. If there is a QR code attached to the same Point of Sale, this payment will be available by scanning the QR code. . [optional] # noqa: E501 + metadata ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}): A set of key-value pairs that you can attach to a resource. This can be useful for storing additional information about the resource in a structured format.. [optional] # noqa: E501 next_action (PaymentNextAction): [optional] # noqa: E501 created_at (int): Time at which the resource was created. Measured in seconds since the Unix epoch.. [optional] # noqa: E501 updated_at (int): Time at which the resource updated last time. Measured in seconds since the Unix epoch.. [optional] # noqa: E501 diff --git a/Monei/model/payment_billing_details.py b/Monei/model/payment_billing_details.py index 726cb0b..225c209 100644 --- a/Monei/model/payment_billing_details.py +++ b/Monei/model/payment_billing_details.py @@ -1,9 +1,9 @@ """ MONEI API v1 -

The MONEI API is organized around REST. Our API has predictable resource-oriented URLs, accepts JSON-encoded request bodies, returns JSON-encoded responses, and uses standard HTTP response codes, authentication, and verbs.

Base URL:

https://api.monei.com/v1

Client libraries:

Important:

If you are not using our official SDKs, you need to provide a valid User-Agent header in each request, otherwise your requests will be rejected.

# noqa: E501 +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - The version of the OpenAPI document: 1.2.2 + The version of the OpenAPI document: 1.5.0 Generated by: https://openapi-generator.tech """ @@ -91,6 +91,7 @@ def openapi_types(): 'email': (str,), # noqa: E501 'phone': (str,), # noqa: E501 'company': (str,), # noqa: E501 + 'tax_id': (str,), # noqa: E501 'address': (Address,), # noqa: E501 } @@ -104,6 +105,7 @@ def discriminator(): 'email': 'email', # noqa: E501 'phone': 'phone', # noqa: E501 'company': 'company', # noqa: E501 + 'tax_id': 'taxId', # noqa: E501 'address': 'address', # noqa: E501 } @@ -148,10 +150,11 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 Animal class but this time we won't travel through its discriminator because we passed in _visited_composed_classes = (Animal,) - name (str): The customer’s billing full name.. [optional] # noqa: E501 - email (str): The customer’s billing email address.. [optional] # noqa: E501 - phone (str): The customer’s billing phone number.. [optional] # noqa: E501 + name (str): The customer's billing full name.. [optional] # noqa: E501 + email (str): The customer's billing email address.. [optional] # noqa: E501 + phone (str): The customer's billing phone number in E.164 format.. [optional] # noqa: E501 company (str): Billing company name.. [optional] # noqa: E501 + tax_id (str): Company tax ID.. [optional] # noqa: E501 address (Address): [optional] # noqa: E501 """ @@ -238,10 +241,11 @@ def __init__(self, *args, **kwargs): # noqa: E501 Animal class but this time we won't travel through its discriminator because we passed in _visited_composed_classes = (Animal,) - name (str): The customer’s billing full name.. [optional] # noqa: E501 - email (str): The customer’s billing email address.. [optional] # noqa: E501 - phone (str): The customer’s billing phone number.. [optional] # noqa: E501 + name (str): The customer's billing full name.. [optional] # noqa: E501 + email (str): The customer's billing email address.. [optional] # noqa: E501 + phone (str): The customer's billing phone number in E.164 format.. [optional] # noqa: E501 company (str): Billing company name.. [optional] # noqa: E501 + tax_id (str): Company tax ID.. [optional] # noqa: E501 address (Address): [optional] # noqa: E501 """ diff --git a/Monei/model/payment_cancellation_reason.py b/Monei/model/payment_cancellation_reason.py index 167663c..c7d9952 100644 --- a/Monei/model/payment_cancellation_reason.py +++ b/Monei/model/payment_cancellation_reason.py @@ -1,9 +1,9 @@ """ MONEI API v1 -

The MONEI API is organized around REST. Our API has predictable resource-oriented URLs, accepts JSON-encoded request bodies, returns JSON-encoded responses, and uses standard HTTP response codes, authentication, and verbs.

Base URL:

https://api.monei.com/v1

Client libraries:

Important:

If you are not using our official SDKs, you need to provide a valid User-Agent header in each request, otherwise your requests will be rejected.

# noqa: E501 +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - The version of the OpenAPI document: 1.2.2 + The version of the OpenAPI document: 1.5.0 Generated by: https://openapi-generator.tech """ diff --git a/Monei/model/payment_customer.py b/Monei/model/payment_customer.py index d1007a9..c741f82 100644 --- a/Monei/model/payment_customer.py +++ b/Monei/model/payment_customer.py @@ -1,9 +1,9 @@ """ MONEI API v1 -

The MONEI API is organized around REST. Our API has predictable resource-oriented URLs, accepts JSON-encoded request bodies, returns JSON-encoded responses, and uses standard HTTP response codes, authentication, and verbs.

Base URL:

https://api.monei.com/v1

Client libraries:

Important:

If you are not using our official SDKs, you need to provide a valid User-Agent header in each request, otherwise your requests will be rejected.

# noqa: E501 +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - The version of the OpenAPI document: 1.2.2 + The version of the OpenAPI document: 1.5.0 Generated by: https://openapi-generator.tech """ @@ -138,9 +138,9 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 Animal class but this time we won't travel through its discriminator because we passed in _visited_composed_classes = (Animal,) - email (str): The customer’s email address.. [optional] # noqa: E501 - name (str): The customer’s full name or business name.. [optional] # noqa: E501 - phone (str): The customer’s phone number.. [optional] # noqa: E501 + email (str): The customer's email address.. [optional] # noqa: E501 + name (str): The customer's full name or business name.. [optional] # noqa: E501 + phone (str): The customer's phone number in E.164 format.. [optional] # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) @@ -226,9 +226,9 @@ def __init__(self, *args, **kwargs): # noqa: E501 Animal class but this time we won't travel through its discriminator because we passed in _visited_composed_classes = (Animal,) - email (str): The customer’s email address.. [optional] # noqa: E501 - name (str): The customer’s full name or business name.. [optional] # noqa: E501 - phone (str): The customer’s phone number.. [optional] # noqa: E501 + email (str): The customer's email address.. [optional] # noqa: E501 + name (str): The customer's full name or business name.. [optional] # noqa: E501 + phone (str): The customer's phone number in E.164 format.. [optional] # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) diff --git a/Monei/model/payment_last_refund_reason.py b/Monei/model/payment_last_refund_reason.py index 40923f0..efad0cd 100644 --- a/Monei/model/payment_last_refund_reason.py +++ b/Monei/model/payment_last_refund_reason.py @@ -1,9 +1,9 @@ """ MONEI API v1 -

The MONEI API is organized around REST. Our API has predictable resource-oriented URLs, accepts JSON-encoded request bodies, returns JSON-encoded responses, and uses standard HTTP response codes, authentication, and verbs.

Base URL:

https://api.monei.com/v1

Client libraries:

Important:

If you are not using our official SDKs, you need to provide a valid User-Agent header in each request, otherwise your requests will be rejected.

# noqa: E501 +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - The version of the OpenAPI document: 1.2.2 + The version of the OpenAPI document: 1.5.0 Generated by: https://openapi-generator.tech """ diff --git a/Monei/model/payment_message_channel.py b/Monei/model/payment_message_channel.py index be5d958..673c065 100644 --- a/Monei/model/payment_message_channel.py +++ b/Monei/model/payment_message_channel.py @@ -1,9 +1,9 @@ """ MONEI API v1 -

The MONEI API is organized around REST. Our API has predictable resource-oriented URLs, accepts JSON-encoded request bodies, returns JSON-encoded responses, and uses standard HTTP response codes, authentication, and verbs.

Base URL:

https://api.monei.com/v1

Client libraries:

Important:

If you are not using our official SDKs, you need to provide a valid User-Agent header in each request, otherwise your requests will be rejected.

# noqa: E501 +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - The version of the OpenAPI document: 1.2.2 + The version of the OpenAPI document: 1.5.0 Generated by: https://openapi-generator.tech """ @@ -53,6 +53,7 @@ class PaymentMessageChannel(ModelSimple): allowed_values = { ('value',): { 'EMAIL': "EMAIL", + 'WHATSAPP': "WHATSAPP", 'SMS': "SMS", }, } @@ -105,10 +106,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): The channel used to send the payment message. if `customerEmail` or `customerPhone` is provided this parameter is ignored. ., must be one of ["EMAIL", "SMS", ] # noqa: E501 + args[0] (str): The channel used to send the payment message. ., must be one of ["EMAIL", "WHATSAPP", "SMS", ] # noqa: E501 Keyword Args: - value (str): The channel used to send the payment message. if `customerEmail` or `customerPhone` is provided this parameter is ignored. ., must be one of ["EMAIL", "SMS", ] # noqa: E501 + value (str): The channel used to send the payment message. ., must be one of ["EMAIL", "WHATSAPP", "SMS", ] # 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. @@ -199,10 +200,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): The channel used to send the payment message. if `customerEmail` or `customerPhone` is provided this parameter is ignored. ., must be one of ["EMAIL", "SMS", ] # noqa: E501 + args[0] (str): The channel used to send the payment message. ., must be one of ["EMAIL", "WHATSAPP", "SMS", ] # noqa: E501 Keyword Args: - value (str): The channel used to send the payment message. if `customerEmail` or `customerPhone` is provided this parameter is ignored. ., must be one of ["EMAIL", "SMS", ] # noqa: E501 + value (str): The channel used to send the payment message. ., must be one of ["EMAIL", "WHATSAPP", "SMS", ] # 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/Monei/model/payment_message_language.py b/Monei/model/payment_message_language.py index 1bcefc5..fd29d86 100644 --- a/Monei/model/payment_message_language.py +++ b/Monei/model/payment_message_language.py @@ -1,9 +1,9 @@ """ MONEI API v1 -

The MONEI API is organized around REST. Our API has predictable resource-oriented URLs, accepts JSON-encoded request bodies, returns JSON-encoded responses, and uses standard HTTP response codes, authentication, and verbs.

Base URL:

https://api.monei.com/v1

Client libraries:

Important:

If you are not using our official SDKs, you need to provide a valid User-Agent header in each request, otherwise your requests will be rejected.

# noqa: E501 +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - The version of the OpenAPI document: 1.2.2 + The version of the OpenAPI document: 1.5.0 Generated by: https://openapi-generator.tech """ diff --git a/Monei/model/payment_methods.py b/Monei/model/payment_methods.py new file mode 100644 index 0000000..7d93d84 --- /dev/null +++ b/Monei/model/payment_methods.py @@ -0,0 +1,303 @@ +""" + MONEI API v1 + +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 + + The version of the OpenAPI document: 1.5.0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from Monei.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from Monei.exceptions import ApiAttributeError + + +def lazy_import(): + from Monei.model.payment_methods_metadata import PaymentMethodsMetadata + from Monei.model.payment_methods_methods import PaymentMethodsMethods + globals()['PaymentMethodsMetadata'] = PaymentMethodsMetadata + globals()['PaymentMethodsMethods'] = PaymentMethodsMethods + + +class PaymentMethods(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'livemode': (bool,), # noqa: E501 + 'payment_methods': (PaymentMethodsMethods,), # noqa: E501 + 'metadata': (PaymentMethodsMetadata,), # noqa: E501 + 'merchant_name': (str,), # noqa: E501 + 'merchant_url': (str,), # noqa: E501 + 'country_code': (str,), # noqa: E501 + 'account_id': (str,), # noqa: E501 + 'amount': (int,), # noqa: E501 + 'currency': (str,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'livemode': 'livemode', # noqa: E501 + 'payment_methods': 'paymentMethods', # noqa: E501 + 'metadata': 'metadata', # noqa: E501 + 'merchant_name': 'merchantName', # noqa: E501 + 'merchant_url': 'merchantUrl', # noqa: E501 + 'country_code': 'countryCode', # noqa: E501 + 'account_id': 'accountId', # noqa: E501 + 'amount': 'amount', # noqa: E501 + 'currency': 'currency', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """PaymentMethods - 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 + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + livemode (bool): Has the value `true` if the resource exists in live mode or the value `false` if the resource exists in test mode.. [optional] # noqa: E501 + payment_methods (PaymentMethodsMethods): [optional] # noqa: E501 + metadata (PaymentMethodsMetadata): [optional] # noqa: E501 + merchant_name (str): The name of the merchant. [optional] # noqa: E501 + merchant_url (str): The URL of the merchant's website. [optional] # noqa: E501 + country_code (str): Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).. [optional] # noqa: E501 + account_id (str): MONEI Account identifier.. [optional] # noqa: E501 + amount (int): The amount of the payment in the smallest currency unit. For example, 10 EUR = 1000 cents. Only present when querying by paymentId. . [optional] # noqa: E501 + currency (str): Three-letter ISO currency code, in uppercase. Only present when querying by paymentId. . [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """PaymentMethods - 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 + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + livemode (bool): Has the value `true` if the resource exists in live mode or the value `false` if the resource exists in test mode.. [optional] # noqa: E501 + payment_methods (PaymentMethodsMethods): [optional] # noqa: E501 + metadata (PaymentMethodsMetadata): [optional] # noqa: E501 + merchant_name (str): The name of the merchant. [optional] # noqa: E501 + merchant_url (str): The URL of the merchant's website. [optional] # noqa: E501 + country_code (str): Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).. [optional] # noqa: E501 + account_id (str): MONEI Account identifier.. [optional] # noqa: E501 + amount (int): The amount of the payment in the smallest currency unit. For example, 10 EUR = 1000 cents. Only present when querying by paymentId. . [optional] # noqa: E501 + currency (str): Three-letter ISO currency code, in uppercase. Only present when querying by paymentId. . [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/Monei/model/payment_methods_metadata.py b/Monei/model/payment_methods_metadata.py new file mode 100644 index 0000000..4ef0a34 --- /dev/null +++ b/Monei/model/payment_methods_metadata.py @@ -0,0 +1,363 @@ +""" + MONEI API v1 + +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 + + The version of the OpenAPI document: 1.5.0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from Monei.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from Monei.exceptions import ApiAttributeError + + +def lazy_import(): + from Monei.model.payment_methods_metadata_alipay import PaymentMethodsMetadataAlipay + from Monei.model.payment_methods_metadata_apple_pay import PaymentMethodsMetadataApplePay + from Monei.model.payment_methods_metadata_bancontact import PaymentMethodsMetadataBancontact + from Monei.model.payment_methods_metadata_bizum import PaymentMethodsMetadataBizum + from Monei.model.payment_methods_metadata_blik import PaymentMethodsMetadataBlik + from Monei.model.payment_methods_metadata_card import PaymentMethodsMetadataCard + from Monei.model.payment_methods_metadata_click_to_pay import PaymentMethodsMetadataClickToPay + from Monei.model.payment_methods_metadata_eps import PaymentMethodsMetadataEps + from Monei.model.payment_methods_metadata_giropay import PaymentMethodsMetadataGiropay + from Monei.model.payment_methods_metadata_google_pay import PaymentMethodsMetadataGooglePay + from Monei.model.payment_methods_metadata_i_deal import PaymentMethodsMetadataIDeal + from Monei.model.payment_methods_metadata_klarna import PaymentMethodsMetadataKlarna + from Monei.model.payment_methods_metadata_mbway import PaymentMethodsMetadataMbway + from Monei.model.payment_methods_metadata_sepa import PaymentMethodsMetadataSepa + from Monei.model.payment_methods_metadata_sofort import PaymentMethodsMetadataSofort + from Monei.model.payment_methods_metadata_trustly import PaymentMethodsMetadataTrustly + globals()['PaymentMethodsMetadataAlipay'] = PaymentMethodsMetadataAlipay + globals()['PaymentMethodsMetadataApplePay'] = PaymentMethodsMetadataApplePay + globals()['PaymentMethodsMetadataBancontact'] = PaymentMethodsMetadataBancontact + globals()['PaymentMethodsMetadataBizum'] = PaymentMethodsMetadataBizum + globals()['PaymentMethodsMetadataBlik'] = PaymentMethodsMetadataBlik + globals()['PaymentMethodsMetadataCard'] = PaymentMethodsMetadataCard + globals()['PaymentMethodsMetadataClickToPay'] = PaymentMethodsMetadataClickToPay + globals()['PaymentMethodsMetadataEps'] = PaymentMethodsMetadataEps + globals()['PaymentMethodsMetadataGiropay'] = PaymentMethodsMetadataGiropay + globals()['PaymentMethodsMetadataGooglePay'] = PaymentMethodsMetadataGooglePay + globals()['PaymentMethodsMetadataIDeal'] = PaymentMethodsMetadataIDeal + globals()['PaymentMethodsMetadataKlarna'] = PaymentMethodsMetadataKlarna + globals()['PaymentMethodsMetadataMbway'] = PaymentMethodsMetadataMbway + globals()['PaymentMethodsMetadataSepa'] = PaymentMethodsMetadataSepa + globals()['PaymentMethodsMetadataSofort'] = PaymentMethodsMetadataSofort + globals()['PaymentMethodsMetadataTrustly'] = PaymentMethodsMetadataTrustly + + +class PaymentMethodsMetadata(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'alipay': (PaymentMethodsMetadataAlipay,), # noqa: E501 + 'bancontact': (PaymentMethodsMetadataBancontact,), # noqa: E501 + 'bizum': (PaymentMethodsMetadataBizum,), # noqa: E501 + 'blik': (PaymentMethodsMetadataBlik,), # noqa: E501 + 'card': (PaymentMethodsMetadataCard,), # noqa: E501 + 'eps': (PaymentMethodsMetadataEps,), # noqa: E501 + 'i_deal': (PaymentMethodsMetadataIDeal,), # noqa: E501 + 'mbway': (PaymentMethodsMetadataMbway,), # noqa: E501 + 'multibanco': (PaymentMethodsMetadataMbway,), # noqa: E501 + 'sofort': (PaymentMethodsMetadataSofort,), # noqa: E501 + 'trustly': (PaymentMethodsMetadataTrustly,), # noqa: E501 + 'sepa': (PaymentMethodsMetadataSepa,), # noqa: E501 + 'klarna': (PaymentMethodsMetadataKlarna,), # noqa: E501 + 'giropay': (PaymentMethodsMetadataGiropay,), # noqa: E501 + 'google_pay': (PaymentMethodsMetadataGooglePay,), # noqa: E501 + 'apple_pay': (PaymentMethodsMetadataApplePay,), # noqa: E501 + 'click_to_pay': (PaymentMethodsMetadataClickToPay,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'alipay': 'alipay', # noqa: E501 + 'bancontact': 'bancontact', # noqa: E501 + 'bizum': 'bizum', # noqa: E501 + 'blik': 'blik', # noqa: E501 + 'card': 'card', # noqa: E501 + 'eps': 'eps', # noqa: E501 + 'i_deal': 'iDeal', # noqa: E501 + 'mbway': 'mbway', # noqa: E501 + 'multibanco': 'multibanco', # noqa: E501 + 'sofort': 'sofort', # noqa: E501 + 'trustly': 'trustly', # noqa: E501 + 'sepa': 'sepa', # noqa: E501 + 'klarna': 'klarna', # noqa: E501 + 'giropay': 'giropay', # noqa: E501 + 'google_pay': 'googlePay', # noqa: E501 + 'apple_pay': 'applePay', # noqa: E501 + 'click_to_pay': 'clickToPay', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """PaymentMethodsMetadata - 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 + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + alipay (PaymentMethodsMetadataAlipay): [optional] # noqa: E501 + bancontact (PaymentMethodsMetadataBancontact): [optional] # noqa: E501 + bizum (PaymentMethodsMetadataBizum): [optional] # noqa: E501 + blik (PaymentMethodsMetadataBlik): [optional] # noqa: E501 + card (PaymentMethodsMetadataCard): [optional] # noqa: E501 + eps (PaymentMethodsMetadataEps): [optional] # noqa: E501 + i_deal (PaymentMethodsMetadataIDeal): [optional] # noqa: E501 + mbway (PaymentMethodsMetadataMbway): [optional] # noqa: E501 + multibanco (PaymentMethodsMetadataMbway): [optional] # noqa: E501 + sofort (PaymentMethodsMetadataSofort): [optional] # noqa: E501 + trustly (PaymentMethodsMetadataTrustly): [optional] # noqa: E501 + sepa (PaymentMethodsMetadataSepa): [optional] # noqa: E501 + klarna (PaymentMethodsMetadataKlarna): [optional] # noqa: E501 + giropay (PaymentMethodsMetadataGiropay): [optional] # noqa: E501 + google_pay (PaymentMethodsMetadataGooglePay): [optional] # noqa: E501 + apple_pay (PaymentMethodsMetadataApplePay): [optional] # noqa: E501 + click_to_pay (PaymentMethodsMetadataClickToPay): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """PaymentMethodsMetadata - 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 + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + alipay (PaymentMethodsMetadataAlipay): [optional] # noqa: E501 + bancontact (PaymentMethodsMetadataBancontact): [optional] # noqa: E501 + bizum (PaymentMethodsMetadataBizum): [optional] # noqa: E501 + blik (PaymentMethodsMetadataBlik): [optional] # noqa: E501 + card (PaymentMethodsMetadataCard): [optional] # noqa: E501 + eps (PaymentMethodsMetadataEps): [optional] # noqa: E501 + i_deal (PaymentMethodsMetadataIDeal): [optional] # noqa: E501 + mbway (PaymentMethodsMetadataMbway): [optional] # noqa: E501 + multibanco (PaymentMethodsMetadataMbway): [optional] # noqa: E501 + sofort (PaymentMethodsMetadataSofort): [optional] # noqa: E501 + trustly (PaymentMethodsMetadataTrustly): [optional] # noqa: E501 + sepa (PaymentMethodsMetadataSepa): [optional] # noqa: E501 + klarna (PaymentMethodsMetadataKlarna): [optional] # noqa: E501 + giropay (PaymentMethodsMetadataGiropay): [optional] # noqa: E501 + google_pay (PaymentMethodsMetadataGooglePay): [optional] # noqa: E501 + apple_pay (PaymentMethodsMetadataApplePay): [optional] # noqa: E501 + click_to_pay (PaymentMethodsMetadataClickToPay): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/Monei/model/payment_methods_metadata_alipay.py b/Monei/model/payment_methods_metadata_alipay.py new file mode 100644 index 0000000..ae6fd17 --- /dev/null +++ b/Monei/model/payment_methods_metadata_alipay.py @@ -0,0 +1,263 @@ +""" + MONEI API v1 + +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 + + The version of the OpenAPI document: 1.5.0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from Monei.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from Monei.exceptions import ApiAttributeError + + + +class PaymentMethodsMetadataAlipay(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'countries': ([str],), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'countries': 'countries', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """PaymentMethodsMetadataAlipay - 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 + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + countries ([str]): List of countries where the payment method is available. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """PaymentMethodsMetadataAlipay - 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 + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + countries ([str]): List of countries where the payment method is available. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/Monei/model/payment_methods_metadata_apple_pay.py b/Monei/model/payment_methods_metadata_apple_pay.py new file mode 100644 index 0000000..ec06508 --- /dev/null +++ b/Monei/model/payment_methods_metadata_apple_pay.py @@ -0,0 +1,263 @@ +""" + MONEI API v1 + +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 + + The version of the OpenAPI document: 1.5.0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from Monei.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from Monei.exceptions import ApiAttributeError + + + +class PaymentMethodsMetadataApplePay(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'merchant_id': (str,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'merchant_id': 'merchantId', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """PaymentMethodsMetadataApplePay - 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 + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + merchant_id (str): Apple Pay merchant ID. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """PaymentMethodsMetadataApplePay - 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 + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + merchant_id (str): Apple Pay merchant ID. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/Monei/model/payment_methods_metadata_bancontact.py b/Monei/model/payment_methods_metadata_bancontact.py new file mode 100644 index 0000000..e925b8a --- /dev/null +++ b/Monei/model/payment_methods_metadata_bancontact.py @@ -0,0 +1,263 @@ +""" + MONEI API v1 + +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 + + The version of the OpenAPI document: 1.5.0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from Monei.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from Monei.exceptions import ApiAttributeError + + + +class PaymentMethodsMetadataBancontact(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'countries': ([str],), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'countries': 'countries', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """PaymentMethodsMetadataBancontact - 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 + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + countries ([str]): List of countries where the payment method is available. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """PaymentMethodsMetadataBancontact - 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 + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + countries ([str]): List of countries where the payment method is available. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/Monei/model/payment_methods_metadata_bizum.py b/Monei/model/payment_methods_metadata_bizum.py new file mode 100644 index 0000000..d1a522e --- /dev/null +++ b/Monei/model/payment_methods_metadata_bizum.py @@ -0,0 +1,263 @@ +""" + MONEI API v1 + +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 + + The version of the OpenAPI document: 1.5.0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from Monei.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from Monei.exceptions import ApiAttributeError + + + +class PaymentMethodsMetadataBizum(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'countries': ([str],), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'countries': 'countries', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """PaymentMethodsMetadataBizum - 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 + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + countries ([str]): List of countries where the payment method is available. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """PaymentMethodsMetadataBizum - 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 + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + countries ([str]): List of countries where the payment method is available. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/Monei/model/payment_methods_metadata_blik.py b/Monei/model/payment_methods_metadata_blik.py new file mode 100644 index 0000000..9f620ba --- /dev/null +++ b/Monei/model/payment_methods_metadata_blik.py @@ -0,0 +1,263 @@ +""" + MONEI API v1 + +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 + + The version of the OpenAPI document: 1.5.0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from Monei.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from Monei.exceptions import ApiAttributeError + + + +class PaymentMethodsMetadataBlik(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'countries': ([str],), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'countries': 'countries', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """PaymentMethodsMetadataBlik - 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 + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + countries ([str]): List of countries where the payment method is available. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """PaymentMethodsMetadataBlik - 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 + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + countries ([str]): List of countries where the payment method is available. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/Monei/model/payment_methods_metadata_card.py b/Monei/model/payment_methods_metadata_card.py new file mode 100644 index 0000000..b2c14df --- /dev/null +++ b/Monei/model/payment_methods_metadata_card.py @@ -0,0 +1,263 @@ +""" + MONEI API v1 + +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 + + The version of the OpenAPI document: 1.5.0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from Monei.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from Monei.exceptions import ApiAttributeError + + + +class PaymentMethodsMetadataCard(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'brands': ([str],), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'brands': 'brands', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """PaymentMethodsMetadataCard - 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 + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + brands ([str]): List of card brands supported. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """PaymentMethodsMetadataCard - 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 + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + brands ([str]): List of card brands supported. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/Monei/model/payment_methods_metadata_click_to_pay.py b/Monei/model/payment_methods_metadata_click_to_pay.py new file mode 100644 index 0000000..ccb6a87 --- /dev/null +++ b/Monei/model/payment_methods_metadata_click_to_pay.py @@ -0,0 +1,289 @@ +""" + MONEI API v1 + +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 + + The version of the OpenAPI document: 1.5.0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from Monei.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from Monei.exceptions import ApiAttributeError + + +def lazy_import(): + from Monei.model.payment_methods_metadata_click_to_pay_discover import PaymentMethodsMetadataClickToPayDiscover + from Monei.model.payment_methods_metadata_click_to_pay_mastercard import PaymentMethodsMetadataClickToPayMastercard + from Monei.model.payment_methods_metadata_click_to_pay_visa import PaymentMethodsMetadataClickToPayVisa + globals()['PaymentMethodsMetadataClickToPayDiscover'] = PaymentMethodsMetadataClickToPayDiscover + globals()['PaymentMethodsMetadataClickToPayMastercard'] = PaymentMethodsMetadataClickToPayMastercard + globals()['PaymentMethodsMetadataClickToPayVisa'] = PaymentMethodsMetadataClickToPayVisa + + +class PaymentMethodsMetadataClickToPay(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'token_support': (bool,), # noqa: E501 + 'preselected': (bool,), # noqa: E501 + 'visa': (PaymentMethodsMetadataClickToPayVisa,), # noqa: E501 + 'mastercard': (PaymentMethodsMetadataClickToPayMastercard,), # noqa: E501 + 'discover': (PaymentMethodsMetadataClickToPayDiscover,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'token_support': 'tokenSupport', # noqa: E501 + 'preselected': 'preselected', # noqa: E501 + 'visa': 'visa', # noqa: E501 + 'mastercard': 'mastercard', # noqa: E501 + 'discover': 'discover', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """PaymentMethodsMetadataClickToPay - 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 + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + token_support (bool): Whether token support is enabled. [optional] # noqa: E501 + preselected (bool): Whether the method is preselected. [optional] # noqa: E501 + visa (PaymentMethodsMetadataClickToPayVisa): [optional] # noqa: E501 + mastercard (PaymentMethodsMetadataClickToPayMastercard): [optional] # noqa: E501 + discover (PaymentMethodsMetadataClickToPayDiscover): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """PaymentMethodsMetadataClickToPay - 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 + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + token_support (bool): Whether token support is enabled. [optional] # noqa: E501 + preselected (bool): Whether the method is preselected. [optional] # noqa: E501 + visa (PaymentMethodsMetadataClickToPayVisa): [optional] # noqa: E501 + mastercard (PaymentMethodsMetadataClickToPayMastercard): [optional] # noqa: E501 + discover (PaymentMethodsMetadataClickToPayDiscover): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/Monei/model/payment_methods_metadata_click_to_pay_discover.py b/Monei/model/payment_methods_metadata_click_to_pay_discover.py new file mode 100644 index 0000000..abaa7ee --- /dev/null +++ b/Monei/model/payment_methods_metadata_click_to_pay_discover.py @@ -0,0 +1,267 @@ +""" + MONEI API v1 + +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 + + The version of the OpenAPI document: 1.5.0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from Monei.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from Monei.exceptions import ApiAttributeError + + + +class PaymentMethodsMetadataClickToPayDiscover(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'srci_dpa_id': (str,), # noqa: E501 + 'src_initiator_id': (str,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'srci_dpa_id': 'srciDpaId', # noqa: E501 + 'src_initiator_id': 'srcInitiatorId', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """PaymentMethodsMetadataClickToPayDiscover - 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 + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + srci_dpa_id (str): [optional] # noqa: E501 + src_initiator_id (str): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """PaymentMethodsMetadataClickToPayDiscover - 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 + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + srci_dpa_id (str): [optional] # noqa: E501 + src_initiator_id (str): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/Monei/model/payment_methods_metadata_click_to_pay_mastercard.py b/Monei/model/payment_methods_metadata_click_to_pay_mastercard.py new file mode 100644 index 0000000..f7e1f26 --- /dev/null +++ b/Monei/model/payment_methods_metadata_click_to_pay_mastercard.py @@ -0,0 +1,267 @@ +""" + MONEI API v1 + +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 + + The version of the OpenAPI document: 1.5.0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from Monei.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from Monei.exceptions import ApiAttributeError + + + +class PaymentMethodsMetadataClickToPayMastercard(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'srci_dpa_id': (str,), # noqa: E501 + 'src_initiator_id': (str,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'srci_dpa_id': 'srciDpaId', # noqa: E501 + 'src_initiator_id': 'srcInitiatorId', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """PaymentMethodsMetadataClickToPayMastercard - 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 + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + srci_dpa_id (str): [optional] # noqa: E501 + src_initiator_id (str): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """PaymentMethodsMetadataClickToPayMastercard - 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 + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + srci_dpa_id (str): [optional] # noqa: E501 + src_initiator_id (str): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/Monei/model/payment_methods_metadata_click_to_pay_visa.py b/Monei/model/payment_methods_metadata_click_to_pay_visa.py new file mode 100644 index 0000000..659c504 --- /dev/null +++ b/Monei/model/payment_methods_metadata_click_to_pay_visa.py @@ -0,0 +1,267 @@ +""" + MONEI API v1 + +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 + + The version of the OpenAPI document: 1.5.0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from Monei.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from Monei.exceptions import ApiAttributeError + + + +class PaymentMethodsMetadataClickToPayVisa(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'srci_dpa_id': (str,), # noqa: E501 + 'src_initiator_id': (str,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'srci_dpa_id': 'srciDpaId', # noqa: E501 + 'src_initiator_id': 'srcInitiatorId', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """PaymentMethodsMetadataClickToPayVisa - 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 + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + srci_dpa_id (str): [optional] # noqa: E501 + src_initiator_id (str): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """PaymentMethodsMetadataClickToPayVisa - 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 + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + srci_dpa_id (str): [optional] # noqa: E501 + src_initiator_id (str): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/Monei/model/payment_methods_metadata_eps.py b/Monei/model/payment_methods_metadata_eps.py new file mode 100644 index 0000000..535500e --- /dev/null +++ b/Monei/model/payment_methods_metadata_eps.py @@ -0,0 +1,263 @@ +""" + MONEI API v1 + +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 + + The version of the OpenAPI document: 1.5.0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from Monei.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from Monei.exceptions import ApiAttributeError + + + +class PaymentMethodsMetadataEps(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'countries': ([str],), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'countries': 'countries', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """PaymentMethodsMetadataEps - 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 + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + countries ([str]): List of countries where the payment method is available. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """PaymentMethodsMetadataEps - 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 + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + countries ([str]): List of countries where the payment method is available. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/Monei/model/payment_methods_metadata_giropay.py b/Monei/model/payment_methods_metadata_giropay.py new file mode 100644 index 0000000..1a2b7a9 --- /dev/null +++ b/Monei/model/payment_methods_metadata_giropay.py @@ -0,0 +1,263 @@ +""" + MONEI API v1 + +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 + + The version of the OpenAPI document: 1.5.0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from Monei.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from Monei.exceptions import ApiAttributeError + + + +class PaymentMethodsMetadataGiropay(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'countries': ([str],), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'countries': 'countries', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """PaymentMethodsMetadataGiropay - 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 + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + countries ([str]): List of countries where the payment method is available. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """PaymentMethodsMetadataGiropay - 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 + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + countries ([str]): List of countries where the payment method is available. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/Monei/model/payment_methods_metadata_google_pay.py b/Monei/model/payment_methods_metadata_google_pay.py new file mode 100644 index 0000000..5c7d15a --- /dev/null +++ b/Monei/model/payment_methods_metadata_google_pay.py @@ -0,0 +1,267 @@ +""" + MONEI API v1 + +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 + + The version of the OpenAPI document: 1.5.0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from Monei.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from Monei.exceptions import ApiAttributeError + + + +class PaymentMethodsMetadataGooglePay(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'merchant_id': (str,), # noqa: E501 + 'cvc_required': (bool,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'merchant_id': 'merchantId', # noqa: E501 + 'cvc_required': 'cvcRequired', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """PaymentMethodsMetadataGooglePay - 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 + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + merchant_id (str): Google Pay merchant ID. [optional] # noqa: E501 + cvc_required (bool): Whether CVC is required for Google Pay transactions. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """PaymentMethodsMetadataGooglePay - 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 + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + merchant_id (str): Google Pay merchant ID. [optional] # noqa: E501 + cvc_required (bool): Whether CVC is required for Google Pay transactions. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/Monei/model/payment_methods_metadata_i_deal.py b/Monei/model/payment_methods_metadata_i_deal.py new file mode 100644 index 0000000..cb46889 --- /dev/null +++ b/Monei/model/payment_methods_metadata_i_deal.py @@ -0,0 +1,263 @@ +""" + MONEI API v1 + +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 + + The version of the OpenAPI document: 1.5.0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from Monei.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from Monei.exceptions import ApiAttributeError + + + +class PaymentMethodsMetadataIDeal(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'countries': ([str],), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'countries': 'countries', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """PaymentMethodsMetadataIDeal - 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 + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + countries ([str]): List of countries where the payment method is available. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """PaymentMethodsMetadataIDeal - 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 + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + countries ([str]): List of countries where the payment method is available. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/Monei/model/payment_methods_metadata_klarna.py b/Monei/model/payment_methods_metadata_klarna.py new file mode 100644 index 0000000..735c01f --- /dev/null +++ b/Monei/model/payment_methods_metadata_klarna.py @@ -0,0 +1,263 @@ +""" + MONEI API v1 + +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 + + The version of the OpenAPI document: 1.5.0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from Monei.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from Monei.exceptions import ApiAttributeError + + + +class PaymentMethodsMetadataKlarna(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'countries': ([str],), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'countries': 'countries', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """PaymentMethodsMetadataKlarna - 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 + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + countries ([str]): List of countries where the payment method is available. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """PaymentMethodsMetadataKlarna - 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 + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + countries ([str]): List of countries where the payment method is available. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/Monei/model/payment_methods_metadata_mbway.py b/Monei/model/payment_methods_metadata_mbway.py new file mode 100644 index 0000000..71b6bb4 --- /dev/null +++ b/Monei/model/payment_methods_metadata_mbway.py @@ -0,0 +1,263 @@ +""" + MONEI API v1 + +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 + + The version of the OpenAPI document: 1.5.0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from Monei.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from Monei.exceptions import ApiAttributeError + + + +class PaymentMethodsMetadataMbway(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'countries': ([str],), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'countries': 'countries', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """PaymentMethodsMetadataMbway - 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 + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + countries ([str]): List of countries where the payment method is available. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """PaymentMethodsMetadataMbway - 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 + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + countries ([str]): List of countries where the payment method is available. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/Monei/model/payment_methods_metadata_sepa.py b/Monei/model/payment_methods_metadata_sepa.py new file mode 100644 index 0000000..3159652 --- /dev/null +++ b/Monei/model/payment_methods_metadata_sepa.py @@ -0,0 +1,263 @@ +""" + MONEI API v1 + +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 + + The version of the OpenAPI document: 1.5.0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from Monei.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from Monei.exceptions import ApiAttributeError + + + +class PaymentMethodsMetadataSepa(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'countries': ([str],), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'countries': 'countries', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """PaymentMethodsMetadataSepa - 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 + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + countries ([str]): List of countries where the payment method is available. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """PaymentMethodsMetadataSepa - 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 + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + countries ([str]): List of countries where the payment method is available. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/Monei/model/payment_methods_metadata_sofort.py b/Monei/model/payment_methods_metadata_sofort.py new file mode 100644 index 0000000..cb5939e --- /dev/null +++ b/Monei/model/payment_methods_metadata_sofort.py @@ -0,0 +1,263 @@ +""" + MONEI API v1 + +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 + + The version of the OpenAPI document: 1.5.0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from Monei.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from Monei.exceptions import ApiAttributeError + + + +class PaymentMethodsMetadataSofort(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'countries': ([str],), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'countries': 'countries', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """PaymentMethodsMetadataSofort - 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 + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + countries ([str]): List of countries where the payment method is available. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """PaymentMethodsMetadataSofort - 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 + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + countries ([str]): List of countries where the payment method is available. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/Monei/model/payment_methods_metadata_trustly.py b/Monei/model/payment_methods_metadata_trustly.py new file mode 100644 index 0000000..413eb27 --- /dev/null +++ b/Monei/model/payment_methods_metadata_trustly.py @@ -0,0 +1,263 @@ +""" + MONEI API v1 + +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 + + The version of the OpenAPI document: 1.5.0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from Monei.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from Monei.exceptions import ApiAttributeError + + + +class PaymentMethodsMetadataTrustly(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'countries': ([str],), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'countries': 'countries', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """PaymentMethodsMetadataTrustly - 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 + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + countries ([str]): List of countries where the payment method is available. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """PaymentMethodsMetadataTrustly - 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 + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + countries ([str]): List of countries where the payment method is available. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/Monei/model/payment_methods_methods.py b/Monei/model/payment_methods_methods.py new file mode 100644 index 0000000..d715b2c --- /dev/null +++ b/Monei/model/payment_methods_methods.py @@ -0,0 +1,286 @@ +""" + MONEI API v1 + +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 + + The version of the OpenAPI document: 1.5.0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from Monei.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from Monei.exceptions import ApiAttributeError + + + +class PaymentMethodsMethods(ModelSimple): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + additional_properties_type = None + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'value': ([str],), + } + + @cached_property + def discriminator(): + return None + + + attribute_map = {} + + read_only_vars = set() + + _composed_schemas = None + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): + """PaymentMethodsMethods - a model defined in OpenAPI + + Note that value can be passed either in args or in kwargs, but not in both. + + Args: + args[0] ([str]): An array of available payment methods for the account or payment. Possible values include: - `alipay` - Alipay - `applePay` - Apple Pay - `bancontact` - Bancontact - `bizum` - Bizum - `blik` - BLIK - `card` - Credit or debit card - `cardPresent` - Card present (physical POS) - `clickToPay` - Click to Pay - `cofidis` - Cofidis - `cofidisLoan` - Cofidis Loan - `eps` - EPS - `giropay` - Giropay - `googlePay` - Google Pay - `iDeal` - iDEAL - `klarna` - Klarna - `mbway` - MB WAY - `multibanco` - Multibanco - `paypal` - PayPal - `sepa` - SEPA Direct Debit - `sofort` - Sofort - `trustly` - Trustly . # noqa: E501 + + Keyword Args: + value ([str]): An array of available payment methods for the account or payment. Possible values include: - `alipay` - Alipay - `applePay` - Apple Pay - `bancontact` - Bancontact - `bizum` - Bizum - `blik` - BLIK - `card` - Credit or debit card - `cardPresent` - Card present (physical POS) - `clickToPay` - Click to Pay - `cofidis` - Cofidis - `cofidisLoan` - Cofidis Loan - `eps` - EPS - `giropay` - Giropay - `googlePay` - Google Pay - `iDeal` - iDEAL - `klarna` - Klarna - `mbway` - MB WAY - `multibanco` - Multibanco - `paypal` - PayPal - `sepa` - SEPA Direct Debit - `sofort` - Sofort - `trustly` - Trustly . # 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. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + # required up here when default value is not given + _path_to_item = kwargs.pop('_path_to_item', ()) + + if 'value' in kwargs: + value = kwargs.pop('value') + elif args: + args = list(args) + value = args.pop(0) + else: + raise ApiTypeError( + "value is required, but not passed in args or kwargs and doesn't have default", + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + self.value = value + if kwargs: + raise ApiTypeError( + "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( + kwargs, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): + """PaymentMethodsMethods - a model defined in OpenAPI + + Note that value can be passed either in args or in kwargs, but not in both. + + Args: + args[0] ([str]): An array of available payment methods for the account or payment. Possible values include: - `alipay` - Alipay - `applePay` - Apple Pay - `bancontact` - Bancontact - `bizum` - Bizum - `blik` - BLIK - `card` - Credit or debit card - `cardPresent` - Card present (physical POS) - `clickToPay` - Click to Pay - `cofidis` - Cofidis - `cofidisLoan` - Cofidis Loan - `eps` - EPS - `giropay` - Giropay - `googlePay` - Google Pay - `iDeal` - iDEAL - `klarna` - Klarna - `mbway` - MB WAY - `multibanco` - Multibanco - `paypal` - PayPal - `sepa` - SEPA Direct Debit - `sofort` - Sofort - `trustly` - Trustly . # noqa: E501 + + Keyword Args: + value ([str]): An array of available payment methods for the account or payment. Possible values include: - `alipay` - Alipay - `applePay` - Apple Pay - `bancontact` - Bancontact - `bizum` - Bizum - `blik` - BLIK - `card` - Credit or debit card - `cardPresent` - Card present (physical POS) - `clickToPay` - Click to Pay - `cofidis` - Cofidis - `cofidisLoan` - Cofidis Loan - `eps` - EPS - `giropay` - Giropay - `googlePay` - Google Pay - `iDeal` - iDEAL - `klarna` - Klarna - `mbway` - MB WAY - `multibanco` - Multibanco - `paypal` - PayPal - `sepa` - SEPA Direct Debit - `sofort` - Sofort - `trustly` - Trustly . # 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. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + # required up here when default value is not given + _path_to_item = kwargs.pop('_path_to_item', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if 'value' in kwargs: + value = kwargs.pop('value') + elif args: + args = list(args) + value = args.pop(0) + else: + raise ApiTypeError( + "value is required, but not passed in args or kwargs and doesn't have default", + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + self.value = value + if kwargs: + raise ApiTypeError( + "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( + kwargs, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + return self diff --git a/Monei/model/payment_next_action.py b/Monei/model/payment_next_action.py index 8291c0c..2225003 100644 --- a/Monei/model/payment_next_action.py +++ b/Monei/model/payment_next_action.py @@ -1,9 +1,9 @@ """ MONEI API v1 -

The MONEI API is organized around REST. Our API has predictable resource-oriented URLs, accepts JSON-encoded request bodies, returns JSON-encoded responses, and uses standard HTTP response codes, authentication, and verbs.

Base URL:

https://api.monei.com/v1

Client libraries:

Important:

If you are not using our official SDKs, you need to provide a valid User-Agent header in each request, otherwise your requests will be rejected.

# noqa: E501 +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - The version of the OpenAPI document: 1.2.2 + The version of the OpenAPI document: 1.5.0 Generated by: https://openapi-generator.tech """ @@ -59,6 +59,7 @@ class PaymentNextAction(ModelNormal): 'CONFIRM': "CONFIRM", 'CHALLENGE': "CHALLENGE", 'FRICTIONLESS_CHALLENGE': "FRICTIONLESS_CHALLENGE", + 'BIZUM_CHALLENGE': "BIZUM_CHALLENGE", 'COMPLETE': "COMPLETE", }, } @@ -144,7 +145,7 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 Animal class but this time we won't travel through its discriminator because we passed in _visited_composed_classes = (Animal,) - type (str): - `CONFIRM` - Your customer needs to be redirected to a [hosted payment page](https://docs.monei.com/docs/use-prebuilt-payment-page) or confirm payment using [payment token](https://docs.monei.com/docs/accept-card-payment#3-submitting-the-payment-to-monei-client-side). The **redirectUrl** will point to the hosted payment page. - `FRICTIONLESS_CHALLENGE` - Your customer needs to be redirected to the frictionless 3d secure challenge page provided by the bank. The **redirectUrl** will point to the frictionless 3d secure challenge page provided by the bank. - `CHALLENGE` - Your customer needs to be redirected to the 3d secure challenge page provided by the bank. The **redirectUrl** will point to the 3d secure challenge page provided by the bank. - `COMPLETE` - The payment is completed. The **redirectUrl** will be the **completeUrl** if it was provided when the payment was created. . [optional] # noqa: E501 + type (str): - `CONFIRM` - Your customer needs to be redirected to a [hosted payment page](https://docs.monei.com/docs/use-prebuilt-payment-page) or confirm payment using [payment token](https://docs.monei.com/docs/accept-card-payment#3-submitting-the-payment-to-monei-client-side). The **redirectUrl** will point to the hosted payment page. - `FRICTIONLESS_CHALLENGE` - Your customer needs to be redirected to the frictionless 3d secure challenge page provided by the bank. The **redirectUrl** will point to the frictionless 3d secure challenge page provided by the bank. - `CHALLENGE` - Your customer needs to be redirected to the 3d secure challenge page provided by the bank. The **redirectUrl** will point to the 3d secure challenge page provided by the bank. - `COMPLETE` - The payment is completed. The **redirectUrl** will be the **completeUrl** if it was provided when the payment was created. - `BIZUM_CHALLENGE` - Your customer will be redirected to the Bizum hosted payment page. . [optional] # noqa: E501 must_redirect (bool): If `true` you have to redirect your customer to the **redirectUrl** to continue payment process. . [optional] # noqa: E501 redirect_url (str): Redirect your customer to this url to continue payment process. . [optional] # noqa: E501 """ @@ -232,7 +233,7 @@ def __init__(self, *args, **kwargs): # noqa: E501 Animal class but this time we won't travel through its discriminator because we passed in _visited_composed_classes = (Animal,) - type (str): - `CONFIRM` - Your customer needs to be redirected to a [hosted payment page](https://docs.monei.com/docs/use-prebuilt-payment-page) or confirm payment using [payment token](https://docs.monei.com/docs/accept-card-payment#3-submitting-the-payment-to-monei-client-side). The **redirectUrl** will point to the hosted payment page. - `FRICTIONLESS_CHALLENGE` - Your customer needs to be redirected to the frictionless 3d secure challenge page provided by the bank. The **redirectUrl** will point to the frictionless 3d secure challenge page provided by the bank. - `CHALLENGE` - Your customer needs to be redirected to the 3d secure challenge page provided by the bank. The **redirectUrl** will point to the 3d secure challenge page provided by the bank. - `COMPLETE` - The payment is completed. The **redirectUrl** will be the **completeUrl** if it was provided when the payment was created. . [optional] # noqa: E501 + type (str): - `CONFIRM` - Your customer needs to be redirected to a [hosted payment page](https://docs.monei.com/docs/use-prebuilt-payment-page) or confirm payment using [payment token](https://docs.monei.com/docs/accept-card-payment#3-submitting-the-payment-to-monei-client-side). The **redirectUrl** will point to the hosted payment page. - `FRICTIONLESS_CHALLENGE` - Your customer needs to be redirected to the frictionless 3d secure challenge page provided by the bank. The **redirectUrl** will point to the frictionless 3d secure challenge page provided by the bank. - `CHALLENGE` - Your customer needs to be redirected to the 3d secure challenge page provided by the bank. The **redirectUrl** will point to the 3d secure challenge page provided by the bank. - `COMPLETE` - The payment is completed. The **redirectUrl** will be the **completeUrl** if it was provided when the payment was created. - `BIZUM_CHALLENGE` - Your customer will be redirected to the Bizum hosted payment page. . [optional] # noqa: E501 must_redirect (bool): If `true` you have to redirect your customer to the **redirectUrl** to continue payment process. . [optional] # noqa: E501 redirect_url (str): Redirect your customer to this url to continue payment process. . [optional] # noqa: E501 """ diff --git a/Monei/model/payment_payment_method.py b/Monei/model/payment_payment_method.py index 52ffe34..21d8fcd 100644 --- a/Monei/model/payment_payment_method.py +++ b/Monei/model/payment_payment_method.py @@ -1,9 +1,9 @@ """ MONEI API v1 -

The MONEI API is organized around REST. Our API has predictable resource-oriented URLs, accepts JSON-encoded request bodies, returns JSON-encoded responses, and uses standard HTTP response codes, authentication, and verbs.

Base URL:

https://api.monei.com/v1

Client libraries:

Important:

If you are not using our official SDKs, you need to provide a valid User-Agent header in each request, otherwise your requests will be rejected.

# noqa: E501 +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - The version of the OpenAPI document: 1.2.2 + The version of the OpenAPI document: 1.5.0 Generated by: https://openapi-generator.tech """ @@ -33,11 +33,19 @@ def lazy_import(): from Monei.model.payment_payment_method_bizum import PaymentPaymentMethodBizum from Monei.model.payment_payment_method_card import PaymentPaymentMethodCard from Monei.model.payment_payment_method_cofidis import PaymentPaymentMethodCofidis + from Monei.model.payment_payment_method_klarna import PaymentPaymentMethodKlarna + from Monei.model.payment_payment_method_mbway import PaymentPaymentMethodMbway from Monei.model.payment_payment_method_paypal import PaymentPaymentMethodPaypal + from Monei.model.payment_payment_method_sepa import PaymentPaymentMethodSepa + from Monei.model.payment_payment_method_trustly import PaymentPaymentMethodTrustly globals()['PaymentPaymentMethodBizum'] = PaymentPaymentMethodBizum globals()['PaymentPaymentMethodCard'] = PaymentPaymentMethodCard globals()['PaymentPaymentMethodCofidis'] = PaymentPaymentMethodCofidis + globals()['PaymentPaymentMethodKlarna'] = PaymentPaymentMethodKlarna + globals()['PaymentPaymentMethodMbway'] = PaymentPaymentMethodMbway globals()['PaymentPaymentMethodPaypal'] = PaymentPaymentMethodPaypal + globals()['PaymentPaymentMethodSepa'] = PaymentPaymentMethodSepa + globals()['PaymentPaymentMethodTrustly'] = PaymentPaymentMethodTrustly class PaymentPaymentMethod(ModelNormal): @@ -66,13 +74,23 @@ class PaymentPaymentMethod(ModelNormal): allowed_values = { ('method',): { + 'ALIPAY': "alipay", 'CARD': "card", 'BIZUM': "bizum", - 'GOOGLEPAY': "googlePay", - 'APPLEPAY': "applePay", - 'CLICKTOPAY': "clickToPay", 'PAYPAL': "paypal", 'COFIDIS': "cofidis", + 'COFIDISLOAN': "cofidisLoan", + 'MBWAY': "mbway", + 'MULTIBANCO': "multibanco", + 'IDEAL': "iDeal", + 'BANCONTACT': "bancontact", + 'SOFORT': "sofort", + 'TRUSTLY': "trustly", + 'SEPA': "sepa", + 'KLARNA': "klarna", + 'GIROPAY': "giropay", + 'EPS': "eps", + 'BLIK': "blik", }, } @@ -107,6 +125,11 @@ def openapi_types(): 'bizum': (PaymentPaymentMethodBizum,), # noqa: E501 'paypal': (PaymentPaymentMethodPaypal,), # noqa: E501 'cofidis': (PaymentPaymentMethodCofidis,), # noqa: E501 + 'cofidis_loan': (PaymentPaymentMethodCofidis,), # noqa: E501 + 'mbway': (PaymentPaymentMethodMbway,), # noqa: E501 + 'trustly': (PaymentPaymentMethodTrustly,), # noqa: E501 + 'sepa': (PaymentPaymentMethodSepa,), # noqa: E501 + 'klarna': (PaymentPaymentMethodKlarna,), # noqa: E501 } @cached_property @@ -120,6 +143,11 @@ def discriminator(): 'bizum': 'bizum', # noqa: E501 'paypal': 'paypal', # noqa: E501 'cofidis': 'cofidis', # noqa: E501 + 'cofidis_loan': 'cofidisLoan', # noqa: E501 + 'mbway': 'mbway', # noqa: E501 + 'trustly': 'trustly', # noqa: E501 + 'sepa': 'sepa', # noqa: E501 + 'klarna': 'klarna', # noqa: E501 } read_only_vars = { @@ -168,6 +196,11 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 bizum (PaymentPaymentMethodBizum): [optional] # noqa: E501 paypal (PaymentPaymentMethodPaypal): [optional] # noqa: E501 cofidis (PaymentPaymentMethodCofidis): [optional] # noqa: E501 + cofidis_loan (PaymentPaymentMethodCofidis): [optional] # noqa: E501 + mbway (PaymentPaymentMethodMbway): [optional] # noqa: E501 + trustly (PaymentPaymentMethodTrustly): [optional] # noqa: E501 + sepa (PaymentPaymentMethodSepa): [optional] # noqa: E501 + klarna (PaymentPaymentMethodKlarna): [optional] # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) @@ -258,6 +291,11 @@ def __init__(self, *args, **kwargs): # noqa: E501 bizum (PaymentPaymentMethodBizum): [optional] # noqa: E501 paypal (PaymentPaymentMethodPaypal): [optional] # noqa: E501 cofidis (PaymentPaymentMethodCofidis): [optional] # noqa: E501 + cofidis_loan (PaymentPaymentMethodCofidis): [optional] # noqa: E501 + mbway (PaymentPaymentMethodMbway): [optional] # noqa: E501 + trustly (PaymentPaymentMethodTrustly): [optional] # noqa: E501 + sepa (PaymentPaymentMethodSepa): [optional] # noqa: E501 + klarna (PaymentPaymentMethodKlarna): [optional] # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) diff --git a/Monei/model/payment_payment_method_bizum.py b/Monei/model/payment_payment_method_bizum.py index 496a778..60e3bc6 100644 --- a/Monei/model/payment_payment_method_bizum.py +++ b/Monei/model/payment_payment_method_bizum.py @@ -1,9 +1,9 @@ """ MONEI API v1 -

The MONEI API is organized around REST. Our API has predictable resource-oriented URLs, accepts JSON-encoded request bodies, returns JSON-encoded responses, and uses standard HTTP response codes, authentication, and verbs.

Base URL:

https://api.monei.com/v1

Client libraries:

Important:

If you are not using our official SDKs, you need to provide a valid User-Agent header in each request, otherwise your requests will be rejected.

# noqa: E501 +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - The version of the OpenAPI document: 1.2.2 + The version of the OpenAPI document: 1.5.0 Generated by: https://openapi-generator.tech """ @@ -134,7 +134,7 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 Animal class but this time we won't travel through its discriminator because we passed in _visited_composed_classes = (Animal,) - phone_number (str): The phone number used to pay with `bizum`.. [optional] # noqa: E501 + phone_number (str): Phone number in E.164 format used to pay with `bizum`.. [optional] # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) @@ -220,7 +220,7 @@ def __init__(self, *args, **kwargs): # noqa: E501 Animal class but this time we won't travel through its discriminator because we passed in _visited_composed_classes = (Animal,) - phone_number (str): The phone number used to pay with `bizum`.. [optional] # noqa: E501 + phone_number (str): Phone number in E.164 format used to pay with `bizum`.. [optional] # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) diff --git a/Monei/model/payment_payment_method_bizum_input.py b/Monei/model/payment_payment_method_bizum_input.py new file mode 100644 index 0000000..2289252 --- /dev/null +++ b/Monei/model/payment_payment_method_bizum_input.py @@ -0,0 +1,263 @@ +""" + MONEI API v1 + +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 + + The version of the OpenAPI document: 1.5.0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from Monei.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from Monei.exceptions import ApiAttributeError + + + +class PaymentPaymentMethodBizumInput(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'phone_number': (str,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'phone_number': 'phoneNumber', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """PaymentPaymentMethodBizumInput - 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 + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + phone_number (str): Phone number in E.164 format used to pay with `bizum`.. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """PaymentPaymentMethodBizumInput - 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 + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + phone_number (str): Phone number in E.164 format used to pay with `bizum`.. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/Monei/model/payment_payment_method_card.py b/Monei/model/payment_payment_method_card.py index e1afc27..8c85af9 100644 --- a/Monei/model/payment_payment_method_card.py +++ b/Monei/model/payment_payment_method_card.py @@ -1,9 +1,9 @@ """ MONEI API v1 -

The MONEI API is organized around REST. Our API has predictable resource-oriented URLs, accepts JSON-encoded request bodies, returns JSON-encoded responses, and uses standard HTTP response codes, authentication, and verbs.

Base URL:

https://api.monei.com/v1

Client libraries:

Important:

If you are not using our official SDKs, you need to provide a valid User-Agent header in each request, otherwise your requests will be rejected.

# noqa: E501 +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - The version of the OpenAPI document: 1.2.2 + The version of the OpenAPI document: 1.5.0 Generated by: https://openapi-generator.tech """ diff --git a/Monei/model/payment_payment_method_card_input.py b/Monei/model/payment_payment_method_card_input.py new file mode 100644 index 0000000..f5cb031 --- /dev/null +++ b/Monei/model/payment_payment_method_card_input.py @@ -0,0 +1,283 @@ +""" + MONEI API v1 + +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 + + The version of the OpenAPI document: 1.5.0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from Monei.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from Monei.exceptions import ApiAttributeError + + + +class PaymentPaymentMethodCardInput(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'number': (str,), # noqa: E501 + 'cvc': (str,), # noqa: E501 + 'exp_month': (str,), # noqa: E501 + 'exp_year': (str,), # noqa: E501 + 'cardholder_name': (str,), # noqa: E501 + 'cardholder_email': (str,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'number': 'number', # noqa: E501 + 'cvc': 'cvc', # noqa: E501 + 'exp_month': 'expMonth', # noqa: E501 + 'exp_year': 'expYear', # noqa: E501 + 'cardholder_name': 'cardholderName', # noqa: E501 + 'cardholder_email': 'cardholderEmail', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """PaymentPaymentMethodCardInput - 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 + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + number (str): The card number, as a string without any separators.. [optional] # noqa: E501 + cvc (str): Card security code.. [optional] # noqa: E501 + exp_month (str): Two-digit number representing the card's expiration month.. [optional] # noqa: E501 + exp_year (str): Two-digit number representing the card's expiration year.. [optional] # noqa: E501 + cardholder_name (str): The cardholder's name, as stated in the credit card.. [optional] # noqa: E501 + cardholder_email (str): The cardholder's email address.. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """PaymentPaymentMethodCardInput - 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 + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + number (str): The card number, as a string without any separators.. [optional] # noqa: E501 + cvc (str): Card security code.. [optional] # noqa: E501 + exp_month (str): Two-digit number representing the card's expiration month.. [optional] # noqa: E501 + exp_year (str): Two-digit number representing the card's expiration year.. [optional] # noqa: E501 + cardholder_name (str): The cardholder's name, as stated in the credit card.. [optional] # noqa: E501 + cardholder_email (str): The cardholder's email address.. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/Monei/model/payment_payment_method_cofidis.py b/Monei/model/payment_payment_method_cofidis.py index 81db820..f26b5ca 100644 --- a/Monei/model/payment_payment_method_cofidis.py +++ b/Monei/model/payment_payment_method_cofidis.py @@ -1,9 +1,9 @@ """ MONEI API v1 -

The MONEI API is organized around REST. Our API has predictable resource-oriented URLs, accepts JSON-encoded request bodies, returns JSON-encoded responses, and uses standard HTTP response codes, authentication, and verbs.

Base URL:

https://api.monei.com/v1

Client libraries:

Important:

If you are not using our official SDKs, you need to provide a valid User-Agent header in each request, otherwise your requests will be rejected.

# noqa: E501 +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - The version of the OpenAPI document: 1.2.2 + The version of the OpenAPI document: 1.5.0 Generated by: https://openapi-generator.tech """ diff --git a/Monei/model/payment_payment_method_input.py b/Monei/model/payment_payment_method_input.py index f8f3acc..41aff59 100644 --- a/Monei/model/payment_payment_method_input.py +++ b/Monei/model/payment_payment_method_input.py @@ -1,9 +1,9 @@ """ MONEI API v1 -

The MONEI API is organized around REST. Our API has predictable resource-oriented URLs, accepts JSON-encoded request bodies, returns JSON-encoded responses, and uses standard HTTP response codes, authentication, and verbs.

Base URL:

https://api.monei.com/v1

Client libraries:

Important:

If you are not using our official SDKs, you need to provide a valid User-Agent header in each request, otherwise your requests will be rejected.

# noqa: E501 +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - The version of the OpenAPI document: 1.2.2 + The version of the OpenAPI document: 1.5.0 Generated by: https://openapi-generator.tech """ @@ -30,8 +30,10 @@ def lazy_import(): - from Monei.model.card import Card - globals()['Card'] = Card + from Monei.model.payment_payment_method_bizum_input import PaymentPaymentMethodBizumInput + from Monei.model.payment_payment_method_card_input import PaymentPaymentMethodCardInput + globals()['PaymentPaymentMethodBizumInput'] = PaymentPaymentMethodBizumInput + globals()['PaymentPaymentMethodCardInput'] = PaymentPaymentMethodCardInput class PaymentPaymentMethodInput(ModelNormal): @@ -87,7 +89,8 @@ def openapi_types(): """ lazy_import() return { - 'card': (Card,), # noqa: E501 + 'card': (PaymentPaymentMethodCardInput,), # noqa: E501 + 'bizum': (PaymentPaymentMethodBizumInput,), # noqa: E501 } @cached_property @@ -97,6 +100,7 @@ def discriminator(): attribute_map = { 'card': 'card', # noqa: E501 + 'bizum': 'bizum', # noqa: E501 } read_only_vars = { @@ -140,7 +144,8 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 Animal class but this time we won't travel through its discriminator because we passed in _visited_composed_classes = (Animal,) - card (Card): [optional] # noqa: E501 + card (PaymentPaymentMethodCardInput): [optional] # noqa: E501 + bizum (PaymentPaymentMethodBizumInput): [optional] # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) @@ -226,7 +231,8 @@ def __init__(self, *args, **kwargs): # noqa: E501 Animal class but this time we won't travel through its discriminator because we passed in _visited_composed_classes = (Animal,) - card (Card): [optional] # noqa: E501 + card (PaymentPaymentMethodCardInput): [optional] # noqa: E501 + bizum (PaymentPaymentMethodBizumInput): [optional] # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) diff --git a/Monei/model/payment_payment_method_klarna.py b/Monei/model/payment_payment_method_klarna.py new file mode 100644 index 0000000..f8def5e --- /dev/null +++ b/Monei/model/payment_payment_method_klarna.py @@ -0,0 +1,285 @@ +""" + MONEI API v1 + +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 + + The version of the OpenAPI document: 1.5.0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from Monei.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from Monei.exceptions import ApiAttributeError + + + +class PaymentPaymentMethodKlarna(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + ('billing_category',): { + 'PAY_LATER': "PAY_LATER", + 'PAY_NOW': "PAY_NOW", + 'SLICE_IT': "SLICE_IT", + 'SLICE_IT_BY_CARD': "SLICE_IT_BY_CARD", + }, + ('auth_payment_method',): { + 'INVOICE': "invoice", + 'FIXED_AMOUNT': "fixed_amount", + 'PIX': "pix", + 'BASE_ACCOUNT': "base_account", + 'DEFERRED_INTEREST': "deferred_interest", + 'DIRECT_DEBIT': "direct_debit", + 'DIRECT_BANK_TRANSFER': "direct_bank_transfer", + 'B2B_INVOICE': "b2b_invoice", + 'CARD': "card", + 'SLICE_IT_BY_CARD': "slice_it_by_card", + }, + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'billing_category': (str,), # noqa: E501 + 'auth_payment_method': (str,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'billing_category': 'billingCategory', # noqa: E501 + 'auth_payment_method': 'authPaymentMethod', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """PaymentPaymentMethodKlarna - 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 + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + billing_category (str): [optional] # noqa: E501 + auth_payment_method (str): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """PaymentPaymentMethodKlarna - 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 + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + billing_category (str): [optional] # noqa: E501 + auth_payment_method (str): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/Monei/model/payment_payment_method_mbway.py b/Monei/model/payment_payment_method_mbway.py new file mode 100644 index 0000000..b534cc5 --- /dev/null +++ b/Monei/model/payment_payment_method_mbway.py @@ -0,0 +1,263 @@ +""" + MONEI API v1 + +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 + + The version of the OpenAPI document: 1.5.0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from Monei.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from Monei.exceptions import ApiAttributeError + + + +class PaymentPaymentMethodMbway(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'phone_number': (str,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'phone_number': 'phoneNumber', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """PaymentPaymentMethodMbway - 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 + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + phone_number (str): Phone number in E.164 format used to pay with `mbway`.. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """PaymentPaymentMethodMbway - 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 + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + phone_number (str): Phone number in E.164 format used to pay with `mbway`.. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/Monei/model/payment_payment_method_paypal.py b/Monei/model/payment_payment_method_paypal.py index 4d508e0..7ed4dab 100644 --- a/Monei/model/payment_payment_method_paypal.py +++ b/Monei/model/payment_payment_method_paypal.py @@ -1,9 +1,9 @@ """ MONEI API v1 -

The MONEI API is organized around REST. Our API has predictable resource-oriented URLs, accepts JSON-encoded request bodies, returns JSON-encoded responses, and uses standard HTTP response codes, authentication, and verbs.

Base URL:

https://api.monei.com/v1

Client libraries:

Important:

If you are not using our official SDKs, you need to provide a valid User-Agent header in each request, otherwise your requests will be rejected.

# noqa: E501 +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - The version of the OpenAPI document: 1.2.2 + The version of the OpenAPI document: 1.5.0 Generated by: https://openapi-generator.tech """ diff --git a/Monei/model/payment_payment_method_sepa.py b/Monei/model/payment_payment_method_sepa.py new file mode 100644 index 0000000..c2a730c --- /dev/null +++ b/Monei/model/payment_payment_method_sepa.py @@ -0,0 +1,295 @@ +""" + MONEI API v1 + +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 + + The version of the OpenAPI document: 1.5.0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from Monei.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from Monei.exceptions import ApiAttributeError + + + +class PaymentPaymentMethodSepa(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'accountholder_address': (str,), # noqa: E501 + 'accountholder_email': (str,), # noqa: E501 + 'accountholder_name': (str,), # noqa: E501 + 'country_code': (str,), # noqa: E501 + 'bank_address': (str,), # noqa: E501 + 'bank_code': (str,), # noqa: E501 + 'bank_name': (str,), # noqa: E501 + 'bic': (str,), # noqa: E501 + 'last4': (str,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'accountholder_address': 'accountholderAddress', # noqa: E501 + 'accountholder_email': 'accountholderEmail', # noqa: E501 + 'accountholder_name': 'accountholderName', # noqa: E501 + 'country_code': 'countryCode', # noqa: E501 + 'bank_address': 'bankAddress', # noqa: E501 + 'bank_code': 'bankCode', # noqa: E501 + 'bank_name': 'bankName', # noqa: E501 + 'bic': 'bic', # noqa: E501 + 'last4': 'last4', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """PaymentPaymentMethodSepa - 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 + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + accountholder_address (str): The address of the account holder.. [optional] # noqa: E501 + accountholder_email (str): The email of the account holder.. [optional] # noqa: E501 + accountholder_name (str): The name of the account holder.. [optional] # noqa: E501 + country_code (str): The country code of the account holder.. [optional] # noqa: E501 + bank_address (str): The address of the bank.. [optional] # noqa: E501 + bank_code (str): The code of the bank.. [optional] # noqa: E501 + bank_name (str): The name of the bank.. [optional] # noqa: E501 + bic (str): The BIC of the bank.. [optional] # noqa: E501 + last4 (str): The last 4 digits of the IBAN.. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """PaymentPaymentMethodSepa - 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 + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + accountholder_address (str): The address of the account holder.. [optional] # noqa: E501 + accountholder_email (str): The email of the account holder.. [optional] # noqa: E501 + accountholder_name (str): The name of the account holder.. [optional] # noqa: E501 + country_code (str): The country code of the account holder.. [optional] # noqa: E501 + bank_address (str): The address of the bank.. [optional] # noqa: E501 + bank_code (str): The code of the bank.. [optional] # noqa: E501 + bank_name (str): The name of the bank.. [optional] # noqa: E501 + bic (str): The BIC of the bank.. [optional] # noqa: E501 + last4 (str): The last 4 digits of the IBAN.. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/Monei/model/payment_payment_method_trustly.py b/Monei/model/payment_payment_method_trustly.py new file mode 100644 index 0000000..fb78ff5 --- /dev/null +++ b/Monei/model/payment_payment_method_trustly.py @@ -0,0 +1,263 @@ +""" + MONEI API v1 + +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 + + The version of the OpenAPI document: 1.5.0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from Monei.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from Monei.exceptions import ApiAttributeError + + + +class PaymentPaymentMethodTrustly(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'customer_id': (str,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'customer_id': 'customerId', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """PaymentPaymentMethodTrustly - 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 + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + customer_id (str): The Trustly's customer ID.. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """PaymentPaymentMethodTrustly - 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 + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + customer_id (str): The Trustly's customer ID.. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/Monei/model/payment_payment_methods.py b/Monei/model/payment_payment_methods.py index d004109..d126669 100644 --- a/Monei/model/payment_payment_methods.py +++ b/Monei/model/payment_payment_methods.py @@ -1,9 +1,9 @@ """ MONEI API v1 -

The MONEI API is organized around REST. Our API has predictable resource-oriented URLs, accepts JSON-encoded request bodies, returns JSON-encoded responses, and uses standard HTTP response codes, authentication, and verbs.

Base URL:

https://api.monei.com/v1

Client libraries:

Important:

If you are not using our official SDKs, you need to provide a valid User-Agent header in each request, otherwise your requests will be rejected.

# noqa: E501 +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - The version of the OpenAPI document: 1.2.2 + The version of the OpenAPI document: 1.5.0 Generated by: https://openapi-generator.tech """ @@ -101,10 +101,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]): An array of allowed payment methods (used in hosted payment page). Must be enabled payment methods. Possible values: - `card` - `bizum` - `paypal` - `cofidis` - `cofidisLoan` - `multibanco` - `iDeal` - `bancontact` - `sofort` - `trustly` - `sepa` - `klarna` - `giropay` . # noqa: E501 + args[0] ([str]): An array of allowed payment methods (used in hosted payment page). Must be enabled payment methods. Possible values: - `alipay` - `card` - `bizum` - `paypal` - `cofidis` - `cofidisLoan` - `mbway` - `multibanco` - `iDeal` - `bancontact` - `sofort` - `trustly` - `sepa` - `klarna` - `giropay` - `eps` - `blik` . # noqa: E501 Keyword Args: - value ([str]): An array of allowed payment methods (used in hosted payment page). Must be enabled payment methods. Possible values: - `card` - `bizum` - `paypal` - `cofidis` - `cofidisLoan` - `multibanco` - `iDeal` - `bancontact` - `sofort` - `trustly` - `sepa` - `klarna` - `giropay` . # noqa: E501 + value ([str]): An array of allowed payment methods (used in hosted payment page). Must be enabled payment methods. Possible values: - `alipay` - `card` - `bizum` - `paypal` - `cofidis` - `cofidisLoan` - `mbway` - `multibanco` - `iDeal` - `bancontact` - `sofort` - `trustly` - `sepa` - `klarna` - `giropay` - `eps` - `blik` . # 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. @@ -195,10 +195,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]): An array of allowed payment methods (used in hosted payment page). Must be enabled payment methods. Possible values: - `card` - `bizum` - `paypal` - `cofidis` - `cofidisLoan` - `multibanco` - `iDeal` - `bancontact` - `sofort` - `trustly` - `sepa` - `klarna` - `giropay` . # noqa: E501 + args[0] ([str]): An array of allowed payment methods (used in hosted payment page). Must be enabled payment methods. Possible values: - `alipay` - `card` - `bizum` - `paypal` - `cofidis` - `cofidisLoan` - `mbway` - `multibanco` - `iDeal` - `bancontact` - `sofort` - `trustly` - `sepa` - `klarna` - `giropay` - `eps` - `blik` . # noqa: E501 Keyword Args: - value ([str]): An array of allowed payment methods (used in hosted payment page). Must be enabled payment methods. Possible values: - `card` - `bizum` - `paypal` - `cofidis` - `cofidisLoan` - `multibanco` - `iDeal` - `bancontact` - `sofort` - `trustly` - `sepa` - `klarna` - `giropay` . # noqa: E501 + value ([str]): An array of allowed payment methods (used in hosted payment page). Must be enabled payment methods. Possible values: - `alipay` - `card` - `bizum` - `paypal` - `cofidis` - `cofidisLoan` - `mbway` - `multibanco` - `iDeal` - `bancontact` - `sofort` - `trustly` - `sepa` - `klarna` - `giropay` - `eps` - `blik` . # 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/Monei/model/payment_refund_reason.py b/Monei/model/payment_refund_reason.py index d1e7ed0..53cce7e 100644 --- a/Monei/model/payment_refund_reason.py +++ b/Monei/model/payment_refund_reason.py @@ -1,9 +1,9 @@ """ MONEI API v1 -

The MONEI API is organized around REST. Our API has predictable resource-oriented URLs, accepts JSON-encoded request bodies, returns JSON-encoded responses, and uses standard HTTP response codes, authentication, and verbs.

Base URL:

https://api.monei.com/v1

Client libraries:

Important:

If you are not using our official SDKs, you need to provide a valid User-Agent header in each request, otherwise your requests will be rejected.

# noqa: E501 +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - The version of the OpenAPI document: 1.2.2 + The version of the OpenAPI document: 1.5.0 Generated by: https://openapi-generator.tech """ diff --git a/Monei/model/payment_sequence.py b/Monei/model/payment_sequence.py index e1c26dc..69cec0a 100644 --- a/Monei/model/payment_sequence.py +++ b/Monei/model/payment_sequence.py @@ -1,9 +1,9 @@ """ MONEI API v1 -

The MONEI API is organized around REST. Our API has predictable resource-oriented URLs, accepts JSON-encoded request bodies, returns JSON-encoded responses, and uses standard HTTP response codes, authentication, and verbs.

Base URL:

https://api.monei.com/v1

Client libraries:

Important:

If you are not using our official SDKs, you need to provide a valid User-Agent header in each request, otherwise your requests will be rejected.

# noqa: E501 +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - The version of the OpenAPI document: 1.2.2 + The version of the OpenAPI document: 1.5.0 Generated by: https://openapi-generator.tech """ diff --git a/Monei/model/payment_sequence_recurring.py b/Monei/model/payment_sequence_recurring.py index bd6f656..8aaa6ad 100644 --- a/Monei/model/payment_sequence_recurring.py +++ b/Monei/model/payment_sequence_recurring.py @@ -1,9 +1,9 @@ """ MONEI API v1 -

The MONEI API is organized around REST. Our API has predictable resource-oriented URLs, accepts JSON-encoded request bodies, returns JSON-encoded responses, and uses standard HTTP response codes, authentication, and verbs.

Base URL:

https://api.monei.com/v1

Client libraries:

Important:

If you are not using our official SDKs, you need to provide a valid User-Agent header in each request, otherwise your requests will be rejected.

# noqa: E501 +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - The version of the OpenAPI document: 1.2.2 + The version of the OpenAPI document: 1.5.0 Generated by: https://openapi-generator.tech """ diff --git a/Monei/model/payment_session_details.py b/Monei/model/payment_session_details.py index 5bf717a..8927444 100644 --- a/Monei/model/payment_session_details.py +++ b/Monei/model/payment_session_details.py @@ -1,9 +1,9 @@ """ MONEI API v1 -

The MONEI API is organized around REST. Our API has predictable resource-oriented URLs, accepts JSON-encoded request bodies, returns JSON-encoded responses, and uses standard HTTP response codes, authentication, and verbs.

Base URL:

https://api.monei.com/v1

Client libraries:

Important:

If you are not using our official SDKs, you need to provide a valid User-Agent header in each request, otherwise your requests will be rejected.

# noqa: E501 +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - The version of the OpenAPI document: 1.2.2 + The version of the OpenAPI document: 1.5.0 Generated by: https://openapi-generator.tech """ diff --git a/Monei/model/payment_shipping_details.py b/Monei/model/payment_shipping_details.py index ae684a2..b2839ce 100644 --- a/Monei/model/payment_shipping_details.py +++ b/Monei/model/payment_shipping_details.py @@ -1,9 +1,9 @@ """ MONEI API v1 -

The MONEI API is organized around REST. Our API has predictable resource-oriented URLs, accepts JSON-encoded request bodies, returns JSON-encoded responses, and uses standard HTTP response codes, authentication, and verbs.

Base URL:

https://api.monei.com/v1

Client libraries:

Important:

If you are not using our official SDKs, you need to provide a valid User-Agent header in each request, otherwise your requests will be rejected.

# noqa: E501 +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - The version of the OpenAPI document: 1.2.2 + The version of the OpenAPI document: 1.5.0 Generated by: https://openapi-generator.tech """ @@ -91,6 +91,7 @@ def openapi_types(): 'email': (str,), # noqa: E501 'phone': (str,), # noqa: E501 'company': (str,), # noqa: E501 + 'tax_id': (str,), # noqa: E501 'address': (Address,), # noqa: E501 } @@ -104,6 +105,7 @@ def discriminator(): 'email': 'email', # noqa: E501 'phone': 'phone', # noqa: E501 'company': 'company', # noqa: E501 + 'tax_id': 'taxId', # noqa: E501 'address': 'address', # noqa: E501 } @@ -148,10 +150,11 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 Animal class but this time we won't travel through its discriminator because we passed in _visited_composed_classes = (Animal,) - name (str): The shipping customer’s full name.. [optional] # noqa: E501 - email (str): The shipping customer’s email address.. [optional] # noqa: E501 - phone (str): The shipping customer’s phone number.. [optional] # noqa: E501 + name (str): The shipping customer's full name.. [optional] # noqa: E501 + email (str): The shipping customer's email address.. [optional] # noqa: E501 + phone (str): The shipping customer's phone number in E.164 format.. [optional] # noqa: E501 company (str): Name of the company where the shipment is going.. [optional] # noqa: E501 + tax_id (str): Company tax ID.. [optional] # noqa: E501 address (Address): [optional] # noqa: E501 """ @@ -238,10 +241,11 @@ def __init__(self, *args, **kwargs): # noqa: E501 Animal class but this time we won't travel through its discriminator because we passed in _visited_composed_classes = (Animal,) - name (str): The shipping customer’s full name.. [optional] # noqa: E501 - email (str): The shipping customer’s email address.. [optional] # noqa: E501 - phone (str): The shipping customer’s phone number.. [optional] # noqa: E501 + name (str): The shipping customer's full name.. [optional] # noqa: E501 + email (str): The shipping customer's email address.. [optional] # noqa: E501 + phone (str): The shipping customer's phone number in E.164 format.. [optional] # noqa: E501 company (str): Name of the company where the shipment is going.. [optional] # noqa: E501 + tax_id (str): Company tax ID.. [optional] # noqa: E501 address (Address): [optional] # noqa: E501 """ diff --git a/Monei/model/payment_shop.py b/Monei/model/payment_shop.py index 07e7333..b30477c 100644 --- a/Monei/model/payment_shop.py +++ b/Monei/model/payment_shop.py @@ -1,9 +1,9 @@ """ MONEI API v1 -

The MONEI API is organized around REST. Our API has predictable resource-oriented URLs, accepts JSON-encoded request bodies, returns JSON-encoded responses, and uses standard HTTP response codes, authentication, and verbs.

Base URL:

https://api.monei.com/v1

Client libraries:

Important:

If you are not using our official SDKs, you need to provide a valid User-Agent header in each request, otherwise your requests will be rejected.

# noqa: E501 +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - The version of the OpenAPI document: 1.2.2 + The version of the OpenAPI document: 1.5.0 Generated by: https://openapi-generator.tech """ diff --git a/Monei/model/payment_status.py b/Monei/model/payment_status.py index 5e9b0fe..a26caea 100644 --- a/Monei/model/payment_status.py +++ b/Monei/model/payment_status.py @@ -1,9 +1,9 @@ """ MONEI API v1 -

The MONEI API is organized around REST. Our API has predictable resource-oriented URLs, accepts JSON-encoded request bodies, returns JSON-encoded responses, and uses standard HTTP response codes, authentication, and verbs.

Base URL:

https://api.monei.com/v1

Client libraries:

Important:

If you are not using our official SDKs, you need to provide a valid User-Agent header in each request, otherwise your requests will be rejected.

# noqa: E501 +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - The version of the OpenAPI document: 1.2.2 + The version of the OpenAPI document: 1.5.0 Generated by: https://openapi-generator.tech """ diff --git a/Monei/model/payment_trace_details.py b/Monei/model/payment_trace_details.py index e8932dd..9cf24c7 100644 --- a/Monei/model/payment_trace_details.py +++ b/Monei/model/payment_trace_details.py @@ -1,9 +1,9 @@ """ MONEI API v1 -

The MONEI API is organized around REST. Our API has predictable resource-oriented URLs, accepts JSON-encoded request bodies, returns JSON-encoded responses, and uses standard HTTP response codes, authentication, and verbs.

Base URL:

https://api.monei.com/v1

Client libraries:

Important:

If you are not using our official SDKs, you need to provide a valid User-Agent header in each request, otherwise your requests will be rejected.

# noqa: E501 +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - The version of the OpenAPI document: 1.2.2 + The version of the OpenAPI document: 1.5.0 Generated by: https://openapi-generator.tech """ diff --git a/Monei/model/payment_transaction_type.py b/Monei/model/payment_transaction_type.py index 96e4e0e..4283806 100644 --- a/Monei/model/payment_transaction_type.py +++ b/Monei/model/payment_transaction_type.py @@ -1,9 +1,9 @@ """ MONEI API v1 -

The MONEI API is organized around REST. Our API has predictable resource-oriented URLs, accepts JSON-encoded request bodies, returns JSON-encoded responses, and uses standard HTTP response codes, authentication, and verbs.

Base URL:

https://api.monei.com/v1

Client libraries:

Important:

If you are not using our official SDKs, you need to provide a valid User-Agent header in each request, otherwise your requests will be rejected.

# noqa: E501 +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - The version of the OpenAPI document: 1.2.2 + The version of the OpenAPI document: 1.5.0 Generated by: https://openapi-generator.tech """ @@ -54,6 +54,8 @@ class PaymentTransactionType(ModelSimple): ('value',): { 'SALE': "SALE", 'AUTH': "AUTH", + 'PAYOUT': "PAYOUT", + 'VERIF': "VERIF", }, } @@ -105,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): Controls when the funds will be captured. - `SALE` - **Default**. MONEI automatically captures funds when the customer authorizes the payment. - `AUTH` - Place a hold on the funds when the customer authorizes the payment, but don’t capture the funds until later. . if omitted defaults to "SALE", must be one of ["SALE", "AUTH", ] # noqa: E501 + args[0] (str): Controls when the funds will be captured. - `SALE` - **Default**. MONEI automatically captures funds when the customer authorizes the payment. - `AUTH` - Place a hold on the funds when the customer authorizes the payment, but don't capture the funds until later. - `PAYOUT` - Send funds to the customer - `VERIF` - Verify the card without placing a hold or capturing funds. . if omitted defaults to "SALE", must be one of ["SALE", "AUTH", "PAYOUT", "VERIF", ] # noqa: E501 Keyword Args: - value (str): Controls when the funds will be captured. - `SALE` - **Default**. MONEI automatically captures funds when the customer authorizes the payment. - `AUTH` - Place a hold on the funds when the customer authorizes the payment, but don’t capture the funds until later. . if omitted defaults to "SALE", must be one of ["SALE", "AUTH", ] # noqa: E501 + value (str): Controls when the funds will be captured. - `SALE` - **Default**. MONEI automatically captures funds when the customer authorizes the payment. - `AUTH` - Place a hold on the funds when the customer authorizes the payment, but don't capture the funds until later. - `PAYOUT` - Send funds to the customer - `VERIF` - Verify the card without placing a hold or capturing funds. . if omitted defaults to "SALE", must be one of ["SALE", "AUTH", "PAYOUT", "VERIF", ] # 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. @@ -195,10 +197,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): Controls when the funds will be captured. - `SALE` - **Default**. MONEI automatically captures funds when the customer authorizes the payment. - `AUTH` - Place a hold on the funds when the customer authorizes the payment, but don’t capture the funds until later. . if omitted defaults to "SALE", must be one of ["SALE", "AUTH", ] # noqa: E501 + args[0] (str): Controls when the funds will be captured. - `SALE` - **Default**. MONEI automatically captures funds when the customer authorizes the payment. - `AUTH` - Place a hold on the funds when the customer authorizes the payment, but don't capture the funds until later. - `PAYOUT` - Send funds to the customer - `VERIF` - Verify the card without placing a hold or capturing funds. . if omitted defaults to "SALE", must be one of ["SALE", "AUTH", "PAYOUT", "VERIF", ] # noqa: E501 Keyword Args: - value (str): Controls when the funds will be captured. - `SALE` - **Default**. MONEI automatically captures funds when the customer authorizes the payment. - `AUTH` - Place a hold on the funds when the customer authorizes the payment, but don’t capture the funds until later. . if omitted defaults to "SALE", must be one of ["SALE", "AUTH", ] # noqa: E501 + value (str): Controls when the funds will be captured. - `SALE` - **Default**. MONEI automatically captures funds when the customer authorizes the payment. - `AUTH` - Place a hold on the funds when the customer authorizes the payment, but don't capture the funds until later. - `PAYOUT` - Send funds to the customer - `VERIF` - Verify the card without placing a hold or capturing funds. . if omitted defaults to "SALE", must be one of ["SALE", "AUTH", "PAYOUT", "VERIF", ] # 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/Monei/model/recurring_payment_request.py b/Monei/model/recurring_payment_request.py index 2e68796..622792a 100644 --- a/Monei/model/recurring_payment_request.py +++ b/Monei/model/recurring_payment_request.py @@ -1,9 +1,9 @@ """ MONEI API v1 -

The MONEI API is organized around REST. Our API has predictable resource-oriented URLs, accepts JSON-encoded request bodies, returns JSON-encoded responses, and uses standard HTTP response codes, authentication, and verbs.

Base URL:

https://api.monei.com/v1

Client libraries:

Important:

If you are not using our official SDKs, you need to provide a valid User-Agent header in each request, otherwise your requests will be rejected.

# noqa: E501 +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - The version of the OpenAPI document: 1.2.2 + The version of the OpenAPI document: 1.5.0 Generated by: https://openapi-generator.tech """ @@ -101,6 +101,7 @@ def openapi_types(): 'billing_details': (PaymentBillingDetails,), # noqa: E501 'shipping_details': (PaymentShippingDetails,), # noqa: E501 'callback_url': (str,), # noqa: E501 + 'metadata': ({str: (bool, date, datetime, dict, float, int, list, str, none_type)},), # noqa: E501 } @cached_property @@ -117,6 +118,7 @@ def discriminator(): 'billing_details': 'billingDetails', # noqa: E501 'shipping_details': 'shippingDetails', # noqa: E501 'callback_url': 'callbackUrl', # noqa: E501 + 'metadata': 'metadata', # noqa: E501 } read_only_vars = { @@ -170,6 +172,7 @@ def _from_openapi_data(cls, order_id, *args, **kwargs): # noqa: E501 billing_details (PaymentBillingDetails): [optional] # noqa: E501 shipping_details (PaymentShippingDetails): [optional] # noqa: E501 callback_url (str): The URL to which a payment result should be sent asynchronously. . [optional] # noqa: E501 + metadata ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}): A set of key-value pairs that you can attach to a resource. This can be useful for storing additional information about the resource in a structured format.. [optional] # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) @@ -266,6 +269,7 @@ def __init__(self, order_id, *args, **kwargs): # noqa: E501 billing_details (PaymentBillingDetails): [optional] # noqa: E501 shipping_details (PaymentShippingDetails): [optional] # noqa: E501 callback_url (str): The URL to which a payment result should be sent asynchronously. . [optional] # noqa: E501 + metadata ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}): A set of key-value pairs that you can attach to a resource. This can be useful for storing additional information about the resource in a structured format.. [optional] # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) diff --git a/Monei/model/refund_payment_request.py b/Monei/model/refund_payment_request.py index 34af7f8..ff8d834 100644 --- a/Monei/model/refund_payment_request.py +++ b/Monei/model/refund_payment_request.py @@ -1,9 +1,9 @@ """ MONEI API v1 -

The MONEI API is organized around REST. Our API has predictable resource-oriented URLs, accepts JSON-encoded request bodies, returns JSON-encoded responses, and uses standard HTTP response codes, authentication, and verbs.

Base URL:

https://api.monei.com/v1

Client libraries:

Important:

If you are not using our official SDKs, you need to provide a valid User-Agent header in each request, otherwise your requests will be rejected.

# noqa: E501 +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - The version of the OpenAPI document: 1.2.2 + The version of the OpenAPI document: 1.5.0 Generated by: https://openapi-generator.tech """ diff --git a/Monei/model/register_apple_pay_domain_request.py b/Monei/model/register_apple_pay_domain_request.py new file mode 100644 index 0000000..2a71170 --- /dev/null +++ b/Monei/model/register_apple_pay_domain_request.py @@ -0,0 +1,269 @@ +""" + MONEI API v1 + +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 + + The version of the OpenAPI document: 1.5.0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from Monei.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from Monei.exceptions import ApiAttributeError + + + +class RegisterApplePayDomainRequest(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'domain_name': (str,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'domain_name': 'domainName', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, domain_name, *args, **kwargs): # noqa: E501 + """RegisterApplePayDomainRequest - a model defined in OpenAPI + + Args: + domain_name (str): The domain name to register for Apple Pay. + + Keyword Args: + _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. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.domain_name = domain_name + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, domain_name, *args, **kwargs): # noqa: E501 + """RegisterApplePayDomainRequest - a model defined in OpenAPI + + Args: + domain_name (str): The domain name to register for Apple Pay. + + Keyword Args: + _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. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.domain_name = domain_name + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/Monei/model/send_payment_link_request.py b/Monei/model/send_payment_link_request.py index a724322..a4ef8dc 100644 --- a/Monei/model/send_payment_link_request.py +++ b/Monei/model/send_payment_link_request.py @@ -1,9 +1,9 @@ """ MONEI API v1 -

The MONEI API is organized around REST. Our API has predictable resource-oriented URLs, accepts JSON-encoded request bodies, returns JSON-encoded responses, and uses standard HTTP response codes, authentication, and verbs.

Base URL:

https://api.monei.com/v1

Client libraries:

Important:

If you are not using our official SDKs, you need to provide a valid User-Agent header in each request, otherwise your requests will be rejected.

# noqa: E501 +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - The version of the OpenAPI document: 1.2.2 + The version of the OpenAPI document: 1.5.0 Generated by: https://openapi-generator.tech """ diff --git a/Monei/model/send_payment_receipt_request.py b/Monei/model/send_payment_receipt_request.py index e6b9866..cd8d6b7 100644 --- a/Monei/model/send_payment_receipt_request.py +++ b/Monei/model/send_payment_receipt_request.py @@ -1,9 +1,9 @@ """ MONEI API v1 -

The MONEI API is organized around REST. Our API has predictable resource-oriented URLs, accepts JSON-encoded request bodies, returns JSON-encoded responses, and uses standard HTTP response codes, authentication, and verbs.

Base URL:

https://api.monei.com/v1

Client libraries:

Important:

If you are not using our official SDKs, you need to provide a valid User-Agent header in each request, otherwise your requests will be rejected.

# noqa: E501 +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - The version of the OpenAPI document: 1.2.2 + The version of the OpenAPI document: 1.5.0 Generated by: https://openapi-generator.tech """ diff --git a/Monei/model/send_payment_request_request.py b/Monei/model/send_payment_request_request.py new file mode 100644 index 0000000..3776237 --- /dev/null +++ b/Monei/model/send_payment_request_request.py @@ -0,0 +1,279 @@ +""" + MONEI API v1 + +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 + + The version of the OpenAPI document: 1.5.0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from Monei.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from Monei.exceptions import ApiAttributeError + + +def lazy_import(): + from Monei.model.payment_message_language import PaymentMessageLanguage + globals()['PaymentMessageLanguage'] = PaymentMessageLanguage + + +class SendPaymentRequestRequest(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'phone_number': (str,), # noqa: E501 + 'language': (PaymentMessageLanguage,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'phone_number': 'phoneNumber', # noqa: E501 + 'language': 'language', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, phone_number, *args, **kwargs): # noqa: E501 + """SendPaymentRequestRequest - a model defined in OpenAPI + + Args: + phone_number (str): Phone number in E.164 format. The customer will receive payment link on this phone number. + + Keyword Args: + _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. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + language (PaymentMessageLanguage): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.phone_number = phone_number + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, phone_number, *args, **kwargs): # noqa: E501 + """SendPaymentRequestRequest - a model defined in OpenAPI + + Args: + phone_number (str): Phone number in E.164 format. The customer will receive payment link on this phone number. + + Keyword Args: + _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. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + language (PaymentMessageLanguage): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.phone_number = phone_number + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/Monei/model/send_subscription_link_request.py b/Monei/model/send_subscription_link_request.py new file mode 100644 index 0000000..21f2b52 --- /dev/null +++ b/Monei/model/send_subscription_link_request.py @@ -0,0 +1,279 @@ +""" + MONEI API v1 + +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 + + The version of the OpenAPI document: 1.5.0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from Monei.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from Monei.exceptions import ApiAttributeError + + + +class SendSubscriptionLinkRequest(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + ('channel',): { + 'EMAIL': "email", + 'SMS': "sms", + }, + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'customer_email': (str,), # noqa: E501 + 'customer_phone': (str,), # noqa: E501 + 'channel': (str,), # noqa: E501 + 'language': (str,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'customer_email': 'customerEmail', # noqa: E501 + 'customer_phone': 'customerPhone', # noqa: E501 + 'channel': 'channel', # noqa: E501 + 'language': 'language', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """SendSubscriptionLinkRequest - 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 + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + customer_email (str): Customer email to send the subscription link to. [optional] # noqa: E501 + customer_phone (str): Customer phone number to send the subscription link to. [optional] # noqa: E501 + channel (str): Channel to use for sending the subscription link. [optional] # noqa: E501 + language (str): Language to use for the subscription link message. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """SendSubscriptionLinkRequest - 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 + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + customer_email (str): Customer email to send the subscription link to. [optional] # noqa: E501 + customer_phone (str): Customer phone number to send the subscription link to. [optional] # noqa: E501 + channel (str): Channel to use for sending the subscription link. [optional] # noqa: E501 + language (str): Language to use for the subscription link message. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/Monei/model/send_subscription_status_request.py b/Monei/model/send_subscription_status_request.py new file mode 100644 index 0000000..cde966d --- /dev/null +++ b/Monei/model/send_subscription_status_request.py @@ -0,0 +1,279 @@ +""" + MONEI API v1 + +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 + + The version of the OpenAPI document: 1.5.0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from Monei.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from Monei.exceptions import ApiAttributeError + + + +class SendSubscriptionStatusRequest(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + ('channel',): { + 'EMAIL': "email", + 'SMS': "sms", + }, + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'customer_email': (str,), # noqa: E501 + 'customer_phone': (str,), # noqa: E501 + 'channel': (str,), # noqa: E501 + 'language': (str,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'customer_email': 'customerEmail', # noqa: E501 + 'customer_phone': 'customerPhone', # noqa: E501 + 'channel': 'channel', # noqa: E501 + 'language': 'language', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """SendSubscriptionStatusRequest - 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 + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + customer_email (str): Customer email to send the subscription status to. [optional] # noqa: E501 + customer_phone (str): Customer phone number to send the subscription status to. [optional] # noqa: E501 + channel (str): Channel to use for sending the subscription status. [optional] # noqa: E501 + language (str): Language to use for the subscription status message. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """SendSubscriptionStatusRequest - 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 + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + customer_email (str): Customer email to send the subscription status to. [optional] # noqa: E501 + customer_phone (str): Customer phone number to send the subscription status to. [optional] # noqa: E501 + channel (str): Channel to use for sending the subscription status. [optional] # noqa: E501 + language (str): Language to use for the subscription status message. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/Monei/model/subscription.py b/Monei/model/subscription.py index e2b3a6c..ebf7595 100644 --- a/Monei/model/subscription.py +++ b/Monei/model/subscription.py @@ -1,9 +1,9 @@ """ MONEI API v1 -

The MONEI API is organized around REST. Our API has predictable resource-oriented URLs, accepts JSON-encoded request bodies, returns JSON-encoded responses, and uses standard HTTP response codes, authentication, and verbs.

Base URL:

https://api.monei.com/v1

Client libraries:

Important:

If you are not using our official SDKs, you need to provide a valid User-Agent header in each request, otherwise your requests will be rejected.

# noqa: E501 +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - The version of the OpenAPI document: 1.2.2 + The version of the OpenAPI document: 1.5.0 Generated by: https://openapi-generator.tech """ @@ -37,6 +37,7 @@ def lazy_import(): from Monei.model.subscription_interval import SubscriptionInterval from Monei.model.subscription_last_payment import SubscriptionLastPayment from Monei.model.subscription_payment_method import SubscriptionPaymentMethod + from Monei.model.subscription_retry_schedule import SubscriptionRetrySchedule from Monei.model.subscription_status import SubscriptionStatus globals()['PaymentBillingDetails'] = PaymentBillingDetails globals()['PaymentCustomer'] = PaymentCustomer @@ -45,6 +46,7 @@ def lazy_import(): globals()['SubscriptionInterval'] = SubscriptionInterval globals()['SubscriptionLastPayment'] = SubscriptionLastPayment globals()['SubscriptionPaymentMethod'] = SubscriptionPaymentMethod + globals()['SubscriptionRetrySchedule'] = SubscriptionRetrySchedule globals()['SubscriptionStatus'] = SubscriptionStatus @@ -122,12 +124,14 @@ def openapi_types(): 'trial_period_end': (float,), # noqa: E501 'next_payment_at': (int,), # noqa: E501 'retry_count': (int,), # noqa: E501 + 'retry_schedule': (SubscriptionRetrySchedule,), # noqa: E501 'cancel_at_period_end': (bool,), # noqa: E501 'pause_at_period_end': (bool,), # noqa: E501 'trace_details': (PaymentTraceDetails,), # noqa: E501 'sequence_id': (str,), # noqa: E501 'callback_url': (str,), # noqa: E501 'payment_callback_url': (str,), # noqa: E501 + 'metadata': ({str: (bool, date, datetime, dict, float, int, list, str, none_type)},), # noqa: E501 'created_at': (int,), # noqa: E501 'updated_at': (int,), # noqa: E501 } @@ -159,12 +163,14 @@ def discriminator(): 'trial_period_end': 'trialPeriodEnd', # noqa: E501 'next_payment_at': 'nextPaymentAt', # noqa: E501 'retry_count': 'retryCount', # noqa: E501 + 'retry_schedule': 'retrySchedule', # noqa: E501 'cancel_at_period_end': 'cancelAtPeriodEnd', # noqa: E501 'pause_at_period_end': 'pauseAtPeriodEnd', # noqa: E501 'trace_details': 'traceDetails', # noqa: E501 'sequence_id': 'sequenceId', # noqa: E501 'callback_url': 'callbackUrl', # noqa: E501 'payment_callback_url': 'paymentCallbackUrl', # noqa: E501 + 'metadata': 'metadata', # noqa: E501 'created_at': 'createdAt', # noqa: E501 'updated_at': 'updatedAt', # noqa: E501 } @@ -231,12 +237,14 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 trial_period_end (float): The end date of the trial period. Measured in seconds since the Unix epoch.. [optional] # noqa: E501 next_payment_at (int): The date when the next payment will be made.. [optional] # noqa: E501 retry_count (int): Number of retries left for the subscription.. [optional] # noqa: E501 + retry_schedule (SubscriptionRetrySchedule): [optional] # noqa: E501 cancel_at_period_end (bool): If true, the subscription will be canceled at the end of the current period. . [optional] # noqa: E501 pause_at_period_end (bool): If true, the subscription will be paused at the end of the current period. . [optional] # noqa: E501 trace_details (PaymentTraceDetails): [optional] # noqa: E501 sequence_id (str): A permanent identifier that refers to the initial payment of a sequence of payments. This value needs to be sent in the path for `RECURRING` payments. . [optional] # noqa: E501 - callback_url (str): The URL will be called each time subscription status changes. . [optional] # noqa: E501 - payment_callback_url (str): The URL will be called each time subscription creates a new payments. . [optional] # noqa: E501 + callback_url (str): The URL will be called each time subscription status changes. You will receive a subscription object in the body of the request. . [optional] # noqa: E501 + payment_callback_url (str): The URL will be called each time subscription creates a new payments. You will receive the payment object in the body of the request. . [optional] # noqa: E501 + metadata ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}): A set of key-value pairs that you can attach to a resource. This can be useful for storing additional information about the resource in a structured format.. [optional] # noqa: E501 created_at (int): Time at which the resource was created. Measured in seconds since the Unix epoch.. [optional] # noqa: E501 updated_at (int): Time at which the resource updated last time. Measured in seconds since the Unix epoch.. [optional] # noqa: E501 """ @@ -345,12 +353,14 @@ def __init__(self, *args, **kwargs): # noqa: E501 trial_period_end (float): The end date of the trial period. Measured in seconds since the Unix epoch.. [optional] # noqa: E501 next_payment_at (int): The date when the next payment will be made.. [optional] # noqa: E501 retry_count (int): Number of retries left for the subscription.. [optional] # noqa: E501 + retry_schedule (SubscriptionRetrySchedule): [optional] # noqa: E501 cancel_at_period_end (bool): If true, the subscription will be canceled at the end of the current period. . [optional] # noqa: E501 pause_at_period_end (bool): If true, the subscription will be paused at the end of the current period. . [optional] # noqa: E501 trace_details (PaymentTraceDetails): [optional] # noqa: E501 sequence_id (str): A permanent identifier that refers to the initial payment of a sequence of payments. This value needs to be sent in the path for `RECURRING` payments. . [optional] # noqa: E501 - callback_url (str): The URL will be called each time subscription status changes. . [optional] # noqa: E501 - payment_callback_url (str): The URL will be called each time subscription creates a new payments. . [optional] # noqa: E501 + callback_url (str): The URL will be called each time subscription status changes. You will receive a subscription object in the body of the request. . [optional] # noqa: E501 + payment_callback_url (str): The URL will be called each time subscription creates a new payments. You will receive the payment object in the body of the request. . [optional] # noqa: E501 + metadata ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}): A set of key-value pairs that you can attach to a resource. This can be useful for storing additional information about the resource in a structured format.. [optional] # noqa: E501 created_at (int): Time at which the resource was created. Measured in seconds since the Unix epoch.. [optional] # noqa: E501 updated_at (int): Time at which the resource updated last time. Measured in seconds since the Unix epoch.. [optional] # noqa: E501 """ diff --git a/Monei/model/subscription_interval.py b/Monei/model/subscription_interval.py index d450f10..c1448d5 100644 --- a/Monei/model/subscription_interval.py +++ b/Monei/model/subscription_interval.py @@ -1,9 +1,9 @@ """ MONEI API v1 -

The MONEI API is organized around REST. Our API has predictable resource-oriented URLs, accepts JSON-encoded request bodies, returns JSON-encoded responses, and uses standard HTTP response codes, authentication, and verbs.

Base URL:

https://api.monei.com/v1

Client libraries:

Important:

If you are not using our official SDKs, you need to provide a valid User-Agent header in each request, otherwise your requests will be rejected.

# noqa: E501 +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - The version of the OpenAPI document: 1.2.2 + The version of the OpenAPI document: 1.5.0 Generated by: https://openapi-generator.tech """ diff --git a/Monei/model/subscription_last_payment.py b/Monei/model/subscription_last_payment.py index 0ece264..bba56ca 100644 --- a/Monei/model/subscription_last_payment.py +++ b/Monei/model/subscription_last_payment.py @@ -1,9 +1,9 @@ """ MONEI API v1 -

The MONEI API is organized around REST. Our API has predictable resource-oriented URLs, accepts JSON-encoded request bodies, returns JSON-encoded responses, and uses standard HTTP response codes, authentication, and verbs.

Base URL:

https://api.monei.com/v1

Client libraries:

Important:

If you are not using our official SDKs, you need to provide a valid User-Agent header in each request, otherwise your requests will be rejected.

# noqa: E501 +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - The version of the OpenAPI document: 1.2.2 + The version of the OpenAPI document: 1.5.0 Generated by: https://openapi-generator.tech """ diff --git a/Monei/model/subscription_payment_method.py b/Monei/model/subscription_payment_method.py index 7c42979..28739b6 100644 --- a/Monei/model/subscription_payment_method.py +++ b/Monei/model/subscription_payment_method.py @@ -1,9 +1,9 @@ """ MONEI API v1 -

The MONEI API is organized around REST. Our API has predictable resource-oriented URLs, accepts JSON-encoded request bodies, returns JSON-encoded responses, and uses standard HTTP response codes, authentication, and verbs.

Base URL:

https://api.monei.com/v1

Client libraries:

Important:

If you are not using our official SDKs, you need to provide a valid User-Agent header in each request, otherwise your requests will be rejected.

# noqa: E501 +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - The version of the OpenAPI document: 1.2.2 + The version of the OpenAPI document: 1.5.0 Generated by: https://openapi-generator.tech """ diff --git a/Monei/model/subscription_payment_method_card.py b/Monei/model/subscription_payment_method_card.py index cf50c58..1ab685e 100644 --- a/Monei/model/subscription_payment_method_card.py +++ b/Monei/model/subscription_payment_method_card.py @@ -1,9 +1,9 @@ """ MONEI API v1 -

The MONEI API is organized around REST. Our API has predictable resource-oriented URLs, accepts JSON-encoded request bodies, returns JSON-encoded responses, and uses standard HTTP response codes, authentication, and verbs.

Base URL:

https://api.monei.com/v1

Client libraries:

Important:

If you are not using our official SDKs, you need to provide a valid User-Agent header in each request, otherwise your requests will be rejected.

# noqa: E501 +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - The version of the OpenAPI document: 1.2.2 + The version of the OpenAPI document: 1.5.0 Generated by: https://openapi-generator.tech """ diff --git a/Monei/model/subscription_retry_schedule.py b/Monei/model/subscription_retry_schedule.py new file mode 100644 index 0000000..a9972e6 --- /dev/null +++ b/Monei/model/subscription_retry_schedule.py @@ -0,0 +1,291 @@ +""" + MONEI API v1 + +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 + + The version of the OpenAPI document: 1.5.0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from Monei.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from Monei.exceptions import ApiAttributeError + + +def lazy_import(): + from Monei.model.subscription_retry_schedule_inner import SubscriptionRetryScheduleInner + globals()['SubscriptionRetryScheduleInner'] = SubscriptionRetryScheduleInner + + +class SubscriptionRetrySchedule(ModelSimple): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + additional_properties_type = None + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'value': ([SubscriptionRetryScheduleInner],), + } + + @cached_property + def discriminator(): + return None + + + attribute_map = {} + + read_only_vars = set() + + _composed_schemas = None + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): + """SubscriptionRetrySchedule - a model defined in OpenAPI + + Note that value can be passed either in args or in kwargs, but not in both. + + Args: + args[0] ([SubscriptionRetryScheduleInner]): Defines a custom schedule for retrying failed subscription payments. Each entry in the array specifies how long to wait before attempting the next payment retry. If not specified, the system's default retry schedule will be used. . # noqa: E501 + + Keyword Args: + value ([SubscriptionRetryScheduleInner]): Defines a custom schedule for retrying failed subscription payments. Each entry in the array specifies how long to wait before attempting the next payment retry. If not specified, the system's default retry schedule will be used. . # 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. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + # required up here when default value is not given + _path_to_item = kwargs.pop('_path_to_item', ()) + + if 'value' in kwargs: + value = kwargs.pop('value') + elif args: + args = list(args) + value = args.pop(0) + else: + raise ApiTypeError( + "value is required, but not passed in args or kwargs and doesn't have default", + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + self.value = value + if kwargs: + raise ApiTypeError( + "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( + kwargs, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): + """SubscriptionRetrySchedule - a model defined in OpenAPI + + Note that value can be passed either in args or in kwargs, but not in both. + + Args: + args[0] ([SubscriptionRetryScheduleInner]): Defines a custom schedule for retrying failed subscription payments. Each entry in the array specifies how long to wait before attempting the next payment retry. If not specified, the system's default retry schedule will be used. . # noqa: E501 + + Keyword Args: + value ([SubscriptionRetryScheduleInner]): Defines a custom schedule for retrying failed subscription payments. Each entry in the array specifies how long to wait before attempting the next payment retry. If not specified, the system's default retry schedule will be used. . # 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. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + # required up here when default value is not given + _path_to_item = kwargs.pop('_path_to_item', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if 'value' in kwargs: + value = kwargs.pop('value') + elif args: + args = list(args) + value = args.pop(0) + else: + raise ApiTypeError( + "value is required, but not passed in args or kwargs and doesn't have default", + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + self.value = value + if kwargs: + raise ApiTypeError( + "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( + kwargs, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + return self diff --git a/Monei/model/subscription_retry_schedule_inner.py b/Monei/model/subscription_retry_schedule_inner.py new file mode 100644 index 0000000..aec4473 --- /dev/null +++ b/Monei/model/subscription_retry_schedule_inner.py @@ -0,0 +1,285 @@ +""" + MONEI API v1 + +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 + + The version of the OpenAPI document: 1.5.0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from Monei.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from Monei.exceptions import ApiAttributeError + + + +class SubscriptionRetryScheduleInner(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + ('interval',): { + 'DAY': "day", + 'WEEK': "week", + 'MONTH': "month", + 'YEAR': "year", + }, + } + + validations = { + ('interval_count',): { + 'inclusive_maximum': 31, + 'inclusive_minimum': 1, + }, + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'interval': (str,), # noqa: E501 + 'interval_count': (int,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'interval': 'interval', # noqa: E501 + 'interval_count': 'intervalCount', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, interval, interval_count, *args, **kwargs): # noqa: E501 + """SubscriptionRetryScheduleInner - a model defined in OpenAPI + + Args: + interval (str): The unit of time to wait before the retry attempt. + interval_count (int): The number of intervals to wait before the retry attempt. + + Keyword Args: + _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. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.interval = interval + self.interval_count = interval_count + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, interval, interval_count, *args, **kwargs): # noqa: E501 + """SubscriptionRetryScheduleInner - a model defined in OpenAPI + + Args: + interval (str): The unit of time to wait before the retry attempt. + interval_count (int): The number of intervals to wait before the retry attempt. + + Keyword Args: + _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. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.interval = interval + self.interval_count = interval_count + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/Monei/model/subscription_status.py b/Monei/model/subscription_status.py index a5fc5be..aceb93b 100644 --- a/Monei/model/subscription_status.py +++ b/Monei/model/subscription_status.py @@ -1,9 +1,9 @@ """ MONEI API v1 -

The MONEI API is organized around REST. Our API has predictable resource-oriented URLs, accepts JSON-encoded request bodies, returns JSON-encoded responses, and uses standard HTTP response codes, authentication, and verbs.

Base URL:

https://api.monei.com/v1

Client libraries:

Important:

If you are not using our official SDKs, you need to provide a valid User-Agent header in each request, otherwise your requests will be rejected.

# noqa: E501 +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - The version of the OpenAPI document: 1.2.2 + The version of the OpenAPI document: 1.5.0 Generated by: https://openapi-generator.tech """ diff --git a/Monei/model/update_subscription_request.py b/Monei/model/update_subscription_request.py index 5d7f0ed..77821fc 100644 --- a/Monei/model/update_subscription_request.py +++ b/Monei/model/update_subscription_request.py @@ -1,9 +1,9 @@ """ MONEI API v1 -

The MONEI API is organized around REST. Our API has predictable resource-oriented URLs, accepts JSON-encoded request bodies, returns JSON-encoded responses, and uses standard HTTP response codes, authentication, and verbs.

Base URL:

https://api.monei.com/v1

Client libraries:

Important:

If you are not using our official SDKs, you need to provide a valid User-Agent header in each request, otherwise your requests will be rejected.

# noqa: E501 +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - The version of the OpenAPI document: 1.2.2 + The version of the OpenAPI document: 1.5.0 Generated by: https://openapi-generator.tech """ @@ -34,10 +34,12 @@ def lazy_import(): from Monei.model.payment_customer import PaymentCustomer from Monei.model.payment_shipping_details import PaymentShippingDetails from Monei.model.subscription_interval import SubscriptionInterval + from Monei.model.subscription_retry_schedule import SubscriptionRetrySchedule globals()['PaymentBillingDetails'] = PaymentBillingDetails globals()['PaymentCustomer'] = PaymentCustomer globals()['PaymentShippingDetails'] = PaymentShippingDetails globals()['SubscriptionInterval'] = SubscriptionInterval + globals()['SubscriptionRetrySchedule'] = SubscriptionRetrySchedule class UpdateSubscriptionRequest(ModelNormal): @@ -106,6 +108,8 @@ def openapi_types(): 'pause_at_period_end': (bool,), # noqa: E501 'cancel_at_period_end': (bool,), # noqa: E501 'pause_interval_count': (int,), # noqa: E501 + 'retry_schedule': (SubscriptionRetrySchedule,), # noqa: E501 + 'metadata': ({str: (bool, date, datetime, dict, float, int, list, str, none_type)},), # noqa: E501 } @cached_property @@ -127,6 +131,8 @@ def discriminator(): 'pause_at_period_end': 'pauseAtPeriodEnd', # noqa: E501 'cancel_at_period_end': 'cancelAtPeriodEnd', # noqa: E501 'pause_interval_count': 'pauseIntervalCount', # noqa: E501 + 'retry_schedule': 'retrySchedule', # noqa: E501 + 'metadata': 'metadata', # noqa: E501 } read_only_vars = { @@ -178,11 +184,13 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 billing_details (PaymentBillingDetails): [optional] # noqa: E501 shipping_details (PaymentShippingDetails): [optional] # noqa: E501 trial_period_end (float): The end date of the trial period. Measured in seconds since the Unix epoch.. [optional] # noqa: E501 - callback_url (str): The URL will be called each time subscription status changes. . [optional] # noqa: E501 - payment_callback_url (str): The URL will be called each time subscription creates a new payments. . [optional] # noqa: E501 + callback_url (str): The URL will be called each time subscription status changes. You will receive a subscription object in the body of the request. . [optional] # noqa: E501 + payment_callback_url (str): The URL will be called each time subscription creates a new payments. You will receive the payment object in the body of the request. . [optional] # noqa: E501 pause_at_period_end (bool): If true, the subscription will be paused at the end of the current period. . [optional] # noqa: E501 cancel_at_period_end (bool): If true, the subscription will be canceled at the end of the current period. . [optional] # noqa: E501 pause_interval_count (int): Number of intervals when subscription will be paused before it activates again.. [optional] # noqa: E501 + retry_schedule (SubscriptionRetrySchedule): [optional] # noqa: E501 + metadata ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}): A set of key-value pairs that you can attach to a resource. This can be useful for storing additional information about the resource in a structured format.. [optional] # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) @@ -276,11 +284,13 @@ def __init__(self, *args, **kwargs): # noqa: E501 billing_details (PaymentBillingDetails): [optional] # noqa: E501 shipping_details (PaymentShippingDetails): [optional] # noqa: E501 trial_period_end (float): The end date of the trial period. Measured in seconds since the Unix epoch.. [optional] # noqa: E501 - callback_url (str): The URL will be called each time subscription status changes. . [optional] # noqa: E501 - payment_callback_url (str): The URL will be called each time subscription creates a new payments. . [optional] # noqa: E501 + callback_url (str): The URL will be called each time subscription status changes. You will receive a subscription object in the body of the request. . [optional] # noqa: E501 + payment_callback_url (str): The URL will be called each time subscription creates a new payments. You will receive the payment object in the body of the request. . [optional] # noqa: E501 pause_at_period_end (bool): If true, the subscription will be paused at the end of the current period. . [optional] # noqa: E501 cancel_at_period_end (bool): If true, the subscription will be canceled at the end of the current period. . [optional] # noqa: E501 pause_interval_count (int): Number of intervals when subscription will be paused before it activates again.. [optional] # noqa: E501 + retry_schedule (SubscriptionRetrySchedule): [optional] # noqa: E501 + metadata ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}): A set of key-value pairs that you can attach to a resource. This can be useful for storing additional information about the resource in a structured format.. [optional] # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) diff --git a/Monei/model/validate_bizum_phone_request.py b/Monei/model/validate_bizum_phone_request.py new file mode 100644 index 0000000..94f2bdd --- /dev/null +++ b/Monei/model/validate_bizum_phone_request.py @@ -0,0 +1,279 @@ +""" + MONEI API v1 + +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 + + The version of the OpenAPI document: 1.5.0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from Monei.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from Monei.exceptions import ApiAttributeError + + + +class ValidateBizumPhoneRequest(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'account_id': (str,), # noqa: E501 + 'phone_number': (str,), # noqa: E501 + 'payment_id': (str,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'account_id': 'accountId', # noqa: E501 + 'phone_number': 'phoneNumber', # noqa: E501 + 'payment_id': 'paymentId', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, account_id, phone_number, *args, **kwargs): # noqa: E501 + """ValidateBizumPhoneRequest - a model defined in OpenAPI + + Args: + account_id (str): MONEI Account identifier. + phone_number (str): Phone number in E.164 format. + + Keyword Args: + _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. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + payment_id (str): Unique identifier for the payment.. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.account_id = account_id + self.phone_number = phone_number + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, account_id, phone_number, *args, **kwargs): # noqa: E501 + """ValidateBizumPhoneRequest - a model defined in OpenAPI + + Args: + account_id (str): MONEI Account identifier. + phone_number (str): Phone number in E.164 format. + + Keyword Args: + _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. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + payment_id (str): Unique identifier for the payment.. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.account_id = account_id + self.phone_number = phone_number + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/Monei/model_utils.py b/Monei/model_utils.py index cd57aa0..665fc93 100644 --- a/Monei/model_utils.py +++ b/Monei/model_utils.py @@ -1,9 +1,9 @@ """ MONEI API v1 -

The MONEI API is organized around REST. Our API has predictable resource-oriented URLs, accepts JSON-encoded request bodies, returns JSON-encoded responses, and uses standard HTTP response codes, authentication, and verbs.

Base URL:

https://api.monei.com/v1

Client libraries:

Important:

If you are not using our official SDKs, you need to provide a valid User-Agent header in each request, otherwise your requests will be rejected.

# noqa: E501 +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - The version of the OpenAPI document: 1.2.2 + The version of the OpenAPI document: 1.5.0 Generated by: https://openapi-generator.tech """ diff --git a/Monei/models/__init__.py b/Monei/models/__init__.py index 593de70..3e176b8 100644 --- a/Monei/models/__init__.py +++ b/Monei/models/__init__.py @@ -1,73 +1,101 @@ -# coding: utf-8 - # flake8: noqa -""" - MONEI API v1 - -

The MONEI API is organized around REST. Our API has predictable resource-oriented URLs, accepts JSON-encoded request bodies, returns JSON-encoded responses, and uses standard HTTP response codes, authentication, and verbs.

Base URL:

https://api.monei.com/v1

Client libraries:

Important:

If you are not using our official SDKs, you need to provide a valid User-Agent header in each request, otherwise your requests will be rejected.

# noqa: E501 - - The version of the OpenAPI document: 1.4.6 - Generated by: https://openapi-generator.tech -""" - -from __future__ import absolute_import +# import all models into this package +# if you have many models here with many references from one model to another this may +# raise a RecursionError +# to avoid this, import only the models that you directly need like: +# from from Monei.model.pet import Pet +# or import this package, but before doing it, use: +# import sys +# sys.setrecursionlimit(n) -# import models into model package -from Monei.models.activate_subscription_request import ActivateSubscriptionRequest -from Monei.models.address import Address -from Monei.models.cancel_payment_request import CancelPaymentRequest -from Monei.models.cancel_subscription_request import CancelSubscriptionRequest -from Monei.models.capture_payment_request import CapturePaymentRequest -from Monei.models.confirm_payment_request import ConfirmPaymentRequest -from Monei.models.confirm_payment_request_payment_method import ConfirmPaymentRequestPaymentMethod -from Monei.models.confirm_payment_request_payment_method_card import ConfirmPaymentRequestPaymentMethodCard -from Monei.models.create_payment_request import CreatePaymentRequest -from Monei.models.create_subscription_request import CreateSubscriptionRequest -from Monei.models.error import Error -from Monei.models.inline_response200 import InlineResponse200 -from Monei.models.inline_response2001 import InlineResponse2001 -from Monei.models.pause_subscription_request import PauseSubscriptionRequest -from Monei.models.payment import Payment -from Monei.models.payment_billing_details import PaymentBillingDetails -from Monei.models.payment_cancellation_reason import PaymentCancellationReason -from Monei.models.payment_customer import PaymentCustomer -from Monei.models.payment_last_refund_reason import PaymentLastRefundReason -from Monei.models.payment_message_channel import PaymentMessageChannel -from Monei.models.payment_message_language import PaymentMessageLanguage -from Monei.models.payment_next_action import PaymentNextAction -from Monei.models.payment_payment_method import PaymentPaymentMethod -from Monei.models.payment_payment_method_bizum import PaymentPaymentMethodBizum -from Monei.models.payment_payment_method_bizum_input import PaymentPaymentMethodBizumInput -from Monei.models.payment_payment_method_card import PaymentPaymentMethodCard -from Monei.models.payment_payment_method_card_input import PaymentPaymentMethodCardInput -from Monei.models.payment_payment_method_cofidis import PaymentPaymentMethodCofidis -from Monei.models.payment_payment_method_input import PaymentPaymentMethodInput -from Monei.models.payment_payment_method_klarna import PaymentPaymentMethodKlarna -from Monei.models.payment_payment_method_mbway import PaymentPaymentMethodMbway -from Monei.models.payment_payment_method_paypal import PaymentPaymentMethodPaypal -from Monei.models.payment_payment_method_sepa import PaymentPaymentMethodSepa -from Monei.models.payment_payment_method_trustly import PaymentPaymentMethodTrustly -from Monei.models.payment_refund_reason import PaymentRefundReason -from Monei.models.payment_sequence import PaymentSequence -from Monei.models.payment_sequence_recurring import PaymentSequenceRecurring -from Monei.models.payment_session_details import PaymentSessionDetails -from Monei.models.payment_shipping_details import PaymentShippingDetails -from Monei.models.payment_shop import PaymentShop -from Monei.models.payment_status import PaymentStatus -from Monei.models.payment_trace_details import PaymentTraceDetails -from Monei.models.payment_transaction_type import PaymentTransactionType -from Monei.models.recurring_payment_request import RecurringPaymentRequest -from Monei.models.refund_payment_request import RefundPaymentRequest -from Monei.models.register_domain_request import RegisterDomainRequest -from Monei.models.send_payment_link_request import SendPaymentLinkRequest -from Monei.models.send_payment_receipt_request import SendPaymentReceiptRequest -from Monei.models.send_payment_request import SendPaymentRequest -from Monei.models.subscription import Subscription -from Monei.models.subscription_interval import SubscriptionInterval -from Monei.models.subscription_last_payment import SubscriptionLastPayment -from Monei.models.subscription_payment_method import SubscriptionPaymentMethod -from Monei.models.subscription_payment_method_card import SubscriptionPaymentMethodCard -from Monei.models.subscription_status import SubscriptionStatus -from Monei.models.update_subscription_request import UpdateSubscriptionRequest -from Monei.models.validate_bizum_phone_request import ValidateBizumPhoneRequest +from Monei.model.activate_subscription_request import ActivateSubscriptionRequest +from Monei.model.address import Address +from Monei.model.apple_pay_domain_register200_response import ApplePayDomainRegister200Response +from Monei.model.apple_pay_domain_register400_response import ApplePayDomainRegister400Response +from Monei.model.apple_pay_domain_register401_response import ApplePayDomainRegister401Response +from Monei.model.apple_pay_domain_register404_response import ApplePayDomainRegister404Response +from Monei.model.apple_pay_domain_register422_response import ApplePayDomainRegister422Response +from Monei.model.apple_pay_domain_register500_response import ApplePayDomainRegister500Response +from Monei.model.apple_pay_domain_register503_response import ApplePayDomainRegister503Response +from Monei.model.bizum_validate_phone200_response import BizumValidatePhone200Response +from Monei.model.cancel_payment_request import CancelPaymentRequest +from Monei.model.cancel_subscription_request import CancelSubscriptionRequest +from Monei.model.capture_payment_request import CapturePaymentRequest +from Monei.model.confirm_payment_request import ConfirmPaymentRequest +from Monei.model.confirm_payment_request_payment_method import ConfirmPaymentRequestPaymentMethod +from Monei.model.confirm_payment_request_payment_method_card import ConfirmPaymentRequestPaymentMethodCard +from Monei.model.create_payment_request import CreatePaymentRequest +from Monei.model.create_subscription_request import CreateSubscriptionRequest +from Monei.model.error import Error +from Monei.model.pause_subscription_request import PauseSubscriptionRequest +from Monei.model.payment import Payment +from Monei.model.payment_billing_details import PaymentBillingDetails +from Monei.model.payment_cancellation_reason import PaymentCancellationReason +from Monei.model.payment_customer import PaymentCustomer +from Monei.model.payment_last_refund_reason import PaymentLastRefundReason +from Monei.model.payment_message_channel import PaymentMessageChannel +from Monei.model.payment_message_language import PaymentMessageLanguage +from Monei.model.payment_methods import PaymentMethods +from Monei.model.payment_methods_metadata import PaymentMethodsMetadata +from Monei.model.payment_methods_metadata_alipay import PaymentMethodsMetadataAlipay +from Monei.model.payment_methods_metadata_apple_pay import PaymentMethodsMetadataApplePay +from Monei.model.payment_methods_metadata_bancontact import PaymentMethodsMetadataBancontact +from Monei.model.payment_methods_metadata_bizum import PaymentMethodsMetadataBizum +from Monei.model.payment_methods_metadata_blik import PaymentMethodsMetadataBlik +from Monei.model.payment_methods_metadata_card import PaymentMethodsMetadataCard +from Monei.model.payment_methods_metadata_click_to_pay import PaymentMethodsMetadataClickToPay +from Monei.model.payment_methods_metadata_click_to_pay_discover import PaymentMethodsMetadataClickToPayDiscover +from Monei.model.payment_methods_metadata_click_to_pay_mastercard import PaymentMethodsMetadataClickToPayMastercard +from Monei.model.payment_methods_metadata_click_to_pay_visa import PaymentMethodsMetadataClickToPayVisa +from Monei.model.payment_methods_metadata_eps import PaymentMethodsMetadataEps +from Monei.model.payment_methods_metadata_giropay import PaymentMethodsMetadataGiropay +from Monei.model.payment_methods_metadata_google_pay import PaymentMethodsMetadataGooglePay +from Monei.model.payment_methods_metadata_i_deal import PaymentMethodsMetadataIDeal +from Monei.model.payment_methods_metadata_klarna import PaymentMethodsMetadataKlarna +from Monei.model.payment_methods_metadata_mbway import PaymentMethodsMetadataMbway +from Monei.model.payment_methods_metadata_sepa import PaymentMethodsMetadataSepa +from Monei.model.payment_methods_metadata_sofort import PaymentMethodsMetadataSofort +from Monei.model.payment_methods_metadata_trustly import PaymentMethodsMetadataTrustly +from Monei.model.payment_methods_methods import PaymentMethodsMethods +from Monei.model.payment_next_action import PaymentNextAction +from Monei.model.payment_payment_method import PaymentPaymentMethod +from Monei.model.payment_payment_method_bizum import PaymentPaymentMethodBizum +from Monei.model.payment_payment_method_bizum_input import PaymentPaymentMethodBizumInput +from Monei.model.payment_payment_method_card import PaymentPaymentMethodCard +from Monei.model.payment_payment_method_card_input import PaymentPaymentMethodCardInput +from Monei.model.payment_payment_method_cofidis import PaymentPaymentMethodCofidis +from Monei.model.payment_payment_method_input import PaymentPaymentMethodInput +from Monei.model.payment_payment_method_klarna import PaymentPaymentMethodKlarna +from Monei.model.payment_payment_method_mbway import PaymentPaymentMethodMbway +from Monei.model.payment_payment_method_paypal import PaymentPaymentMethodPaypal +from Monei.model.payment_payment_method_sepa import PaymentPaymentMethodSepa +from Monei.model.payment_payment_method_trustly import PaymentPaymentMethodTrustly +from Monei.model.payment_payment_methods import PaymentPaymentMethods +from Monei.model.payment_refund_reason import PaymentRefundReason +from Monei.model.payment_sequence import PaymentSequence +from Monei.model.payment_sequence_recurring import PaymentSequenceRecurring +from Monei.model.payment_session_details import PaymentSessionDetails +from Monei.model.payment_shipping_details import PaymentShippingDetails +from Monei.model.payment_shop import PaymentShop +from Monei.model.payment_status import PaymentStatus +from Monei.model.payment_trace_details import PaymentTraceDetails +from Monei.model.payment_transaction_type import PaymentTransactionType +from Monei.model.recurring_payment_request import RecurringPaymentRequest +from Monei.model.refund_payment_request import RefundPaymentRequest +from Monei.model.register_apple_pay_domain_request import RegisterApplePayDomainRequest +from Monei.model.send_payment_link_request import SendPaymentLinkRequest +from Monei.model.send_payment_receipt_request import SendPaymentReceiptRequest +from Monei.model.send_payment_request_request import SendPaymentRequestRequest +from Monei.model.send_subscription_link_request import SendSubscriptionLinkRequest +from Monei.model.send_subscription_status_request import SendSubscriptionStatusRequest +from Monei.model.subscription import Subscription +from Monei.model.subscription_interval import SubscriptionInterval +from Monei.model.subscription_last_payment import SubscriptionLastPayment +from Monei.model.subscription_payment_method import SubscriptionPaymentMethod +from Monei.model.subscription_payment_method_card import SubscriptionPaymentMethodCard +from Monei.model.subscription_retry_schedule import SubscriptionRetrySchedule +from Monei.model.subscription_retry_schedule_inner import SubscriptionRetryScheduleInner +from Monei.model.subscription_status import SubscriptionStatus +from Monei.model.update_subscription_request import UpdateSubscriptionRequest +from Monei.model.validate_bizum_phone_request import ValidateBizumPhoneRequest diff --git a/Monei/models/activate_subscription_request.py b/Monei/models/activate_subscription_request.py index 3e2b1d3..b070dc5 100644 --- a/Monei/models/activate_subscription_request.py +++ b/Monei/models/activate_subscription_request.py @@ -3,9 +3,9 @@ """ MONEI API v1 -

The MONEI API is organized around REST. Our API has predictable resource-oriented URLs, accepts JSON-encoded request bodies, returns JSON-encoded responses, and uses standard HTTP response codes, authentication, and verbs.

Base URL:

https://api.monei.com/v1

Client libraries:

Important:

If you are not using our official SDKs, you need to provide a valid User-Agent header in each request, otherwise your requests will be rejected.

# noqa: E501 +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - The version of the OpenAPI document: 1.4.6 + The version of the OpenAPI document: 1.5.0 Generated by: https://openapi-generator.tech """ diff --git a/Monei/models/address.py b/Monei/models/address.py index 5929b0b..df9012a 100644 --- a/Monei/models/address.py +++ b/Monei/models/address.py @@ -3,9 +3,9 @@ """ MONEI API v1 -

The MONEI API is organized around REST. Our API has predictable resource-oriented URLs, accepts JSON-encoded request bodies, returns JSON-encoded responses, and uses standard HTTP response codes, authentication, and verbs.

Base URL:

https://api.monei.com/v1

Client libraries:

Important:

If you are not using our official SDKs, you need to provide a valid User-Agent header in each request, otherwise your requests will be rejected.

# noqa: E501 +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - The version of the OpenAPI document: 1.4.6 + The version of the OpenAPI document: 1.5.0 Generated by: https://openapi-generator.tech """ diff --git a/Monei/models/cancel_payment_request.py b/Monei/models/cancel_payment_request.py index 03dfe8c..97edaae 100644 --- a/Monei/models/cancel_payment_request.py +++ b/Monei/models/cancel_payment_request.py @@ -3,9 +3,9 @@ """ MONEI API v1 -

The MONEI API is organized around REST. Our API has predictable resource-oriented URLs, accepts JSON-encoded request bodies, returns JSON-encoded responses, and uses standard HTTP response codes, authentication, and verbs.

Base URL:

https://api.monei.com/v1

Client libraries:

Important:

If you are not using our official SDKs, you need to provide a valid User-Agent header in each request, otherwise your requests will be rejected.

# noqa: E501 +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - The version of the OpenAPI document: 1.4.6 + The version of the OpenAPI document: 1.5.0 Generated by: https://openapi-generator.tech """ diff --git a/Monei/models/cancel_subscription_request.py b/Monei/models/cancel_subscription_request.py index aee8411..80b6c2e 100644 --- a/Monei/models/cancel_subscription_request.py +++ b/Monei/models/cancel_subscription_request.py @@ -3,9 +3,9 @@ """ MONEI API v1 -

The MONEI API is organized around REST. Our API has predictable resource-oriented URLs, accepts JSON-encoded request bodies, returns JSON-encoded responses, and uses standard HTTP response codes, authentication, and verbs.

Base URL:

https://api.monei.com/v1

Client libraries:

Important:

If you are not using our official SDKs, you need to provide a valid User-Agent header in each request, otherwise your requests will be rejected.

# noqa: E501 +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - The version of the OpenAPI document: 1.4.6 + The version of the OpenAPI document: 1.5.0 Generated by: https://openapi-generator.tech """ diff --git a/Monei/models/capture_payment_request.py b/Monei/models/capture_payment_request.py index b67fcdb..26399fb 100644 --- a/Monei/models/capture_payment_request.py +++ b/Monei/models/capture_payment_request.py @@ -3,9 +3,9 @@ """ MONEI API v1 -

The MONEI API is organized around REST. Our API has predictable resource-oriented URLs, accepts JSON-encoded request bodies, returns JSON-encoded responses, and uses standard HTTP response codes, authentication, and verbs.

Base URL:

https://api.monei.com/v1

Client libraries:

Important:

If you are not using our official SDKs, you need to provide a valid User-Agent header in each request, otherwise your requests will be rejected.

# noqa: E501 +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - The version of the OpenAPI document: 1.4.6 + The version of the OpenAPI document: 1.5.0 Generated by: https://openapi-generator.tech """ diff --git a/Monei/models/confirm_payment_request.py b/Monei/models/confirm_payment_request.py index 0542b54..cbcef4a 100644 --- a/Monei/models/confirm_payment_request.py +++ b/Monei/models/confirm_payment_request.py @@ -3,9 +3,9 @@ """ MONEI API v1 -

The MONEI API is organized around REST. Our API has predictable resource-oriented URLs, accepts JSON-encoded request bodies, returns JSON-encoded responses, and uses standard HTTP response codes, authentication, and verbs.

Base URL:

https://api.monei.com/v1

Client libraries:

Important:

If you are not using our official SDKs, you need to provide a valid User-Agent header in each request, otherwise your requests will be rejected.

# noqa: E501 +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - The version of the OpenAPI document: 1.4.6 + The version of the OpenAPI document: 1.5.0 Generated by: https://openapi-generator.tech """ diff --git a/Monei/models/confirm_payment_request_payment_method.py b/Monei/models/confirm_payment_request_payment_method.py index 55f004b..3434021 100644 --- a/Monei/models/confirm_payment_request_payment_method.py +++ b/Monei/models/confirm_payment_request_payment_method.py @@ -3,9 +3,9 @@ """ MONEI API v1 -

The MONEI API is organized around REST. Our API has predictable resource-oriented URLs, accepts JSON-encoded request bodies, returns JSON-encoded responses, and uses standard HTTP response codes, authentication, and verbs.

Base URL:

https://api.monei.com/v1

Client libraries:

Important:

If you are not using our official SDKs, you need to provide a valid User-Agent header in each request, otherwise your requests will be rejected.

# noqa: E501 +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - The version of the OpenAPI document: 1.4.6 + The version of the OpenAPI document: 1.5.0 Generated by: https://openapi-generator.tech """ diff --git a/Monei/models/confirm_payment_request_payment_method_card.py b/Monei/models/confirm_payment_request_payment_method_card.py index cdd0946..92524f3 100644 --- a/Monei/models/confirm_payment_request_payment_method_card.py +++ b/Monei/models/confirm_payment_request_payment_method_card.py @@ -3,9 +3,9 @@ """ MONEI API v1 -

The MONEI API is organized around REST. Our API has predictable resource-oriented URLs, accepts JSON-encoded request bodies, returns JSON-encoded responses, and uses standard HTTP response codes, authentication, and verbs.

Base URL:

https://api.monei.com/v1

Client libraries:

Important:

If you are not using our official SDKs, you need to provide a valid User-Agent header in each request, otherwise your requests will be rejected.

# noqa: E501 +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - The version of the OpenAPI document: 1.4.6 + The version of the OpenAPI document: 1.5.0 Generated by: https://openapi-generator.tech """ diff --git a/Monei/models/create_payment_request.py b/Monei/models/create_payment_request.py index 5f3b7e7..9fba364 100644 --- a/Monei/models/create_payment_request.py +++ b/Monei/models/create_payment_request.py @@ -3,9 +3,9 @@ """ MONEI API v1 -

The MONEI API is organized around REST. Our API has predictable resource-oriented URLs, accepts JSON-encoded request bodies, returns JSON-encoded responses, and uses standard HTTP response codes, authentication, and verbs.

Base URL:

https://api.monei.com/v1

Client libraries:

Important:

If you are not using our official SDKs, you need to provide a valid User-Agent header in each request, otherwise your requests will be rejected.

# noqa: E501 +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - The version of the OpenAPI document: 1.4.6 + The version of the OpenAPI document: 1.5.0 Generated by: https://openapi-generator.tech """ diff --git a/Monei/models/create_subscription_request.py b/Monei/models/create_subscription_request.py index 5f5bdaf..f882473 100644 --- a/Monei/models/create_subscription_request.py +++ b/Monei/models/create_subscription_request.py @@ -3,9 +3,9 @@ """ MONEI API v1 -

The MONEI API is organized around REST. Our API has predictable resource-oriented URLs, accepts JSON-encoded request bodies, returns JSON-encoded responses, and uses standard HTTP response codes, authentication, and verbs.

Base URL:

https://api.monei.com/v1

Client libraries:

Important:

If you are not using our official SDKs, you need to provide a valid User-Agent header in each request, otherwise your requests will be rejected.

# noqa: E501 +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - The version of the OpenAPI document: 1.4.6 + The version of the OpenAPI document: 1.5.0 Generated by: https://openapi-generator.tech """ @@ -43,6 +43,7 @@ class CreateSubscriptionRequest(object): 'shipping_details': 'PaymentShippingDetails', 'trial_period_end': 'float', 'trial_period_days': 'int', + 'retry_schedule': 'list[object]', 'callback_url': 'str', 'payment_callback_url': 'str', 'metadata': 'object' @@ -59,12 +60,13 @@ class CreateSubscriptionRequest(object): 'shipping_details': 'shippingDetails', 'trial_period_end': 'trialPeriodEnd', 'trial_period_days': 'trialPeriodDays', + 'retry_schedule': 'retrySchedule', 'callback_url': 'callbackUrl', 'payment_callback_url': 'paymentCallbackUrl', 'metadata': 'metadata' } - def __init__(self, amount=None, currency=None, interval=None, interval_count=None, description=None, customer=None, billing_details=None, shipping_details=None, trial_period_end=None, trial_period_days=None, callback_url=None, payment_callback_url=None, metadata=None, local_vars_configuration=None): # noqa: E501 + def __init__(self, amount=None, currency=None, interval=None, interval_count=None, description=None, customer=None, billing_details=None, shipping_details=None, trial_period_end=None, trial_period_days=None, retry_schedule=None, callback_url=None, payment_callback_url=None, metadata=None, local_vars_configuration=None): # noqa: E501 """CreateSubscriptionRequest - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() @@ -80,6 +82,7 @@ def __init__(self, amount=None, currency=None, interval=None, interval_count=Non self._shipping_details = None self._trial_period_end = None self._trial_period_days = None + self._retry_schedule = None self._callback_url = None self._payment_callback_url = None self._metadata = None @@ -102,6 +105,8 @@ def __init__(self, amount=None, currency=None, interval=None, interval_count=Non self.trial_period_end = trial_period_end if trial_period_days is not None: self.trial_period_days = trial_period_days + if retry_schedule is not None: + self.retry_schedule = retry_schedule if callback_url is not None: self.callback_url = callback_url if payment_callback_url is not None: @@ -337,6 +342,29 @@ def trial_period_days(self, trial_period_days): self._trial_period_days = trial_period_days + @property + def retry_schedule(self): + """Gets the retry_schedule of this CreateSubscriptionRequest. # noqa: E501 + + Defines a custom schedule for retrying failed subscription payments. Each entry in the array specifies how long to wait before attempting the next payment retry. If not specified, the system's default retry schedule will be used. # noqa: E501 + + :return: The retry_schedule of this CreateSubscriptionRequest. # noqa: E501 + :rtype: list[object] + """ + return self._retry_schedule + + @retry_schedule.setter + def retry_schedule(self, retry_schedule): + """Sets the retry_schedule of this CreateSubscriptionRequest. + + Defines a custom schedule for retrying failed subscription payments. Each entry in the array specifies how long to wait before attempting the next payment retry. If not specified, the system's default retry schedule will be used. # noqa: E501 + + :param retry_schedule: The retry_schedule of this CreateSubscriptionRequest. # noqa: E501 + :type: list[object] + """ + + self._retry_schedule = retry_schedule + @property def callback_url(self): """Gets the callback_url of this CreateSubscriptionRequest. # noqa: E501 diff --git a/Monei/models/error.py b/Monei/models/error.py index 71d839d..798681d 100644 --- a/Monei/models/error.py +++ b/Monei/models/error.py @@ -3,9 +3,9 @@ """ MONEI API v1 -

The MONEI API is organized around REST. Our API has predictable resource-oriented URLs, accepts JSON-encoded request bodies, returns JSON-encoded responses, and uses standard HTTP response codes, authentication, and verbs.

Base URL:

https://api.monei.com/v1

Client libraries:

Important:

If you are not using our official SDKs, you need to provide a valid User-Agent header in each request, otherwise your requests will be rejected.

# noqa: E501 +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - The version of the OpenAPI document: 1.4.6 + The version of the OpenAPI document: 1.5.0 Generated by: https://openapi-generator.tech """ @@ -33,33 +33,95 @@ class Error(object): and the value is json key in definition. """ openapi_types = { + 'status': 'str', + 'status_code': 'int', 'message': 'str', - 'code': 'int' + 'request_id': 'str', + 'request_time': 'datetime' } attribute_map = { + 'status': 'status', + 'status_code': 'statusCode', 'message': 'message', - 'code': 'code' + 'request_id': 'requestId', + 'request_time': 'requestTime' } - def __init__(self, message=None, code=None, local_vars_configuration=None): # noqa: E501 + def __init__(self, status=None, status_code=None, message=None, request_id=None, request_time=None, local_vars_configuration=None): # noqa: E501 """Error - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() self.local_vars_configuration = local_vars_configuration + self._status = None + self._status_code = None self._message = None - self._code = None + self._request_id = None + self._request_time = None self.discriminator = None + self.status = status + self.status_code = status_code self.message = message - if code is not None: - self.code = code + self.request_id = request_id + self.request_time = request_time + + @property + def status(self): + """Gets the status of this Error. # noqa: E501 + + Error type identifier # noqa: E501 + + :return: The status of this Error. # noqa: E501 + :rtype: str + """ + return self._status + + @status.setter + def status(self, status): + """Sets the status of this Error. + + Error type identifier # noqa: E501 + + :param status: The status of this Error. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and status is None: # noqa: E501 + raise ValueError("Invalid value for `status`, must not be `None`") # noqa: E501 + + self._status = status + + @property + def status_code(self): + """Gets the status_code of this Error. # noqa: E501 + + HTTP status code # noqa: E501 + + :return: The status_code of this Error. # noqa: E501 + :rtype: int + """ + return self._status_code + + @status_code.setter + def status_code(self, status_code): + """Sets the status_code of this Error. + + HTTP status code # noqa: E501 + + :param status_code: The status_code of this Error. # noqa: E501 + :type: int + """ + if self.local_vars_configuration.client_side_validation and status_code is None: # noqa: E501 + raise ValueError("Invalid value for `status_code`, must not be `None`") # noqa: E501 + + self._status_code = status_code @property def message(self): """Gets the message of this Error. # noqa: E501 + Human-readable error message # noqa: E501 :return: The message of this Error. # noqa: E501 :rtype: str @@ -70,6 +132,7 @@ def message(self): def message(self, message): """Sets the message of this Error. + Human-readable error message # noqa: E501 :param message: The message of this Error. # noqa: E501 :type: str @@ -80,25 +143,54 @@ def message(self, message): self._message = message @property - def code(self): - """Gets the code of this Error. # noqa: E501 + def request_id(self): + """Gets the request_id of this Error. # noqa: E501 + Unique identifier for the request # noqa: E501 - :return: The code of this Error. # noqa: E501 - :rtype: int + :return: The request_id of this Error. # noqa: E501 + :rtype: str """ - return self._code + return self._request_id - @code.setter - def code(self, code): - """Sets the code of this Error. + @request_id.setter + def request_id(self, request_id): + """Sets the request_id of this Error. + Unique identifier for the request # noqa: E501 - :param code: The code of this Error. # noqa: E501 - :type: int + :param request_id: The request_id of this Error. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and request_id is None: # noqa: E501 + raise ValueError("Invalid value for `request_id`, must not be `None`") # noqa: E501 + + self._request_id = request_id + + @property + def request_time(self): + """Gets the request_time of this Error. # noqa: E501 + + Timestamp when the request was processed # noqa: E501 + + :return: The request_time of this Error. # noqa: E501 + :rtype: datetime + """ + return self._request_time + + @request_time.setter + def request_time(self, request_time): + """Sets the request_time of this Error. + + Timestamp when the request was processed # noqa: E501 + + :param request_time: The request_time of this Error. # noqa: E501 + :type: datetime """ + if self.local_vars_configuration.client_side_validation and request_time is None: # noqa: E501 + raise ValueError("Invalid value for `request_time`, must not be `None`") # noqa: E501 - self._code = code + self._request_time = request_time def to_dict(self): """Returns the model properties as a dict""" diff --git a/Monei/models/inline_response200.py b/Monei/models/inline_response200.py index 9011793..1997f22 100644 --- a/Monei/models/inline_response200.py +++ b/Monei/models/inline_response200.py @@ -3,9 +3,9 @@ """ MONEI API v1 -

The MONEI API is organized around REST. Our API has predictable resource-oriented URLs, accepts JSON-encoded request bodies, returns JSON-encoded responses, and uses standard HTTP response codes, authentication, and verbs.

Base URL:

https://api.monei.com/v1

Client libraries:

Important:

If you are not using our official SDKs, you need to provide a valid User-Agent header in each request, otherwise your requests will be rejected.

# noqa: E501 +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - The version of the OpenAPI document: 1.4.6 + The version of the OpenAPI document: 1.5.0 Generated by: https://openapi-generator.tech """ diff --git a/Monei/models/inline_response2001.py b/Monei/models/inline_response2001.py index ee5fa2c..8a5cf6d 100644 --- a/Monei/models/inline_response2001.py +++ b/Monei/models/inline_response2001.py @@ -3,9 +3,9 @@ """ MONEI API v1 -

The MONEI API is organized around REST. Our API has predictable resource-oriented URLs, accepts JSON-encoded request bodies, returns JSON-encoded responses, and uses standard HTTP response codes, authentication, and verbs.

Base URL:

https://api.monei.com/v1

Client libraries:

Important:

If you are not using our official SDKs, you need to provide a valid User-Agent header in each request, otherwise your requests will be rejected.

# noqa: E501 +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - The version of the OpenAPI document: 1.4.6 + The version of the OpenAPI document: 1.5.0 Generated by: https://openapi-generator.tech """ diff --git a/Monei/models/pause_subscription_request.py b/Monei/models/pause_subscription_request.py index 04a3bf4..2bb17f9 100644 --- a/Monei/models/pause_subscription_request.py +++ b/Monei/models/pause_subscription_request.py @@ -3,9 +3,9 @@ """ MONEI API v1 -

The MONEI API is organized around REST. Our API has predictable resource-oriented URLs, accepts JSON-encoded request bodies, returns JSON-encoded responses, and uses standard HTTP response codes, authentication, and verbs.

Base URL:

https://api.monei.com/v1

Client libraries:

Important:

If you are not using our official SDKs, you need to provide a valid User-Agent header in each request, otherwise your requests will be rejected.

# noqa: E501 +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - The version of the OpenAPI document: 1.4.6 + The version of the OpenAPI document: 1.5.0 Generated by: https://openapi-generator.tech """ diff --git a/Monei/models/payment.py b/Monei/models/payment.py index c8d3fba..dbe4e57 100644 --- a/Monei/models/payment.py +++ b/Monei/models/payment.py @@ -3,9 +3,9 @@ """ MONEI API v1 -

The MONEI API is organized around REST. Our API has predictable resource-oriented URLs, accepts JSON-encoded request bodies, returns JSON-encoded responses, and uses standard HTTP response codes, authentication, and verbs.

Base URL:

https://api.monei.com/v1

Client libraries:

Important:

If you are not using our official SDKs, you need to provide a valid User-Agent header in each request, otherwise your requests will be rejected.

# noqa: E501 +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - The version of the OpenAPI document: 1.4.6 + The version of the OpenAPI document: 1.5.0 Generated by: https://openapi-generator.tech """ diff --git a/Monei/models/payment_billing_details.py b/Monei/models/payment_billing_details.py index 6f5c0ea..252e23c 100644 --- a/Monei/models/payment_billing_details.py +++ b/Monei/models/payment_billing_details.py @@ -3,9 +3,9 @@ """ MONEI API v1 -

The MONEI API is organized around REST. Our API has predictable resource-oriented URLs, accepts JSON-encoded request bodies, returns JSON-encoded responses, and uses standard HTTP response codes, authentication, and verbs.

Base URL:

https://api.monei.com/v1

Client libraries:

Important:

If you are not using our official SDKs, you need to provide a valid User-Agent header in each request, otherwise your requests will be rejected.

# noqa: E501 +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - The version of the OpenAPI document: 1.4.6 + The version of the OpenAPI document: 1.5.0 Generated by: https://openapi-generator.tech """ @@ -81,7 +81,7 @@ def __init__(self, name=None, email=None, phone=None, company=None, tax_id=None, def name(self): """Gets the name of this PaymentBillingDetails. # noqa: E501 - The customer’s billing full name. # noqa: E501 + The customer's billing full name. # noqa: E501 :return: The name of this PaymentBillingDetails. # noqa: E501 :rtype: str @@ -92,7 +92,7 @@ def name(self): def name(self, name): """Sets the name of this PaymentBillingDetails. - The customer’s billing full name. # noqa: E501 + The customer's billing full name. # noqa: E501 :param name: The name of this PaymentBillingDetails. # noqa: E501 :type: str @@ -104,7 +104,7 @@ def name(self, name): def email(self): """Gets the email of this PaymentBillingDetails. # noqa: E501 - The customer’s billing email address. # noqa: E501 + The customer's billing email address. # noqa: E501 :return: The email of this PaymentBillingDetails. # noqa: E501 :rtype: str @@ -115,7 +115,7 @@ def email(self): def email(self, email): """Sets the email of this PaymentBillingDetails. - The customer’s billing email address. # noqa: E501 + The customer's billing email address. # noqa: E501 :param email: The email of this PaymentBillingDetails. # noqa: E501 :type: str @@ -127,7 +127,7 @@ def email(self, email): def phone(self): """Gets the phone of this PaymentBillingDetails. # noqa: E501 - The customer’s billing phone number. # noqa: E501 + The customer's billing phone number in E.164 format. # noqa: E501 :return: The phone of this PaymentBillingDetails. # noqa: E501 :rtype: str @@ -138,7 +138,7 @@ def phone(self): def phone(self, phone): """Sets the phone of this PaymentBillingDetails. - The customer’s billing phone number. # noqa: E501 + The customer's billing phone number in E.164 format. # noqa: E501 :param phone: The phone of this PaymentBillingDetails. # noqa: E501 :type: str diff --git a/Monei/models/payment_cancellation_reason.py b/Monei/models/payment_cancellation_reason.py index ef044b9..841cef5 100644 --- a/Monei/models/payment_cancellation_reason.py +++ b/Monei/models/payment_cancellation_reason.py @@ -3,9 +3,9 @@ """ MONEI API v1 -

The MONEI API is organized around REST. Our API has predictable resource-oriented URLs, accepts JSON-encoded request bodies, returns JSON-encoded responses, and uses standard HTTP response codes, authentication, and verbs.

Base URL:

https://api.monei.com/v1

Client libraries:

Important:

If you are not using our official SDKs, you need to provide a valid User-Agent header in each request, otherwise your requests will be rejected.

# noqa: E501 +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - The version of the OpenAPI document: 1.4.6 + The version of the OpenAPI document: 1.5.0 Generated by: https://openapi-generator.tech """ diff --git a/Monei/models/payment_customer.py b/Monei/models/payment_customer.py index 062da20..7cc04f6 100644 --- a/Monei/models/payment_customer.py +++ b/Monei/models/payment_customer.py @@ -3,9 +3,9 @@ """ MONEI API v1 -

The MONEI API is organized around REST. Our API has predictable resource-oriented URLs, accepts JSON-encoded request bodies, returns JSON-encoded responses, and uses standard HTTP response codes, authentication, and verbs.

Base URL:

https://api.monei.com/v1

Client libraries:

Important:

If you are not using our official SDKs, you need to provide a valid User-Agent header in each request, otherwise your requests will be rejected.

# noqa: E501 +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - The version of the OpenAPI document: 1.4.6 + The version of the OpenAPI document: 1.5.0 Generated by: https://openapi-generator.tech """ @@ -66,7 +66,7 @@ def __init__(self, email=None, name=None, phone=None, local_vars_configuration=N def email(self): """Gets the email of this PaymentCustomer. # noqa: E501 - The customer’s email address. # noqa: E501 + The customer's email address. # noqa: E501 :return: The email of this PaymentCustomer. # noqa: E501 :rtype: str @@ -77,7 +77,7 @@ def email(self): def email(self, email): """Sets the email of this PaymentCustomer. - The customer’s email address. # noqa: E501 + The customer's email address. # noqa: E501 :param email: The email of this PaymentCustomer. # noqa: E501 :type: str @@ -89,7 +89,7 @@ def email(self, email): def name(self): """Gets the name of this PaymentCustomer. # noqa: E501 - The customer’s full name or business name. # noqa: E501 + The customer's full name or business name. # noqa: E501 :return: The name of this PaymentCustomer. # noqa: E501 :rtype: str @@ -100,7 +100,7 @@ def name(self): def name(self, name): """Sets the name of this PaymentCustomer. - The customer’s full name or business name. # noqa: E501 + The customer's full name or business name. # noqa: E501 :param name: The name of this PaymentCustomer. # noqa: E501 :type: str @@ -112,7 +112,7 @@ def name(self, name): def phone(self): """Gets the phone of this PaymentCustomer. # noqa: E501 - The customer’s phone number. # noqa: E501 + The customer's phone number in E.164 format. # noqa: E501 :return: The phone of this PaymentCustomer. # noqa: E501 :rtype: str @@ -123,7 +123,7 @@ def phone(self): def phone(self, phone): """Sets the phone of this PaymentCustomer. - The customer’s phone number. # noqa: E501 + The customer's phone number in E.164 format. # noqa: E501 :param phone: The phone of this PaymentCustomer. # noqa: E501 :type: str diff --git a/Monei/models/payment_last_refund_reason.py b/Monei/models/payment_last_refund_reason.py index b35ec6e..3908635 100644 --- a/Monei/models/payment_last_refund_reason.py +++ b/Monei/models/payment_last_refund_reason.py @@ -3,9 +3,9 @@ """ MONEI API v1 -

The MONEI API is organized around REST. Our API has predictable resource-oriented URLs, accepts JSON-encoded request bodies, returns JSON-encoded responses, and uses standard HTTP response codes, authentication, and verbs.

Base URL:

https://api.monei.com/v1

Client libraries:

Important:

If you are not using our official SDKs, you need to provide a valid User-Agent header in each request, otherwise your requests will be rejected.

# noqa: E501 +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - The version of the OpenAPI document: 1.4.6 + The version of the OpenAPI document: 1.5.0 Generated by: https://openapi-generator.tech """ diff --git a/Monei/models/payment_message_channel.py b/Monei/models/payment_message_channel.py index 0432d2b..d453a76 100644 --- a/Monei/models/payment_message_channel.py +++ b/Monei/models/payment_message_channel.py @@ -3,9 +3,9 @@ """ MONEI API v1 -

The MONEI API is organized around REST. Our API has predictable resource-oriented URLs, accepts JSON-encoded request bodies, returns JSON-encoded responses, and uses standard HTTP response codes, authentication, and verbs.

Base URL:

https://api.monei.com/v1

Client libraries:

Important:

If you are not using our official SDKs, you need to provide a valid User-Agent header in each request, otherwise your requests will be rejected.

# noqa: E501 +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - The version of the OpenAPI document: 1.4.6 + The version of the OpenAPI document: 1.5.0 Generated by: https://openapi-generator.tech """ diff --git a/Monei/models/payment_message_language.py b/Monei/models/payment_message_language.py index 33ce2a8..4e88999 100644 --- a/Monei/models/payment_message_language.py +++ b/Monei/models/payment_message_language.py @@ -3,9 +3,9 @@ """ MONEI API v1 -

The MONEI API is organized around REST. Our API has predictable resource-oriented URLs, accepts JSON-encoded request bodies, returns JSON-encoded responses, and uses standard HTTP response codes, authentication, and verbs.

Base URL:

https://api.monei.com/v1

Client libraries:

Important:

If you are not using our official SDKs, you need to provide a valid User-Agent header in each request, otherwise your requests will be rejected.

# noqa: E501 +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - The version of the OpenAPI document: 1.4.6 + The version of the OpenAPI document: 1.5.0 Generated by: https://openapi-generator.tech """ diff --git a/Monei/models/payment_methods.py b/Monei/models/payment_methods.py new file mode 100644 index 0000000..24664d4 --- /dev/null +++ b/Monei/models/payment_methods.py @@ -0,0 +1,352 @@ +# coding: utf-8 + +""" + MONEI API v1 + +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 + + The version of the OpenAPI document: 1.5.0 + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from Monei.configuration import Configuration + + +class PaymentMethods(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'livemode': 'bool', + 'payment_methods': 'list[str]', + 'metadata': 'PaymentMethodsMetadata', + 'merchant_name': 'str', + 'merchant_url': 'str', + 'country_code': 'str', + 'account_id': 'str', + 'amount': 'int', + 'currency': 'str' + } + + attribute_map = { + 'livemode': 'livemode', + 'payment_methods': 'paymentMethods', + 'metadata': 'metadata', + 'merchant_name': 'merchantName', + 'merchant_url': 'merchantUrl', + 'country_code': 'countryCode', + 'account_id': 'accountId', + 'amount': 'amount', + 'currency': 'currency' + } + + def __init__(self, livemode=None, payment_methods=None, metadata=None, merchant_name=None, merchant_url=None, country_code=None, account_id=None, amount=None, currency=None, local_vars_configuration=None): # noqa: E501 + """PaymentMethods - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._livemode = None + self._payment_methods = None + self._metadata = None + self._merchant_name = None + self._merchant_url = None + self._country_code = None + self._account_id = None + self._amount = None + self._currency = None + self.discriminator = None + + if livemode is not None: + self.livemode = livemode + if payment_methods is not None: + self.payment_methods = payment_methods + if metadata is not None: + self.metadata = metadata + if merchant_name is not None: + self.merchant_name = merchant_name + if merchant_url is not None: + self.merchant_url = merchant_url + if country_code is not None: + self.country_code = country_code + if account_id is not None: + self.account_id = account_id + if amount is not None: + self.amount = amount + if currency is not None: + self.currency = currency + + @property + def livemode(self): + """Gets the livemode of this PaymentMethods. # noqa: E501 + + Has the value `true` if the resource exists in live mode or the value `false` if the resource exists in test mode. # noqa: E501 + + :return: The livemode of this PaymentMethods. # noqa: E501 + :rtype: bool + """ + return self._livemode + + @livemode.setter + def livemode(self, livemode): + """Sets the livemode of this PaymentMethods. + + Has the value `true` if the resource exists in live mode or the value `false` if the resource exists in test mode. # noqa: E501 + + :param livemode: The livemode of this PaymentMethods. # noqa: E501 + :type: bool + """ + + self._livemode = livemode + + @property + def payment_methods(self): + """Gets the payment_methods of this PaymentMethods. # noqa: E501 + + An array of available payment methods for the account or payment. Possible values include: - `alipay` - Alipay - `applePay` - Apple Pay - `bancontact` - Bancontact - `bizum` - Bizum - `blik` - BLIK - `card` - Credit or debit card - `cardPresent` - Card present (physical POS) - `clickToPay` - Click to Pay - `cofidis` - Cofidis - `cofidisLoan` - Cofidis Loan - `eps` - EPS - `giropay` - Giropay - `googlePay` - Google Pay - `iDeal` - iDEAL - `klarna` - Klarna - `mbway` - MB WAY - `multibanco` - Multibanco - `paypal` - PayPal - `sepa` - SEPA Direct Debit - `sofort` - Sofort - `trustly` - Trustly # noqa: E501 + + :return: The payment_methods of this PaymentMethods. # noqa: E501 + :rtype: list[str] + """ + return self._payment_methods + + @payment_methods.setter + def payment_methods(self, payment_methods): + """Sets the payment_methods of this PaymentMethods. + + An array of available payment methods for the account or payment. Possible values include: - `alipay` - Alipay - `applePay` - Apple Pay - `bancontact` - Bancontact - `bizum` - Bizum - `blik` - BLIK - `card` - Credit or debit card - `cardPresent` - Card present (physical POS) - `clickToPay` - Click to Pay - `cofidis` - Cofidis - `cofidisLoan` - Cofidis Loan - `eps` - EPS - `giropay` - Giropay - `googlePay` - Google Pay - `iDeal` - iDEAL - `klarna` - Klarna - `mbway` - MB WAY - `multibanco` - Multibanco - `paypal` - PayPal - `sepa` - SEPA Direct Debit - `sofort` - Sofort - `trustly` - Trustly # noqa: E501 + + :param payment_methods: The payment_methods of this PaymentMethods. # noqa: E501 + :type: list[str] + """ + allowed_values = ["alipay", "applePay", "bancontact", "bizum", "blik", "card", "cardPresent", "clickToPay", "cofidis", "cofidisLoan", "eps", "giropay", "googlePay", "iDeal", "klarna", "mbway", "multibanco", "paypal", "sepa", "sofort", "trustly"] # noqa: E501 + if (self.local_vars_configuration.client_side_validation and + not set(payment_methods).issubset(set(allowed_values))): # noqa: E501 + raise ValueError( + "Invalid values for `payment_methods` [{0}], must be a subset of [{1}]" # noqa: E501 + .format(", ".join(map(str, set(payment_methods) - set(allowed_values))), # noqa: E501 + ", ".join(map(str, allowed_values))) + ) + + self._payment_methods = payment_methods + + @property + def metadata(self): + """Gets the metadata of this PaymentMethods. # noqa: E501 + + + :return: The metadata of this PaymentMethods. # noqa: E501 + :rtype: PaymentMethodsMetadata + """ + return self._metadata + + @metadata.setter + def metadata(self, metadata): + """Sets the metadata of this PaymentMethods. + + + :param metadata: The metadata of this PaymentMethods. # noqa: E501 + :type: PaymentMethodsMetadata + """ + + self._metadata = metadata + + @property + def merchant_name(self): + """Gets the merchant_name of this PaymentMethods. # noqa: E501 + + The name of the merchant # noqa: E501 + + :return: The merchant_name of this PaymentMethods. # noqa: E501 + :rtype: str + """ + return self._merchant_name + + @merchant_name.setter + def merchant_name(self, merchant_name): + """Sets the merchant_name of this PaymentMethods. + + The name of the merchant # noqa: E501 + + :param merchant_name: The merchant_name of this PaymentMethods. # noqa: E501 + :type: str + """ + + self._merchant_name = merchant_name + + @property + def merchant_url(self): + """Gets the merchant_url of this PaymentMethods. # noqa: E501 + + The URL of the merchant's website # noqa: E501 + + :return: The merchant_url of this PaymentMethods. # noqa: E501 + :rtype: str + """ + return self._merchant_url + + @merchant_url.setter + def merchant_url(self, merchant_url): + """Sets the merchant_url of this PaymentMethods. + + The URL of the merchant's website # noqa: E501 + + :param merchant_url: The merchant_url of this PaymentMethods. # noqa: E501 + :type: str + """ + + self._merchant_url = merchant_url + + @property + def country_code(self): + """Gets the country_code of this PaymentMethods. # noqa: E501 + + Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). # noqa: E501 + + :return: The country_code of this PaymentMethods. # noqa: E501 + :rtype: str + """ + return self._country_code + + @country_code.setter + def country_code(self, country_code): + """Sets the country_code of this PaymentMethods. + + Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). # noqa: E501 + + :param country_code: The country_code of this PaymentMethods. # noqa: E501 + :type: str + """ + + self._country_code = country_code + + @property + def account_id(self): + """Gets the account_id of this PaymentMethods. # noqa: E501 + + MONEI Account identifier. # noqa: E501 + + :return: The account_id of this PaymentMethods. # noqa: E501 + :rtype: str + """ + return self._account_id + + @account_id.setter + def account_id(self, account_id): + """Sets the account_id of this PaymentMethods. + + MONEI Account identifier. # noqa: E501 + + :param account_id: The account_id of this PaymentMethods. # noqa: E501 + :type: str + """ + + self._account_id = account_id + + @property + def amount(self): + """Gets the amount of this PaymentMethods. # noqa: E501 + + The amount of the payment in the smallest currency unit. For example, 10 EUR = 1000 cents. Only present when querying by paymentId. # noqa: E501 + + :return: The amount of this PaymentMethods. # noqa: E501 + :rtype: int + """ + return self._amount + + @amount.setter + def amount(self, amount): + """Sets the amount of this PaymentMethods. + + The amount of the payment in the smallest currency unit. For example, 10 EUR = 1000 cents. Only present when querying by paymentId. # noqa: E501 + + :param amount: The amount of this PaymentMethods. # noqa: E501 + :type: int + """ + + self._amount = amount + + @property + def currency(self): + """Gets the currency of this PaymentMethods. # noqa: E501 + + Three-letter ISO currency code, in uppercase. Only present when querying by paymentId. # noqa: E501 + + :return: The currency of this PaymentMethods. # noqa: E501 + :rtype: str + """ + return self._currency + + @currency.setter + def currency(self, currency): + """Sets the currency of this PaymentMethods. + + Three-letter ISO currency code, in uppercase. Only present when querying by paymentId. # noqa: E501 + + :param currency: The currency of this PaymentMethods. # noqa: E501 + :type: str + """ + + self._currency = currency + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, PaymentMethods): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, PaymentMethods): + return True + + return self.to_dict() != other.to_dict() diff --git a/Monei/models/payment_methods_metadata.py b/Monei/models/payment_methods_metadata.py new file mode 100644 index 0000000..11615f3 --- /dev/null +++ b/Monei/models/payment_methods_metadata.py @@ -0,0 +1,536 @@ +# coding: utf-8 + +""" + MONEI API v1 + +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 + + The version of the OpenAPI document: 1.5.0 + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from Monei.configuration import Configuration + + +class PaymentMethodsMetadata(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'alipay': 'PaymentMethodsMetadataAlipay', + 'bancontact': 'PaymentMethodsMetadataBancontact', + 'bizum': 'PaymentMethodsMetadataBizum', + 'blik': 'PaymentMethodsMetadataBlik', + 'card': 'PaymentMethodsMetadataCard', + 'eps': 'PaymentMethodsMetadataEps', + 'i_deal': 'PaymentMethodsMetadataIDeal', + 'mbway': 'PaymentMethodsMetadataMbway', + 'multibanco': 'PaymentMethodsMetadataMbway', + 'sofort': 'PaymentMethodsMetadataSofort', + 'trustly': 'PaymentMethodsMetadataTrustly', + 'sepa': 'PaymentMethodsMetadataSepa', + 'klarna': 'PaymentMethodsMetadataKlarna', + 'giropay': 'PaymentMethodsMetadataGiropay', + 'google_pay': 'PaymentMethodsMetadataGooglePay', + 'apple_pay': 'PaymentMethodsMetadataApplePay', + 'click_to_pay': 'PaymentMethodsMetadataClickToPay' + } + + attribute_map = { + 'alipay': 'alipay', + 'bancontact': 'bancontact', + 'bizum': 'bizum', + 'blik': 'blik', + 'card': 'card', + 'eps': 'eps', + 'i_deal': 'iDeal', + 'mbway': 'mbway', + 'multibanco': 'multibanco', + 'sofort': 'sofort', + 'trustly': 'trustly', + 'sepa': 'sepa', + 'klarna': 'klarna', + 'giropay': 'giropay', + 'google_pay': 'googlePay', + 'apple_pay': 'applePay', + 'click_to_pay': 'clickToPay' + } + + def __init__(self, alipay=None, bancontact=None, bizum=None, blik=None, card=None, eps=None, i_deal=None, mbway=None, multibanco=None, sofort=None, trustly=None, sepa=None, klarna=None, giropay=None, google_pay=None, apple_pay=None, click_to_pay=None, local_vars_configuration=None): # noqa: E501 + """PaymentMethodsMetadata - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._alipay = None + self._bancontact = None + self._bizum = None + self._blik = None + self._card = None + self._eps = None + self._i_deal = None + self._mbway = None + self._multibanco = None + self._sofort = None + self._trustly = None + self._sepa = None + self._klarna = None + self._giropay = None + self._google_pay = None + self._apple_pay = None + self._click_to_pay = None + self.discriminator = None + + if alipay is not None: + self.alipay = alipay + if bancontact is not None: + self.bancontact = bancontact + if bizum is not None: + self.bizum = bizum + if blik is not None: + self.blik = blik + if card is not None: + self.card = card + if eps is not None: + self.eps = eps + if i_deal is not None: + self.i_deal = i_deal + if mbway is not None: + self.mbway = mbway + if multibanco is not None: + self.multibanco = multibanco + if sofort is not None: + self.sofort = sofort + if trustly is not None: + self.trustly = trustly + if sepa is not None: + self.sepa = sepa + if klarna is not None: + self.klarna = klarna + if giropay is not None: + self.giropay = giropay + if google_pay is not None: + self.google_pay = google_pay + if apple_pay is not None: + self.apple_pay = apple_pay + if click_to_pay is not None: + self.click_to_pay = click_to_pay + + @property + def alipay(self): + """Gets the alipay of this PaymentMethodsMetadata. # noqa: E501 + + + :return: The alipay of this PaymentMethodsMetadata. # noqa: E501 + :rtype: PaymentMethodsMetadataAlipay + """ + return self._alipay + + @alipay.setter + def alipay(self, alipay): + """Sets the alipay of this PaymentMethodsMetadata. + + + :param alipay: The alipay of this PaymentMethodsMetadata. # noqa: E501 + :type: PaymentMethodsMetadataAlipay + """ + + self._alipay = alipay + + @property + def bancontact(self): + """Gets the bancontact of this PaymentMethodsMetadata. # noqa: E501 + + + :return: The bancontact of this PaymentMethodsMetadata. # noqa: E501 + :rtype: PaymentMethodsMetadataBancontact + """ + return self._bancontact + + @bancontact.setter + def bancontact(self, bancontact): + """Sets the bancontact of this PaymentMethodsMetadata. + + + :param bancontact: The bancontact of this PaymentMethodsMetadata. # noqa: E501 + :type: PaymentMethodsMetadataBancontact + """ + + self._bancontact = bancontact + + @property + def bizum(self): + """Gets the bizum of this PaymentMethodsMetadata. # noqa: E501 + + + :return: The bizum of this PaymentMethodsMetadata. # noqa: E501 + :rtype: PaymentMethodsMetadataBizum + """ + return self._bizum + + @bizum.setter + def bizum(self, bizum): + """Sets the bizum of this PaymentMethodsMetadata. + + + :param bizum: The bizum of this PaymentMethodsMetadata. # noqa: E501 + :type: PaymentMethodsMetadataBizum + """ + + self._bizum = bizum + + @property + def blik(self): + """Gets the blik of this PaymentMethodsMetadata. # noqa: E501 + + + :return: The blik of this PaymentMethodsMetadata. # noqa: E501 + :rtype: PaymentMethodsMetadataBlik + """ + return self._blik + + @blik.setter + def blik(self, blik): + """Sets the blik of this PaymentMethodsMetadata. + + + :param blik: The blik of this PaymentMethodsMetadata. # noqa: E501 + :type: PaymentMethodsMetadataBlik + """ + + self._blik = blik + + @property + def card(self): + """Gets the card of this PaymentMethodsMetadata. # noqa: E501 + + + :return: The card of this PaymentMethodsMetadata. # noqa: E501 + :rtype: PaymentMethodsMetadataCard + """ + return self._card + + @card.setter + def card(self, card): + """Sets the card of this PaymentMethodsMetadata. + + + :param card: The card of this PaymentMethodsMetadata. # noqa: E501 + :type: PaymentMethodsMetadataCard + """ + + self._card = card + + @property + def eps(self): + """Gets the eps of this PaymentMethodsMetadata. # noqa: E501 + + + :return: The eps of this PaymentMethodsMetadata. # noqa: E501 + :rtype: PaymentMethodsMetadataEps + """ + return self._eps + + @eps.setter + def eps(self, eps): + """Sets the eps of this PaymentMethodsMetadata. + + + :param eps: The eps of this PaymentMethodsMetadata. # noqa: E501 + :type: PaymentMethodsMetadataEps + """ + + self._eps = eps + + @property + def i_deal(self): + """Gets the i_deal of this PaymentMethodsMetadata. # noqa: E501 + + + :return: The i_deal of this PaymentMethodsMetadata. # noqa: E501 + :rtype: PaymentMethodsMetadataIDeal + """ + return self._i_deal + + @i_deal.setter + def i_deal(self, i_deal): + """Sets the i_deal of this PaymentMethodsMetadata. + + + :param i_deal: The i_deal of this PaymentMethodsMetadata. # noqa: E501 + :type: PaymentMethodsMetadataIDeal + """ + + self._i_deal = i_deal + + @property + def mbway(self): + """Gets the mbway of this PaymentMethodsMetadata. # noqa: E501 + + + :return: The mbway of this PaymentMethodsMetadata. # noqa: E501 + :rtype: PaymentMethodsMetadataMbway + """ + return self._mbway + + @mbway.setter + def mbway(self, mbway): + """Sets the mbway of this PaymentMethodsMetadata. + + + :param mbway: The mbway of this PaymentMethodsMetadata. # noqa: E501 + :type: PaymentMethodsMetadataMbway + """ + + self._mbway = mbway + + @property + def multibanco(self): + """Gets the multibanco of this PaymentMethodsMetadata. # noqa: E501 + + + :return: The multibanco of this PaymentMethodsMetadata. # noqa: E501 + :rtype: PaymentMethodsMetadataMbway + """ + return self._multibanco + + @multibanco.setter + def multibanco(self, multibanco): + """Sets the multibanco of this PaymentMethodsMetadata. + + + :param multibanco: The multibanco of this PaymentMethodsMetadata. # noqa: E501 + :type: PaymentMethodsMetadataMbway + """ + + self._multibanco = multibanco + + @property + def sofort(self): + """Gets the sofort of this PaymentMethodsMetadata. # noqa: E501 + + + :return: The sofort of this PaymentMethodsMetadata. # noqa: E501 + :rtype: PaymentMethodsMetadataSofort + """ + return self._sofort + + @sofort.setter + def sofort(self, sofort): + """Sets the sofort of this PaymentMethodsMetadata. + + + :param sofort: The sofort of this PaymentMethodsMetadata. # noqa: E501 + :type: PaymentMethodsMetadataSofort + """ + + self._sofort = sofort + + @property + def trustly(self): + """Gets the trustly of this PaymentMethodsMetadata. # noqa: E501 + + + :return: The trustly of this PaymentMethodsMetadata. # noqa: E501 + :rtype: PaymentMethodsMetadataTrustly + """ + return self._trustly + + @trustly.setter + def trustly(self, trustly): + """Sets the trustly of this PaymentMethodsMetadata. + + + :param trustly: The trustly of this PaymentMethodsMetadata. # noqa: E501 + :type: PaymentMethodsMetadataTrustly + """ + + self._trustly = trustly + + @property + def sepa(self): + """Gets the sepa of this PaymentMethodsMetadata. # noqa: E501 + + + :return: The sepa of this PaymentMethodsMetadata. # noqa: E501 + :rtype: PaymentMethodsMetadataSepa + """ + return self._sepa + + @sepa.setter + def sepa(self, sepa): + """Sets the sepa of this PaymentMethodsMetadata. + + + :param sepa: The sepa of this PaymentMethodsMetadata. # noqa: E501 + :type: PaymentMethodsMetadataSepa + """ + + self._sepa = sepa + + @property + def klarna(self): + """Gets the klarna of this PaymentMethodsMetadata. # noqa: E501 + + + :return: The klarna of this PaymentMethodsMetadata. # noqa: E501 + :rtype: PaymentMethodsMetadataKlarna + """ + return self._klarna + + @klarna.setter + def klarna(self, klarna): + """Sets the klarna of this PaymentMethodsMetadata. + + + :param klarna: The klarna of this PaymentMethodsMetadata. # noqa: E501 + :type: PaymentMethodsMetadataKlarna + """ + + self._klarna = klarna + + @property + def giropay(self): + """Gets the giropay of this PaymentMethodsMetadata. # noqa: E501 + + + :return: The giropay of this PaymentMethodsMetadata. # noqa: E501 + :rtype: PaymentMethodsMetadataGiropay + """ + return self._giropay + + @giropay.setter + def giropay(self, giropay): + """Sets the giropay of this PaymentMethodsMetadata. + + + :param giropay: The giropay of this PaymentMethodsMetadata. # noqa: E501 + :type: PaymentMethodsMetadataGiropay + """ + + self._giropay = giropay + + @property + def google_pay(self): + """Gets the google_pay of this PaymentMethodsMetadata. # noqa: E501 + + + :return: The google_pay of this PaymentMethodsMetadata. # noqa: E501 + :rtype: PaymentMethodsMetadataGooglePay + """ + return self._google_pay + + @google_pay.setter + def google_pay(self, google_pay): + """Sets the google_pay of this PaymentMethodsMetadata. + + + :param google_pay: The google_pay of this PaymentMethodsMetadata. # noqa: E501 + :type: PaymentMethodsMetadataGooglePay + """ + + self._google_pay = google_pay + + @property + def apple_pay(self): + """Gets the apple_pay of this PaymentMethodsMetadata. # noqa: E501 + + + :return: The apple_pay of this PaymentMethodsMetadata. # noqa: E501 + :rtype: PaymentMethodsMetadataApplePay + """ + return self._apple_pay + + @apple_pay.setter + def apple_pay(self, apple_pay): + """Sets the apple_pay of this PaymentMethodsMetadata. + + + :param apple_pay: The apple_pay of this PaymentMethodsMetadata. # noqa: E501 + :type: PaymentMethodsMetadataApplePay + """ + + self._apple_pay = apple_pay + + @property + def click_to_pay(self): + """Gets the click_to_pay of this PaymentMethodsMetadata. # noqa: E501 + + + :return: The click_to_pay of this PaymentMethodsMetadata. # noqa: E501 + :rtype: PaymentMethodsMetadataClickToPay + """ + return self._click_to_pay + + @click_to_pay.setter + def click_to_pay(self, click_to_pay): + """Sets the click_to_pay of this PaymentMethodsMetadata. + + + :param click_to_pay: The click_to_pay of this PaymentMethodsMetadata. # noqa: E501 + :type: PaymentMethodsMetadataClickToPay + """ + + self._click_to_pay = click_to_pay + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, PaymentMethodsMetadata): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, PaymentMethodsMetadata): + return True + + return self.to_dict() != other.to_dict() diff --git a/Monei/models/payment_methods_metadata_alipay.py b/Monei/models/payment_methods_metadata_alipay.py new file mode 100644 index 0000000..81abc57 --- /dev/null +++ b/Monei/models/payment_methods_metadata_alipay.py @@ -0,0 +1,122 @@ +# coding: utf-8 + +""" + MONEI API v1 + +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 + + The version of the OpenAPI document: 1.5.0 + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from Monei.configuration import Configuration + + +class PaymentMethodsMetadataAlipay(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'countries': 'list[str]' + } + + attribute_map = { + 'countries': 'countries' + } + + def __init__(self, countries=None, local_vars_configuration=None): # noqa: E501 + """PaymentMethodsMetadataAlipay - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._countries = None + self.discriminator = None + + if countries is not None: + self.countries = countries + + @property + def countries(self): + """Gets the countries of this PaymentMethodsMetadataAlipay. # noqa: E501 + + List of countries where the payment method is available # noqa: E501 + + :return: The countries of this PaymentMethodsMetadataAlipay. # noqa: E501 + :rtype: list[str] + """ + return self._countries + + @countries.setter + def countries(self, countries): + """Sets the countries of this PaymentMethodsMetadataAlipay. + + List of countries where the payment method is available # noqa: E501 + + :param countries: The countries of this PaymentMethodsMetadataAlipay. # noqa: E501 + :type: list[str] + """ + + self._countries = countries + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, PaymentMethodsMetadataAlipay): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, PaymentMethodsMetadataAlipay): + return True + + return self.to_dict() != other.to_dict() diff --git a/Monei/models/payment_methods_metadata_apple_pay.py b/Monei/models/payment_methods_metadata_apple_pay.py new file mode 100644 index 0000000..edb46ef --- /dev/null +++ b/Monei/models/payment_methods_metadata_apple_pay.py @@ -0,0 +1,122 @@ +# coding: utf-8 + +""" + MONEI API v1 + +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 + + The version of the OpenAPI document: 1.5.0 + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from Monei.configuration import Configuration + + +class PaymentMethodsMetadataApplePay(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'merchant_id': 'str' + } + + attribute_map = { + 'merchant_id': 'merchantId' + } + + def __init__(self, merchant_id=None, local_vars_configuration=None): # noqa: E501 + """PaymentMethodsMetadataApplePay - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._merchant_id = None + self.discriminator = None + + if merchant_id is not None: + self.merchant_id = merchant_id + + @property + def merchant_id(self): + """Gets the merchant_id of this PaymentMethodsMetadataApplePay. # noqa: E501 + + Apple Pay merchant ID # noqa: E501 + + :return: The merchant_id of this PaymentMethodsMetadataApplePay. # noqa: E501 + :rtype: str + """ + return self._merchant_id + + @merchant_id.setter + def merchant_id(self, merchant_id): + """Sets the merchant_id of this PaymentMethodsMetadataApplePay. + + Apple Pay merchant ID # noqa: E501 + + :param merchant_id: The merchant_id of this PaymentMethodsMetadataApplePay. # noqa: E501 + :type: str + """ + + self._merchant_id = merchant_id + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, PaymentMethodsMetadataApplePay): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, PaymentMethodsMetadataApplePay): + return True + + return self.to_dict() != other.to_dict() diff --git a/Monei/models/payment_methods_metadata_bancontact.py b/Monei/models/payment_methods_metadata_bancontact.py new file mode 100644 index 0000000..3b5706d --- /dev/null +++ b/Monei/models/payment_methods_metadata_bancontact.py @@ -0,0 +1,122 @@ +# coding: utf-8 + +""" + MONEI API v1 + +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 + + The version of the OpenAPI document: 1.5.0 + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from Monei.configuration import Configuration + + +class PaymentMethodsMetadataBancontact(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'countries': 'list[str]' + } + + attribute_map = { + 'countries': 'countries' + } + + def __init__(self, countries=None, local_vars_configuration=None): # noqa: E501 + """PaymentMethodsMetadataBancontact - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._countries = None + self.discriminator = None + + if countries is not None: + self.countries = countries + + @property + def countries(self): + """Gets the countries of this PaymentMethodsMetadataBancontact. # noqa: E501 + + List of countries where the payment method is available # noqa: E501 + + :return: The countries of this PaymentMethodsMetadataBancontact. # noqa: E501 + :rtype: list[str] + """ + return self._countries + + @countries.setter + def countries(self, countries): + """Sets the countries of this PaymentMethodsMetadataBancontact. + + List of countries where the payment method is available # noqa: E501 + + :param countries: The countries of this PaymentMethodsMetadataBancontact. # noqa: E501 + :type: list[str] + """ + + self._countries = countries + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, PaymentMethodsMetadataBancontact): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, PaymentMethodsMetadataBancontact): + return True + + return self.to_dict() != other.to_dict() diff --git a/Monei/models/payment_methods_metadata_bizum.py b/Monei/models/payment_methods_metadata_bizum.py new file mode 100644 index 0000000..91a07cb --- /dev/null +++ b/Monei/models/payment_methods_metadata_bizum.py @@ -0,0 +1,122 @@ +# coding: utf-8 + +""" + MONEI API v1 + +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 + + The version of the OpenAPI document: 1.5.0 + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from Monei.configuration import Configuration + + +class PaymentMethodsMetadataBizum(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'countries': 'list[str]' + } + + attribute_map = { + 'countries': 'countries' + } + + def __init__(self, countries=None, local_vars_configuration=None): # noqa: E501 + """PaymentMethodsMetadataBizum - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._countries = None + self.discriminator = None + + if countries is not None: + self.countries = countries + + @property + def countries(self): + """Gets the countries of this PaymentMethodsMetadataBizum. # noqa: E501 + + List of countries where the payment method is available # noqa: E501 + + :return: The countries of this PaymentMethodsMetadataBizum. # noqa: E501 + :rtype: list[str] + """ + return self._countries + + @countries.setter + def countries(self, countries): + """Sets the countries of this PaymentMethodsMetadataBizum. + + List of countries where the payment method is available # noqa: E501 + + :param countries: The countries of this PaymentMethodsMetadataBizum. # noqa: E501 + :type: list[str] + """ + + self._countries = countries + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, PaymentMethodsMetadataBizum): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, PaymentMethodsMetadataBizum): + return True + + return self.to_dict() != other.to_dict() diff --git a/Monei/models/payment_methods_metadata_blik.py b/Monei/models/payment_methods_metadata_blik.py new file mode 100644 index 0000000..2e9eff9 --- /dev/null +++ b/Monei/models/payment_methods_metadata_blik.py @@ -0,0 +1,122 @@ +# coding: utf-8 + +""" + MONEI API v1 + +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 + + The version of the OpenAPI document: 1.5.0 + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from Monei.configuration import Configuration + + +class PaymentMethodsMetadataBlik(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'countries': 'list[str]' + } + + attribute_map = { + 'countries': 'countries' + } + + def __init__(self, countries=None, local_vars_configuration=None): # noqa: E501 + """PaymentMethodsMetadataBlik - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._countries = None + self.discriminator = None + + if countries is not None: + self.countries = countries + + @property + def countries(self): + """Gets the countries of this PaymentMethodsMetadataBlik. # noqa: E501 + + List of countries where the payment method is available # noqa: E501 + + :return: The countries of this PaymentMethodsMetadataBlik. # noqa: E501 + :rtype: list[str] + """ + return self._countries + + @countries.setter + def countries(self, countries): + """Sets the countries of this PaymentMethodsMetadataBlik. + + List of countries where the payment method is available # noqa: E501 + + :param countries: The countries of this PaymentMethodsMetadataBlik. # noqa: E501 + :type: list[str] + """ + + self._countries = countries + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, PaymentMethodsMetadataBlik): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, PaymentMethodsMetadataBlik): + return True + + return self.to_dict() != other.to_dict() diff --git a/Monei/models/payment_methods_metadata_card.py b/Monei/models/payment_methods_metadata_card.py new file mode 100644 index 0000000..9c5ef1e --- /dev/null +++ b/Monei/models/payment_methods_metadata_card.py @@ -0,0 +1,122 @@ +# coding: utf-8 + +""" + MONEI API v1 + +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 + + The version of the OpenAPI document: 1.5.0 + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from Monei.configuration import Configuration + + +class PaymentMethodsMetadataCard(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'brands': 'list[str]' + } + + attribute_map = { + 'brands': 'brands' + } + + def __init__(self, brands=None, local_vars_configuration=None): # noqa: E501 + """PaymentMethodsMetadataCard - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._brands = None + self.discriminator = None + + if brands is not None: + self.brands = brands + + @property + def brands(self): + """Gets the brands of this PaymentMethodsMetadataCard. # noqa: E501 + + List of card brands supported # noqa: E501 + + :return: The brands of this PaymentMethodsMetadataCard. # noqa: E501 + :rtype: list[str] + """ + return self._brands + + @brands.setter + def brands(self, brands): + """Sets the brands of this PaymentMethodsMetadataCard. + + List of card brands supported # noqa: E501 + + :param brands: The brands of this PaymentMethodsMetadataCard. # noqa: E501 + :type: list[str] + """ + + self._brands = brands + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, PaymentMethodsMetadataCard): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, PaymentMethodsMetadataCard): + return True + + return self.to_dict() != other.to_dict() diff --git a/Monei/models/payment_methods_metadata_click_to_pay.py b/Monei/models/payment_methods_metadata_click_to_pay.py new file mode 100644 index 0000000..a163a03 --- /dev/null +++ b/Monei/models/payment_methods_metadata_click_to_pay.py @@ -0,0 +1,228 @@ +# coding: utf-8 + +""" + MONEI API v1 + +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 + + The version of the OpenAPI document: 1.5.0 + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from Monei.configuration import Configuration + + +class PaymentMethodsMetadataClickToPay(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'token_support': 'bool', + 'preselected': 'bool', + 'visa': 'PaymentMethodsMetadataClickToPayVisa', + 'mastercard': 'PaymentMethodsMetadataClickToPayMastercard', + 'discover': 'PaymentMethodsMetadataClickToPayDiscover' + } + + attribute_map = { + 'token_support': 'tokenSupport', + 'preselected': 'preselected', + 'visa': 'visa', + 'mastercard': 'mastercard', + 'discover': 'discover' + } + + def __init__(self, token_support=None, preselected=None, visa=None, mastercard=None, discover=None, local_vars_configuration=None): # noqa: E501 + """PaymentMethodsMetadataClickToPay - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._token_support = None + self._preselected = None + self._visa = None + self._mastercard = None + self._discover = None + self.discriminator = None + + if token_support is not None: + self.token_support = token_support + if preselected is not None: + self.preselected = preselected + if visa is not None: + self.visa = visa + if mastercard is not None: + self.mastercard = mastercard + if discover is not None: + self.discover = discover + + @property + def token_support(self): + """Gets the token_support of this PaymentMethodsMetadataClickToPay. # noqa: E501 + + Whether token support is enabled # noqa: E501 + + :return: The token_support of this PaymentMethodsMetadataClickToPay. # noqa: E501 + :rtype: bool + """ + return self._token_support + + @token_support.setter + def token_support(self, token_support): + """Sets the token_support of this PaymentMethodsMetadataClickToPay. + + Whether token support is enabled # noqa: E501 + + :param token_support: The token_support of this PaymentMethodsMetadataClickToPay. # noqa: E501 + :type: bool + """ + + self._token_support = token_support + + @property + def preselected(self): + """Gets the preselected of this PaymentMethodsMetadataClickToPay. # noqa: E501 + + Whether the method is preselected # noqa: E501 + + :return: The preselected of this PaymentMethodsMetadataClickToPay. # noqa: E501 + :rtype: bool + """ + return self._preselected + + @preselected.setter + def preselected(self, preselected): + """Sets the preselected of this PaymentMethodsMetadataClickToPay. + + Whether the method is preselected # noqa: E501 + + :param preselected: The preselected of this PaymentMethodsMetadataClickToPay. # noqa: E501 + :type: bool + """ + + self._preselected = preselected + + @property + def visa(self): + """Gets the visa of this PaymentMethodsMetadataClickToPay. # noqa: E501 + + + :return: The visa of this PaymentMethodsMetadataClickToPay. # noqa: E501 + :rtype: PaymentMethodsMetadataClickToPayVisa + """ + return self._visa + + @visa.setter + def visa(self, visa): + """Sets the visa of this PaymentMethodsMetadataClickToPay. + + + :param visa: The visa of this PaymentMethodsMetadataClickToPay. # noqa: E501 + :type: PaymentMethodsMetadataClickToPayVisa + """ + + self._visa = visa + + @property + def mastercard(self): + """Gets the mastercard of this PaymentMethodsMetadataClickToPay. # noqa: E501 + + + :return: The mastercard of this PaymentMethodsMetadataClickToPay. # noqa: E501 + :rtype: PaymentMethodsMetadataClickToPayMastercard + """ + return self._mastercard + + @mastercard.setter + def mastercard(self, mastercard): + """Sets the mastercard of this PaymentMethodsMetadataClickToPay. + + + :param mastercard: The mastercard of this PaymentMethodsMetadataClickToPay. # noqa: E501 + :type: PaymentMethodsMetadataClickToPayMastercard + """ + + self._mastercard = mastercard + + @property + def discover(self): + """Gets the discover of this PaymentMethodsMetadataClickToPay. # noqa: E501 + + + :return: The discover of this PaymentMethodsMetadataClickToPay. # noqa: E501 + :rtype: PaymentMethodsMetadataClickToPayDiscover + """ + return self._discover + + @discover.setter + def discover(self, discover): + """Sets the discover of this PaymentMethodsMetadataClickToPay. + + + :param discover: The discover of this PaymentMethodsMetadataClickToPay. # noqa: E501 + :type: PaymentMethodsMetadataClickToPayDiscover + """ + + self._discover = discover + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, PaymentMethodsMetadataClickToPay): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, PaymentMethodsMetadataClickToPay): + return True + + return self.to_dict() != other.to_dict() diff --git a/Monei/models/payment_methods_metadata_click_to_pay_discover.py b/Monei/models/payment_methods_metadata_click_to_pay_discover.py new file mode 100644 index 0000000..f93820f --- /dev/null +++ b/Monei/models/payment_methods_metadata_click_to_pay_discover.py @@ -0,0 +1,146 @@ +# coding: utf-8 + +""" + MONEI API v1 + +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 + + The version of the OpenAPI document: 1.5.0 + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from Monei.configuration import Configuration + + +class PaymentMethodsMetadataClickToPayDiscover(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'srci_dpa_id': 'str', + 'src_initiator_id': 'str' + } + + attribute_map = { + 'srci_dpa_id': 'srciDpaId', + 'src_initiator_id': 'srcInitiatorId' + } + + def __init__(self, srci_dpa_id=None, src_initiator_id=None, local_vars_configuration=None): # noqa: E501 + """PaymentMethodsMetadataClickToPayDiscover - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._srci_dpa_id = None + self._src_initiator_id = None + self.discriminator = None + + if srci_dpa_id is not None: + self.srci_dpa_id = srci_dpa_id + if src_initiator_id is not None: + self.src_initiator_id = src_initiator_id + + @property + def srci_dpa_id(self): + """Gets the srci_dpa_id of this PaymentMethodsMetadataClickToPayDiscover. # noqa: E501 + + + :return: The srci_dpa_id of this PaymentMethodsMetadataClickToPayDiscover. # noqa: E501 + :rtype: str + """ + return self._srci_dpa_id + + @srci_dpa_id.setter + def srci_dpa_id(self, srci_dpa_id): + """Sets the srci_dpa_id of this PaymentMethodsMetadataClickToPayDiscover. + + + :param srci_dpa_id: The srci_dpa_id of this PaymentMethodsMetadataClickToPayDiscover. # noqa: E501 + :type: str + """ + + self._srci_dpa_id = srci_dpa_id + + @property + def src_initiator_id(self): + """Gets the src_initiator_id of this PaymentMethodsMetadataClickToPayDiscover. # noqa: E501 + + + :return: The src_initiator_id of this PaymentMethodsMetadataClickToPayDiscover. # noqa: E501 + :rtype: str + """ + return self._src_initiator_id + + @src_initiator_id.setter + def src_initiator_id(self, src_initiator_id): + """Sets the src_initiator_id of this PaymentMethodsMetadataClickToPayDiscover. + + + :param src_initiator_id: The src_initiator_id of this PaymentMethodsMetadataClickToPayDiscover. # noqa: E501 + :type: str + """ + + self._src_initiator_id = src_initiator_id + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, PaymentMethodsMetadataClickToPayDiscover): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, PaymentMethodsMetadataClickToPayDiscover): + return True + + return self.to_dict() != other.to_dict() diff --git a/Monei/models/payment_methods_metadata_click_to_pay_mastercard.py b/Monei/models/payment_methods_metadata_click_to_pay_mastercard.py new file mode 100644 index 0000000..2e91674 --- /dev/null +++ b/Monei/models/payment_methods_metadata_click_to_pay_mastercard.py @@ -0,0 +1,146 @@ +# coding: utf-8 + +""" + MONEI API v1 + +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 + + The version of the OpenAPI document: 1.5.0 + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from Monei.configuration import Configuration + + +class PaymentMethodsMetadataClickToPayMastercard(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'srci_dpa_id': 'str', + 'src_initiator_id': 'str' + } + + attribute_map = { + 'srci_dpa_id': 'srciDpaId', + 'src_initiator_id': 'srcInitiatorId' + } + + def __init__(self, srci_dpa_id=None, src_initiator_id=None, local_vars_configuration=None): # noqa: E501 + """PaymentMethodsMetadataClickToPayMastercard - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._srci_dpa_id = None + self._src_initiator_id = None + self.discriminator = None + + if srci_dpa_id is not None: + self.srci_dpa_id = srci_dpa_id + if src_initiator_id is not None: + self.src_initiator_id = src_initiator_id + + @property + def srci_dpa_id(self): + """Gets the srci_dpa_id of this PaymentMethodsMetadataClickToPayMastercard. # noqa: E501 + + + :return: The srci_dpa_id of this PaymentMethodsMetadataClickToPayMastercard. # noqa: E501 + :rtype: str + """ + return self._srci_dpa_id + + @srci_dpa_id.setter + def srci_dpa_id(self, srci_dpa_id): + """Sets the srci_dpa_id of this PaymentMethodsMetadataClickToPayMastercard. + + + :param srci_dpa_id: The srci_dpa_id of this PaymentMethodsMetadataClickToPayMastercard. # noqa: E501 + :type: str + """ + + self._srci_dpa_id = srci_dpa_id + + @property + def src_initiator_id(self): + """Gets the src_initiator_id of this PaymentMethodsMetadataClickToPayMastercard. # noqa: E501 + + + :return: The src_initiator_id of this PaymentMethodsMetadataClickToPayMastercard. # noqa: E501 + :rtype: str + """ + return self._src_initiator_id + + @src_initiator_id.setter + def src_initiator_id(self, src_initiator_id): + """Sets the src_initiator_id of this PaymentMethodsMetadataClickToPayMastercard. + + + :param src_initiator_id: The src_initiator_id of this PaymentMethodsMetadataClickToPayMastercard. # noqa: E501 + :type: str + """ + + self._src_initiator_id = src_initiator_id + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, PaymentMethodsMetadataClickToPayMastercard): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, PaymentMethodsMetadataClickToPayMastercard): + return True + + return self.to_dict() != other.to_dict() diff --git a/Monei/models/payment_methods_metadata_click_to_pay_visa.py b/Monei/models/payment_methods_metadata_click_to_pay_visa.py new file mode 100644 index 0000000..18c3c4b --- /dev/null +++ b/Monei/models/payment_methods_metadata_click_to_pay_visa.py @@ -0,0 +1,146 @@ +# coding: utf-8 + +""" + MONEI API v1 + +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 + + The version of the OpenAPI document: 1.5.0 + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from Monei.configuration import Configuration + + +class PaymentMethodsMetadataClickToPayVisa(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'srci_dpa_id': 'str', + 'src_initiator_id': 'str' + } + + attribute_map = { + 'srci_dpa_id': 'srciDpaId', + 'src_initiator_id': 'srcInitiatorId' + } + + def __init__(self, srci_dpa_id=None, src_initiator_id=None, local_vars_configuration=None): # noqa: E501 + """PaymentMethodsMetadataClickToPayVisa - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._srci_dpa_id = None + self._src_initiator_id = None + self.discriminator = None + + if srci_dpa_id is not None: + self.srci_dpa_id = srci_dpa_id + if src_initiator_id is not None: + self.src_initiator_id = src_initiator_id + + @property + def srci_dpa_id(self): + """Gets the srci_dpa_id of this PaymentMethodsMetadataClickToPayVisa. # noqa: E501 + + + :return: The srci_dpa_id of this PaymentMethodsMetadataClickToPayVisa. # noqa: E501 + :rtype: str + """ + return self._srci_dpa_id + + @srci_dpa_id.setter + def srci_dpa_id(self, srci_dpa_id): + """Sets the srci_dpa_id of this PaymentMethodsMetadataClickToPayVisa. + + + :param srci_dpa_id: The srci_dpa_id of this PaymentMethodsMetadataClickToPayVisa. # noqa: E501 + :type: str + """ + + self._srci_dpa_id = srci_dpa_id + + @property + def src_initiator_id(self): + """Gets the src_initiator_id of this PaymentMethodsMetadataClickToPayVisa. # noqa: E501 + + + :return: The src_initiator_id of this PaymentMethodsMetadataClickToPayVisa. # noqa: E501 + :rtype: str + """ + return self._src_initiator_id + + @src_initiator_id.setter + def src_initiator_id(self, src_initiator_id): + """Sets the src_initiator_id of this PaymentMethodsMetadataClickToPayVisa. + + + :param src_initiator_id: The src_initiator_id of this PaymentMethodsMetadataClickToPayVisa. # noqa: E501 + :type: str + """ + + self._src_initiator_id = src_initiator_id + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, PaymentMethodsMetadataClickToPayVisa): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, PaymentMethodsMetadataClickToPayVisa): + return True + + return self.to_dict() != other.to_dict() diff --git a/Monei/models/payment_methods_metadata_eps.py b/Monei/models/payment_methods_metadata_eps.py new file mode 100644 index 0000000..f58bccf --- /dev/null +++ b/Monei/models/payment_methods_metadata_eps.py @@ -0,0 +1,122 @@ +# coding: utf-8 + +""" + MONEI API v1 + +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 + + The version of the OpenAPI document: 1.5.0 + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from Monei.configuration import Configuration + + +class PaymentMethodsMetadataEps(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'countries': 'list[str]' + } + + attribute_map = { + 'countries': 'countries' + } + + def __init__(self, countries=None, local_vars_configuration=None): # noqa: E501 + """PaymentMethodsMetadataEps - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._countries = None + self.discriminator = None + + if countries is not None: + self.countries = countries + + @property + def countries(self): + """Gets the countries of this PaymentMethodsMetadataEps. # noqa: E501 + + List of countries where the payment method is available # noqa: E501 + + :return: The countries of this PaymentMethodsMetadataEps. # noqa: E501 + :rtype: list[str] + """ + return self._countries + + @countries.setter + def countries(self, countries): + """Sets the countries of this PaymentMethodsMetadataEps. + + List of countries where the payment method is available # noqa: E501 + + :param countries: The countries of this PaymentMethodsMetadataEps. # noqa: E501 + :type: list[str] + """ + + self._countries = countries + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, PaymentMethodsMetadataEps): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, PaymentMethodsMetadataEps): + return True + + return self.to_dict() != other.to_dict() diff --git a/Monei/models/payment_methods_metadata_giropay.py b/Monei/models/payment_methods_metadata_giropay.py new file mode 100644 index 0000000..f096ed8 --- /dev/null +++ b/Monei/models/payment_methods_metadata_giropay.py @@ -0,0 +1,122 @@ +# coding: utf-8 + +""" + MONEI API v1 + +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 + + The version of the OpenAPI document: 1.5.0 + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from Monei.configuration import Configuration + + +class PaymentMethodsMetadataGiropay(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'countries': 'list[str]' + } + + attribute_map = { + 'countries': 'countries' + } + + def __init__(self, countries=None, local_vars_configuration=None): # noqa: E501 + """PaymentMethodsMetadataGiropay - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._countries = None + self.discriminator = None + + if countries is not None: + self.countries = countries + + @property + def countries(self): + """Gets the countries of this PaymentMethodsMetadataGiropay. # noqa: E501 + + List of countries where the payment method is available # noqa: E501 + + :return: The countries of this PaymentMethodsMetadataGiropay. # noqa: E501 + :rtype: list[str] + """ + return self._countries + + @countries.setter + def countries(self, countries): + """Sets the countries of this PaymentMethodsMetadataGiropay. + + List of countries where the payment method is available # noqa: E501 + + :param countries: The countries of this PaymentMethodsMetadataGiropay. # noqa: E501 + :type: list[str] + """ + + self._countries = countries + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, PaymentMethodsMetadataGiropay): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, PaymentMethodsMetadataGiropay): + return True + + return self.to_dict() != other.to_dict() diff --git a/Monei/models/payment_methods_metadata_google_pay.py b/Monei/models/payment_methods_metadata_google_pay.py new file mode 100644 index 0000000..7b8f1ac --- /dev/null +++ b/Monei/models/payment_methods_metadata_google_pay.py @@ -0,0 +1,150 @@ +# coding: utf-8 + +""" + MONEI API v1 + +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 + + The version of the OpenAPI document: 1.5.0 + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from Monei.configuration import Configuration + + +class PaymentMethodsMetadataGooglePay(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'merchant_id': 'str', + 'cvc_required': 'bool' + } + + attribute_map = { + 'merchant_id': 'merchantId', + 'cvc_required': 'cvcRequired' + } + + def __init__(self, merchant_id=None, cvc_required=None, local_vars_configuration=None): # noqa: E501 + """PaymentMethodsMetadataGooglePay - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._merchant_id = None + self._cvc_required = None + self.discriminator = None + + if merchant_id is not None: + self.merchant_id = merchant_id + if cvc_required is not None: + self.cvc_required = cvc_required + + @property + def merchant_id(self): + """Gets the merchant_id of this PaymentMethodsMetadataGooglePay. # noqa: E501 + + Google Pay merchant ID # noqa: E501 + + :return: The merchant_id of this PaymentMethodsMetadataGooglePay. # noqa: E501 + :rtype: str + """ + return self._merchant_id + + @merchant_id.setter + def merchant_id(self, merchant_id): + """Sets the merchant_id of this PaymentMethodsMetadataGooglePay. + + Google Pay merchant ID # noqa: E501 + + :param merchant_id: The merchant_id of this PaymentMethodsMetadataGooglePay. # noqa: E501 + :type: str + """ + + self._merchant_id = merchant_id + + @property + def cvc_required(self): + """Gets the cvc_required of this PaymentMethodsMetadataGooglePay. # noqa: E501 + + Whether CVC is required for Google Pay transactions # noqa: E501 + + :return: The cvc_required of this PaymentMethodsMetadataGooglePay. # noqa: E501 + :rtype: bool + """ + return self._cvc_required + + @cvc_required.setter + def cvc_required(self, cvc_required): + """Sets the cvc_required of this PaymentMethodsMetadataGooglePay. + + Whether CVC is required for Google Pay transactions # noqa: E501 + + :param cvc_required: The cvc_required of this PaymentMethodsMetadataGooglePay. # noqa: E501 + :type: bool + """ + + self._cvc_required = cvc_required + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, PaymentMethodsMetadataGooglePay): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, PaymentMethodsMetadataGooglePay): + return True + + return self.to_dict() != other.to_dict() diff --git a/Monei/models/payment_methods_metadata_i_deal.py b/Monei/models/payment_methods_metadata_i_deal.py new file mode 100644 index 0000000..c5313f3 --- /dev/null +++ b/Monei/models/payment_methods_metadata_i_deal.py @@ -0,0 +1,122 @@ +# coding: utf-8 + +""" + MONEI API v1 + +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 + + The version of the OpenAPI document: 1.5.0 + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from Monei.configuration import Configuration + + +class PaymentMethodsMetadataIDeal(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'countries': 'list[str]' + } + + attribute_map = { + 'countries': 'countries' + } + + def __init__(self, countries=None, local_vars_configuration=None): # noqa: E501 + """PaymentMethodsMetadataIDeal - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._countries = None + self.discriminator = None + + if countries is not None: + self.countries = countries + + @property + def countries(self): + """Gets the countries of this PaymentMethodsMetadataIDeal. # noqa: E501 + + List of countries where the payment method is available # noqa: E501 + + :return: The countries of this PaymentMethodsMetadataIDeal. # noqa: E501 + :rtype: list[str] + """ + return self._countries + + @countries.setter + def countries(self, countries): + """Sets the countries of this PaymentMethodsMetadataIDeal. + + List of countries where the payment method is available # noqa: E501 + + :param countries: The countries of this PaymentMethodsMetadataIDeal. # noqa: E501 + :type: list[str] + """ + + self._countries = countries + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, PaymentMethodsMetadataIDeal): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, PaymentMethodsMetadataIDeal): + return True + + return self.to_dict() != other.to_dict() diff --git a/Monei/models/payment_methods_metadata_klarna.py b/Monei/models/payment_methods_metadata_klarna.py new file mode 100644 index 0000000..91271ee --- /dev/null +++ b/Monei/models/payment_methods_metadata_klarna.py @@ -0,0 +1,122 @@ +# coding: utf-8 + +""" + MONEI API v1 + +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 + + The version of the OpenAPI document: 1.5.0 + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from Monei.configuration import Configuration + + +class PaymentMethodsMetadataKlarna(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'countries': 'list[str]' + } + + attribute_map = { + 'countries': 'countries' + } + + def __init__(self, countries=None, local_vars_configuration=None): # noqa: E501 + """PaymentMethodsMetadataKlarna - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._countries = None + self.discriminator = None + + if countries is not None: + self.countries = countries + + @property + def countries(self): + """Gets the countries of this PaymentMethodsMetadataKlarna. # noqa: E501 + + List of countries where the payment method is available # noqa: E501 + + :return: The countries of this PaymentMethodsMetadataKlarna. # noqa: E501 + :rtype: list[str] + """ + return self._countries + + @countries.setter + def countries(self, countries): + """Sets the countries of this PaymentMethodsMetadataKlarna. + + List of countries where the payment method is available # noqa: E501 + + :param countries: The countries of this PaymentMethodsMetadataKlarna. # noqa: E501 + :type: list[str] + """ + + self._countries = countries + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, PaymentMethodsMetadataKlarna): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, PaymentMethodsMetadataKlarna): + return True + + return self.to_dict() != other.to_dict() diff --git a/Monei/models/payment_methods_metadata_mbway.py b/Monei/models/payment_methods_metadata_mbway.py new file mode 100644 index 0000000..b2a302a --- /dev/null +++ b/Monei/models/payment_methods_metadata_mbway.py @@ -0,0 +1,122 @@ +# coding: utf-8 + +""" + MONEI API v1 + +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 + + The version of the OpenAPI document: 1.5.0 + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from Monei.configuration import Configuration + + +class PaymentMethodsMetadataMbway(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'countries': 'list[str]' + } + + attribute_map = { + 'countries': 'countries' + } + + def __init__(self, countries=None, local_vars_configuration=None): # noqa: E501 + """PaymentMethodsMetadataMbway - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._countries = None + self.discriminator = None + + if countries is not None: + self.countries = countries + + @property + def countries(self): + """Gets the countries of this PaymentMethodsMetadataMbway. # noqa: E501 + + List of countries where the payment method is available # noqa: E501 + + :return: The countries of this PaymentMethodsMetadataMbway. # noqa: E501 + :rtype: list[str] + """ + return self._countries + + @countries.setter + def countries(self, countries): + """Sets the countries of this PaymentMethodsMetadataMbway. + + List of countries where the payment method is available # noqa: E501 + + :param countries: The countries of this PaymentMethodsMetadataMbway. # noqa: E501 + :type: list[str] + """ + + self._countries = countries + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, PaymentMethodsMetadataMbway): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, PaymentMethodsMetadataMbway): + return True + + return self.to_dict() != other.to_dict() diff --git a/Monei/models/payment_methods_metadata_sepa.py b/Monei/models/payment_methods_metadata_sepa.py new file mode 100644 index 0000000..f0f52c0 --- /dev/null +++ b/Monei/models/payment_methods_metadata_sepa.py @@ -0,0 +1,122 @@ +# coding: utf-8 + +""" + MONEI API v1 + +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 + + The version of the OpenAPI document: 1.5.0 + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from Monei.configuration import Configuration + + +class PaymentMethodsMetadataSepa(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'countries': 'list[str]' + } + + attribute_map = { + 'countries': 'countries' + } + + def __init__(self, countries=None, local_vars_configuration=None): # noqa: E501 + """PaymentMethodsMetadataSepa - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._countries = None + self.discriminator = None + + if countries is not None: + self.countries = countries + + @property + def countries(self): + """Gets the countries of this PaymentMethodsMetadataSepa. # noqa: E501 + + List of countries where the payment method is available # noqa: E501 + + :return: The countries of this PaymentMethodsMetadataSepa. # noqa: E501 + :rtype: list[str] + """ + return self._countries + + @countries.setter + def countries(self, countries): + """Sets the countries of this PaymentMethodsMetadataSepa. + + List of countries where the payment method is available # noqa: E501 + + :param countries: The countries of this PaymentMethodsMetadataSepa. # noqa: E501 + :type: list[str] + """ + + self._countries = countries + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, PaymentMethodsMetadataSepa): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, PaymentMethodsMetadataSepa): + return True + + return self.to_dict() != other.to_dict() diff --git a/Monei/models/payment_methods_metadata_sofort.py b/Monei/models/payment_methods_metadata_sofort.py new file mode 100644 index 0000000..7e7e578 --- /dev/null +++ b/Monei/models/payment_methods_metadata_sofort.py @@ -0,0 +1,122 @@ +# coding: utf-8 + +""" + MONEI API v1 + +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 + + The version of the OpenAPI document: 1.5.0 + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from Monei.configuration import Configuration + + +class PaymentMethodsMetadataSofort(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'countries': 'list[str]' + } + + attribute_map = { + 'countries': 'countries' + } + + def __init__(self, countries=None, local_vars_configuration=None): # noqa: E501 + """PaymentMethodsMetadataSofort - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._countries = None + self.discriminator = None + + if countries is not None: + self.countries = countries + + @property + def countries(self): + """Gets the countries of this PaymentMethodsMetadataSofort. # noqa: E501 + + List of countries where the payment method is available # noqa: E501 + + :return: The countries of this PaymentMethodsMetadataSofort. # noqa: E501 + :rtype: list[str] + """ + return self._countries + + @countries.setter + def countries(self, countries): + """Sets the countries of this PaymentMethodsMetadataSofort. + + List of countries where the payment method is available # noqa: E501 + + :param countries: The countries of this PaymentMethodsMetadataSofort. # noqa: E501 + :type: list[str] + """ + + self._countries = countries + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, PaymentMethodsMetadataSofort): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, PaymentMethodsMetadataSofort): + return True + + return self.to_dict() != other.to_dict() diff --git a/Monei/models/payment_methods_metadata_trustly.py b/Monei/models/payment_methods_metadata_trustly.py new file mode 100644 index 0000000..5c3a3c1 --- /dev/null +++ b/Monei/models/payment_methods_metadata_trustly.py @@ -0,0 +1,122 @@ +# coding: utf-8 + +""" + MONEI API v1 + +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 + + The version of the OpenAPI document: 1.5.0 + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from Monei.configuration import Configuration + + +class PaymentMethodsMetadataTrustly(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'countries': 'list[str]' + } + + attribute_map = { + 'countries': 'countries' + } + + def __init__(self, countries=None, local_vars_configuration=None): # noqa: E501 + """PaymentMethodsMetadataTrustly - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._countries = None + self.discriminator = None + + if countries is not None: + self.countries = countries + + @property + def countries(self): + """Gets the countries of this PaymentMethodsMetadataTrustly. # noqa: E501 + + List of countries where the payment method is available # noqa: E501 + + :return: The countries of this PaymentMethodsMetadataTrustly. # noqa: E501 + :rtype: list[str] + """ + return self._countries + + @countries.setter + def countries(self, countries): + """Sets the countries of this PaymentMethodsMetadataTrustly. + + List of countries where the payment method is available # noqa: E501 + + :param countries: The countries of this PaymentMethodsMetadataTrustly. # noqa: E501 + :type: list[str] + """ + + self._countries = countries + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, PaymentMethodsMetadataTrustly): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, PaymentMethodsMetadataTrustly): + return True + + return self.to_dict() != other.to_dict() diff --git a/Monei/models/payment_next_action.py b/Monei/models/payment_next_action.py index a4901e7..e79a3a6 100644 --- a/Monei/models/payment_next_action.py +++ b/Monei/models/payment_next_action.py @@ -3,9 +3,9 @@ """ MONEI API v1 -

The MONEI API is organized around REST. Our API has predictable resource-oriented URLs, accepts JSON-encoded request bodies, returns JSON-encoded responses, and uses standard HTTP response codes, authentication, and verbs.

Base URL:

https://api.monei.com/v1

Client libraries:

Important:

If you are not using our official SDKs, you need to provide a valid User-Agent header in each request, otherwise your requests will be rejected.

# noqa: E501 +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - The version of the OpenAPI document: 1.4.6 + The version of the OpenAPI document: 1.5.0 Generated by: https://openapi-generator.tech """ diff --git a/Monei/models/payment_payment_method.py b/Monei/models/payment_payment_method.py index 07a4594..26cb9d4 100644 --- a/Monei/models/payment_payment_method.py +++ b/Monei/models/payment_payment_method.py @@ -3,9 +3,9 @@ """ MONEI API v1 -

The MONEI API is organized around REST. Our API has predictable resource-oriented URLs, accepts JSON-encoded request bodies, returns JSON-encoded responses, and uses standard HTTP response codes, authentication, and verbs.

Base URL:

https://api.monei.com/v1

Client libraries:

Important:

If you are not using our official SDKs, you need to provide a valid User-Agent header in each request, otherwise your requests will be rejected.

# noqa: E501 +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - The version of the OpenAPI document: 1.4.6 + The version of the OpenAPI document: 1.5.0 Generated by: https://openapi-generator.tech """ diff --git a/Monei/models/payment_payment_method_bizum.py b/Monei/models/payment_payment_method_bizum.py index f3edf77..f099b46 100644 --- a/Monei/models/payment_payment_method_bizum.py +++ b/Monei/models/payment_payment_method_bizum.py @@ -3,9 +3,9 @@ """ MONEI API v1 -

The MONEI API is organized around REST. Our API has predictable resource-oriented URLs, accepts JSON-encoded request bodies, returns JSON-encoded responses, and uses standard HTTP response codes, authentication, and verbs.

Base URL:

https://api.monei.com/v1

Client libraries:

Important:

If you are not using our official SDKs, you need to provide a valid User-Agent header in each request, otherwise your requests will be rejected.

# noqa: E501 +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - The version of the OpenAPI document: 1.4.6 + The version of the OpenAPI document: 1.5.0 Generated by: https://openapi-generator.tech """ @@ -56,7 +56,7 @@ def __init__(self, phone_number=None, local_vars_configuration=None): # noqa: E def phone_number(self): """Gets the phone_number of this PaymentPaymentMethodBizum. # noqa: E501 - The phone number used to pay with `bizum`. # noqa: E501 + Phone number in E.164 format used to pay with `bizum`. # noqa: E501 :return: The phone_number of this PaymentPaymentMethodBizum. # noqa: E501 :rtype: str @@ -67,7 +67,7 @@ def phone_number(self): def phone_number(self, phone_number): """Sets the phone_number of this PaymentPaymentMethodBizum. - The phone number used to pay with `bizum`. # noqa: E501 + Phone number in E.164 format used to pay with `bizum`. # noqa: E501 :param phone_number: The phone_number of this PaymentPaymentMethodBizum. # noqa: E501 :type: str diff --git a/Monei/models/payment_payment_method_bizum_input.py b/Monei/models/payment_payment_method_bizum_input.py index 05b6bd6..c8d59cf 100644 --- a/Monei/models/payment_payment_method_bizum_input.py +++ b/Monei/models/payment_payment_method_bizum_input.py @@ -3,9 +3,9 @@ """ MONEI API v1 -

The MONEI API is organized around REST. Our API has predictable resource-oriented URLs, accepts JSON-encoded request bodies, returns JSON-encoded responses, and uses standard HTTP response codes, authentication, and verbs.

Base URL:

https://api.monei.com/v1

Client libraries:

Important:

If you are not using our official SDKs, you need to provide a valid User-Agent header in each request, otherwise your requests will be rejected.

# noqa: E501 +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - The version of the OpenAPI document: 1.4.6 + The version of the OpenAPI document: 1.5.0 Generated by: https://openapi-generator.tech """ @@ -56,7 +56,7 @@ def __init__(self, phone_number=None, local_vars_configuration=None): # noqa: E def phone_number(self): """Gets the phone_number of this PaymentPaymentMethodBizumInput. # noqa: E501 - The phone number used to pay with `bizum`. # noqa: E501 + Phone number in E.164 format used to pay with `bizum`. # noqa: E501 :return: The phone_number of this PaymentPaymentMethodBizumInput. # noqa: E501 :rtype: str @@ -67,7 +67,7 @@ def phone_number(self): def phone_number(self, phone_number): """Sets the phone_number of this PaymentPaymentMethodBizumInput. - The phone number used to pay with `bizum`. # noqa: E501 + Phone number in E.164 format used to pay with `bizum`. # noqa: E501 :param phone_number: The phone_number of this PaymentPaymentMethodBizumInput. # noqa: E501 :type: str diff --git a/Monei/models/payment_payment_method_card.py b/Monei/models/payment_payment_method_card.py index 02cac95..a7795cb 100644 --- a/Monei/models/payment_payment_method_card.py +++ b/Monei/models/payment_payment_method_card.py @@ -3,9 +3,9 @@ """ MONEI API v1 -

The MONEI API is organized around REST. Our API has predictable resource-oriented URLs, accepts JSON-encoded request bodies, returns JSON-encoded responses, and uses standard HTTP response codes, authentication, and verbs.

Base URL:

https://api.monei.com/v1

Client libraries:

Important:

If you are not using our official SDKs, you need to provide a valid User-Agent header in each request, otherwise your requests will be rejected.

# noqa: E501 +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - The version of the OpenAPI document: 1.4.6 + The version of the OpenAPI document: 1.5.0 Generated by: https://openapi-generator.tech """ diff --git a/Monei/models/payment_payment_method_card_input.py b/Monei/models/payment_payment_method_card_input.py index e9fc52c..9bcaef2 100644 --- a/Monei/models/payment_payment_method_card_input.py +++ b/Monei/models/payment_payment_method_card_input.py @@ -3,9 +3,9 @@ """ MONEI API v1 -

The MONEI API is organized around REST. Our API has predictable resource-oriented URLs, accepts JSON-encoded request bodies, returns JSON-encoded responses, and uses standard HTTP response codes, authentication, and verbs.

Base URL:

https://api.monei.com/v1

Client libraries:

Important:

If you are not using our official SDKs, you need to provide a valid User-Agent header in each request, otherwise your requests will be rejected.

# noqa: E501 +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - The version of the OpenAPI document: 1.4.6 + The version of the OpenAPI document: 1.5.0 Generated by: https://openapi-generator.tech """ @@ -127,7 +127,7 @@ def cvc(self, cvc): def exp_month(self): """Gets the exp_month of this PaymentPaymentMethodCardInput. # noqa: E501 - Two-digit number representing the card’s expiration month. # noqa: E501 + Two-digit number representing the card's expiration month. # noqa: E501 :return: The exp_month of this PaymentPaymentMethodCardInput. # noqa: E501 :rtype: str @@ -138,7 +138,7 @@ def exp_month(self): def exp_month(self, exp_month): """Sets the exp_month of this PaymentPaymentMethodCardInput. - Two-digit number representing the card’s expiration month. # noqa: E501 + Two-digit number representing the card's expiration month. # noqa: E501 :param exp_month: The exp_month of this PaymentPaymentMethodCardInput. # noqa: E501 :type: str @@ -150,7 +150,7 @@ def exp_month(self, exp_month): def exp_year(self): """Gets the exp_year of this PaymentPaymentMethodCardInput. # noqa: E501 - Two-digit number representing the card’s expiration year. # noqa: E501 + Two-digit number representing the card's expiration year. # noqa: E501 :return: The exp_year of this PaymentPaymentMethodCardInput. # noqa: E501 :rtype: str @@ -161,7 +161,7 @@ def exp_year(self): def exp_year(self, exp_year): """Sets the exp_year of this PaymentPaymentMethodCardInput. - Two-digit number representing the card’s expiration year. # noqa: E501 + Two-digit number representing the card's expiration year. # noqa: E501 :param exp_year: The exp_year of this PaymentPaymentMethodCardInput. # noqa: E501 :type: str diff --git a/Monei/models/payment_payment_method_cofidis.py b/Monei/models/payment_payment_method_cofidis.py index e987224..a0c65ca 100644 --- a/Monei/models/payment_payment_method_cofidis.py +++ b/Monei/models/payment_payment_method_cofidis.py @@ -3,9 +3,9 @@ """ MONEI API v1 -

The MONEI API is organized around REST. Our API has predictable resource-oriented URLs, accepts JSON-encoded request bodies, returns JSON-encoded responses, and uses standard HTTP response codes, authentication, and verbs.

Base URL:

https://api.monei.com/v1

Client libraries:

Important:

If you are not using our official SDKs, you need to provide a valid User-Agent header in each request, otherwise your requests will be rejected.

# noqa: E501 +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - The version of the OpenAPI document: 1.4.6 + The version of the OpenAPI document: 1.5.0 Generated by: https://openapi-generator.tech """ diff --git a/Monei/models/payment_payment_method_input.py b/Monei/models/payment_payment_method_input.py index c3da142..98c889f 100644 --- a/Monei/models/payment_payment_method_input.py +++ b/Monei/models/payment_payment_method_input.py @@ -3,9 +3,9 @@ """ MONEI API v1 -

The MONEI API is organized around REST. Our API has predictable resource-oriented URLs, accepts JSON-encoded request bodies, returns JSON-encoded responses, and uses standard HTTP response codes, authentication, and verbs.

Base URL:

https://api.monei.com/v1

Client libraries:

Important:

If you are not using our official SDKs, you need to provide a valid User-Agent header in each request, otherwise your requests will be rejected.

# noqa: E501 +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - The version of the OpenAPI document: 1.4.6 + The version of the OpenAPI document: 1.5.0 Generated by: https://openapi-generator.tech """ diff --git a/Monei/models/payment_payment_method_klarna.py b/Monei/models/payment_payment_method_klarna.py index 4491969..0f87c1f 100644 --- a/Monei/models/payment_payment_method_klarna.py +++ b/Monei/models/payment_payment_method_klarna.py @@ -3,9 +3,9 @@ """ MONEI API v1 -

The MONEI API is organized around REST. Our API has predictable resource-oriented URLs, accepts JSON-encoded request bodies, returns JSON-encoded responses, and uses standard HTTP response codes, authentication, and verbs.

Base URL:

https://api.monei.com/v1

Client libraries:

Important:

If you are not using our official SDKs, you need to provide a valid User-Agent header in each request, otherwise your requests will be rejected.

# noqa: E501 +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - The version of the OpenAPI document: 1.4.6 + The version of the OpenAPI document: 1.5.0 Generated by: https://openapi-generator.tech """ @@ -33,8 +33,8 @@ class PaymentPaymentMethodKlarna(object): and the value is json key in definition. """ openapi_types = { - 'billing_category': 'Enum', - 'auth_payment_method': 'Enum' + 'billing_category': 'str', + 'auth_payment_method': 'str' } attribute_map = { @@ -63,7 +63,7 @@ def billing_category(self): :return: The billing_category of this PaymentPaymentMethodKlarna. # noqa: E501 - :rtype: Enum + :rtype: str """ return self._billing_category @@ -73,9 +73,9 @@ def billing_category(self, billing_category): :param billing_category: The billing_category of this PaymentPaymentMethodKlarna. # noqa: E501 - :type: Enum + :type: str """ - allowed_values = [PAY_LATER, PAY_NOW, SLICE_IT, SLICE_IT_BY_CARD] # noqa: E501 + allowed_values = ["PAY_LATER", "PAY_NOW", "SLICE_IT", "SLICE_IT_BY_CARD"] # noqa: E501 if self.local_vars_configuration.client_side_validation and billing_category not in allowed_values: # noqa: E501 raise ValueError( "Invalid value for `billing_category` ({0}), must be one of {1}" # noqa: E501 @@ -90,7 +90,7 @@ def auth_payment_method(self): :return: The auth_payment_method of this PaymentPaymentMethodKlarna. # noqa: E501 - :rtype: Enum + :rtype: str """ return self._auth_payment_method @@ -100,9 +100,9 @@ def auth_payment_method(self, auth_payment_method): :param auth_payment_method: The auth_payment_method of this PaymentPaymentMethodKlarna. # noqa: E501 - :type: Enum + :type: str """ - allowed_values = [invoice, fixed_amount, pix, base_account, deferred_interest, direct_debit, direct_bank_transfer, b2b_invoice, card, slice_it_by_card] # noqa: E501 + allowed_values = ["invoice", "fixed_amount", "pix", "base_account", "deferred_interest", "direct_debit", "direct_bank_transfer", "b2b_invoice", "card", "slice_it_by_card"] # noqa: E501 if self.local_vars_configuration.client_side_validation and auth_payment_method not in allowed_values: # noqa: E501 raise ValueError( "Invalid value for `auth_payment_method` ({0}), must be one of {1}" # noqa: E501 diff --git a/Monei/models/payment_payment_method_mbway.py b/Monei/models/payment_payment_method_mbway.py index a29cd93..5e93c06 100644 --- a/Monei/models/payment_payment_method_mbway.py +++ b/Monei/models/payment_payment_method_mbway.py @@ -3,9 +3,9 @@ """ MONEI API v1 -

The MONEI API is organized around REST. Our API has predictable resource-oriented URLs, accepts JSON-encoded request bodies, returns JSON-encoded responses, and uses standard HTTP response codes, authentication, and verbs.

Base URL:

https://api.monei.com/v1

Client libraries:

Important:

If you are not using our official SDKs, you need to provide a valid User-Agent header in each request, otherwise your requests will be rejected.

# noqa: E501 +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - The version of the OpenAPI document: 1.4.6 + The version of the OpenAPI document: 1.5.0 Generated by: https://openapi-generator.tech """ @@ -56,7 +56,7 @@ def __init__(self, phone_number=None, local_vars_configuration=None): # noqa: E def phone_number(self): """Gets the phone_number of this PaymentPaymentMethodMbway. # noqa: E501 - The phone number used to pay with `mbway`. # noqa: E501 + Phone number in E.164 format used to pay with `mbway`. # noqa: E501 :return: The phone_number of this PaymentPaymentMethodMbway. # noqa: E501 :rtype: str @@ -67,7 +67,7 @@ def phone_number(self): def phone_number(self, phone_number): """Sets the phone_number of this PaymentPaymentMethodMbway. - The phone number used to pay with `mbway`. # noqa: E501 + Phone number in E.164 format used to pay with `mbway`. # noqa: E501 :param phone_number: The phone_number of this PaymentPaymentMethodMbway. # noqa: E501 :type: str diff --git a/Monei/models/payment_payment_method_paypal.py b/Monei/models/payment_payment_method_paypal.py index 8d9ed70..97a21c0 100644 --- a/Monei/models/payment_payment_method_paypal.py +++ b/Monei/models/payment_payment_method_paypal.py @@ -3,9 +3,9 @@ """ MONEI API v1 -

The MONEI API is organized around REST. Our API has predictable resource-oriented URLs, accepts JSON-encoded request bodies, returns JSON-encoded responses, and uses standard HTTP response codes, authentication, and verbs.

Base URL:

https://api.monei.com/v1

Client libraries:

Important:

If you are not using our official SDKs, you need to provide a valid User-Agent header in each request, otherwise your requests will be rejected.

# noqa: E501 +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - The version of the OpenAPI document: 1.4.6 + The version of the OpenAPI document: 1.5.0 Generated by: https://openapi-generator.tech """ diff --git a/Monei/models/payment_payment_method_sepa.py b/Monei/models/payment_payment_method_sepa.py index f32ed38..06a199b 100644 --- a/Monei/models/payment_payment_method_sepa.py +++ b/Monei/models/payment_payment_method_sepa.py @@ -3,9 +3,9 @@ """ MONEI API v1 -

The MONEI API is organized around REST. Our API has predictable resource-oriented URLs, accepts JSON-encoded request bodies, returns JSON-encoded responses, and uses standard HTTP response codes, authentication, and verbs.

Base URL:

https://api.monei.com/v1

Client libraries:

Important:

If you are not using our official SDKs, you need to provide a valid User-Agent header in each request, otherwise your requests will be rejected.

# noqa: E501 +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - The version of the OpenAPI document: 1.4.6 + The version of the OpenAPI document: 1.5.0 Generated by: https://openapi-generator.tech """ diff --git a/Monei/models/payment_payment_method_trustly.py b/Monei/models/payment_payment_method_trustly.py index 305cbba..6e583ef 100644 --- a/Monei/models/payment_payment_method_trustly.py +++ b/Monei/models/payment_payment_method_trustly.py @@ -3,9 +3,9 @@ """ MONEI API v1 -

The MONEI API is organized around REST. Our API has predictable resource-oriented URLs, accepts JSON-encoded request bodies, returns JSON-encoded responses, and uses standard HTTP response codes, authentication, and verbs.

Base URL:

https://api.monei.com/v1

Client libraries:

Important:

If you are not using our official SDKs, you need to provide a valid User-Agent header in each request, otherwise your requests will be rejected.

# noqa: E501 +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - The version of the OpenAPI document: 1.4.6 + The version of the OpenAPI document: 1.5.0 Generated by: https://openapi-generator.tech """ diff --git a/Monei/models/payment_refund_reason.py b/Monei/models/payment_refund_reason.py index 96b772b..5ecc3fa 100644 --- a/Monei/models/payment_refund_reason.py +++ b/Monei/models/payment_refund_reason.py @@ -3,9 +3,9 @@ """ MONEI API v1 -

The MONEI API is organized around REST. Our API has predictable resource-oriented URLs, accepts JSON-encoded request bodies, returns JSON-encoded responses, and uses standard HTTP response codes, authentication, and verbs.

Base URL:

https://api.monei.com/v1

Client libraries:

Important:

If you are not using our official SDKs, you need to provide a valid User-Agent header in each request, otherwise your requests will be rejected.

# noqa: E501 +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - The version of the OpenAPI document: 1.4.6 + The version of the OpenAPI document: 1.5.0 Generated by: https://openapi-generator.tech """ diff --git a/Monei/models/payment_sequence.py b/Monei/models/payment_sequence.py index 003eb96..000044f 100644 --- a/Monei/models/payment_sequence.py +++ b/Monei/models/payment_sequence.py @@ -3,9 +3,9 @@ """ MONEI API v1 -

The MONEI API is organized around REST. Our API has predictable resource-oriented URLs, accepts JSON-encoded request bodies, returns JSON-encoded responses, and uses standard HTTP response codes, authentication, and verbs.

Base URL:

https://api.monei.com/v1

Client libraries:

Important:

If you are not using our official SDKs, you need to provide a valid User-Agent header in each request, otherwise your requests will be rejected.

# noqa: E501 +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - The version of the OpenAPI document: 1.4.6 + The version of the OpenAPI document: 1.5.0 Generated by: https://openapi-generator.tech """ diff --git a/Monei/models/payment_sequence_recurring.py b/Monei/models/payment_sequence_recurring.py index f86264f..c2956a6 100644 --- a/Monei/models/payment_sequence_recurring.py +++ b/Monei/models/payment_sequence_recurring.py @@ -3,9 +3,9 @@ """ MONEI API v1 -

The MONEI API is organized around REST. Our API has predictable resource-oriented URLs, accepts JSON-encoded request bodies, returns JSON-encoded responses, and uses standard HTTP response codes, authentication, and verbs.

Base URL:

https://api.monei.com/v1

Client libraries:

Important:

If you are not using our official SDKs, you need to provide a valid User-Agent header in each request, otherwise your requests will be rejected.

# noqa: E501 +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - The version of the OpenAPI document: 1.4.6 + The version of the OpenAPI document: 1.5.0 Generated by: https://openapi-generator.tech """ diff --git a/Monei/models/payment_session_details.py b/Monei/models/payment_session_details.py index c464259..f5977f8 100644 --- a/Monei/models/payment_session_details.py +++ b/Monei/models/payment_session_details.py @@ -3,9 +3,9 @@ """ MONEI API v1 -

The MONEI API is organized around REST. Our API has predictable resource-oriented URLs, accepts JSON-encoded request bodies, returns JSON-encoded responses, and uses standard HTTP response codes, authentication, and verbs.

Base URL:

https://api.monei.com/v1

Client libraries:

Important:

If you are not using our official SDKs, you need to provide a valid User-Agent header in each request, otherwise your requests will be rejected.

# noqa: E501 +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - The version of the OpenAPI document: 1.4.6 + The version of the OpenAPI document: 1.5.0 Generated by: https://openapi-generator.tech """ diff --git a/Monei/models/payment_shipping_details.py b/Monei/models/payment_shipping_details.py index 8d8a42d..378a006 100644 --- a/Monei/models/payment_shipping_details.py +++ b/Monei/models/payment_shipping_details.py @@ -3,9 +3,9 @@ """ MONEI API v1 -

The MONEI API is organized around REST. Our API has predictable resource-oriented URLs, accepts JSON-encoded request bodies, returns JSON-encoded responses, and uses standard HTTP response codes, authentication, and verbs.

Base URL:

https://api.monei.com/v1

Client libraries:

Important:

If you are not using our official SDKs, you need to provide a valid User-Agent header in each request, otherwise your requests will be rejected.

# noqa: E501 +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - The version of the OpenAPI document: 1.4.6 + The version of the OpenAPI document: 1.5.0 Generated by: https://openapi-generator.tech """ @@ -81,7 +81,7 @@ def __init__(self, name=None, email=None, phone=None, company=None, tax_id=None, def name(self): """Gets the name of this PaymentShippingDetails. # noqa: E501 - The shipping customer’s full name. # noqa: E501 + The shipping customer's full name. # noqa: E501 :return: The name of this PaymentShippingDetails. # noqa: E501 :rtype: str @@ -92,7 +92,7 @@ def name(self): def name(self, name): """Sets the name of this PaymentShippingDetails. - The shipping customer’s full name. # noqa: E501 + The shipping customer's full name. # noqa: E501 :param name: The name of this PaymentShippingDetails. # noqa: E501 :type: str @@ -104,7 +104,7 @@ def name(self, name): def email(self): """Gets the email of this PaymentShippingDetails. # noqa: E501 - The shipping customer’s email address. # noqa: E501 + The shipping customer's email address. # noqa: E501 :return: The email of this PaymentShippingDetails. # noqa: E501 :rtype: str @@ -115,7 +115,7 @@ def email(self): def email(self, email): """Sets the email of this PaymentShippingDetails. - The shipping customer’s email address. # noqa: E501 + The shipping customer's email address. # noqa: E501 :param email: The email of this PaymentShippingDetails. # noqa: E501 :type: str @@ -127,7 +127,7 @@ def email(self, email): def phone(self): """Gets the phone of this PaymentShippingDetails. # noqa: E501 - The shipping customer’s phone number. # noqa: E501 + The shipping customer's phone number in E.164 format. # noqa: E501 :return: The phone of this PaymentShippingDetails. # noqa: E501 :rtype: str @@ -138,7 +138,7 @@ def phone(self): def phone(self, phone): """Sets the phone of this PaymentShippingDetails. - The shipping customer’s phone number. # noqa: E501 + The shipping customer's phone number in E.164 format. # noqa: E501 :param phone: The phone of this PaymentShippingDetails. # noqa: E501 :type: str diff --git a/Monei/models/payment_shop.py b/Monei/models/payment_shop.py index 831d977..42b2758 100644 --- a/Monei/models/payment_shop.py +++ b/Monei/models/payment_shop.py @@ -3,9 +3,9 @@ """ MONEI API v1 -

The MONEI API is organized around REST. Our API has predictable resource-oriented URLs, accepts JSON-encoded request bodies, returns JSON-encoded responses, and uses standard HTTP response codes, authentication, and verbs.

Base URL:

https://api.monei.com/v1

Client libraries:

Important:

If you are not using our official SDKs, you need to provide a valid User-Agent header in each request, otherwise your requests will be rejected.

# noqa: E501 +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - The version of the OpenAPI document: 1.4.6 + The version of the OpenAPI document: 1.5.0 Generated by: https://openapi-generator.tech """ diff --git a/Monei/models/payment_status.py b/Monei/models/payment_status.py index b7fefe2..a9f6428 100644 --- a/Monei/models/payment_status.py +++ b/Monei/models/payment_status.py @@ -3,9 +3,9 @@ """ MONEI API v1 -

The MONEI API is organized around REST. Our API has predictable resource-oriented URLs, accepts JSON-encoded request bodies, returns JSON-encoded responses, and uses standard HTTP response codes, authentication, and verbs.

Base URL:

https://api.monei.com/v1

Client libraries:

Important:

If you are not using our official SDKs, you need to provide a valid User-Agent header in each request, otherwise your requests will be rejected.

# noqa: E501 +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - The version of the OpenAPI document: 1.4.6 + The version of the OpenAPI document: 1.5.0 Generated by: https://openapi-generator.tech """ diff --git a/Monei/models/payment_trace_details.py b/Monei/models/payment_trace_details.py index 17fbcfd..e85ff35 100644 --- a/Monei/models/payment_trace_details.py +++ b/Monei/models/payment_trace_details.py @@ -3,9 +3,9 @@ """ MONEI API v1 -

The MONEI API is organized around REST. Our API has predictable resource-oriented URLs, accepts JSON-encoded request bodies, returns JSON-encoded responses, and uses standard HTTP response codes, authentication, and verbs.

Base URL:

https://api.monei.com/v1

Client libraries:

Important:

If you are not using our official SDKs, you need to provide a valid User-Agent header in each request, otherwise your requests will be rejected.

# noqa: E501 +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - The version of the OpenAPI document: 1.4.6 + The version of the OpenAPI document: 1.5.0 Generated by: https://openapi-generator.tech """ diff --git a/Monei/models/payment_transaction_type.py b/Monei/models/payment_transaction_type.py index 337782c..49d6425 100644 --- a/Monei/models/payment_transaction_type.py +++ b/Monei/models/payment_transaction_type.py @@ -3,9 +3,9 @@ """ MONEI API v1 -

The MONEI API is organized around REST. Our API has predictable resource-oriented URLs, accepts JSON-encoded request bodies, returns JSON-encoded responses, and uses standard HTTP response codes, authentication, and verbs.

Base URL:

https://api.monei.com/v1

Client libraries:

Important:

If you are not using our official SDKs, you need to provide a valid User-Agent header in each request, otherwise your requests will be rejected.

# noqa: E501 +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - The version of the OpenAPI document: 1.4.6 + The version of the OpenAPI document: 1.5.0 Generated by: https://openapi-generator.tech """ diff --git a/Monei/models/recurring_payment_request.py b/Monei/models/recurring_payment_request.py index 05d4ad3..216322b 100644 --- a/Monei/models/recurring_payment_request.py +++ b/Monei/models/recurring_payment_request.py @@ -3,9 +3,9 @@ """ MONEI API v1 -

The MONEI API is organized around REST. Our API has predictable resource-oriented URLs, accepts JSON-encoded request bodies, returns JSON-encoded responses, and uses standard HTTP response codes, authentication, and verbs.

Base URL:

https://api.monei.com/v1

Client libraries:

Important:

If you are not using our official SDKs, you need to provide a valid User-Agent header in each request, otherwise your requests will be rejected.

# noqa: E501 +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - The version of the OpenAPI document: 1.4.6 + The version of the OpenAPI document: 1.5.0 Generated by: https://openapi-generator.tech """ diff --git a/Monei/models/refund_payment_request.py b/Monei/models/refund_payment_request.py index 658b01f..ddb45c8 100644 --- a/Monei/models/refund_payment_request.py +++ b/Monei/models/refund_payment_request.py @@ -3,9 +3,9 @@ """ MONEI API v1 -

The MONEI API is organized around REST. Our API has predictable resource-oriented URLs, accepts JSON-encoded request bodies, returns JSON-encoded responses, and uses standard HTTP response codes, authentication, and verbs.

Base URL:

https://api.monei.com/v1

Client libraries:

Important:

If you are not using our official SDKs, you need to provide a valid User-Agent header in each request, otherwise your requests will be rejected.

# noqa: E501 +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - The version of the OpenAPI document: 1.4.6 + The version of the OpenAPI document: 1.5.0 Generated by: https://openapi-generator.tech """ diff --git a/Monei/models/register_apple_pay_domain_request.py b/Monei/models/register_apple_pay_domain_request.py new file mode 100644 index 0000000..cde861e --- /dev/null +++ b/Monei/models/register_apple_pay_domain_request.py @@ -0,0 +1,123 @@ +# coding: utf-8 + +""" + MONEI API v1 + +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 + + The version of the OpenAPI document: 1.5.0 + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from Monei.configuration import Configuration + + +class RegisterApplePayDomainRequest(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'domain_name': 'str' + } + + attribute_map = { + 'domain_name': 'domainName' + } + + def __init__(self, domain_name=None, local_vars_configuration=None): # noqa: E501 + """RegisterApplePayDomainRequest - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._domain_name = None + self.discriminator = None + + self.domain_name = domain_name + + @property + def domain_name(self): + """Gets the domain_name of this RegisterApplePayDomainRequest. # noqa: E501 + + The domain name to register for Apple Pay. # noqa: E501 + + :return: The domain_name of this RegisterApplePayDomainRequest. # noqa: E501 + :rtype: str + """ + return self._domain_name + + @domain_name.setter + def domain_name(self, domain_name): + """Sets the domain_name of this RegisterApplePayDomainRequest. + + The domain name to register for Apple Pay. # noqa: E501 + + :param domain_name: The domain_name of this RegisterApplePayDomainRequest. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and domain_name is None: # noqa: E501 + raise ValueError("Invalid value for `domain_name`, must not be `None`") # noqa: E501 + + self._domain_name = domain_name + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, RegisterApplePayDomainRequest): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, RegisterApplePayDomainRequest): + return True + + return self.to_dict() != other.to_dict() diff --git a/Monei/models/send_payment_link_request.py b/Monei/models/send_payment_link_request.py index f2106bc..4036279 100644 --- a/Monei/models/send_payment_link_request.py +++ b/Monei/models/send_payment_link_request.py @@ -3,9 +3,9 @@ """ MONEI API v1 -

The MONEI API is organized around REST. Our API has predictable resource-oriented URLs, accepts JSON-encoded request bodies, returns JSON-encoded responses, and uses standard HTTP response codes, authentication, and verbs.

Base URL:

https://api.monei.com/v1

Client libraries:

Important:

If you are not using our official SDKs, you need to provide a valid User-Agent header in each request, otherwise your requests will be rejected.

# noqa: E501 +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - The version of the OpenAPI document: 1.4.6 + The version of the OpenAPI document: 1.5.0 Generated by: https://openapi-generator.tech """ diff --git a/Monei/models/send_payment_receipt_request.py b/Monei/models/send_payment_receipt_request.py index 48ba5e9..ad19e8d 100644 --- a/Monei/models/send_payment_receipt_request.py +++ b/Monei/models/send_payment_receipt_request.py @@ -3,9 +3,9 @@ """ MONEI API v1 -

The MONEI API is organized around REST. Our API has predictable resource-oriented URLs, accepts JSON-encoded request bodies, returns JSON-encoded responses, and uses standard HTTP response codes, authentication, and verbs.

Base URL:

https://api.monei.com/v1

Client libraries:

Important:

If you are not using our official SDKs, you need to provide a valid User-Agent header in each request, otherwise your requests will be rejected.

# noqa: E501 +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - The version of the OpenAPI document: 1.4.6 + The version of the OpenAPI document: 1.5.0 Generated by: https://openapi-generator.tech """ diff --git a/Monei/models/send_payment_request_request.py b/Monei/models/send_payment_request_request.py new file mode 100644 index 0000000..e178fff --- /dev/null +++ b/Monei/models/send_payment_request_request.py @@ -0,0 +1,149 @@ +# coding: utf-8 + +""" + MONEI API v1 + +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 + + The version of the OpenAPI document: 1.5.0 + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from Monei.configuration import Configuration + + +class SendPaymentRequestRequest(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'phone_number': 'str', + 'language': 'PaymentMessageLanguage' + } + + attribute_map = { + 'phone_number': 'phoneNumber', + 'language': 'language' + } + + def __init__(self, phone_number=None, language=None, local_vars_configuration=None): # noqa: E501 + """SendPaymentRequestRequest - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._phone_number = None + self._language = None + self.discriminator = None + + self.phone_number = phone_number + if language is not None: + self.language = language + + @property + def phone_number(self): + """Gets the phone_number of this SendPaymentRequestRequest. # noqa: E501 + + Phone number in E.164 format. The customer will receive payment link on this phone number. # noqa: E501 + + :return: The phone_number of this SendPaymentRequestRequest. # noqa: E501 + :rtype: str + """ + return self._phone_number + + @phone_number.setter + def phone_number(self, phone_number): + """Sets the phone_number of this SendPaymentRequestRequest. + + Phone number in E.164 format. The customer will receive payment link on this phone number. # noqa: E501 + + :param phone_number: The phone_number of this SendPaymentRequestRequest. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and phone_number is None: # noqa: E501 + raise ValueError("Invalid value for `phone_number`, must not be `None`") # noqa: E501 + + self._phone_number = phone_number + + @property + def language(self): + """Gets the language of this SendPaymentRequestRequest. # noqa: E501 + + + :return: The language of this SendPaymentRequestRequest. # noqa: E501 + :rtype: PaymentMessageLanguage + """ + return self._language + + @language.setter + def language(self, language): + """Sets the language of this SendPaymentRequestRequest. + + + :param language: The language of this SendPaymentRequestRequest. # noqa: E501 + :type: PaymentMessageLanguage + """ + + self._language = language + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, SendPaymentRequestRequest): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, SendPaymentRequestRequest): + return True + + return self.to_dict() != other.to_dict() diff --git a/Monei/models/send_subscription_link_request.py b/Monei/models/send_subscription_link_request.py new file mode 100644 index 0000000..d88bb4c --- /dev/null +++ b/Monei/models/send_subscription_link_request.py @@ -0,0 +1,212 @@ +# coding: utf-8 + +""" + MONEI API v1 + +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 + + The version of the OpenAPI document: 1.5.0 + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from Monei.configuration import Configuration + + +class SendSubscriptionLinkRequest(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'customer_email': 'str', + 'customer_phone': 'str', + 'channel': 'str', + 'language': 'str' + } + + attribute_map = { + 'customer_email': 'customerEmail', + 'customer_phone': 'customerPhone', + 'channel': 'channel', + 'language': 'language' + } + + def __init__(self, customer_email=None, customer_phone=None, channel=None, language=None, local_vars_configuration=None): # noqa: E501 + """SendSubscriptionLinkRequest - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._customer_email = None + self._customer_phone = None + self._channel = None + self._language = None + self.discriminator = None + + if customer_email is not None: + self.customer_email = customer_email + if customer_phone is not None: + self.customer_phone = customer_phone + if channel is not None: + self.channel = channel + if language is not None: + self.language = language + + @property + def customer_email(self): + """Gets the customer_email of this SendSubscriptionLinkRequest. # noqa: E501 + + Customer email to send the subscription link to # noqa: E501 + + :return: The customer_email of this SendSubscriptionLinkRequest. # noqa: E501 + :rtype: str + """ + return self._customer_email + + @customer_email.setter + def customer_email(self, customer_email): + """Sets the customer_email of this SendSubscriptionLinkRequest. + + Customer email to send the subscription link to # noqa: E501 + + :param customer_email: The customer_email of this SendSubscriptionLinkRequest. # noqa: E501 + :type: str + """ + + self._customer_email = customer_email + + @property + def customer_phone(self): + """Gets the customer_phone of this SendSubscriptionLinkRequest. # noqa: E501 + + Customer phone number to send the subscription link to # noqa: E501 + + :return: The customer_phone of this SendSubscriptionLinkRequest. # noqa: E501 + :rtype: str + """ + return self._customer_phone + + @customer_phone.setter + def customer_phone(self, customer_phone): + """Sets the customer_phone of this SendSubscriptionLinkRequest. + + Customer phone number to send the subscription link to # noqa: E501 + + :param customer_phone: The customer_phone of this SendSubscriptionLinkRequest. # noqa: E501 + :type: str + """ + + self._customer_phone = customer_phone + + @property + def channel(self): + """Gets the channel of this SendSubscriptionLinkRequest. # noqa: E501 + + Channel to use for sending the subscription link # noqa: E501 + + :return: The channel of this SendSubscriptionLinkRequest. # noqa: E501 + :rtype: str + """ + return self._channel + + @channel.setter + def channel(self, channel): + """Sets the channel of this SendSubscriptionLinkRequest. + + Channel to use for sending the subscription link # noqa: E501 + + :param channel: The channel of this SendSubscriptionLinkRequest. # noqa: E501 + :type: str + """ + allowed_values = ["email", "sms"] # noqa: E501 + if self.local_vars_configuration.client_side_validation and channel not in allowed_values: # noqa: E501 + raise ValueError( + "Invalid value for `channel` ({0}), must be one of {1}" # noqa: E501 + .format(channel, allowed_values) + ) + + self._channel = channel + + @property + def language(self): + """Gets the language of this SendSubscriptionLinkRequest. # noqa: E501 + + Language to use for the subscription link message # noqa: E501 + + :return: The language of this SendSubscriptionLinkRequest. # noqa: E501 + :rtype: str + """ + return self._language + + @language.setter + def language(self, language): + """Sets the language of this SendSubscriptionLinkRequest. + + Language to use for the subscription link message # noqa: E501 + + :param language: The language of this SendSubscriptionLinkRequest. # noqa: E501 + :type: str + """ + + self._language = language + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, SendSubscriptionLinkRequest): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, SendSubscriptionLinkRequest): + return True + + return self.to_dict() != other.to_dict() diff --git a/Monei/models/send_subscription_status_request.py b/Monei/models/send_subscription_status_request.py new file mode 100644 index 0000000..320a476 --- /dev/null +++ b/Monei/models/send_subscription_status_request.py @@ -0,0 +1,212 @@ +# coding: utf-8 + +""" + MONEI API v1 + +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 + + The version of the OpenAPI document: 1.5.0 + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from Monei.configuration import Configuration + + +class SendSubscriptionStatusRequest(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'customer_email': 'str', + 'customer_phone': 'str', + 'channel': 'str', + 'language': 'str' + } + + attribute_map = { + 'customer_email': 'customerEmail', + 'customer_phone': 'customerPhone', + 'channel': 'channel', + 'language': 'language' + } + + def __init__(self, customer_email=None, customer_phone=None, channel=None, language=None, local_vars_configuration=None): # noqa: E501 + """SendSubscriptionStatusRequest - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._customer_email = None + self._customer_phone = None + self._channel = None + self._language = None + self.discriminator = None + + if customer_email is not None: + self.customer_email = customer_email + if customer_phone is not None: + self.customer_phone = customer_phone + if channel is not None: + self.channel = channel + if language is not None: + self.language = language + + @property + def customer_email(self): + """Gets the customer_email of this SendSubscriptionStatusRequest. # noqa: E501 + + Customer email to send the subscription status to # noqa: E501 + + :return: The customer_email of this SendSubscriptionStatusRequest. # noqa: E501 + :rtype: str + """ + return self._customer_email + + @customer_email.setter + def customer_email(self, customer_email): + """Sets the customer_email of this SendSubscriptionStatusRequest. + + Customer email to send the subscription status to # noqa: E501 + + :param customer_email: The customer_email of this SendSubscriptionStatusRequest. # noqa: E501 + :type: str + """ + + self._customer_email = customer_email + + @property + def customer_phone(self): + """Gets the customer_phone of this SendSubscriptionStatusRequest. # noqa: E501 + + Customer phone number to send the subscription status to # noqa: E501 + + :return: The customer_phone of this SendSubscriptionStatusRequest. # noqa: E501 + :rtype: str + """ + return self._customer_phone + + @customer_phone.setter + def customer_phone(self, customer_phone): + """Sets the customer_phone of this SendSubscriptionStatusRequest. + + Customer phone number to send the subscription status to # noqa: E501 + + :param customer_phone: The customer_phone of this SendSubscriptionStatusRequest. # noqa: E501 + :type: str + """ + + self._customer_phone = customer_phone + + @property + def channel(self): + """Gets the channel of this SendSubscriptionStatusRequest. # noqa: E501 + + Channel to use for sending the subscription status # noqa: E501 + + :return: The channel of this SendSubscriptionStatusRequest. # noqa: E501 + :rtype: str + """ + return self._channel + + @channel.setter + def channel(self, channel): + """Sets the channel of this SendSubscriptionStatusRequest. + + Channel to use for sending the subscription status # noqa: E501 + + :param channel: The channel of this SendSubscriptionStatusRequest. # noqa: E501 + :type: str + """ + allowed_values = ["email", "sms"] # noqa: E501 + if self.local_vars_configuration.client_side_validation and channel not in allowed_values: # noqa: E501 + raise ValueError( + "Invalid value for `channel` ({0}), must be one of {1}" # noqa: E501 + .format(channel, allowed_values) + ) + + self._channel = channel + + @property + def language(self): + """Gets the language of this SendSubscriptionStatusRequest. # noqa: E501 + + Language to use for the subscription status message # noqa: E501 + + :return: The language of this SendSubscriptionStatusRequest. # noqa: E501 + :rtype: str + """ + return self._language + + @language.setter + def language(self, language): + """Sets the language of this SendSubscriptionStatusRequest. + + Language to use for the subscription status message # noqa: E501 + + :param language: The language of this SendSubscriptionStatusRequest. # noqa: E501 + :type: str + """ + + self._language = language + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, SendSubscriptionStatusRequest): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, SendSubscriptionStatusRequest): + return True + + return self.to_dict() != other.to_dict() diff --git a/Monei/models/subscription.py b/Monei/models/subscription.py index 75ad79b..9ffb3a8 100644 --- a/Monei/models/subscription.py +++ b/Monei/models/subscription.py @@ -3,9 +3,9 @@ """ MONEI API v1 -

The MONEI API is organized around REST. Our API has predictable resource-oriented URLs, accepts JSON-encoded request bodies, returns JSON-encoded responses, and uses standard HTTP response codes, authentication, and verbs.

Base URL:

https://api.monei.com/v1

Client libraries:

Important:

If you are not using our official SDKs, you need to provide a valid User-Agent header in each request, otherwise your requests will be rejected.

# noqa: E501 +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - The version of the OpenAPI document: 1.4.6 + The version of the OpenAPI document: 1.5.0 Generated by: https://openapi-generator.tech """ @@ -54,6 +54,7 @@ class Subscription(object): 'trial_period_end': 'float', 'next_payment_at': 'int', 'retry_count': 'int', + 'retry_schedule': 'list[object]', 'cancel_at_period_end': 'bool', 'pause_at_period_end': 'bool', 'trace_details': 'PaymentTraceDetails', @@ -87,6 +88,7 @@ class Subscription(object): 'trial_period_end': 'trialPeriodEnd', 'next_payment_at': 'nextPaymentAt', 'retry_count': 'retryCount', + 'retry_schedule': 'retrySchedule', 'cancel_at_period_end': 'cancelAtPeriodEnd', 'pause_at_period_end': 'pauseAtPeriodEnd', 'trace_details': 'traceDetails', @@ -98,7 +100,7 @@ class Subscription(object): 'updated_at': 'updatedAt' } - def __init__(self, id=None, amount=None, currency=None, description=None, account_id=None, livemode=None, status=None, customer=None, billing_details=None, shipping_details=None, interval=None, interval_count=None, pause_interval_count=None, last_order_id=None, last_payment=None, payment_method=None, current_period_start=None, current_period_end=None, trial_period_end=None, next_payment_at=None, retry_count=None, cancel_at_period_end=None, pause_at_period_end=None, trace_details=None, sequence_id=None, callback_url=None, payment_callback_url=None, metadata=None, created_at=None, updated_at=None, local_vars_configuration=None): # noqa: E501 + def __init__(self, id=None, amount=None, currency=None, description=None, account_id=None, livemode=None, status=None, customer=None, billing_details=None, shipping_details=None, interval=None, interval_count=None, pause_interval_count=None, last_order_id=None, last_payment=None, payment_method=None, current_period_start=None, current_period_end=None, trial_period_end=None, next_payment_at=None, retry_count=None, retry_schedule=None, cancel_at_period_end=None, pause_at_period_end=None, trace_details=None, sequence_id=None, callback_url=None, payment_callback_url=None, metadata=None, created_at=None, updated_at=None, local_vars_configuration=None): # noqa: E501 """Subscription - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() @@ -125,6 +127,7 @@ def __init__(self, id=None, amount=None, currency=None, description=None, accoun self._trial_period_end = None self._next_payment_at = None self._retry_count = None + self._retry_schedule = None self._cancel_at_period_end = None self._pause_at_period_end = None self._trace_details = None @@ -178,6 +181,8 @@ def __init__(self, id=None, amount=None, currency=None, description=None, accoun self.next_payment_at = next_payment_at if retry_count is not None: self.retry_count = retry_count + if retry_schedule is not None: + self.retry_schedule = retry_schedule if cancel_at_period_end is not None: self.cancel_at_period_end = cancel_at_period_end if pause_at_period_end is not None: @@ -666,6 +671,29 @@ def retry_count(self, retry_count): self._retry_count = retry_count + @property + def retry_schedule(self): + """Gets the retry_schedule of this Subscription. # noqa: E501 + + Defines a custom schedule for retrying failed subscription payments. Each entry in the array specifies how long to wait before attempting the next payment retry. If not specified, the system's default retry schedule will be used. # noqa: E501 + + :return: The retry_schedule of this Subscription. # noqa: E501 + :rtype: list[object] + """ + return self._retry_schedule + + @retry_schedule.setter + def retry_schedule(self, retry_schedule): + """Sets the retry_schedule of this Subscription. + + Defines a custom schedule for retrying failed subscription payments. Each entry in the array specifies how long to wait before attempting the next payment retry. If not specified, the system's default retry schedule will be used. # noqa: E501 + + :param retry_schedule: The retry_schedule of this Subscription. # noqa: E501 + :type: list[object] + """ + + self._retry_schedule = retry_schedule + @property def cancel_at_period_end(self): """Gets the cancel_at_period_end of this Subscription. # noqa: E501 diff --git a/Monei/models/subscription_interval.py b/Monei/models/subscription_interval.py index 61457a5..6f73be5 100644 --- a/Monei/models/subscription_interval.py +++ b/Monei/models/subscription_interval.py @@ -3,9 +3,9 @@ """ MONEI API v1 -

The MONEI API is organized around REST. Our API has predictable resource-oriented URLs, accepts JSON-encoded request bodies, returns JSON-encoded responses, and uses standard HTTP response codes, authentication, and verbs.

Base URL:

https://api.monei.com/v1

Client libraries:

Important:

If you are not using our official SDKs, you need to provide a valid User-Agent header in each request, otherwise your requests will be rejected.

# noqa: E501 +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - The version of the OpenAPI document: 1.4.6 + The version of the OpenAPI document: 1.5.0 Generated by: https://openapi-generator.tech """ diff --git a/Monei/models/subscription_last_payment.py b/Monei/models/subscription_last_payment.py index 286d4da..25f2517 100644 --- a/Monei/models/subscription_last_payment.py +++ b/Monei/models/subscription_last_payment.py @@ -3,9 +3,9 @@ """ MONEI API v1 -

The MONEI API is organized around REST. Our API has predictable resource-oriented URLs, accepts JSON-encoded request bodies, returns JSON-encoded responses, and uses standard HTTP response codes, authentication, and verbs.

Base URL:

https://api.monei.com/v1

Client libraries:

Important:

If you are not using our official SDKs, you need to provide a valid User-Agent header in each request, otherwise your requests will be rejected.

# noqa: E501 +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - The version of the OpenAPI document: 1.4.6 + The version of the OpenAPI document: 1.5.0 Generated by: https://openapi-generator.tech """ diff --git a/Monei/models/subscription_payment_method.py b/Monei/models/subscription_payment_method.py index ae9cabe..23f392a 100644 --- a/Monei/models/subscription_payment_method.py +++ b/Monei/models/subscription_payment_method.py @@ -3,9 +3,9 @@ """ MONEI API v1 -

The MONEI API is organized around REST. Our API has predictable resource-oriented URLs, accepts JSON-encoded request bodies, returns JSON-encoded responses, and uses standard HTTP response codes, authentication, and verbs.

Base URL:

https://api.monei.com/v1

Client libraries:

Important:

If you are not using our official SDKs, you need to provide a valid User-Agent header in each request, otherwise your requests will be rejected.

# noqa: E501 +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - The version of the OpenAPI document: 1.4.6 + The version of the OpenAPI document: 1.5.0 Generated by: https://openapi-generator.tech """ diff --git a/Monei/models/subscription_payment_method_card.py b/Monei/models/subscription_payment_method_card.py index 3bcb88e..73b4f67 100644 --- a/Monei/models/subscription_payment_method_card.py +++ b/Monei/models/subscription_payment_method_card.py @@ -3,9 +3,9 @@ """ MONEI API v1 -

The MONEI API is organized around REST. Our API has predictable resource-oriented URLs, accepts JSON-encoded request bodies, returns JSON-encoded responses, and uses standard HTTP response codes, authentication, and verbs.

Base URL:

https://api.monei.com/v1

Client libraries:

Important:

If you are not using our official SDKs, you need to provide a valid User-Agent header in each request, otherwise your requests will be rejected.

# noqa: E501 +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - The version of the OpenAPI document: 1.4.6 + The version of the OpenAPI document: 1.5.0 Generated by: https://openapi-generator.tech """ diff --git a/Monei/models/subscription_status.py b/Monei/models/subscription_status.py index e62545a..5febe4f 100644 --- a/Monei/models/subscription_status.py +++ b/Monei/models/subscription_status.py @@ -3,9 +3,9 @@ """ MONEI API v1 -

The MONEI API is organized around REST. Our API has predictable resource-oriented URLs, accepts JSON-encoded request bodies, returns JSON-encoded responses, and uses standard HTTP response codes, authentication, and verbs.

Base URL:

https://api.monei.com/v1

Client libraries:

Important:

If you are not using our official SDKs, you need to provide a valid User-Agent header in each request, otherwise your requests will be rejected.

# noqa: E501 +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - The version of the OpenAPI document: 1.4.6 + The version of the OpenAPI document: 1.5.0 Generated by: https://openapi-generator.tech """ diff --git a/Monei/models/update_subscription_request.py b/Monei/models/update_subscription_request.py index 36c6c35..d814e09 100644 --- a/Monei/models/update_subscription_request.py +++ b/Monei/models/update_subscription_request.py @@ -3,9 +3,9 @@ """ MONEI API v1 -

The MONEI API is organized around REST. Our API has predictable resource-oriented URLs, accepts JSON-encoded request bodies, returns JSON-encoded responses, and uses standard HTTP response codes, authentication, and verbs.

Base URL:

https://api.monei.com/v1

Client libraries:

Important:

If you are not using our official SDKs, you need to provide a valid User-Agent header in each request, otherwise your requests will be rejected.

# noqa: E501 +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - The version of the OpenAPI document: 1.4.6 + The version of the OpenAPI document: 1.5.0 Generated by: https://openapi-generator.tech """ @@ -46,6 +46,7 @@ class UpdateSubscriptionRequest(object): 'pause_at_period_end': 'bool', 'cancel_at_period_end': 'bool', 'pause_interval_count': 'int', + 'retry_schedule': 'list[object]', 'metadata': 'object' } @@ -63,10 +64,11 @@ class UpdateSubscriptionRequest(object): 'pause_at_period_end': 'pauseAtPeriodEnd', 'cancel_at_period_end': 'cancelAtPeriodEnd', 'pause_interval_count': 'pauseIntervalCount', + 'retry_schedule': 'retrySchedule', 'metadata': 'metadata' } - def __init__(self, amount=None, interval=None, interval_count=None, description=None, customer=None, billing_details=None, shipping_details=None, trial_period_end=None, callback_url=None, payment_callback_url=None, pause_at_period_end=None, cancel_at_period_end=None, pause_interval_count=None, metadata=None, local_vars_configuration=None): # noqa: E501 + def __init__(self, amount=None, interval=None, interval_count=None, description=None, customer=None, billing_details=None, shipping_details=None, trial_period_end=None, callback_url=None, payment_callback_url=None, pause_at_period_end=None, cancel_at_period_end=None, pause_interval_count=None, retry_schedule=None, metadata=None, local_vars_configuration=None): # noqa: E501 """UpdateSubscriptionRequest - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() @@ -85,6 +87,7 @@ def __init__(self, amount=None, interval=None, interval_count=None, description= self._pause_at_period_end = None self._cancel_at_period_end = None self._pause_interval_count = None + self._retry_schedule = None self._metadata = None self.discriminator = None @@ -114,6 +117,8 @@ def __init__(self, amount=None, interval=None, interval_count=None, description= self.cancel_at_period_end = cancel_at_period_end if pause_interval_count is not None: self.pause_interval_count = pause_interval_count + if retry_schedule is not None: + self.retry_schedule = retry_schedule if metadata is not None: self.metadata = metadata @@ -408,6 +413,29 @@ def pause_interval_count(self, pause_interval_count): self._pause_interval_count = pause_interval_count + @property + def retry_schedule(self): + """Gets the retry_schedule of this UpdateSubscriptionRequest. # noqa: E501 + + Defines a custom schedule for retrying failed subscription payments. Each entry in the array specifies how long to wait before attempting the next payment retry. If not specified, the system's default retry schedule will be used. # noqa: E501 + + :return: The retry_schedule of this UpdateSubscriptionRequest. # noqa: E501 + :rtype: list[object] + """ + return self._retry_schedule + + @retry_schedule.setter + def retry_schedule(self, retry_schedule): + """Sets the retry_schedule of this UpdateSubscriptionRequest. + + Defines a custom schedule for retrying failed subscription payments. Each entry in the array specifies how long to wait before attempting the next payment retry. If not specified, the system's default retry schedule will be used. # noqa: E501 + + :param retry_schedule: The retry_schedule of this UpdateSubscriptionRequest. # noqa: E501 + :type: list[object] + """ + + self._retry_schedule = retry_schedule + @property def metadata(self): """Gets the metadata of this UpdateSubscriptionRequest. # noqa: E501 diff --git a/Monei/models/validate_bizum_phone_request.py b/Monei/models/validate_bizum_phone_request.py index c00e270..d456b82 100644 --- a/Monei/models/validate_bizum_phone_request.py +++ b/Monei/models/validate_bizum_phone_request.py @@ -3,9 +3,9 @@ """ MONEI API v1 -

The MONEI API is organized around REST. Our API has predictable resource-oriented URLs, accepts JSON-encoded request bodies, returns JSON-encoded responses, and uses standard HTTP response codes, authentication, and verbs.

Base URL:

https://api.monei.com/v1

Client libraries:

Important:

If you are not using our official SDKs, you need to provide a valid User-Agent header in each request, otherwise your requests will be rejected.

# noqa: E501 +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - The version of the OpenAPI document: 1.4.6 + The version of the OpenAPI document: 1.5.0 Generated by: https://openapi-generator.tech """ diff --git a/Monei/rest.py b/Monei/rest.py index c6513e3..506bc2e 100644 --- a/Monei/rest.py +++ b/Monei/rest.py @@ -1,30 +1,25 @@ -# coding: utf-8 - """ MONEI API v1 -

The MONEI API is organized around REST. Our API has predictable resource-oriented URLs, accepts JSON-encoded request bodies, returns JSON-encoded responses, and uses standard HTTP response codes, authentication, and verbs.

Base URL:

https://api.monei.com/v1

Client libraries:

Important:

If you are not using our official SDKs, you need to provide a valid User-Agent header in each request, otherwise your requests will be rejected.

# noqa: E501 +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - The version of the OpenAPI document: 1.4.6 + The version of the OpenAPI document: 1.5.0 Generated by: https://openapi-generator.tech """ -from __future__ import absolute_import - import io import json import logging import re import ssl - -import certifi -# python 2 and python 3 compatibility library -import six -from six.moves.urllib.parse import urlencode +from urllib.parse import urlencode +from urllib.parse import urlparse +from urllib.request import proxy_bypass_environment import urllib3 +import ipaddress -from Monei.exceptions import ApiException, ApiValueError +from Monei.exceptions import ApiException, UnauthorizedException, ForbiddenException, NotFoundException, ServiceException, ApiValueError logger = logging.getLogger(__name__) @@ -62,13 +57,6 @@ def __init__(self, configuration, pools_size=4, maxsize=None): else: cert_reqs = ssl.CERT_NONE - # ca_certs - if configuration.ssl_ca_cert: - ca_certs = configuration.ssl_ca_cert - else: - # if not set certificate file, use Mozilla's root certificates. - ca_certs = certifi.where() - addition_pool_args = {} if configuration.assert_hostname is not None: addition_pool_args['assert_hostname'] = configuration.assert_hostname # noqa: E501 @@ -76,6 +64,9 @@ def __init__(self, configuration, pools_size=4, maxsize=None): if configuration.retries is not None: addition_pool_args['retries'] = configuration.retries + if configuration.socket_options is not None: + addition_pool_args['socket_options'] = configuration.socket_options + if maxsize is None: if configuration.connection_pool_maxsize is not None: maxsize = configuration.connection_pool_maxsize @@ -83,12 +74,13 @@ def __init__(self, configuration, pools_size=4, maxsize=None): maxsize = 4 # https pool manager - if configuration.proxy: + if configuration.proxy and not should_bypass_proxies( + configuration.host, no_proxy=configuration.no_proxy or ''): self.pool_manager = urllib3.ProxyManager( num_pools=pools_size, maxsize=maxsize, cert_reqs=cert_reqs, - ca_certs=ca_certs, + ca_certs=configuration.ssl_ca_cert, cert_file=configuration.cert_file, key_file=configuration.key_file, proxy_url=configuration.proxy, @@ -100,7 +92,7 @@ def __init__(self, configuration, pools_size=4, maxsize=None): num_pools=pools_size, maxsize=maxsize, cert_reqs=cert_reqs, - ca_certs=ca_certs, + ca_certs=configuration.ssl_ca_cert, cert_file=configuration.cert_file, key_file=configuration.key_file, **addition_pool_args @@ -141,22 +133,23 @@ def request(self, method, url, query_params=None, headers=None, timeout = None if _request_timeout: - if isinstance(_request_timeout, (int, ) if six.PY3 else (int, long)): # noqa: E501,F821 + if isinstance(_request_timeout, (int, float)): # noqa: E501,F821 timeout = urllib3.Timeout(total=_request_timeout) elif (isinstance(_request_timeout, tuple) and len(_request_timeout) == 2): timeout = urllib3.Timeout( connect=_request_timeout[0], read=_request_timeout[1]) - if 'Content-Type' not in headers: - headers['Content-Type'] = 'application/json' - try: # For `POST`, `PUT`, `PATCH`, `OPTIONS`, `DELETE` if method in ['POST', 'PUT', 'PATCH', 'OPTIONS', 'DELETE']: + # Only set a default Content-Type for POST, PUT, PATCH and OPTIONS requests + if (method != 'DELETE') and ('Content-Type' not in headers): + headers['Content-Type'] = 'application/json' if query_params: url += '?' + urlencode(query_params) - if re.search('json', headers['Content-Type'], re.IGNORECASE): + if ('Content-Type' not in headers) or (re.search('json', + headers['Content-Type'], re.IGNORECASE)): request_body = None if body is not None: request_body = json.dumps(body) @@ -221,6 +214,18 @@ 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) return r @@ -289,3 +294,59 @@ def PATCH(self, url, headers=None, query_params=None, post_params=None, _preload_content=_preload_content, _request_timeout=_request_timeout, body=body) + +# end of class RESTClientObject + + +def is_ipv4(target): + """ Test if IPv4 address or not + """ + try: + chk = ipaddress.IPv4Address(target) + return True + except ipaddress.AddressValueError: + return False + + +def in_ipv4net(target, net): + """ Test if target belongs to given IPv4 network + """ + try: + nw = ipaddress.IPv4Network(net) + ip = ipaddress.IPv4Address(target) + if ip in nw: + return True + return False + except ipaddress.AddressValueError: + return False + except ipaddress.NetmaskValueError: + return False + + +def should_bypass_proxies(url, no_proxy=None): + """ Yet another requests.should_bypass_proxies + Test if proxies should not be used for a particular url. + """ + + parsed = urlparse(url) + + # special cases + if parsed.hostname in [None, '']: + return True + + # special cases + if no_proxy in [None, '']: + return False + if no_proxy == '*': + return True + + no_proxy = no_proxy.lower().replace(' ', ''); + entries = ( + host for host in no_proxy.split(',') if host + ) + + if is_ipv4(parsed.hostname): + for item in entries: + if in_ipv4net(parsed.hostname, item): + return True + return proxy_bypass_environment(parsed.hostname, {'no': no_proxy}) diff --git a/build/package.json b/build/package.json index 178b26e..efd5387 100644 --- a/build/package.json +++ b/build/package.json @@ -4,17 +4,17 @@ "description": "MONEI PYTHON SDK", "author": "monei", "scripts": { - "build": "openapi-generator generate -i https://js.monei.com/api/v1/openapi.json -g python --remove-operation-id-prefix -c ./config.json -o ../ && ./post-build.sh", - "build:local": "openapi-generator generate -i ./openapi.json -g python --remove-operation-id-prefix -c ./config.json -o ../ && ./post-build.sh", + "build": "openapi-generator-cli generate -i https://js.monei.com/api/v1/openapi.json -g python --remove-operation-id-prefix -c ./config.json -o ../ && ./post-build.sh", + "build:local": "openapi-generator-cli generate -i ./openapi.json -g python --remove-operation-id-prefix -c ./config.json -o ../ && ./post-build.sh", "publish": "./release.sh", "release": "release-it", "prepare": "yarn run build" }, "license": "MIT", "devDependencies": { - "@openapitools/openapi-generator-cli": "1.0.18-4.3.1", - "@release-it/bumper": "^2.0.0", - "release-it": "^14.10.0" + "@openapitools/openapi-generator-cli": "2.17.0", + "@release-it/bumper": "^7.0.1", + "release-it": "^18.1.2" }, "release-it": { "git": { @@ -45,5 +45,5 @@ } } }, - "packageManager": "yarn@4.2.1" + "packageManager": "yarn@4.7.0" } diff --git a/build/yarn.lock b/build/yarn.lock index 317d882..d2eb1ad 100644 --- a/build/yarn.lock +++ b/build/yarn.lock @@ -32,13 +32,321 @@ __metadata: languageName: node linkType: hard -"@iarna/toml@npm:2.2.5, @iarna/toml@npm:^2.2.5": +"@babel/runtime@npm:^7.21.0": + version: 7.26.9 + resolution: "@babel/runtime@npm:7.26.9" + dependencies: + regenerator-runtime: "npm:^0.14.0" + checksum: 10c0/e8517131110a6ec3a7360881438b85060e49824e007f4a64b5dfa9192cf2bb5c01e84bfc109f02d822c7edb0db926928dd6b991e3ee460b483fb0fac43152d9b + languageName: node + linkType: hard + +"@iarna/toml@npm:2.2.5": version: 2.2.5 resolution: "@iarna/toml@npm:2.2.5" checksum: 10c0/d095381ad4554aca233b7cf5a91f243ef619e5e15efd3157bc640feac320545450d14b394aebbf6f02a2047437ced778ae598d5879a995441ab7b6c0b2c2f201 languageName: node linkType: hard +"@iarna/toml@npm:^3.0.0": + version: 3.0.0 + resolution: "@iarna/toml@npm:3.0.0" + checksum: 10c0/419506f8d8183eb34e3d8d632dacbaf40790d20d56290acf3ad90765e20111140335e682b02e9fe76713fbf35dc652b2b482dbfd752c0aa890e6ef39b8f1c421 + languageName: node + linkType: hard + +"@inquirer/checkbox@npm:^4.1.2": + version: 4.1.2 + resolution: "@inquirer/checkbox@npm:4.1.2" + dependencies: + "@inquirer/core": "npm:^10.1.7" + "@inquirer/figures": "npm:^1.0.10" + "@inquirer/type": "npm:^3.0.4" + ansi-escapes: "npm:^4.3.2" + yoctocolors-cjs: "npm:^2.1.2" + peerDependencies: + "@types/node": ">=18" + peerDependenciesMeta: + "@types/node": + optional: true + checksum: 10c0/5edd83063cf6f828ca2400561c857f1869382d431d584b009d3cd04a5f12fb1a4887fe4c9bd4c93f7f68e07a75e00aabdf85c58f2964eff356ac55dd52d01cee + languageName: node + linkType: hard + +"@inquirer/confirm@npm:^5.1.6": + version: 5.1.6 + resolution: "@inquirer/confirm@npm:5.1.6" + dependencies: + "@inquirer/core": "npm:^10.1.7" + "@inquirer/type": "npm:^3.0.4" + peerDependencies: + "@types/node": ">=18" + peerDependenciesMeta: + "@types/node": + optional: true + checksum: 10c0/57b667f8096ec261504b613656e7b7718a238a73e059870a2b8e97c3127bc50085251100ed371250733b7cc5cd68122d8694d6a04a46de95d08bb590a8437b11 + languageName: node + linkType: hard + +"@inquirer/core@npm:^10.1.2, @inquirer/core@npm:^10.1.7": + version: 10.1.7 + resolution: "@inquirer/core@npm:10.1.7" + dependencies: + "@inquirer/figures": "npm:^1.0.10" + "@inquirer/type": "npm:^3.0.4" + ansi-escapes: "npm:^4.3.2" + cli-width: "npm:^4.1.0" + mute-stream: "npm:^2.0.0" + signal-exit: "npm:^4.1.0" + wrap-ansi: "npm:^6.2.0" + yoctocolors-cjs: "npm:^2.1.2" + peerDependencies: + "@types/node": ">=18" + peerDependenciesMeta: + "@types/node": + optional: true + checksum: 10c0/13c25ced3e66b0ef9018fc9cc1bb841d20d56917e2609514f80df91f2395f18d9851c91987064e15afa36a6161b6bd2daee6ebef4a1791ffb12b816d4273ca55 + languageName: node + linkType: hard + +"@inquirer/editor@npm:^4.2.7": + version: 4.2.7 + resolution: "@inquirer/editor@npm:4.2.7" + dependencies: + "@inquirer/core": "npm:^10.1.7" + "@inquirer/type": "npm:^3.0.4" + external-editor: "npm:^3.1.0" + peerDependencies: + "@types/node": ">=18" + peerDependenciesMeta: + "@types/node": + optional: true + checksum: 10c0/8570bd5992dab031b7eea498941a728fbbada04072ce64192c46987a6d6e91669f9dd846049b5c49e87de01efd292fb2137606aafd7eee33e047864b2989d87f + languageName: node + linkType: hard + +"@inquirer/expand@npm:^4.0.9": + version: 4.0.9 + resolution: "@inquirer/expand@npm:4.0.9" + dependencies: + "@inquirer/core": "npm:^10.1.7" + "@inquirer/type": "npm:^3.0.4" + yoctocolors-cjs: "npm:^2.1.2" + peerDependencies: + "@types/node": ">=18" + peerDependenciesMeta: + "@types/node": + optional: true + checksum: 10c0/4267c404f0c053abc613bcf359e80d701043062e79c4f34857e612955826a133eaa83014084f8f3e371e5f2e0706674069c399301902691e54da86e442cf8ea9 + languageName: node + linkType: hard + +"@inquirer/figures@npm:^1.0.10": + version: 1.0.10 + resolution: "@inquirer/figures@npm:1.0.10" + checksum: 10c0/013b0eef03706d5ff8847c1ab1a12643edfb3d1902a5353bfe626999bc3b46653f8317d011a9dd4e831d3f2bfef3da84104a1fda4db0de0f4938122f5c70362e + languageName: node + linkType: hard + +"@inquirer/input@npm:^4.1.6": + version: 4.1.6 + resolution: "@inquirer/input@npm:4.1.6" + dependencies: + "@inquirer/core": "npm:^10.1.7" + "@inquirer/type": "npm:^3.0.4" + peerDependencies: + "@types/node": ">=18" + peerDependenciesMeta: + "@types/node": + optional: true + checksum: 10c0/b1df056e4855e2617f0c4000a09978902b8c65ec757ecfb59b1ac02c303dedc6c5e2fd677ceeabe02d18b97be2011bcbcd20ac9ed55d7c3371ef3e2a00814740 + languageName: node + linkType: hard + +"@inquirer/number@npm:^3.0.9": + version: 3.0.9 + resolution: "@inquirer/number@npm:3.0.9" + dependencies: + "@inquirer/core": "npm:^10.1.7" + "@inquirer/type": "npm:^3.0.4" + peerDependencies: + "@types/node": ">=18" + peerDependenciesMeta: + "@types/node": + optional: true + checksum: 10c0/5569d570fa539263324d3651f8fc3fe451e4a5d8d7799b8576abb3246eefbabc15a48ff4f2ef3353238aa42c01815cd761b5a148a236943b73e03e969a4a7ac7 + languageName: node + linkType: hard + +"@inquirer/password@npm:^4.0.9": + version: 4.0.9 + resolution: "@inquirer/password@npm:4.0.9" + dependencies: + "@inquirer/core": "npm:^10.1.7" + "@inquirer/type": "npm:^3.0.4" + ansi-escapes: "npm:^4.3.2" + peerDependencies: + "@types/node": ">=18" + peerDependenciesMeta: + "@types/node": + optional: true + checksum: 10c0/7e2a7bc48715d933f8826112a41237905ce3ce7839b286a7d68079cda351db17c6e868727902061588f5baa75dd203e66ba1f265646bfe440da572d17d5c21eb + languageName: node + linkType: hard + +"@inquirer/prompts@npm:^7.2.1": + version: 7.3.2 + resolution: "@inquirer/prompts@npm:7.3.2" + dependencies: + "@inquirer/checkbox": "npm:^4.1.2" + "@inquirer/confirm": "npm:^5.1.6" + "@inquirer/editor": "npm:^4.2.7" + "@inquirer/expand": "npm:^4.0.9" + "@inquirer/input": "npm:^4.1.6" + "@inquirer/number": "npm:^3.0.9" + "@inquirer/password": "npm:^4.0.9" + "@inquirer/rawlist": "npm:^4.0.9" + "@inquirer/search": "npm:^3.0.9" + "@inquirer/select": "npm:^4.0.9" + peerDependencies: + "@types/node": ">=18" + peerDependenciesMeta: + "@types/node": + optional: true + checksum: 10c0/a318d7c2a963f753f4868151f2ce5673e214f3a6597430e712bc59ef9605c831b71a6b52a9c5ea2f312b23063d2ee9fd633e127cdc9e4999e95ef15a5e90c7e1 + languageName: node + linkType: hard + +"@inquirer/rawlist@npm:^4.0.9": + version: 4.0.9 + resolution: "@inquirer/rawlist@npm:4.0.9" + dependencies: + "@inquirer/core": "npm:^10.1.7" + "@inquirer/type": "npm:^3.0.4" + yoctocolors-cjs: "npm:^2.1.2" + peerDependencies: + "@types/node": ">=18" + peerDependenciesMeta: + "@types/node": + optional: true + checksum: 10c0/6639a662a88f2ceb44b43d7303c24b49570becfa296db11902d69a76e11e3ba865f546502a9808c1e04a1a9ab387401ec6c801a34f2b6d95091e7ad1eb185c1a + languageName: node + linkType: hard + +"@inquirer/search@npm:^3.0.9": + version: 3.0.9 + resolution: "@inquirer/search@npm:3.0.9" + dependencies: + "@inquirer/core": "npm:^10.1.7" + "@inquirer/figures": "npm:^1.0.10" + "@inquirer/type": "npm:^3.0.4" + yoctocolors-cjs: "npm:^2.1.2" + peerDependencies: + "@types/node": ">=18" + peerDependenciesMeta: + "@types/node": + optional: true + checksum: 10c0/5d1c1865705a79054b35b5767df21dd5e3215eccfc5a2e4c5b9a962875ae71c32541da124426f380c4264f87265f9b32f2df6562a47b77ba32b88658076178a1 + languageName: node + linkType: hard + +"@inquirer/select@npm:^4.0.9": + version: 4.0.9 + resolution: "@inquirer/select@npm:4.0.9" + dependencies: + "@inquirer/core": "npm:^10.1.7" + "@inquirer/figures": "npm:^1.0.10" + "@inquirer/type": "npm:^3.0.4" + ansi-escapes: "npm:^4.3.2" + yoctocolors-cjs: "npm:^2.1.2" + peerDependencies: + "@types/node": ">=18" + peerDependenciesMeta: + "@types/node": + optional: true + checksum: 10c0/e03e00a7e0ab1e9fd95a3cbed0eeadacc3ff89af53afd81209a17c5f991b69d9c10d031dc7b5773c4c4d88b527dfd2f560e0d7f3eb44444ebeb6293edf422adb + languageName: node + linkType: hard + +"@inquirer/type@npm:^3.0.2, @inquirer/type@npm:^3.0.4": + version: 3.0.4 + resolution: "@inquirer/type@npm:3.0.4" + peerDependencies: + "@types/node": ">=18" + peerDependenciesMeta: + "@types/node": + optional: true + checksum: 10c0/d1db1833e879646ce1f31daff372e90ee099457cf7a2c09a62e8bbce47aced5f22599ef51aa8b82b5ffaeb624340c263cdd9d7a9eae8d3dfc9740efad080915e + languageName: node + linkType: hard + +"@lukeed/csprng@npm:^1.0.0": + version: 1.1.0 + resolution: "@lukeed/csprng@npm:1.1.0" + checksum: 10c0/5d6dcf478af732972083ab2889c294b57f1028fa13c2c240d7a4aaa079c2c75df7ef0dcbdda5419147fc6704b4adf96b2de92f1a9a72ac21c6350c4014fffe6c + languageName: node + linkType: hard + +"@nestjs/axios@npm:3.1.3": + version: 3.1.3 + resolution: "@nestjs/axios@npm:3.1.3" + peerDependencies: + "@nestjs/common": ^7.0.0 || ^8.0.0 || ^9.0.0 || ^10.0.0 + axios: ^1.3.1 + rxjs: ^6.0.0 || ^7.0.0 + checksum: 10c0/3b3f5ecc9a17317daafbf6ffe0cb792c5bd44d9fe7c6e2bda5d87163b9c2ed05a71a49d4e2d810c455eaa94f25e85e63673da21d674917bd9c16dfb937771109 + languageName: node + linkType: hard + +"@nestjs/common@npm:10.4.15": + version: 10.4.15 + resolution: "@nestjs/common@npm:10.4.15" + dependencies: + iterare: "npm:1.2.1" + tslib: "npm:2.8.1" + uid: "npm:2.0.2" + peerDependencies: + class-transformer: "*" + class-validator: "*" + reflect-metadata: ^0.1.12 || ^0.2.0 + rxjs: ^7.1.0 + peerDependenciesMeta: + class-transformer: + optional: true + class-validator: + optional: true + checksum: 10c0/9566993fd3f805df2be632f5a16ca90d81b0deeb50e1e7cde4a49d4948c0d8d7db58b42ded70f35061e95e91a40d2adcd9e19cb2771090114eb737f62d2ea4c6 + languageName: node + linkType: hard + +"@nestjs/core@npm:10.4.15": + version: 10.4.15 + resolution: "@nestjs/core@npm:10.4.15" + dependencies: + "@nuxtjs/opencollective": "npm:0.3.2" + fast-safe-stringify: "npm:2.1.1" + iterare: "npm:1.2.1" + path-to-regexp: "npm:3.3.0" + tslib: "npm:2.8.1" + uid: "npm:2.0.2" + peerDependencies: + "@nestjs/common": ^10.0.0 + "@nestjs/microservices": ^10.0.0 + "@nestjs/platform-express": ^10.0.0 + "@nestjs/websockets": ^10.0.0 + reflect-metadata: ^0.1.12 || ^0.2.0 + rxjs: ^7.1.0 + peerDependenciesMeta: + "@nestjs/microservices": + optional: true + "@nestjs/platform-express": + optional: true + "@nestjs/websockets": + optional: true + checksum: 10c0/68958efca25b28ea38bcfc810751c626a913a848d9ec86aab0a6021e708632b95585f0da5d5c2b0513bb64cacfc97d391b45ec002b718a8e90fdda1b4354bed1 + languageName: node + linkType: hard + "@nodelib/fs.scandir@npm:2.1.5": version: 2.1.5 resolution: "@nodelib/fs.scandir@npm:2.1.5" @@ -66,248 +374,259 @@ __metadata: languageName: node linkType: hard -"@octokit/auth-token@npm:^2.4.4": - version: 2.5.0 - resolution: "@octokit/auth-token@npm:2.5.0" +"@nuxtjs/opencollective@npm:0.3.2": + version: 0.3.2 + resolution: "@nuxtjs/opencollective@npm:0.3.2" dependencies: - "@octokit/types": "npm:^6.0.3" - checksum: 10c0/e9f757b6acdee91885dab97069527c86829da0dc60476c38cdff3a739ff47fd026262715965f91e84ec9d01bc43d02678bc8ed472a85395679af621b3ddbe045 + chalk: "npm:^4.1.0" + consola: "npm:^2.15.0" + node-fetch: "npm:^2.6.1" + bin: + opencollective: bin/opencollective.js + checksum: 10c0/540268687af3289ff107585484d42201b404cdbb98b3a512487c12a6b180a8f0e1df0d701df47d3d9e0d5c0f6eb3252d80535562aedca9edf52cf7fd17ae4601 languageName: node linkType: hard -"@octokit/core@npm:^3.5.1": - version: 3.6.0 - resolution: "@octokit/core@npm:3.6.0" +"@octokit/auth-token@npm:^5.0.0": + version: 5.1.2 + resolution: "@octokit/auth-token@npm:5.1.2" + checksum: 10c0/bd4952571d9c559ede1f6ef8f7756900256d19df0180db04da88886a05484c7e6a4397611422e4804465a82addc8c2daa21d0bb4f450403552ee81041a4046d1 + languageName: node + linkType: hard + +"@octokit/core@npm:^6.1.2": + version: 6.1.4 + resolution: "@octokit/core@npm:6.1.4" dependencies: - "@octokit/auth-token": "npm:^2.4.4" - "@octokit/graphql": "npm:^4.5.8" - "@octokit/request": "npm:^5.6.3" - "@octokit/request-error": "npm:^2.0.5" - "@octokit/types": "npm:^6.0.3" - before-after-hook: "npm:^2.2.0" - universal-user-agent: "npm:^6.0.0" - checksum: 10c0/78d9799a57fe9cf155cce485ba8b7ec32f05024350bf5dd8ab5e0da8995cc22168c39dbbbcfc29bc6c562dd482c1c4a3064f466f49e2e9ce4efad57cf28a7360 + "@octokit/auth-token": "npm:^5.0.0" + "@octokit/graphql": "npm:^8.1.2" + "@octokit/request": "npm:^9.2.1" + "@octokit/request-error": "npm:^6.1.7" + "@octokit/types": "npm:^13.6.2" + before-after-hook: "npm:^3.0.2" + universal-user-agent: "npm:^7.0.0" + checksum: 10c0/bcb05e83c54f686ae55bd3793e63a1832f83cbe804586b52c61b0e18942609dcc209af501720de6f2c87dc575047645b074f4cd5822d461e892058ea9654aebc languageName: node linkType: hard -"@octokit/endpoint@npm:^6.0.1": - version: 6.0.12 - resolution: "@octokit/endpoint@npm:6.0.12" +"@octokit/endpoint@npm:^10.1.3": + version: 10.1.3 + resolution: "@octokit/endpoint@npm:10.1.3" dependencies: - "@octokit/types": "npm:^6.0.3" - is-plain-object: "npm:^5.0.0" - universal-user-agent: "npm:^6.0.0" - checksum: 10c0/b2d9c91f00ab7c997338d08a06bfd12a67d86060bc40471f921ba424e4de4e5a0a1117631f2a8a8787107d89d631172dd157cb5e2633674b1ae3a0e2b0dcfa3e + "@octokit/types": "npm:^13.6.2" + universal-user-agent: "npm:^7.0.2" + checksum: 10c0/096956534efee1f683b4749673c2d1673c6fbe5362b9cce553f9f4b956feaf59bde816594de72f4352f749b862d0b15bc0e2fa7fb0e198deb1fe637b5f4a8bc7 languageName: node linkType: hard -"@octokit/graphql@npm:^4.5.8": - version: 4.8.0 - resolution: "@octokit/graphql@npm:4.8.0" +"@octokit/graphql@npm:^8.1.2": + version: 8.2.1 + resolution: "@octokit/graphql@npm:8.2.1" dependencies: - "@octokit/request": "npm:^5.6.0" - "@octokit/types": "npm:^6.0.3" - universal-user-agent: "npm:^6.0.0" - checksum: 10c0/2cfa0cbc636465d729f4a6a5827f7d36bed0fc9ea270a79427a431f1672fd109f463ca4509aeb3eb02342b91592ff06f318b39d6866d7424d2a16b0bfc01e62e + "@octokit/request": "npm:^9.2.2" + "@octokit/types": "npm:^13.8.0" + universal-user-agent: "npm:^7.0.0" + checksum: 10c0/79fe7b50113bef90a32e3b6ee48923cad2afc049aba5c22e44167cf5773e2688a4e953f3ee1e24bee9706ccf7588ae14451933b282f63f1f7d5c95d319df23dd languageName: node linkType: hard -"@octokit/openapi-types@npm:^12.11.0": - version: 12.11.0 - resolution: "@octokit/openapi-types@npm:12.11.0" - checksum: 10c0/b3bb3684d9686ef948d8805ab56f85818f36e4cb64ef97b8e48dc233efefef22fe0bddd9da705fb628ea618a1bebd62b3d81b09a3f7dce9522f124d998041896 +"@octokit/openapi-types@npm:^23.0.1": + version: 23.0.1 + resolution: "@octokit/openapi-types@npm:23.0.1" + checksum: 10c0/ab734ceb26343d9f051a59503b8cb5bdc7fec9ca044b60511b227179bec73141dd9144a6b2d68bcd737741881b136c1b7d5392da89ae2e35e39acc489e5eb4c1 languageName: node linkType: hard -"@octokit/plugin-paginate-rest@npm:^2.16.8": - version: 2.21.3 - resolution: "@octokit/plugin-paginate-rest@npm:2.21.3" +"@octokit/plugin-paginate-rest@npm:^11.0.0": + version: 11.4.3 + resolution: "@octokit/plugin-paginate-rest@npm:11.4.3" dependencies: - "@octokit/types": "npm:^6.40.0" + "@octokit/types": "npm:^13.7.0" peerDependencies: - "@octokit/core": ">=2" - checksum: 10c0/a16f7ed56db00ea9b72f77735e8d9463ddc84d017cb95c2767026c60a209f7c4176502c592847cf61613eb2f25dafe8d5437c01ad296660ebbfb2c821ef805e9 + "@octokit/core": ">=6" + checksum: 10c0/132fa9c4eacec84d8025866775f0325a752a4c7496a61ebafbd72c80626ead44d1efdae738f1dffd70e2bf3a34e007693ea2356fca5c2a1be445ac466231c395 languageName: node linkType: hard -"@octokit/plugin-request-log@npm:^1.0.4": - version: 1.0.4 - resolution: "@octokit/plugin-request-log@npm:1.0.4" +"@octokit/plugin-request-log@npm:^5.3.1": + version: 5.3.1 + resolution: "@octokit/plugin-request-log@npm:5.3.1" peerDependencies: - "@octokit/core": ">=3" - checksum: 10c0/7238585445555db553912e0cdef82801c89c6e5cbc62c23ae086761c23cc4a403d6c3fddd20348bbd42fb7508e2c2fce370eb18fdbe3fbae2c0d2c8be974f4cc + "@octokit/core": ">=6" + checksum: 10c0/2f959934b8285cf39a1d1d0b92ec881b3ae171ae74738225f87b89381afd72a32bc7ea9c04d2dcee74f74ad24c22cce0c5f3e5b4333d531ea67b985e4ee90cb0 languageName: node linkType: hard -"@octokit/plugin-rest-endpoint-methods@npm:^5.12.0": - version: 5.16.2 - resolution: "@octokit/plugin-rest-endpoint-methods@npm:5.16.2" +"@octokit/plugin-rest-endpoint-methods@npm:^13.0.0": + version: 13.3.1 + resolution: "@octokit/plugin-rest-endpoint-methods@npm:13.3.1" dependencies: - "@octokit/types": "npm:^6.39.0" - deprecation: "npm:^2.3.1" + "@octokit/types": "npm:^13.8.0" peerDependencies: - "@octokit/core": ">=3" - checksum: 10c0/32bfb30241140ad9bf17712856e1946374fb8d6040adfd5b9ea862e7149e5d2a38e0e037d3b468af34f7f2561129a6f170cffeb2a6225e548b04934e2c05eb93 + "@octokit/core": ">=6" + checksum: 10c0/bb9c16c4a05299ed32d871c170c658db5bb81104a276cc2dda80b8ed3038a467124ef5c7d6f3a170a215197f0507c15915f0dc91f0651233d992cee8a9cf3eb0 languageName: node linkType: hard -"@octokit/request-error@npm:^2.0.5, @octokit/request-error@npm:^2.1.0": - version: 2.1.0 - resolution: "@octokit/request-error@npm:2.1.0" +"@octokit/request-error@npm:^6.1.7": + version: 6.1.7 + resolution: "@octokit/request-error@npm:6.1.7" dependencies: - "@octokit/types": "npm:^6.0.3" - deprecation: "npm:^2.0.0" - once: "npm:^1.4.0" - checksum: 10c0/eb50eb2734aa903f1e855ac5887bb76d6f237a3aaa022b09322a7676c79bb8020259b25f84ab895c4fc7af5cc736e601ec8cc7e9040ca4629bac8cb393e91c40 + "@octokit/types": "npm:^13.6.2" + checksum: 10c0/24bd6f98b1d7b2d4062de34777b4195d3cc4dc40c3187a0321dd588291ec5e13b5760765aacdef3a73796a529d3dec0bfb820780be6ef526a3e774d13566b5b0 languageName: node linkType: hard -"@octokit/request@npm:^5.6.0, @octokit/request@npm:^5.6.3": - version: 5.6.3 - resolution: "@octokit/request@npm:5.6.3" +"@octokit/request@npm:^9.2.1, @octokit/request@npm:^9.2.2": + version: 9.2.2 + resolution: "@octokit/request@npm:9.2.2" dependencies: - "@octokit/endpoint": "npm:^6.0.1" - "@octokit/request-error": "npm:^2.1.0" - "@octokit/types": "npm:^6.16.1" - is-plain-object: "npm:^5.0.0" - node-fetch: "npm:^2.6.7" - universal-user-agent: "npm:^6.0.0" - checksum: 10c0/a546dc05665c6cf8184ae7c4ac3ed4f0c339c2170dd7e2beeb31a6e0a9dd968ca8ad960edbd2af745e585276e692c9eb9c6dbf1a8c9d815eb7b7fd282f3e67fc + "@octokit/endpoint": "npm:^10.1.3" + "@octokit/request-error": "npm:^6.1.7" + "@octokit/types": "npm:^13.6.2" + fast-content-type-parse: "npm:^2.0.0" + universal-user-agent: "npm:^7.0.2" + checksum: 10c0/14cb523c17ed619c63e52025af9fdc67357b63d113905ec0ccb47badd20926e6f37a17a0620d3a906823b496e3b7efb29ed1e2af658cde5daf3ed3f88b421973 languageName: node linkType: hard -"@octokit/rest@npm:18.12.0": - version: 18.12.0 - resolution: "@octokit/rest@npm:18.12.0" +"@octokit/rest@npm:21.0.2": + version: 21.0.2 + resolution: "@octokit/rest@npm:21.0.2" dependencies: - "@octokit/core": "npm:^3.5.1" - "@octokit/plugin-paginate-rest": "npm:^2.16.8" - "@octokit/plugin-request-log": "npm:^1.0.4" - "@octokit/plugin-rest-endpoint-methods": "npm:^5.12.0" - checksum: 10c0/e649baf7ccc3de57e5aeffb88e2888b023ffc693dee91c4db58dcb7b5481348bc5b0e6a49a176354c3150e3fa4e02c43a5b1d2be02492909b3f6dcfa5f63e444 + "@octokit/core": "npm:^6.1.2" + "@octokit/plugin-paginate-rest": "npm:^11.0.0" + "@octokit/plugin-request-log": "npm:^5.3.1" + "@octokit/plugin-rest-endpoint-methods": "npm:^13.0.0" + checksum: 10c0/4c7f0cf2797a7da5a6e3d8d7a7cfcc47b36de20a8d3e23289cc5dff2a32228254a6db459b0196f71efe229ef59fa6696591182c6c3bee7a4d658f2a0ef4c26bc languageName: node linkType: hard -"@octokit/types@npm:^6.0.3, @octokit/types@npm:^6.16.1, @octokit/types@npm:^6.39.0, @octokit/types@npm:^6.40.0": - version: 6.41.0 - resolution: "@octokit/types@npm:6.41.0" +"@octokit/types@npm:^13.6.2, @octokit/types@npm:^13.7.0, @octokit/types@npm:^13.8.0": + version: 13.8.0 + resolution: "@octokit/types@npm:13.8.0" dependencies: - "@octokit/openapi-types": "npm:^12.11.0" - checksum: 10c0/81cfa58e5524bf2e233d75a346e625fd6e02a7b919762c6ddb523ad6fb108943ef9d34c0298ff3c5a44122e449d9038263bc22959247fd6ff8894a48888ac705 + "@octokit/openapi-types": "npm:^23.0.1" + checksum: 10c0/e08c2fcf10e374f18e4c9fa12a6ada33a40f112d1209012a39f0ce40ae7aa9dcf0598b6007b467f63cc4a97e7b1388d6eed34ddef61494655e08b5a95afaad97 languageName: node linkType: hard -"@openapitools/openapi-generator-cli@npm:1.0.18-4.3.1": - version: 1.0.18-4.3.1 - resolution: "@openapitools/openapi-generator-cli@npm:1.0.18-4.3.1" +"@openapitools/openapi-generator-cli@npm:2.17.0": + version: 2.17.0 + resolution: "@openapitools/openapi-generator-cli@npm:2.17.0" + dependencies: + "@nestjs/axios": "npm:3.1.3" + "@nestjs/common": "npm:10.4.15" + "@nestjs/core": "npm:10.4.15" + "@nuxtjs/opencollective": "npm:0.3.2" + axios: "npm:1.7.9" + chalk: "npm:4.1.2" + commander: "npm:8.3.0" + compare-versions: "npm:4.1.4" + concurrently: "npm:6.5.1" + console.table: "npm:0.10.0" + fs-extra: "npm:10.1.0" + glob: "npm:9.3.5" + inquirer: "npm:8.2.6" + lodash: "npm:4.17.21" + proxy-agent: "npm:6.5.0" + reflect-metadata: "npm:0.1.13" + rxjs: "npm:7.8.1" + tslib: "npm:2.8.1" bin: - openapi-generator: ./bin/openapi-generator - checksum: 10c0/01348deb21977e6c742049890735c87935815102d303f67d416111c67373003fdc94b8209d9c0728931fbcdf81f3e815524309d98724bb360944298e7d929fc0 + openapi-generator-cli: main.js + checksum: 10c0/43cff421946c074706e2ad9c4c56ca9220caa0b675aad46ac31e7807d4ff728ea57c5a84c375150bc7e6bf36f29bc67a9bebb6ab1a157ba806913550d53b650f languageName: node linkType: hard -"@release-it/bumper@npm:^2.0.0": - version: 2.0.0 - resolution: "@release-it/bumper@npm:2.0.0" - dependencies: - "@iarna/toml": "npm:^2.2.5" - detect-indent: "npm:^6.0.0" - fast-glob: "npm:^3.2.4" - ini: "npm:^1.3.5" - js-yaml: "npm:^3.14.0" - lodash.castarray: "npm:^4.4.0" - lodash.get: "npm:^4.4.2" - lodash.set: "npm:^4.3.2" - mock-fs: "npm:^4.13.0" - peerDependencies: - release-it: ^14.0.0 - checksum: 10c0/d6b1e09ba5e2706bbbde20e7f02f3562731d6df4659f0e672ea1ed02b79fca8c746e2b72e306ec594c9550baaab77c70ac868c9a4cb2218a748801c9033a8e92 +"@pnpm/config.env-replace@npm:^1.1.0": + version: 1.1.0 + resolution: "@pnpm/config.env-replace@npm:1.1.0" + checksum: 10c0/4cfc4a5c49ab3d0c6a1f196cfd4146374768b0243d441c7de8fa7bd28eaab6290f514b98490472cc65dbd080d34369447b3e9302585e1d5c099befd7c8b5e55f languageName: node linkType: hard -"@sindresorhus/is@npm:^0.14.0": - version: 0.14.0 - resolution: "@sindresorhus/is@npm:0.14.0" - checksum: 10c0/7247aa9314d4fc3df9b3f63d8b5b962a89c7600a5db1f268546882bfc4d31a975a899f5f42a09dd41a11e58636e6402f7c40f92df853aee417247bb11faee9a0 +"@pnpm/network.ca-file@npm:^1.0.1": + version: 1.0.2 + resolution: "@pnpm/network.ca-file@npm:1.0.2" + dependencies: + graceful-fs: "npm:4.2.10" + checksum: 10c0/95f6e0e38d047aca3283550719155ce7304ac00d98911e4ab026daedaf640a63bd83e3d13e17c623fa41ac72f3801382ba21260bcce431c14fbbc06430ecb776 languageName: node linkType: hard -"@szmarczak/http-timer@npm:^1.1.2": - version: 1.1.2 - resolution: "@szmarczak/http-timer@npm:1.1.2" +"@pnpm/npm-conf@npm:^2.1.0": + version: 2.3.1 + resolution: "@pnpm/npm-conf@npm:2.3.1" dependencies: - defer-to-connect: "npm:^1.0.1" - checksum: 10c0/0594140e027ce4e98970c6d176457fcbff80900b1b3101ac0d08628ca6d21d70e0b94c6aaada94d4f76c1423fcc7195af83da145ce0fd556fc0595ca74a17b8b + "@pnpm/config.env-replace": "npm:^1.1.0" + "@pnpm/network.ca-file": "npm:^1.0.1" + config-chain: "npm:^1.1.11" + checksum: 10c0/778a3a34ff7d6000a2594d2a9821f873f737bc56367865718b2cf0ba5d366e49689efe7975148316d7afd8e6f1dcef7d736fbb6ea7ef55caadd1dc93a36bb302 languageName: node linkType: hard -"@tootallnate/once@npm:1": - version: 1.1.2 - resolution: "@tootallnate/once@npm:1.1.2" - checksum: 10c0/8fe4d006e90422883a4fa9339dd05a83ff626806262e1710cee5758d493e8cbddf2db81c0e4690636dc840b02c9fda62877866ea774ebd07c1777ed5fafbdec6 +"@release-it/bumper@npm:^7.0.1": + version: 7.0.1 + resolution: "@release-it/bumper@npm:7.0.1" + dependencies: + "@iarna/toml": "npm:^3.0.0" + cheerio: "npm:^1.0.0" + detect-indent: "npm:7.0.1" + fast-glob: "npm:^3.3.3" + ini: "npm:^5.0.0" + js-yaml: "npm:^4.1.0" + lodash-es: "npm:^4.17.21" + semver: "npm:^7.6.3" + peerDependencies: + release-it: ^18.0.0 + checksum: 10c0/7a1e0536711ea18313e80f5258d7dd3d15291e661b5c990466afa6beff17062cc280a35d2d56c9a8fc75f114cd79780e5e8443d394bd4c8341d249872ef9b4a3 languageName: node linkType: hard -"@types/keyv@npm:^3.1.1": - version: 3.1.4 - resolution: "@types/keyv@npm:3.1.4" - dependencies: - "@types/node": "npm:*" - checksum: 10c0/ff8f54fc49621210291f815fe5b15d809fd7d032941b3180743440bd507ecdf08b9e844625fa346af568c84bf34114eb378dcdc3e921a08ba1e2a08d7e3c809c +"@sec-ant/readable-stream@npm:^0.4.1": + version: 0.4.1 + resolution: "@sec-ant/readable-stream@npm:0.4.1" + checksum: 10c0/64e9e9cf161e848067a5bf60cdc04d18495dc28bb63a8d9f8993e4dd99b91ad34e4b563c85de17d91ffb177ec17a0664991d2e115f6543e73236a906068987af languageName: node linkType: hard -"@types/node@npm:*": - version: 20.12.9 - resolution: "@types/node@npm:20.12.9" - dependencies: - undici-types: "npm:~5.26.4" - checksum: 10c0/410da89226b425fa24fe497fbffb90a79ce63461ff0e0361414de567dc80b8c9b5a0e5803983bb62e2c7757b0769bf49498d3578e61f677590124491cdaf1d7a +"@sindresorhus/merge-streams@npm:^2.1.0": + version: 2.3.0 + resolution: "@sindresorhus/merge-streams@npm:2.3.0" + checksum: 10c0/69ee906f3125fb2c6bb6ec5cdd84e8827d93b49b3892bce8b62267116cc7e197b5cccf20c160a1d32c26014ecd14470a72a5e3ee37a58f1d6dadc0db1ccf3894 languageName: node linkType: hard -"@types/parse-json@npm:^4.0.0": +"@sindresorhus/merge-streams@npm:^4.0.0": version: 4.0.0 - resolution: "@types/parse-json@npm:4.0.0" - checksum: 10c0/1d3012ab2fcdad1ba313e1d065b737578f6506c8958e2a7a5bdbdef517c7e930796cb1599ee067d5dee942fb3a764df64b5eef7e9ae98548d776e86dcffba985 + resolution: "@sindresorhus/merge-streams@npm:4.0.0" + checksum: 10c0/482ee543629aa1933b332f811a1ae805a213681ecdd98c042b1c1b89387df63e7812248bb4df3910b02b3cc5589d3d73e4393f30e197c9dde18046ccd471fc6b languageName: node linkType: hard -"@types/responselike@npm:^1.0.0": - version: 1.0.3 - resolution: "@types/responselike@npm:1.0.3" - dependencies: - "@types/node": "npm:*" - checksum: 10c0/a58ba341cb9e7d74f71810a88862da7b2a6fa42e2a1fc0ce40498f6ea1d44382f0640117057da779f74c47039f7166bf48fad02dc876f94e005c7afa50f5e129 +"@tootallnate/quickjs-emscripten@npm:^0.23.0": + version: 0.23.0 + resolution: "@tootallnate/quickjs-emscripten@npm:0.23.0" + checksum: 10c0/2a939b781826fb5fd3edd0f2ec3b321d259d760464cf20611c9877205aaca3ccc0b7304dea68416baa0d568e82cd86b17d29548d1e5139fa3155a4a86a2b4b49 languageName: node linkType: hard -"acorn-walk@npm:^8.2.0": - version: 8.2.0 - resolution: "acorn-walk@npm:8.2.0" - checksum: 10c0/dbe92f5b2452c93e960c5594e666dd1fae141b965ff2cb4a1e1d0381e3e4db4274c5ce4ffa3d681a86ca2a8d4e29d5efc0670a08e23fd2800051ea387df56ca2 - languageName: node - linkType: hard - -"acorn@npm:^8.7.0": - version: 8.8.0 - resolution: "acorn@npm:8.8.0" - bin: - acorn: bin/acorn - checksum: 10c0/5efce4f59554e0ab766f32932cba34b86cc2ecdf24fcd27463beff41d8a1b1b9575c21f92c1b9f7f82b93374a9d5aed33c91f93e2d0cb1bdf3f1e06ec131e816 +"@types/parse-path@npm:^7.0.0": + version: 7.0.3 + resolution: "@types/parse-path@npm:7.0.3" + checksum: 10c0/8344b6c7acba4e4e5a8d542f56f53c297685fa92f9b0c085d7532cc7e1b661432cecfc1c75c76cdb0d161c95679b6ecfe0573d9fef7c836962aacf604150a984 languageName: node linkType: hard -"agent-base@npm:6, agent-base@npm:^6.0.0, agent-base@npm:^6.0.2": - version: 6.0.2 - resolution: "agent-base@npm:6.0.2" - dependencies: - debug: "npm:4" - checksum: 10c0/dc4f757e40b5f3e3d674bc9beb4f1048f4ee83af189bae39be99f57bf1f48dde166a8b0a5342a84b5944ee8e6ed1e5a9d801858f4ad44764e84957122fe46261 +"agent-base@npm:^7.1.0, agent-base@npm:^7.1.2": + version: 7.1.3 + resolution: "agent-base@npm:7.1.3" + checksum: 10c0/6192b580c5b1d8fb399b9c62bf8343d76654c2dd62afcb9a52b2cf44a8b6ace1e3b704d3fe3547d91555c857d3df02603341ff2cb961b9cfe2b12f9f3c38ee11 languageName: node linkType: hard -"ansi-align@npm:^3.0.0": +"ansi-align@npm:^3.0.1": version: 3.0.1 resolution: "ansi-align@npm:3.0.1" dependencies: @@ -316,7 +635,7 @@ __metadata: languageName: node linkType: hard -"ansi-escapes@npm:^4.2.1": +"ansi-escapes@npm:^4.2.1, ansi-escapes@npm:^4.3.2": version: 4.3.2 resolution: "ansi-escapes@npm:4.3.2" dependencies: @@ -332,6 +651,13 @@ __metadata: languageName: node linkType: hard +"ansi-regex@npm:^6.0.1": + version: 6.1.0 + resolution: "ansi-regex@npm:6.1.0" + checksum: 10c0/a91daeddd54746338478eef88af3439a7edf30f8e23196e2d6ed182da9add559c601266dbef01c2efa46a958ad6f1f8b176799657616c702b5b02e799e7fd8dc + languageName: node + linkType: hard + "ansi-styles@npm:^3.2.1": version: 3.2.1 resolution: "ansi-styles@npm:3.2.1" @@ -350,36 +676,21 @@ __metadata: languageName: node linkType: hard -"argparse@npm:^1.0.7": - version: 1.0.10 - resolution: "argparse@npm:1.0.10" - dependencies: - sprintf-js: "npm:~1.0.2" - checksum: 10c0/b2972c5c23c63df66bca144dbc65d180efa74f25f8fd9b7d9a0a6c88ae839db32df3d54770dcb6460cf840d232b60695d1a6b1053f599d84e73f7437087712de - languageName: node - linkType: hard - -"array-union@npm:^2.1.0": - version: 2.1.0 - resolution: "array-union@npm:2.1.0" - checksum: 10c0/429897e68110374f39b771ec47a7161fc6a8fc33e196857c0a396dc75df0b5f65e4d046674db764330b6bb66b39ef48dd7c53b6a2ee75cfb0681e0c1a7033962 +"ansi-styles@npm:^6.2.1": + version: 6.2.1 + resolution: "ansi-styles@npm:6.2.1" + checksum: 10c0/5d1ec38c123984bcedd996eac680d548f31828bd679a66db2bdf11844634dde55fec3efa9c6bb1d89056a5e79c1ac540c4c784d592ea1d25028a92227d2f2d5c languageName: node linkType: hard -"array.prototype.map@npm:^1.0.4": - version: 1.0.4 - resolution: "array.prototype.map@npm:1.0.4" - dependencies: - call-bind: "npm:^1.0.2" - define-properties: "npm:^1.1.3" - es-abstract: "npm:^1.19.0" - es-array-method-boxes-properly: "npm:^1.0.0" - is-string: "npm:^1.0.7" - checksum: 10c0/b42d7d91b89b3b0b2cbb0211917af5be1f100843faeed71bed0cef38d040c980d0fc6433a5df4c13eaded2cccd7b209bbbad250c27f724900cb57c0c0e289dc0 +"argparse@npm:^2.0.1": + version: 2.0.1 + resolution: "argparse@npm:2.0.1" + checksum: 10c0/c5640c2d89045371c7cedd6a70212a04e360fd34d6edeae32f6952c63949e3525ea77dbec0289d8213a99bbaeab5abfa860b5c12cf88a2e6cf8106e90dd27a7e languageName: node linkType: hard -"ast-types@npm:^0.13.2": +"ast-types@npm:^0.13.4": version: 0.13.4 resolution: "ast-types@npm:0.13.4" dependencies: @@ -404,6 +715,27 @@ __metadata: languageName: node linkType: hard +"atomically@npm:^2.0.3": + version: 2.0.3 + resolution: "atomically@npm:2.0.3" + dependencies: + stubborn-fs: "npm:^1.2.5" + when-exit: "npm:^2.1.1" + checksum: 10c0/b9008a74f590d29be947f34b7583dab32034335fedfe340ac3e6458e2e315c770d8af6f15cd3947214702c523d91b5f989498348b1ab49c197bd645dc87d7a94 + languageName: node + linkType: hard + +"axios@npm:1.7.9": + version: 1.7.9 + resolution: "axios@npm:1.7.9" + dependencies: + follow-redirects: "npm:^1.15.6" + form-data: "npm:^4.0.0" + proxy-from-env: "npm:^1.1.0" + checksum: 10c0/b7a41e24b59fee5f0f26c1fc844b45b17442832eb3a0fb42dd4f1430eb4abc571fe168e67913e8a1d91c993232bd1d1ab03e20e4d1fee8c6147649b576fc1b0b + languageName: node + linkType: hard + "balanced-match@npm:^1.0.0": version: 1.0.2 resolution: "balanced-match@npm:1.0.2" @@ -418,10 +750,17 @@ __metadata: languageName: node linkType: hard -"before-after-hook@npm:^2.2.0": - version: 2.2.2 - resolution: "before-after-hook@npm:2.2.2" - checksum: 10c0/7457bfb8f40e8cbce943ea6e6531261925c6c8a451fea540762367a3e2e52b5979978963a7ec65f232a4f5b87310930bf152c9a055608c64ecee5115bad60b9a +"basic-ftp@npm:^5.0.2": + version: 5.0.5 + resolution: "basic-ftp@npm:5.0.5" + checksum: 10c0/be983a3997749856da87b839ffce6b8ed6c7dbf91ea991d5c980d8add275f9f2926c19f80217ac3e7f353815be879371d636407ca72b038cea8cab30e53928a6 + languageName: node + linkType: hard + +"before-after-hook@npm:^3.0.2": + version: 3.0.2 + resolution: "before-after-hook@npm:3.0.2" + checksum: 10c0/dea640f9e88a1085372c9bcc974b7bf379267490693da92ec102a7d8b515dd1e95f00ef575a146b83ca638104c57406c3427d37bdf082f602dde4b56d05bba14 languageName: node linkType: hard @@ -436,19 +775,26 @@ __metadata: languageName: node linkType: hard -"boxen@npm:^5.0.0": - version: 5.1.2 - resolution: "boxen@npm:5.1.2" +"boolbase@npm:^1.0.0": + version: 1.0.0 + resolution: "boolbase@npm:1.0.0" + checksum: 10c0/e4b53deb4f2b85c52be0e21a273f2045c7b6a6ea002b0e139c744cb6f95e9ec044439a52883b0d74dedd1ff3da55ed140cfdddfed7fb0cccbed373de5dce1bcf + languageName: node + linkType: hard + +"boxen@npm:^8.0.1": + version: 8.0.1 + resolution: "boxen@npm:8.0.1" dependencies: - ansi-align: "npm:^3.0.0" - camelcase: "npm:^6.2.0" - chalk: "npm:^4.1.0" - cli-boxes: "npm:^2.2.1" - string-width: "npm:^4.2.2" - type-fest: "npm:^0.20.2" - widest-line: "npm:^3.1.0" - wrap-ansi: "npm:^7.0.0" - checksum: 10c0/71f31c2eb3dcacd5fce524ae509e0cc90421752e0bfbd0281fd3352871d106c462a0f810c85f2fdb02f3a9fab2d7a84e9718b4999384d651b76104ebe5d2c024 + ansi-align: "npm:^3.0.1" + camelcase: "npm:^8.0.0" + chalk: "npm:^5.3.0" + cli-boxes: "npm:^3.0.0" + string-width: "npm:^7.2.0" + type-fest: "npm:^4.21.0" + widest-line: "npm:^5.0.0" + wrap-ansi: "npm:^9.0.0" + checksum: 10c0/8c54f9797bf59eec0b44c9043d9cb5d5b2783dc673e4650235e43a5155c43334e78ec189fd410cf92056c1054aee3758279809deed115b49e68f1a1c6b3faa32 languageName: node linkType: hard @@ -462,12 +808,21 @@ __metadata: languageName: node linkType: hard -"braces@npm:^3.0.2": - version: 3.0.2 - resolution: "braces@npm:3.0.2" +"brace-expansion@npm:^2.0.1": + version: 2.0.1 + resolution: "brace-expansion@npm:2.0.1" dependencies: - fill-range: "npm:^7.0.1" - checksum: 10c0/321b4d675791479293264019156ca322163f02dc06e3c4cab33bb15cd43d80b51efef69b0930cfde3acd63d126ebca24cd0544fa6f261e093a0fb41ab9dda381 + balanced-match: "npm:^1.0.0" + checksum: 10c0/b358f2fe060e2d7a87aa015979ecea07f3c37d4018f8d6deb5bd4c229ad3a0384fe6029bb76cd8be63c81e516ee52d1a0673edbe2023d53a5191732ae3c3e49f + languageName: node + linkType: hard + +"braces@npm:^3.0.3": + version: 3.0.3 + resolution: "braces@npm:3.0.3" + dependencies: + fill-range: "npm:^7.1.1" + checksum: 10c0/7c6dfd30c338d2997ba77500539227b9d1f85e388a5f43220865201e407e076783d0881f2d297b9f80951b4c957fcf0b51c1d2d24227631643c3f7c284b0aa04 languageName: node linkType: hard @@ -481,35 +836,22 @@ __metadata: languageName: node linkType: hard -"bytes@npm:3.1.2": - version: 3.1.2 - resolution: "bytes@npm:3.1.2" - checksum: 10c0/76d1c43cbd602794ad8ad2ae94095cddeb1de78c5dddaa7005c51af10b0176c69971a6d88e805a90c2b6550d76636e43c40d8427a808b8645ede885de4a0358e - languageName: node - linkType: hard - -"cacheable-request@npm:^6.0.0": - version: 6.1.0 - resolution: "cacheable-request@npm:6.1.0" +"bundle-name@npm:^4.1.0": + version: 4.1.0 + resolution: "bundle-name@npm:4.1.0" dependencies: - clone-response: "npm:^1.0.2" - get-stream: "npm:^5.1.0" - http-cache-semantics: "npm:^4.0.0" - keyv: "npm:^3.0.0" - lowercase-keys: "npm:^2.0.0" - normalize-url: "npm:^4.1.0" - responselike: "npm:^1.0.2" - checksum: 10c0/e92f2b2078c014ba097647ab4ff6a6149dc2974a65670ee97ec593ec9f4148ecc988e86b9fcd8ebf7fe255774a53d5dc3db6b01065d44f09a7452c7a7d8e4844 + run-applescript: "npm:^7.0.0" + checksum: 10c0/8e575981e79c2bcf14d8b1c027a3775c095d362d1382312f444a7c861b0e21513c0bd8db5bd2b16e50ba0709fa622d4eab6b53192d222120305e68359daece29 languageName: node linkType: hard -"call-bind@npm:^1.0.0, call-bind@npm:^1.0.2": +"call-bind-apply-helpers@npm:^1.0.1, call-bind-apply-helpers@npm:^1.0.2": version: 1.0.2 - resolution: "call-bind@npm:1.0.2" + resolution: "call-bind-apply-helpers@npm:1.0.2" dependencies: - function-bind: "npm:^1.1.1" - get-intrinsic: "npm:^1.0.2" - checksum: 10c0/74ba3f31e715456e22e451d8d098779b861eba3c7cac0d9b510049aced70d75c231ba05071f97e1812c98e34e2bee734c0c6126653e0088c2d9819ca047f4073 + es-errors: "npm:^1.3.0" + function-bind: "npm:^1.1.2" + checksum: 10c0/47bd9901d57b857590431243fea704ff18078b16890a6b3e021e12d279bbf211d039155e27d7566b374d49ee1f8189344bac9833dec7a20cdec370506361c938 languageName: node linkType: hard @@ -520,10 +862,10 @@ __metadata: languageName: node linkType: hard -"camelcase@npm:^6.2.0": - version: 6.3.0 - resolution: "camelcase@npm:6.3.0" - checksum: 10c0/0d701658219bd3116d12da3eab31acddb3f9440790c0792e0d398f0a520a6a4058018e546862b6fba89d7ae990efaeb97da71e1913e9ebf5a8b5621a3d55c710 +"camelcase@npm:^8.0.0": + version: 8.0.0 + resolution: "camelcase@npm:8.0.0" + checksum: 10c0/56c5fe072f0523c9908cdaac21d4a3b3fb0f608fb2e9ba90a60e792b95dd3bb3d1f3523873ab17d86d146e94171305f73ef619e2f538bd759675bc4a14b4bff3 languageName: node linkType: hard @@ -537,6 +879,13 @@ __metadata: languageName: node linkType: hard +"chalk@npm:5.4.1, chalk@npm:^5.3.0": + version: 5.4.1 + resolution: "chalk@npm:5.4.1" + checksum: 10c0/b23e88132c702f4855ca6d25cb5538b1114343e41472d5263ee8a37cccfccd9c4216d111e1097c6a27830407a1dc81fecdf2a56f2c63033d4dbbd88c10b0dcef + languageName: node + linkType: hard + "chalk@npm:^2.0.0": version: 2.4.2 resolution: "chalk@npm:2.4.2" @@ -555,24 +904,50 @@ __metadata: languageName: node linkType: hard -"ci-info@npm:^2.0.0": - version: 2.0.0 - resolution: "ci-info@npm:2.0.0" - checksum: 10c0/8c5fa3830a2bcee2b53c2e5018226f0141db9ec9f7b1e27a5c57db5512332cde8a0beb769bcbaf0d8775a78afbf2bb841928feca4ea6219638a5b088f9884b46 +"cheerio-select@npm:^2.1.0": + version: 2.1.0 + resolution: "cheerio-select@npm:2.1.0" + dependencies: + boolbase: "npm:^1.0.0" + css-select: "npm:^5.1.0" + css-what: "npm:^6.1.0" + domelementtype: "npm:^2.3.0" + domhandler: "npm:^5.0.3" + domutils: "npm:^3.0.1" + checksum: 10c0/2242097e593919dba4aacb97d7b8275def8b9ec70b00aa1f43335456870cfc9e284eae2080bdc832ed232dabb9eefcf56c722d152da4a154813fb8814a55d282 languageName: node linkType: hard -"ci-info@npm:^3.2.0": - version: 3.4.0 - resolution: "ci-info@npm:3.4.0" - checksum: 10c0/725cabad267e601ec4be269e1af744bedede3bdd42f25bc269d97c05be31bc2edfa8511d8b0eedf27c42ffb87c1dc21af49b20fae1d9ac0345963b13499e8a99 +"cheerio@npm:^1.0.0": + version: 1.0.0 + resolution: "cheerio@npm:1.0.0" + dependencies: + cheerio-select: "npm:^2.1.0" + dom-serializer: "npm:^2.0.0" + domhandler: "npm:^5.0.3" + domutils: "npm:^3.1.0" + encoding-sniffer: "npm:^0.2.0" + htmlparser2: "npm:^9.1.0" + parse5: "npm:^7.1.2" + parse5-htmlparser2-tree-adapter: "npm:^7.0.0" + parse5-parser-stream: "npm:^7.1.2" + undici: "npm:^6.19.5" + whatwg-mimetype: "npm:^4.0.0" + checksum: 10c0/d0e16925d9c36c879edfaef1c0244c866375a4c7b8d6ccd7ae0ad42da7d26263ea1a3c17b9a1aa5965918deeff2d40ac2e7223824f8e6eca972df3b81316a09f languageName: node linkType: hard -"cli-boxes@npm:^2.2.1": - version: 2.2.1 - resolution: "cli-boxes@npm:2.2.1" - checksum: 10c0/6111352edbb2f62dbc7bfd58f2d534de507afed7f189f13fa894ce5a48badd94b2aa502fda28f1d7dd5f1eb456e7d4033d09a76660013ef50c7f66e7a034f050 +"ci-info@npm:^4.1.0": + version: 4.1.0 + resolution: "ci-info@npm:4.1.0" + checksum: 10c0/0f969ce32a974c542bc8abe4454b220d9d9323bb9415054c92a900faa5fdda0bb222eda68c490127c1d78503510d46b6aca614ecaba5a60515b8ac7e170119e6 + languageName: node + linkType: hard + +"cli-boxes@npm:^3.0.0": + version: 3.0.0 + resolution: "cli-boxes@npm:3.0.0" + checksum: 10c0/4db3e8fbfaf1aac4fb3a6cbe5a2d3fa048bee741a45371b906439b9ffc821c6e626b0f108bdcd3ddf126a4a319409aedcf39a0730573ff050fdd7b6731e99fb9 languageName: node linkType: hard @@ -585,6 +960,15 @@ __metadata: languageName: node linkType: hard +"cli-cursor@npm:^5.0.0": + version: 5.0.0 + resolution: "cli-cursor@npm:5.0.0" + dependencies: + restore-cursor: "npm:^5.0.0" + checksum: 10c0/7ec62f69b79f6734ab209a3e4dbdc8af7422d44d360a7cb1efa8a0887bbe466a6e625650c466fe4359aee44dbe2dc0b6994b583d40a05d0808a5cb193641d220 + languageName: node + linkType: hard + "cli-spinners@npm:^2.5.0": version: 2.7.0 resolution: "cli-spinners@npm:2.7.0" @@ -592,6 +976,13 @@ __metadata: languageName: node linkType: hard +"cli-spinners@npm:^2.9.2": + version: 2.9.2 + resolution: "cli-spinners@npm:2.9.2" + checksum: 10c0/907a1c227ddf0d7a101e7ab8b300affc742ead4b4ebe920a5bf1bc6d45dce2958fcd195eb28fa25275062fe6fa9b109b93b63bc8033396ed3bcb50297008b3a3 + languageName: node + linkType: hard + "cli-width@npm:^3.0.0": version: 3.0.0 resolution: "cli-width@npm:3.0.0" @@ -599,12 +990,21 @@ __metadata: languageName: node linkType: hard -"clone-response@npm:^1.0.2": - version: 1.0.3 - resolution: "clone-response@npm:1.0.3" +"cli-width@npm:^4.1.0": + version: 4.1.0 + resolution: "cli-width@npm:4.1.0" + checksum: 10c0/1fbd56413578f6117abcaf858903ba1f4ad78370a4032f916745fa2c7e390183a9d9029cf837df320b0fdce8137668e522f60a30a5f3d6529ff3872d265a955f + languageName: node + linkType: hard + +"cliui@npm:^7.0.2": + version: 7.0.4 + resolution: "cliui@npm:7.0.4" dependencies: - mimic-response: "npm:^1.0.0" - checksum: 10c0/06a2b611824efb128810708baee3bd169ec9a1bf5976a5258cd7eb3f7db25f00166c6eee5961f075c7e38e194f373d4fdf86b8166ad5b9c7e82bbd2e333a6087 + string-width: "npm:^4.2.0" + strip-ansi: "npm:^6.0.0" + wrap-ansi: "npm:^7.0.0" + checksum: 10c0/6035f5daf7383470cef82b3d3db00bec70afb3423538c50394386ffbbab135e26c3689c41791f911fa71b62d13d3863c712fdd70f0fbdffd938a1e6fd09aac00 languageName: node linkType: hard @@ -656,6 +1056,20 @@ __metadata: languageName: node linkType: hard +"commander@npm:8.3.0": + version: 8.3.0 + resolution: "commander@npm:8.3.0" + checksum: 10c0/8b043bb8322ea1c39664a1598a95e0495bfe4ca2fad0d84a92d7d1d8d213e2a155b441d2470c8e08de7c4a28cf2bc6e169211c49e1b21d9f7edc6ae4d9356060 + languageName: node + linkType: hard + +"compare-versions@npm:4.1.4": + version: 4.1.4 + resolution: "compare-versions@npm:4.1.4" + checksum: 10c0/cd3b35190bf2173fa6b43e89ba00606267442d0b4baa39bdb4f969839c266877ffc657f56e484d664cd06b7007a224e344c254545bb6e0184257df8272c5a123 + languageName: node + linkType: hard + "concat-map@npm:0.0.1": version: 0.0.1 resolution: "concat-map@npm:0.0.1" @@ -663,41 +1077,80 @@ __metadata: languageName: node linkType: hard -"configstore@npm:^5.0.1": - version: 5.0.1 - resolution: "configstore@npm:5.0.1" +"concurrently@npm:6.5.1": + version: 6.5.1 + resolution: "concurrently@npm:6.5.1" dependencies: - dot-prop: "npm:^5.2.0" - graceful-fs: "npm:^4.1.2" - make-dir: "npm:^3.0.0" - unique-string: "npm:^2.0.0" - write-file-atomic: "npm:^3.0.0" - xdg-basedir: "npm:^4.0.0" - checksum: 10c0/5af23830e78bdc56cbe92a2f81e87f1d3a39e96e51a0ab2a8bc79bbbc5d4440a48d92833b3fd9c6d34b4a9c4c5853c8487b8e6e68593e7ecbc7434822f7aced3 + chalk: "npm:^4.1.0" + date-fns: "npm:^2.16.1" + lodash: "npm:^4.17.21" + rxjs: "npm:^6.6.3" + spawn-command: "npm:^0.0.2-1" + supports-color: "npm:^8.1.0" + tree-kill: "npm:^1.2.2" + yargs: "npm:^16.2.0" + bin: + concurrently: bin/concurrently.js + checksum: 10c0/4bc2eb5d8fa9a87d2241bc1f7830f5432fd52593944eed162567188f36d1f4219f336f72b5e6afee265547e8be1e54c8c893e5693d3874666a9ce5a7ffe4cc81 languageName: node linkType: hard -"core-util-is@npm:~1.0.0": - version: 1.0.3 - resolution: "core-util-is@npm:1.0.3" - checksum: 10c0/90a0e40abbddfd7618f8ccd63a74d88deea94e77d0e8dbbea059fa7ebebb8fbb4e2909667fe26f3a467073de1a542ebe6ae4c73a73745ac5833786759cd906c9 +"config-chain@npm:^1.1.11": + version: 1.1.13 + resolution: "config-chain@npm:1.1.13" + dependencies: + ini: "npm:^1.3.4" + proto-list: "npm:~1.2.1" + checksum: 10c0/39d1df18739d7088736cc75695e98d7087aea43646351b028dfabd5508d79cf6ef4c5bcd90471f52cd87ae470d1c5490c0a8c1a292fbe6ee9ff688061ea0963e languageName: node linkType: hard -"cosmiconfig@npm:7.0.1": - version: 7.0.1 - resolution: "cosmiconfig@npm:7.0.1" +"configstore@npm:^7.0.0": + version: 7.0.0 + resolution: "configstore@npm:7.0.0" + dependencies: + atomically: "npm:^2.0.3" + dot-prop: "npm:^9.0.0" + graceful-fs: "npm:^4.2.11" + xdg-basedir: "npm:^5.1.0" + checksum: 10c0/46639ddcebe94e58ab903d1bcfaddf297585469ee11fb2900975531cf6e59f495fa1324bf594d6bf13c5daf02e1110e9f0634caecc11203c52283ff26e2a4d8b + languageName: node + linkType: hard + +"consola@npm:^2.15.0": + version: 2.15.3 + resolution: "consola@npm:2.15.3" + checksum: 10c0/34a337e6b4a1349ee4d7b4c568484344418da8fdb829d7d71bfefcd724f608f273987633b6eef465e8de510929907a092e13cb7a28a5d3acb3be446fcc79fd5e + languageName: node + linkType: hard + +"console.table@npm:0.10.0": + version: 0.10.0 + resolution: "console.table@npm:0.10.0" dependencies: - "@types/parse-json": "npm:^4.0.0" - import-fresh: "npm:^3.2.1" - parse-json: "npm:^5.0.0" - path-type: "npm:^4.0.0" - yaml: "npm:^1.10.0" - checksum: 10c0/3cd38525ba22e13da0ef9f4be131df226c94f5b96fb50f6297eb17baeedefe15cf5819f8c73cde69f71cc5034e712c86bd20c7756883dd8094087680ecc25932 + easy-table: "npm:1.1.0" + checksum: 10c0/b1893a06b422c7e82dca03dec000beabebc26415df558a05e1b9778407a76e4caa1db286df40f72e3780ac5c5b5ef5f4b8a3bef2d22020abb86f6408dc357875 languageName: node linkType: hard -"cross-spawn@npm:^7.0.0, cross-spawn@npm:^7.0.3": +"cosmiconfig@npm:9.0.0": + version: 9.0.0 + resolution: "cosmiconfig@npm:9.0.0" + dependencies: + env-paths: "npm:^2.2.1" + import-fresh: "npm:^3.3.0" + js-yaml: "npm:^4.1.0" + parse-json: "npm:^5.2.0" + peerDependencies: + typescript: ">=4.9.5" + peerDependenciesMeta: + typescript: + optional: true + checksum: 10c0/1c1703be4f02a250b1d6ca3267e408ce16abfe8364193891afc94c2d5c060b69611fdc8d97af74b7e6d5d1aac0ab2fb94d6b079573146bc2d756c2484ce5f0ee + languageName: node + linkType: hard + +"cross-spawn@npm:^7.0.3": version: 7.0.3 resolution: "cross-spawn@npm:7.0.3" dependencies: @@ -708,21 +1161,43 @@ __metadata: languageName: node linkType: hard -"crypto-random-string@npm:^2.0.0": - version: 2.0.0 - resolution: "crypto-random-string@npm:2.0.0" - checksum: 10c0/288589b2484fe787f9e146f56c4be90b940018f17af1b152e4dde12309042ff5a2bf69e949aab8b8ac253948381529cc6f3e5a2427b73643a71ff177fa122b37 +"css-select@npm:^5.1.0": + version: 5.1.0 + resolution: "css-select@npm:5.1.0" + dependencies: + boolbase: "npm:^1.0.0" + css-what: "npm:^6.1.0" + domhandler: "npm:^5.0.2" + domutils: "npm:^3.0.1" + nth-check: "npm:^2.0.1" + checksum: 10c0/551c60dba5b54054741032c1793b5734f6ba45e23ae9e82761a3c0ed1acbb8cfedfa443aaba3a3c1a54cac12b456d2012a09d2cd5f0e82e430454c1b9d84d500 languageName: node linkType: hard -"data-uri-to-buffer@npm:3": - version: 3.0.1 - resolution: "data-uri-to-buffer@npm:3.0.1" - checksum: 10c0/01fa28525402582fbb972c91822533f5528156e9e7241512b903467acbe2e0505760504e22c548bb707c7a56b5459194ee4fa6434e5995fa1a658744c2ce0cff +"css-what@npm:^6.1.0": + version: 6.1.0 + resolution: "css-what@npm:6.1.0" + checksum: 10c0/a09f5a6b14ba8dcf57ae9a59474722e80f20406c53a61e9aedb0eedc693b135113ffe2983f4efc4b5065ae639442e9ae88df24941ef159c218b231011d733746 + languageName: node + linkType: hard + +"data-uri-to-buffer@npm:^6.0.2": + version: 6.0.2 + resolution: "data-uri-to-buffer@npm:6.0.2" + checksum: 10c0/f76922bf895b3d7d443059ff278c9cc5efc89d70b8b80cd9de0aa79b3adc6d7a17948eefb8692e30398c43635f70ece1673d6085cc9eba2878dbc6c6da5292ac + languageName: node + linkType: hard + +"date-fns@npm:^2.16.1": + version: 2.30.0 + resolution: "date-fns@npm:2.30.0" + dependencies: + "@babel/runtime": "npm:^7.21.0" + checksum: 10c0/e4b521fbf22bc8c3db332bbfb7b094fd3e7627de0259a9d17c7551e2d2702608a7307a449206065916538e384f37b181565447ce2637ae09828427aed9cb5581 languageName: node linkType: hard -"debug@npm:4, debug@npm:4.3.4": +"debug@npm:4": version: 4.3.4 resolution: "debug@npm:4.3.4" dependencies: @@ -734,19 +1209,15 @@ __metadata: languageName: node linkType: hard -"decode-uri-component@npm:^0.2.0": - version: 0.2.0 - resolution: "decode-uri-component@npm:0.2.0" - checksum: 10c0/dbc3c72e4a740703f76fb3f51e35bb81546aa3e8c7897e015b8bc289813d3044ad6eaa6048fbb43f6b7b34ef005527b7511da50399caa78b91ee39266a341822 - languageName: node - linkType: hard - -"decompress-response@npm:^3.3.0": - version: 3.3.0 - resolution: "decompress-response@npm:3.3.0" +"debug@npm:^4.3.4": + version: 4.4.0 + resolution: "debug@npm:4.4.0" dependencies: - mimic-response: "npm:^1.0.0" - checksum: 10c0/5ffaf1d744277fd51c68c94ddc3081cd011b10b7de06637cccc6ecba137d45304a09ba1a776dee1c47fccc60b4a056c4bc74468eeea798ff1f1fca0024b45c9d + ms: "npm:^2.1.3" + peerDependenciesMeta: + supports-color: + optional: true + checksum: 10c0/db94f1a182bf886f57b4755f85b3a74c39b5114b9377b7ab375dc2cfa3454f09490cc6c30f829df3fc8042bc8b8995f6567ce5cd96f3bc3688bd24027197d9de languageName: node linkType: hard @@ -757,10 +1228,20 @@ __metadata: languageName: node linkType: hard -"deep-is@npm:~0.1.3": - version: 0.1.4 - resolution: "deep-is@npm:0.1.4" - checksum: 10c0/7f0ee496e0dff14a573dc6127f14c95061b448b87b995fc96c017ce0a1e66af1675e73f1d6064407975bc4ea6ab679497a29fff7b5b9c4e99cb10797c1ad0b4c +"default-browser-id@npm:^5.0.0": + version: 5.0.0 + resolution: "default-browser-id@npm:5.0.0" + checksum: 10c0/957fb886502594c8e645e812dfe93dba30ed82e8460d20ce39c53c5b0f3e2afb6ceaec2249083b90bdfbb4cb0f34e1f73fde3d68cac00becdbcfd894156b5ead + languageName: node + linkType: hard + +"default-browser@npm:^5.2.1": + version: 5.2.1 + resolution: "default-browser@npm:5.2.1" + dependencies: + bundle-name: "npm:^4.1.0" + default-browser-id: "npm:^5.0.0" + checksum: 10c0/73f17dc3c58026c55bb5538749597db31f9561c0193cd98604144b704a981c95a466f8ecc3c2db63d8bfd04fb0d426904834cfc91ae510c6aeb97e13c5167c4d languageName: node linkType: hard @@ -773,32 +1254,21 @@ __metadata: languageName: node linkType: hard -"defer-to-connect@npm:^1.0.1": - version: 1.1.3 - resolution: "defer-to-connect@npm:1.1.3" - checksum: 10c0/9feb161bd7d21836fdff31eba79c2b11b7aaf844be58faf727121f8b0d9c2e82b494560df0903f41b52dd75027dc7c9455c11b3739f3202b28ca92b56c8f960e - languageName: node - linkType: hard - -"define-properties@npm:^1.1.3, define-properties@npm:^1.1.4": - version: 1.1.4 - resolution: "define-properties@npm:1.1.4" - dependencies: - has-property-descriptors: "npm:^1.0.0" - object-keys: "npm:^1.1.1" - checksum: 10c0/1e09acd814c3761f2355d9c8a18fbc2b5d2e1073e1302245c134e96aacbff51b152e2a6f5f5db23af3c43e26f4e3a0d42f569aa4135f49046246c934bfb8e1dc +"define-lazy-prop@npm:^3.0.0": + version: 3.0.0 + resolution: "define-lazy-prop@npm:3.0.0" + checksum: 10c0/5ab0b2bf3fa58b3a443140bbd4cd3db1f91b985cc8a246d330b9ac3fc0b6a325a6d82bddc0b055123d745b3f9931afeea74a5ec545439a1630b9c8512b0eeb49 languageName: node linkType: hard -"degenerator@npm:^3.0.2": - version: 3.0.2 - resolution: "degenerator@npm:3.0.2" +"degenerator@npm:^5.0.0": + version: 5.0.1 + resolution: "degenerator@npm:5.0.1" dependencies: - ast-types: "npm:^0.13.2" - escodegen: "npm:^1.8.1" - esprima: "npm:^4.0.0" - vm2: "npm:^3.9.8" - checksum: 10c0/f9ecb5e15412952f9bfdf8c7b329539efa5cd4327bd199a384f50adeaf35169c6e9d2f21af12fcc2d80913481220451efc8f321bc6179997248a80c4cf0f9b5e + ast-types: "npm:^0.13.4" + escodegen: "npm:^2.1.0" + esprima: "npm:^4.0.1" + checksum: 10c0/e48d8a651edeb512a648711a09afec269aac6de97d442a4bb9cf121a66877e0eec11b9727100a10252335c0666ae1c84a8bc1e3a3f47788742c975064d2c7b1c languageName: node linkType: hard @@ -809,49 +1279,87 @@ __metadata: languageName: node linkType: hard -"depd@npm:2.0.0": +"detect-indent@npm:7.0.1": + version: 7.0.1 + resolution: "detect-indent@npm:7.0.1" + checksum: 10c0/47b6e3e3dda603c386e73b129f3e84844ae59bc2615f5072becf3cc02eab400bed5a4e6379c49d0b18cf630e80c2b07e87e0038b777addbc6ef793ad77dd05bc + languageName: node + linkType: hard + +"dom-serializer@npm:^2.0.0": version: 2.0.0 - resolution: "depd@npm:2.0.0" - checksum: 10c0/58bd06ec20e19529b06f7ad07ddab60e504d9e0faca4bd23079fac2d279c3594334d736508dc350e06e510aba5e22e4594483b3a6562ce7c17dd797f4cc4ad2c + resolution: "dom-serializer@npm:2.0.0" + dependencies: + domelementtype: "npm:^2.3.0" + domhandler: "npm:^5.0.2" + entities: "npm:^4.2.0" + checksum: 10c0/d5ae2b7110ca3746b3643d3ef60ef823f5f078667baf530cec096433f1627ec4b6fa8c072f09d079d7cda915fd2c7bc1b7b935681e9b09e591e1e15f4040b8e2 languageName: node linkType: hard -"deprecation@npm:^2.0.0, deprecation@npm:^2.3.1": - version: 2.3.1 - resolution: "deprecation@npm:2.3.1" - checksum: 10c0/23d688ba66b74d09b908c40a76179418acbeeb0bfdf218c8075c58ad8d0c315130cb91aa3dffb623aa3a411a3569ce56c6460de6c8d69071c17fe6dd2442f032 +"domelementtype@npm:^2.3.0": + version: 2.3.0 + resolution: "domelementtype@npm:2.3.0" + checksum: 10c0/686f5a9ef0fff078c1412c05db73a0dce096190036f33e400a07e2a4518e9f56b1e324f5c576a0a747ef0e75b5d985c040b0d51945ce780c0dd3c625a18cd8c9 languageName: node linkType: hard -"detect-indent@npm:^6.0.0": - version: 6.1.0 - resolution: "detect-indent@npm:6.1.0" - checksum: 10c0/dd83cdeda9af219cf77f5e9a0dc31d828c045337386cfb55ce04fad94ba872ee7957336834154f7647b89b899c3c7acc977c57a79b7c776b506240993f97acc7 +"domhandler@npm:^5.0.2, domhandler@npm:^5.0.3": + version: 5.0.3 + resolution: "domhandler@npm:5.0.3" + dependencies: + domelementtype: "npm:^2.3.0" + checksum: 10c0/bba1e5932b3e196ad6862286d76adc89a0dbf0c773e5ced1eb01f9af930c50093a084eff14b8de5ea60b895c56a04d5de8bbc4930c5543d029091916770b2d2a languageName: node linkType: hard -"dir-glob@npm:^3.0.1": - version: 3.0.1 - resolution: "dir-glob@npm:3.0.1" +"domutils@npm:^3.0.1, domutils@npm:^3.1.0": + version: 3.2.2 + resolution: "domutils@npm:3.2.2" dependencies: - path-type: "npm:^4.0.0" - checksum: 10c0/dcac00920a4d503e38bb64001acb19df4efc14536ada475725e12f52c16777afdee4db827f55f13a908ee7efc0cb282e2e3dbaeeb98c0993dd93d1802d3bf00c + dom-serializer: "npm:^2.0.0" + domelementtype: "npm:^2.3.0" + domhandler: "npm:^5.0.3" + checksum: 10c0/47938f473b987ea71cd59e59626eb8666d3aa8feba5266e45527f3b636c7883cca7e582d901531961f742c519d7514636b7973353b648762b2e3bedbf235fada languageName: node linkType: hard -"dot-prop@npm:^5.2.0": - version: 5.3.0 - resolution: "dot-prop@npm:5.3.0" +"dot-prop@npm:^9.0.0": + version: 9.0.0 + resolution: "dot-prop@npm:9.0.0" + dependencies: + type-fest: "npm:^4.18.2" + checksum: 10c0/4bac49a2f559156811862ac92813906f70529c50da918eaab81b38dd869743c667d578e183607f5ae11e8ae2a02e43e98e32c8a37bc4cae76b04d5b576e3112f + languageName: node + linkType: hard + +"dunder-proto@npm:^1.0.1": + version: 1.0.1 + resolution: "dunder-proto@npm:1.0.1" dependencies: - is-obj: "npm:^2.0.0" - checksum: 10c0/93f0d343ef87fe8869320e62f2459f7e70f49c6098d948cc47e060f4a3f827d0ad61e83cb82f2bd90cd5b9571b8d334289978a43c0f98fea4f0e99ee8faa0599 + call-bind-apply-helpers: "npm:^1.0.1" + es-errors: "npm:^1.3.0" + gopd: "npm:^1.2.0" + checksum: 10c0/199f2a0c1c16593ca0a145dbf76a962f8033ce3129f01284d48c45ed4e14fea9bbacd7b3610b6cdc33486cef20385ac054948fefc6272fcce645c09468f93031 + languageName: node + linkType: hard + +"easy-table@npm:1.1.0": + version: 1.1.0 + resolution: "easy-table@npm:1.1.0" + dependencies: + wcwidth: "npm:>=1.0.1" + dependenciesMeta: + wcwidth: + optional: true + checksum: 10c0/0b7b03723e450c8286bd375bbe7d23247456dbb8f79df055adcfd745bfb91f7604c4e78204ff75d65d5229bec8867cbefca51c57938004f487ff800b587540bb languageName: node linkType: hard -"duplexer3@npm:^0.1.4": - version: 0.1.5 - resolution: "duplexer3@npm:0.1.5" - checksum: 10c0/02195030d61c4d6a2a34eca71639f2ea5e05cb963490e5bd9527623c2ac7f50c33842a34d14777ea9cbfd9bc2be5a84065560b897d9fabb99346058a5b86ca98 +"emoji-regex@npm:^10.3.0": + version: 10.4.0 + resolution: "emoji-regex@npm:10.4.0" + checksum: 10c0/a3fcedfc58bfcce21a05a5f36a529d81e88d602100145fcca3dc6f795e3c8acc4fc18fe773fbf9b6d6e9371205edb3afa2668ec3473fa2aa7fd47d2a9d46482d languageName: node linkType: hard @@ -862,12 +1370,27 @@ __metadata: languageName: node linkType: hard -"end-of-stream@npm:^1.1.0": - version: 1.4.4 - resolution: "end-of-stream@npm:1.4.4" +"encoding-sniffer@npm:^0.2.0": + version: 0.2.0 + resolution: "encoding-sniffer@npm:0.2.0" dependencies: - once: "npm:^1.4.0" - checksum: 10c0/870b423afb2d54bb8d243c63e07c170409d41e20b47eeef0727547aea5740bd6717aca45597a9f2745525667a6b804c1e7bede41f856818faee5806dd9ff3975 + iconv-lite: "npm:^0.6.3" + whatwg-encoding: "npm:^3.1.1" + checksum: 10c0/b312e0d67f339bec44e021e5210ee8ee90d7b8f9975eb2c79a36fd467eb07709e88dcf62ee20f62ee0d74a13874307d99557852a2de9b448f1e3fb991fc68257 + languageName: node + linkType: hard + +"entities@npm:^4.2.0, entities@npm:^4.5.0": + version: 4.5.0 + resolution: "entities@npm:4.5.0" + checksum: 10c0/5b039739f7621f5d1ad996715e53d964035f75ad3b9a4d38c6b3804bb226e282ffeae2443624d8fdd9c47d8e926ae9ac009c54671243f0c3294c26af7cc85250 + languageName: node + linkType: hard + +"env-paths@npm:^2.2.1": + version: 2.2.1 + resolution: "env-paths@npm:2.2.1" + checksum: 10c0/285325677bf00e30845e330eec32894f5105529db97496ee3f598478e50f008c5352a41a30e5e72ec9de8a542b5a570b85699cd63bd2bc646dbcb9f311d83bc4 languageName: node linkType: hard @@ -880,76 +1403,52 @@ __metadata: languageName: node linkType: hard -"es-abstract@npm:^1.19.0, es-abstract@npm:^1.19.1, es-abstract@npm:^1.19.5": - version: 1.20.3 - resolution: "es-abstract@npm:1.20.3" - dependencies: - call-bind: "npm:^1.0.2" - es-to-primitive: "npm:^1.2.1" - function-bind: "npm:^1.1.1" - function.prototype.name: "npm:^1.1.5" - get-intrinsic: "npm:^1.1.3" - get-symbol-description: "npm:^1.0.0" - has: "npm:^1.0.3" - has-property-descriptors: "npm:^1.0.0" - has-symbols: "npm:^1.0.3" - internal-slot: "npm:^1.0.3" - is-callable: "npm:^1.2.6" - is-negative-zero: "npm:^2.0.2" - is-regex: "npm:^1.1.4" - is-shared-array-buffer: "npm:^1.0.2" - is-string: "npm:^1.0.7" - is-weakref: "npm:^1.0.2" - object-inspect: "npm:^1.12.2" - object-keys: "npm:^1.1.1" - object.assign: "npm:^4.1.4" - regexp.prototype.flags: "npm:^1.4.3" - safe-regex-test: "npm:^1.0.0" - string.prototype.trimend: "npm:^1.0.5" - string.prototype.trimstart: "npm:^1.0.5" - unbox-primitive: "npm:^1.0.2" - checksum: 10c0/30dce54c52149f9c115c31a2566b6f03f10126a5ca4a76ad41dab150a762ed358870d74f194b60ae602c1e8a57a6f2df7e20388bbc589861d5d74ebb46a9273b - languageName: node - linkType: hard - -"es-array-method-boxes-properly@npm:^1.0.0": - version: 1.0.0 - resolution: "es-array-method-boxes-properly@npm:1.0.0" - checksum: 10c0/4b7617d3fbd460d6f051f684ceca6cf7e88e6724671d9480388d3ecdd72119ddaa46ca31f2c69c5426a82e4b3091c1e81867c71dcdc453565cd90005ff2c382d +"es-define-property@npm:^1.0.1": + version: 1.0.1 + resolution: "es-define-property@npm:1.0.1" + checksum: 10c0/3f54eb49c16c18707949ff25a1456728c883e81259f045003499efba399c08bad00deebf65cccde8c0e07908c1a225c9d472b7107e558f2a48e28d530e34527c languageName: node linkType: hard -"es-get-iterator@npm:^1.0.2": - version: 1.1.2 - resolution: "es-get-iterator@npm:1.1.2" +"es-errors@npm:^1.3.0": + version: 1.3.0 + resolution: "es-errors@npm:1.3.0" + checksum: 10c0/0a61325670072f98d8ae3b914edab3559b6caa980f08054a3b872052640d91da01d38df55df797fcc916389d77fc92b8d5906cf028f4db46d7e3003abecbca85 + languageName: node + linkType: hard + +"es-object-atoms@npm:^1.0.0, es-object-atoms@npm:^1.1.1": + version: 1.1.1 + resolution: "es-object-atoms@npm:1.1.1" dependencies: - call-bind: "npm:^1.0.2" - get-intrinsic: "npm:^1.1.0" - has-symbols: "npm:^1.0.1" - is-arguments: "npm:^1.1.0" - is-map: "npm:^2.0.2" - is-set: "npm:^2.0.2" - is-string: "npm:^1.0.5" - isarray: "npm:^2.0.5" - checksum: 10c0/76a832b3bfd85941c556287cd50a3ad612f5193264b761e2011503f311dfa20aa52b9ebd701d3f16022d4cb56a7130a4cfb50186427d3aecd0d4e547a471f68e + es-errors: "npm:^1.3.0" + checksum: 10c0/65364812ca4daf48eb76e2a3b7a89b3f6a2e62a1c420766ce9f692665a29d94fe41fe88b65f24106f449859549711e4b40d9fb8002d862dfd7eb1c512d10be0c languageName: node linkType: hard -"es-to-primitive@npm:^1.2.1": - version: 1.2.1 - resolution: "es-to-primitive@npm:1.2.1" +"es-set-tostringtag@npm:^2.1.0": + version: 2.1.0 + resolution: "es-set-tostringtag@npm:2.1.0" dependencies: - is-callable: "npm:^1.1.4" - is-date-object: "npm:^1.0.1" - is-symbol: "npm:^1.0.2" - checksum: 10c0/0886572b8dc075cb10e50c0af62a03d03a68e1e69c388bd4f10c0649ee41b1fbb24840a1b7e590b393011b5cdbe0144b776da316762653685432df37d6de60f1 + es-errors: "npm:^1.3.0" + get-intrinsic: "npm:^1.2.6" + has-tostringtag: "npm:^1.0.2" + hasown: "npm:^2.0.2" + checksum: 10c0/ef2ca9ce49afe3931cb32e35da4dcb6d86ab02592cfc2ce3e49ced199d9d0bb5085fc7e73e06312213765f5efa47cc1df553a6a5154584b21448e9fb8355b1af languageName: node linkType: hard -"escape-goat@npm:^2.0.0": - version: 2.1.1 - resolution: "escape-goat@npm:2.1.1" - checksum: 10c0/fc0ad656f89c05e86a9641a21bdc5ea37b258714c057430b68a834854fa3e5770cda7d41756108863fc68b1e36a0946463017b7553ac39eaaf64815be07816fc +"escalade@npm:^3.1.1": + version: 3.2.0 + resolution: "escalade@npm:3.2.0" + checksum: 10c0/ced4dd3a78e15897ed3be74e635110bbf3b08877b0a41be50dcb325ee0e0b5f65fc2d50e9845194d7c4633f327e2e1c6cce00a71b617c5673df0374201d67f65 + languageName: node + linkType: hard + +"escape-goat@npm:^4.0.0": + version: 4.0.0 + resolution: "escape-goat@npm:4.0.0" + checksum: 10c0/9d2a8314e2370f2dd9436d177f6b3b1773525df8f895c8f3e1acb716f5fd6b10b336cb1cd9862d4709b36eb207dbe33664838deca9c6d55b8371be4eebb972f6 languageName: node linkType: hard @@ -960,14 +1459,13 @@ __metadata: languageName: node linkType: hard -"escodegen@npm:^1.8.1": - version: 1.14.3 - resolution: "escodegen@npm:1.14.3" +"escodegen@npm:^2.1.0": + version: 2.1.0 + resolution: "escodegen@npm:2.1.0" dependencies: esprima: "npm:^4.0.1" - estraverse: "npm:^4.2.0" + estraverse: "npm:^5.2.0" esutils: "npm:^2.0.2" - optionator: "npm:^0.8.1" source-map: "npm:~0.6.1" dependenciesMeta: source-map: @@ -975,11 +1473,11 @@ __metadata: bin: escodegen: bin/escodegen.js esgenerate: bin/esgenerate.js - checksum: 10c0/30d337803e8f44308c90267bf6192399e4b44792497c77a7506b68ab802ba6a48ebbe1ce77b219aba13dfd2de5f5e1c267e35be1ed87b2a9c3315e8b283e302a + checksum: 10c0/e1450a1f75f67d35c061bf0d60888b15f62ab63aef9df1901cffc81cffbbb9e8b3de237c5502cf8613a017c1df3a3003881307c78835a1ab54d8c8d2206e01d3 languageName: node linkType: hard -"esprima@npm:^4.0.0, esprima@npm:^4.0.1": +"esprima@npm:^4.0.1": version: 4.0.1 resolution: "esprima@npm:4.0.1" bin: @@ -989,10 +1487,10 @@ __metadata: languageName: node linkType: hard -"estraverse@npm:^4.2.0": - version: 4.3.0 - resolution: "estraverse@npm:4.3.0" - checksum: 10c0/9cb46463ef8a8a4905d3708a652d60122a0c20bb58dec7e0e12ab0e7235123d74214fc0141d743c381813e1b992767e2708194f6f6e0f9fd00c1b4e0887b8b6d +"estraverse@npm:^5.2.0": + version: 5.3.0 + resolution: "estraverse@npm:5.3.0" + checksum: 10c0/1ff9447b96263dec95d6d67431c5e0771eb9776427421260a3e2f0fdd5d6bd4f8e37a7338f5ad2880c9f143450c9b1e4fc2069060724570a49cf9cf0312bd107 languageName: node linkType: hard @@ -1003,41 +1501,44 @@ __metadata: languageName: node linkType: hard -"execa@npm:5.1.1": - version: 5.1.1 - resolution: "execa@npm:5.1.1" +"execa@npm:9.5.2": + version: 9.5.2 + resolution: "execa@npm:9.5.2" dependencies: + "@sindresorhus/merge-streams": "npm:^4.0.0" cross-spawn: "npm:^7.0.3" - get-stream: "npm:^6.0.0" - human-signals: "npm:^2.1.0" - is-stream: "npm:^2.0.0" - merge-stream: "npm:^2.0.0" - npm-run-path: "npm:^4.0.1" - onetime: "npm:^5.1.2" - signal-exit: "npm:^3.0.3" - strip-final-newline: "npm:^2.0.0" - checksum: 10c0/c8e615235e8de4c5addf2fa4c3da3e3aa59ce975a3e83533b4f6a71750fb816a2e79610dc5f1799b6e28976c9ae86747a36a606655bf8cb414a74d8d507b304f + figures: "npm:^6.1.0" + get-stream: "npm:^9.0.0" + human-signals: "npm:^8.0.0" + is-plain-obj: "npm:^4.1.0" + is-stream: "npm:^4.0.1" + npm-run-path: "npm:^6.0.0" + pretty-ms: "npm:^9.0.0" + signal-exit: "npm:^4.1.0" + strip-final-newline: "npm:^4.0.0" + yoctocolors: "npm:^2.0.0" + checksum: 10c0/94782a6282e03253224406c29068d18f9095cc251a45d1f19ac3d8f2a9db2cbe32fb8ceb039db1451d8fce3531135a6c0c559f76d634f85416268fc4a6995365 languageName: node linkType: hard -"execa@npm:^4.0.2": - version: 4.1.0 - resolution: "execa@npm:4.1.0" +"execa@npm:^8.0.1": + version: 8.0.1 + resolution: "execa@npm:8.0.1" dependencies: - cross-spawn: "npm:^7.0.0" - get-stream: "npm:^5.0.0" - human-signals: "npm:^1.1.1" - is-stream: "npm:^2.0.0" + cross-spawn: "npm:^7.0.3" + get-stream: "npm:^8.0.1" + human-signals: "npm:^5.0.0" + is-stream: "npm:^3.0.0" merge-stream: "npm:^2.0.0" - npm-run-path: "npm:^4.0.0" - onetime: "npm:^5.1.0" - signal-exit: "npm:^3.0.2" - strip-final-newline: "npm:^2.0.0" - checksum: 10c0/02211601bb1c52710260edcc68fb84c3c030dc68bafc697c90ada3c52cc31375337de8c24826015b8382a58d63569ffd203b79c94fef217d65503e3e8d2c52ba + npm-run-path: "npm:^5.1.0" + onetime: "npm:^6.0.0" + signal-exit: "npm:^4.1.0" + strip-final-newline: "npm:^3.0.0" + checksum: 10c0/2c52d8775f5bf103ce8eec9c7ab3059909ba350a5164744e9947ed14a53f51687c040a250bda833f906d1283aa8803975b84e6c8f7a7c42f99dc8ef80250d1af languageName: node linkType: hard -"external-editor@npm:^3.0.3": +"external-editor@npm:^3.0.3, external-editor@npm:^3.1.0": version: 3.1.0 resolution: "external-editor@npm:3.1.0" dependencies: @@ -1048,23 +1549,30 @@ __metadata: languageName: node linkType: hard -"fast-glob@npm:^3.1.1, fast-glob@npm:^3.2.4": - version: 3.2.12 - resolution: "fast-glob@npm:3.2.12" +"fast-content-type-parse@npm:^2.0.0": + version: 2.0.1 + resolution: "fast-content-type-parse@npm:2.0.1" + checksum: 10c0/e5ff87d75a35ae4cf377df1dca46ec49e7abbdc8513689676ecdef548b94900b50e66e516e64470035d79b9f7010ef15d98c24d8ae803a881363cc59e0715e19 + languageName: node + linkType: hard + +"fast-glob@npm:^3.3.2, fast-glob@npm:^3.3.3": + version: 3.3.3 + resolution: "fast-glob@npm:3.3.3" dependencies: "@nodelib/fs.stat": "npm:^2.0.2" "@nodelib/fs.walk": "npm:^1.2.3" glob-parent: "npm:^5.1.2" merge2: "npm:^1.3.0" - micromatch: "npm:^4.0.4" - checksum: 10c0/08604fb8ef6442ce74068bef3c3104382bb1f5ab28cf75e4ee904662778b60ad620e1405e692b7edea598ef445f5d387827a965ba034e1892bf54b1dfde97f26 + micromatch: "npm:^4.0.8" + checksum: 10c0/f6aaa141d0d3384cf73cbcdfc52f475ed293f6d5b65bfc5def368b09163a9f7e5ec2b3014d80f733c405f58e470ee0cc451c2937685045cddcdeaa24199c43fe languageName: node linkType: hard -"fast-levenshtein@npm:~2.0.6": - version: 2.0.6 - resolution: "fast-levenshtein@npm:2.0.6" - checksum: 10c0/111972b37338bcb88f7d9e2c5907862c280ebf4234433b95bc611e518d192ccb2d38119c4ac86e26b668d75f7f3894f4ff5c4982899afced7ca78633b08287c4 +"fast-safe-stringify@npm:2.1.1": + version: 2.1.1 + resolution: "fast-safe-stringify@npm:2.1.1" + checksum: 10c0/d90ec1c963394919828872f21edaa3ad6f1dddd288d2bd4e977027afff09f5db40f94e39536d4646f7e01761d704d72d51dce5af1b93717f3489ef808f5f4e4d languageName: node linkType: hard @@ -1086,48 +1594,54 @@ __metadata: languageName: node linkType: hard -"file-uri-to-path@npm:2": - version: 2.0.0 - resolution: "file-uri-to-path@npm:2.0.0" - checksum: 10c0/78fad70e5ce84b11d9590998e4a3c3f87765c18bfa7edfcfd71eab1968c99d4448d24712911479aacf2a870578769f0b4e4fcc093654462a88823d8d134aed48 +"figures@npm:^6.1.0": + version: 6.1.0 + resolution: "figures@npm:6.1.0" + dependencies: + is-unicode-supported: "npm:^2.0.0" + checksum: 10c0/9159df4264d62ef447a3931537de92f5012210cf5135c35c010df50a2169377581378149abfe1eb238bd6acbba1c0d547b1f18e0af6eee49e30363cedaffcfe4 languageName: node linkType: hard -"fill-range@npm:^7.0.1": - version: 7.0.1 - resolution: "fill-range@npm:7.0.1" +"fill-range@npm:^7.1.1": + version: 7.1.1 + resolution: "fill-range@npm:7.1.1" dependencies: to-regex-range: "npm:^5.0.1" - checksum: 10c0/7cdad7d426ffbaadf45aeb5d15ec675bbd77f7597ad5399e3d2766987ed20bda24d5fac64b3ee79d93276f5865608bb22344a26b9b1ae6c4d00bd94bf611623f + checksum: 10c0/b75b691bbe065472f38824f694c2f7449d7f5004aa950426a2c28f0306c60db9b880c0b0e4ed819997ffb882d1da02cfcfc819bddc94d71627f5269682edf018 languageName: node linkType: hard -"filter-obj@npm:^1.1.0": - version: 1.1.0 - resolution: "filter-obj@npm:1.1.0" - checksum: 10c0/071e0886b2b50238ca5026c5bbf58c26a7c1a1f720773b8c7813d16ba93d0200de977af14ac143c5ac18f666b2cfc83073f3a5fe6a4e996c49e0863d5500fccf +"follow-redirects@npm:^1.15.6": + version: 1.15.9 + resolution: "follow-redirects@npm:1.15.9" + peerDependenciesMeta: + debug: + optional: true + checksum: 10c0/5829165bd112c3c0e82be6c15b1a58fa9dcfaede3b3c54697a82fe4a62dd5ae5e8222956b448d2f98e331525f05d00404aba7d696de9e761ef6e42fdc780244f languageName: node linkType: hard -"form-data@npm:4.0.0": - version: 4.0.0 - resolution: "form-data@npm:4.0.0" +"form-data@npm:^4.0.0": + version: 4.0.2 + resolution: "form-data@npm:4.0.2" dependencies: asynckit: "npm:^0.4.0" combined-stream: "npm:^1.0.8" + es-set-tostringtag: "npm:^2.1.0" mime-types: "npm:^2.1.12" - checksum: 10c0/cb6f3ac49180be03ff07ba3ff125f9eba2ff0b277fb33c7fc47569fc5e616882c5b1c69b9904c4c4187e97dd0419dd03b134174756f296dec62041e6527e2c6e + checksum: 10c0/e534b0cf025c831a0929bf4b9bbe1a9a6b03e273a8161f9947286b9b13bf8fb279c6944aae0070c4c311100c6d6dbb815cd955dc217728caf73fad8dc5b8ee9c languageName: node linkType: hard -"fs-extra@npm:^8.1.0": - version: 8.1.0 - resolution: "fs-extra@npm:8.1.0" +"fs-extra@npm:10.1.0": + version: 10.1.0 + resolution: "fs-extra@npm:10.1.0" dependencies: graceful-fs: "npm:^4.2.0" - jsonfile: "npm:^4.0.0" - universalify: "npm:^0.1.0" - checksum: 10c0/259f7b814d9e50d686899550c4f9ded85c46c643f7fe19be69504888e007fcbc08f306fae8ec495b8b998635e997c9e3e175ff2eeed230524ef1c1684cc96423 + jsonfile: "npm:^6.0.1" + universalify: "npm:^2.0.0" + checksum: 10c0/5f579466e7109719d162a9249abbeffe7f426eb133ea486e020b89bc6d67a741134076bf439983f2eb79276ceaf6bd7b7c1e43c3fd67fe889863e69072fb0a5e languageName: node linkType: hard @@ -1138,16 +1652,6 @@ __metadata: languageName: node linkType: hard -"ftp@npm:^0.3.10": - version: 0.3.10 - resolution: "ftp@npm:0.3.10" - dependencies: - readable-stream: "npm:1.1.x" - xregexp: "npm:2.0.0" - checksum: 10c0/bd541fc3e34796cb6fd9749312d4336779ded1edc4b4b82441c211a998da19b8f22a80101685ca128e40ccd33faa9429c22bfd638e2ae1c3b8f1b2f91c2ed719 - languageName: node - linkType: hard - "function-bind@npm:^1.1.1": version: 1.1.1 resolution: "function-bind@npm:1.1.1" @@ -1155,101 +1659,99 @@ __metadata: languageName: node linkType: hard -"function.prototype.name@npm:^1.1.5": - version: 1.1.5 - resolution: "function.prototype.name@npm:1.1.5" - dependencies: - call-bind: "npm:^1.0.2" - define-properties: "npm:^1.1.3" - es-abstract: "npm:^1.19.0" - functions-have-names: "npm:^1.2.2" - checksum: 10c0/b75fb8c5261f03a54f7cb53a8c99e0c40297efc3cf750c51d3a2e56f6741701c14eda51986d30c24063136a4c32d1643df9d1dd2f2a14b64fa011edd3e7117ae +"function-bind@npm:^1.1.2": + version: 1.1.2 + resolution: "function-bind@npm:1.1.2" + checksum: 10c0/d8680ee1e5fcd4c197e4ac33b2b4dce03c71f4d91717292785703db200f5c21f977c568d28061226f9b5900cbcd2c84463646134fd5337e7925e0942bc3f46d5 languageName: node linkType: hard -"functions-have-names@npm:^1.2.2": - version: 1.2.3 - resolution: "functions-have-names@npm:1.2.3" - checksum: 10c0/33e77fd29bddc2d9bb78ab3eb854c165909201f88c75faa8272e35899e2d35a8a642a15e7420ef945e1f64a9670d6aa3ec744106b2aa42be68ca5114025954ca +"get-caller-file@npm:^2.0.5": + version: 2.0.5 + resolution: "get-caller-file@npm:2.0.5" + checksum: 10c0/c6c7b60271931fa752aeb92f2b47e355eac1af3a2673f47c9589e8f8a41adc74d45551c1bc57b5e66a80609f10ffb72b6f575e4370d61cc3f7f3aaff01757cde languageName: node linkType: hard -"get-intrinsic@npm:^1.0.2, get-intrinsic@npm:^1.1.0, get-intrinsic@npm:^1.1.1, get-intrinsic@npm:^1.1.3": - version: 1.1.3 - resolution: "get-intrinsic@npm:1.1.3" - dependencies: - function-bind: "npm:^1.1.1" - has: "npm:^1.0.3" - has-symbols: "npm:^1.0.3" - checksum: 10c0/6f201d5f95ea0dd6c8d0dc2c265603aff0b9e15614cb70f8f4674bb3d2b2369d521efaa84d0b70451d2c00762ebd28402758bf46279c6f2a00d242ebac0d8442 +"get-east-asian-width@npm:^1.0.0": + version: 1.3.0 + resolution: "get-east-asian-width@npm:1.3.0" + checksum: 10c0/1a049ba697e0f9a4d5514c4623781c5246982bdb61082da6b5ae6c33d838e52ce6726407df285cdbb27ec1908b333cf2820989bd3e986e37bb20979437fdf34b languageName: node linkType: hard -"get-stream@npm:^4.1.0": - version: 4.1.0 - resolution: "get-stream@npm:4.1.0" +"get-intrinsic@npm:^1.2.6": + version: 1.3.0 + resolution: "get-intrinsic@npm:1.3.0" dependencies: - pump: "npm:^3.0.0" - checksum: 10c0/294d876f667694a5ca23f0ca2156de67da950433b6fb53024833733975d32582896dbc7f257842d331809979efccf04d5e0b6b75ad4d45744c45f193fd497539 + call-bind-apply-helpers: "npm:^1.0.2" + es-define-property: "npm:^1.0.1" + es-errors: "npm:^1.3.0" + es-object-atoms: "npm:^1.1.1" + function-bind: "npm:^1.1.2" + get-proto: "npm:^1.0.1" + gopd: "npm:^1.2.0" + has-symbols: "npm:^1.1.0" + hasown: "npm:^2.0.2" + math-intrinsics: "npm:^1.1.0" + checksum: 10c0/52c81808af9a8130f581e6a6a83e1ba4a9f703359e7a438d1369a5267a25412322f03dcbd7c549edaef0b6214a0630a28511d7df0130c93cfd380f4fa0b5b66a languageName: node linkType: hard -"get-stream@npm:^5.0.0, get-stream@npm:^5.1.0": - version: 5.2.0 - resolution: "get-stream@npm:5.2.0" +"get-proto@npm:^1.0.1": + version: 1.0.1 + resolution: "get-proto@npm:1.0.1" dependencies: - pump: "npm:^3.0.0" - checksum: 10c0/43797ffd815fbb26685bf188c8cfebecb8af87b3925091dd7b9a9c915993293d78e3c9e1bce125928ff92f2d0796f3889b92b5ec6d58d1041b574682132e0a80 + dunder-proto: "npm:^1.0.1" + es-object-atoms: "npm:^1.0.0" + checksum: 10c0/9224acb44603c5526955e83510b9da41baf6ae73f7398875fba50edc5e944223a89c4a72b070fcd78beb5f7bdda58ecb6294adc28f7acfc0da05f76a2399643c languageName: node linkType: hard -"get-stream@npm:^6.0.0": - version: 6.0.1 - resolution: "get-stream@npm:6.0.1" - checksum: 10c0/49825d57d3fd6964228e6200a58169464b8e8970489b3acdc24906c782fb7f01f9f56f8e6653c4a50713771d6658f7cfe051e5eb8c12e334138c9c918b296341 +"get-stream@npm:^8.0.1": + version: 8.0.1 + resolution: "get-stream@npm:8.0.1" + checksum: 10c0/5c2181e98202b9dae0bb4a849979291043e5892eb40312b47f0c22b9414fc9b28a3b6063d2375705eb24abc41ecf97894d9a51f64ff021511b504477b27b4290 languageName: node linkType: hard -"get-symbol-description@npm:^1.0.0": - version: 1.0.0 - resolution: "get-symbol-description@npm:1.0.0" +"get-stream@npm:^9.0.0": + version: 9.0.1 + resolution: "get-stream@npm:9.0.1" dependencies: - call-bind: "npm:^1.0.2" - get-intrinsic: "npm:^1.1.1" - checksum: 10c0/23bc3b44c221cdf7669a88230c62f4b9e30393b61eb21ba4400cb3e346801bd8f95fe4330ee78dbae37aecd874646d53e3e76a17a654d0c84c77f6690526d6bb + "@sec-ant/readable-stream": "npm:^0.4.1" + is-stream: "npm:^4.0.1" + checksum: 10c0/d70e73857f2eea1826ac570c3a912757dcfbe8a718a033fa0c23e12ac8e7d633195b01710e0559af574cbb5af101009b42df7b6f6b29ceec8dbdf7291931b948 languageName: node linkType: hard -"get-uri@npm:3": - version: 3.0.2 - resolution: "get-uri@npm:3.0.2" +"get-uri@npm:^6.0.1": + version: 6.0.4 + resolution: "get-uri@npm:6.0.4" dependencies: - "@tootallnate/once": "npm:1" - data-uri-to-buffer: "npm:3" - debug: "npm:4" - file-uri-to-path: "npm:2" - fs-extra: "npm:^8.1.0" - ftp: "npm:^0.3.10" - checksum: 10c0/f0e20ce416448af5f90e5b0df2e2df3198a8b7ac80d9c9cb90ab3427ebff3119304d5acc1aba33646464f7529daba33e1961c093d06cd6ca729ac92dda51a21a + basic-ftp: "npm:^5.0.2" + data-uri-to-buffer: "npm:^6.0.2" + debug: "npm:^4.3.4" + checksum: 10c0/07c87abe1f97a4545fae329a37a45e276ec57e6ad48dad2a97780f87c96b00a82c2043ab49e1a991f99bb5cff8f8ed975e44e4f8b3c9600f35493a97f123499f languageName: node linkType: hard -"git-up@npm:^4.0.0": - version: 4.0.5 - resolution: "git-up@npm:4.0.5" +"git-up@npm:^8.0.0": + version: 8.0.1 + resolution: "git-up@npm:8.0.1" dependencies: - is-ssh: "npm:^1.3.0" - parse-url: "npm:^6.0.0" - checksum: 10c0/8141b99734ed64f21946c3645324ebad010dd83d1e9f8fe1230686604ded8376cda9ae7859500712f576fe281d61edba955f11a8e63ba1e1813208e1fdcf6813 + is-ssh: "npm:^1.4.0" + parse-url: "npm:^9.2.0" + checksum: 10c0/9aa809907ecfc96093d91e2fc68644ace1ac184ed613a67d74f24627172f62f73cc0149037975bd2edf6540676db99632692dc3b18e0a053273e160cf158973f languageName: node linkType: hard -"git-url-parse@npm:11.6.0": - version: 11.6.0 - resolution: "git-url-parse@npm:11.6.0" +"git-url-parse@npm:16.0.0": + version: 16.0.0 + resolution: "git-url-parse@npm:16.0.0" dependencies: - git-up: "npm:^4.0.0" - checksum: 10c0/63786d71b7eb86e21a570ff3f3087c26f0b8e16de024b5dffd03556688ec418943e4a638769925eb7265b21be2aade59c77205fcd026b49aba432a5a2150e497 + git-up: "npm:^8.0.0" + checksum: 10c0/c5466d9addcd2a10292e2c477124dc74087ac9525df3bd5d8951371a2dcf864e52dc62e7f85a39373cf8fc1448675b3ff610ecf9ce080bf1da859249c4d81c1a languageName: node linkType: hard @@ -1262,6 +1764,18 @@ __metadata: languageName: node linkType: hard +"glob@npm:9.3.5": + version: 9.3.5 + resolution: "glob@npm:9.3.5" + dependencies: + fs.realpath: "npm:^1.0.0" + minimatch: "npm:^8.0.2" + minipass: "npm:^4.2.4" + path-scurry: "npm:^1.6.1" + checksum: 10c0/2f6c2b9ee019ee21dc258ae97a88719614591e4c979cb4580b1b9df6f0f778a3cb38b4bdaf18dfa584637ea10f89a3c5f2533a5e449cf8741514ad18b0951f2e + languageName: node + linkType: hard + "glob@npm:^7.0.0": version: 7.2.3 resolution: "glob@npm:7.2.3" @@ -1276,59 +1790,47 @@ __metadata: languageName: node linkType: hard -"global-dirs@npm:^3.0.0": - version: 3.0.0 - resolution: "global-dirs@npm:3.0.0" +"global-directory@npm:^4.0.1": + version: 4.0.1 + resolution: "global-directory@npm:4.0.1" dependencies: - ini: "npm:2.0.0" - checksum: 10c0/2b3c05967873662204dfe7159cfef20019e898b5ebe2ac70fc155e4cbe2207732f4b72d4ea1e72f10e91cee139d237ab4d39f1e282751093e7fe83c53abba46f + ini: "npm:4.1.1" + checksum: 10c0/f9cbeef41db4876f94dd0bac1c1b4282a7de9c16350ecaaf83e7b2dd777b32704cc25beeb1170b5a63c42a2c9abfade74d46357fe0133e933218bc89e613d4b2 languageName: node linkType: hard -"globby@npm:11.0.4": - version: 11.0.4 - resolution: "globby@npm:11.0.4" +"globby@npm:14.0.2": + version: 14.0.2 + resolution: "globby@npm:14.0.2" dependencies: - array-union: "npm:^2.1.0" - dir-glob: "npm:^3.0.1" - fast-glob: "npm:^3.1.1" - ignore: "npm:^5.1.4" - merge2: "npm:^1.3.0" - slash: "npm:^3.0.0" - checksum: 10c0/de5f828c834baf75e3bd3c629bb3a64d1dfa9965831d0b105b728f9184284c6ba2b0d42e24862b411abc18e6e0af12e60880b3a62e096752de3426f2839f9ef7 + "@sindresorhus/merge-streams": "npm:^2.1.0" + fast-glob: "npm:^3.3.2" + ignore: "npm:^5.2.4" + path-type: "npm:^5.0.0" + slash: "npm:^5.1.0" + unicorn-magic: "npm:^0.1.0" + checksum: 10c0/3f771cd683b8794db1e7ebc8b6b888d43496d93a82aad4e9d974620f578581210b6c5a6e75ea29573ed16a1345222fab6e9b877a8d1ed56eeb147e09f69c6f78 languageName: node linkType: hard -"got@npm:9.6.0, got@npm:^9.6.0": - version: 9.6.0 - resolution: "got@npm:9.6.0" - dependencies: - "@sindresorhus/is": "npm:^0.14.0" - "@szmarczak/http-timer": "npm:^1.1.2" - cacheable-request: "npm:^6.0.0" - decompress-response: "npm:^3.3.0" - duplexer3: "npm:^0.1.4" - get-stream: "npm:^4.1.0" - lowercase-keys: "npm:^1.0.1" - mimic-response: "npm:^1.0.1" - p-cancelable: "npm:^1.0.0" - to-readable-stream: "npm:^1.0.0" - url-parse-lax: "npm:^3.0.0" - checksum: 10c0/5cb3111e14b48bf4fb8b414627be481ebfb14151ec867e80a74b6d1472489965b9c4f4ac5cf4f3b1f9b90c60a2ce63584d9072b16efd9a3171553e00afc5abc8 +"gopd@npm:^1.2.0": + version: 1.2.0 + resolution: "gopd@npm:1.2.0" + checksum: 10c0/50fff1e04ba2b7737c097358534eacadad1e68d24cccee3272e04e007bed008e68d2614f3987788428fd192a5ae3889d08fb2331417e4fc4a9ab366b2043cead languageName: node linkType: hard -"graceful-fs@npm:^4.1.2, graceful-fs@npm:^4.1.6, graceful-fs@npm:^4.2.0": +"graceful-fs@npm:4.2.10, graceful-fs@npm:^4.1.6, graceful-fs@npm:^4.2.0": version: 4.2.10 resolution: "graceful-fs@npm:4.2.10" checksum: 10c0/4223a833e38e1d0d2aea630c2433cfb94ddc07dfc11d511dbd6be1d16688c5be848acc31f9a5d0d0ddbfb56d2ee5a6ae0278aceeb0ca6a13f27e06b9956fb952 languageName: node linkType: hard -"has-bigints@npm:^1.0.1, has-bigints@npm:^1.0.2": - version: 1.0.2 - resolution: "has-bigints@npm:1.0.2" - checksum: 10c0/724eb1485bfa3cdff6f18d95130aa190561f00b3fcf9f19dc640baf8176b5917c143b81ec2123f8cddb6c05164a198c94b13e1377c497705ccc8e1a80306e83b +"graceful-fs@npm:^4.2.11": + version: 4.2.11 + resolution: "graceful-fs@npm:4.2.11" + checksum: 10c0/386d011a553e02bc594ac2ca0bd6d9e4c22d7fa8cfbfc448a6d148c59ea881b092db9dbe3547ae4b88e55f1b01f7c4a2ecc53b310c042793e63aa44cf6c257f2 languageName: node linkType: hard @@ -1346,35 +1848,26 @@ __metadata: languageName: node linkType: hard -"has-property-descriptors@npm:^1.0.0": - version: 1.0.0 - resolution: "has-property-descriptors@npm:1.0.0" - dependencies: - get-intrinsic: "npm:^1.1.1" - checksum: 10c0/d4ca882b6960d6257bd28baa3ddfa21f068d260411004a093b30ca357c740e11e985771c85216a6d1eef4161e862657f48c4758ec8ab515223b3895200ad164b - languageName: node - linkType: hard - -"has-symbols@npm:^1.0.1, has-symbols@npm:^1.0.2, has-symbols@npm:^1.0.3": +"has-symbols@npm:^1.0.3": version: 1.0.3 resolution: "has-symbols@npm:1.0.3" checksum: 10c0/e6922b4345a3f37069cdfe8600febbca791c94988c01af3394d86ca3360b4b93928bbf395859158f88099cb10b19d98e3bbab7c9ff2c1bd09cf665ee90afa2c3 languageName: node linkType: hard -"has-tostringtag@npm:^1.0.0": - version: 1.0.0 - resolution: "has-tostringtag@npm:1.0.0" - dependencies: - has-symbols: "npm:^1.0.2" - checksum: 10c0/1cdba76b7d13f65198a92b8ca1560ba40edfa09e85d182bf436d928f3588a9ebd260451d569f0ed1b849c4bf54f49c862aa0d0a77f9552b1855bb6deb526c011 +"has-symbols@npm:^1.1.0": + version: 1.1.0 + resolution: "has-symbols@npm:1.1.0" + checksum: 10c0/dde0a734b17ae51e84b10986e651c664379018d10b91b6b0e9b293eddb32f0f069688c841fb40f19e9611546130153e0a2a48fd7f512891fb000ddfa36f5a20e languageName: node linkType: hard -"has-yarn@npm:^2.1.0": - version: 2.1.0 - resolution: "has-yarn@npm:2.1.0" - checksum: 10c0/b5cab61b4129c2fc0474045b59705371b7f5ddf2aab8ba8725011e52269f017e06f75059a2c8a1d8011e9779c2885ad987263cfc6d1280f611c396b45fd5d74a +"has-tostringtag@npm:^1.0.2": + version: 1.0.2 + resolution: "has-tostringtag@npm:1.0.2" + dependencies: + has-symbols: "npm:^1.0.3" + checksum: 10c0/a8b166462192bafe3d9b6e420a1d581d93dd867adb61be223a17a8d6dad147aa77a8be32c961bb2f27b3ef893cae8d36f564ab651f5e9b7938ae86f74027c48c languageName: node linkType: hard @@ -1387,62 +1880,71 @@ __metadata: languageName: node linkType: hard -"http-cache-semantics@npm:^4.0.0": - version: 4.1.0 - resolution: "http-cache-semantics@npm:4.1.0" - checksum: 10c0/abe115ddd9f24914a49842f2745ecc8380837bbe30b59b154648c76ebc1bd3d5f8bd05c1789aaa2ae6b79624c591d13c8aa79104ff21078e117140a65ac20654 +"hasown@npm:^2.0.2": + version: 2.0.2 + resolution: "hasown@npm:2.0.2" + dependencies: + function-bind: "npm:^1.1.2" + checksum: 10c0/3769d434703b8ac66b209a4cca0737519925bbdb61dd887f93a16372b14694c63ff4e797686d87c90f08168e81082248b9b028bad60d4da9e0d1148766f56eb9 languageName: node linkType: hard -"http-errors@npm:2.0.0": - version: 2.0.0 - resolution: "http-errors@npm:2.0.0" +"htmlparser2@npm:^9.1.0": + version: 9.1.0 + resolution: "htmlparser2@npm:9.1.0" dependencies: - depd: "npm:2.0.0" - inherits: "npm:2.0.4" - setprototypeof: "npm:1.2.0" - statuses: "npm:2.0.1" - toidentifier: "npm:1.0.1" - checksum: 10c0/fc6f2715fe188d091274b5ffc8b3657bd85c63e969daa68ccb77afb05b071a4b62841acb7a21e417b5539014dff2ebf9550f0b14a9ff126f2734a7c1387f8e19 + domelementtype: "npm:^2.3.0" + domhandler: "npm:^5.0.3" + domutils: "npm:^3.1.0" + entities: "npm:^4.5.0" + checksum: 10c0/394f6323efc265bbc791d8c0d96bfe95984e0407565248521ab92e2dc7668e5ceeca7bc6ed18d408b9ee3b25032c5743368a4280d280332d782821d5d467ad8f languageName: node linkType: hard -"http-proxy-agent@npm:^4.0.0, http-proxy-agent@npm:^4.0.1": - version: 4.0.1 - resolution: "http-proxy-agent@npm:4.0.1" +"http-proxy-agent@npm:^7.0.0, http-proxy-agent@npm:^7.0.1": + version: 7.0.2 + resolution: "http-proxy-agent@npm:7.0.2" dependencies: - "@tootallnate/once": "npm:1" - agent-base: "npm:6" - debug: "npm:4" - checksum: 10c0/4fa4774d65b5331814b74ac05cefea56854fc0d5989c80b13432c1b0d42a14c9f4342ca3ad9f0359a52e78da12b1744c9f8a28e50042136ea9171675d972a5fd + agent-base: "npm:^7.1.0" + debug: "npm:^4.3.4" + checksum: 10c0/4207b06a4580fb85dd6dff521f0abf6db517489e70863dca1a0291daa7f2d3d2d6015a57bd702af068ea5cf9f1f6ff72314f5f5b4228d299c0904135d2aef921 languageName: node linkType: hard -"https-proxy-agent@npm:5, https-proxy-agent@npm:^5.0.0": - version: 5.0.1 - resolution: "https-proxy-agent@npm:5.0.1" +"https-proxy-agent@npm:^7.0.6": + version: 7.0.6 + resolution: "https-proxy-agent@npm:7.0.6" dependencies: - agent-base: "npm:6" + agent-base: "npm:^7.1.2" debug: "npm:4" - checksum: 10c0/6dd639f03434003577c62b27cafdb864784ef19b2de430d8ae2a1d45e31c4fd60719e5637b44db1a88a046934307da7089e03d6089ec3ddacc1189d8de8897d1 + checksum: 10c0/f729219bc735edb621fa30e6e84e60ee5d00802b8247aac0d7b79b0bd6d4b3294737a337b93b86a0bd9e68099d031858a39260c976dc14cdbba238ba1f8779ac languageName: node linkType: hard -"human-signals@npm:^1.1.1": - version: 1.1.1 - resolution: "human-signals@npm:1.1.1" - checksum: 10c0/18810ed239a7a5e23fb6c32d0fd4be75d7cd337a07ad59b8dbf0794cb0761e6e628349ee04c409e605fe55344716eab5d0a47a62ba2a2d0d367c89a2b4247b1e +"human-signals@npm:^5.0.0": + version: 5.0.0 + resolution: "human-signals@npm:5.0.0" + checksum: 10c0/5a9359073fe17a8b58e5a085e9a39a950366d9f00217c4ff5878bd312e09d80f460536ea6a3f260b5943a01fe55c158d1cea3fc7bee3d0520aeef04f6d915c82 languageName: node linkType: hard -"human-signals@npm:^2.1.0": - version: 2.1.0 - resolution: "human-signals@npm:2.1.0" - checksum: 10c0/695edb3edfcfe9c8b52a76926cd31b36978782062c0ed9b1192b36bebc75c4c87c82e178dfcb0ed0fc27ca59d434198aac0bd0be18f5781ded775604db22304a +"human-signals@npm:^8.0.0": + version: 8.0.0 + resolution: "human-signals@npm:8.0.0" + checksum: 10c0/e4dac4f7d3eb791ed04129fc6a85bd454a9102d3e3b76c911d0db7057ebd60b2956b435b5b5712aec18960488ede3c21ef7c56e42cdd70760c0d84d3c05cd92e + languageName: node + linkType: hard + +"iconv-lite@npm:0.6.3, iconv-lite@npm:^0.6.3": + version: 0.6.3 + resolution: "iconv-lite@npm:0.6.3" + dependencies: + safer-buffer: "npm:>= 2.1.2 < 3.0.0" + checksum: 10c0/98102bc66b33fcf5ac044099d1257ba0b7ad5e3ccd3221f34dd508ab4070edff183276221684e1e0555b145fce0850c9f7d2b60a9fcac50fbb4ea0d6e845a3b1 languageName: node linkType: hard -"iconv-lite@npm:0.4.24, iconv-lite@npm:^0.4.24": +"iconv-lite@npm:^0.4.24": version: 0.4.24 resolution: "iconv-lite@npm:0.4.24" dependencies: @@ -1458,52 +1960,20 @@ __metadata: languageName: node linkType: hard -"ignore@npm:^5.1.4": - version: 5.2.0 - resolution: "ignore@npm:5.2.0" - checksum: 10c0/7fb7b4c4c52c2555113ff968f8a83b8ac21b076282bfcb3f468c3fb429be69bd56222306c31de95dd452c647fc6ae24339b8047ebe3ef34c02591abfec58da01 - languageName: node - linkType: hard - -"import-cwd@npm:3.0.0": - version: 3.0.0 - resolution: "import-cwd@npm:3.0.0" - dependencies: - import-from: "npm:^3.0.0" - checksum: 10c0/398eff50e400b0db4ccabf7626391ac3aa959d9f95e659cd26d217f9d33b41f3aa02b7056ac4c3a2bf1d12b359b4761756d784f470c223297774480f6546857d +"ignore@npm:^5.2.4": + version: 5.3.2 + resolution: "ignore@npm:5.3.2" + checksum: 10c0/f9f652c957983634ded1e7f02da3b559a0d4cc210fca3792cb67f1b153623c9c42efdc1c4121af171e295444459fc4a9201101fb041b1104a3c000bccb188337 languageName: node linkType: hard -"import-fresh@npm:^3.2.1": - version: 3.3.0 - resolution: "import-fresh@npm:3.3.0" +"import-fresh@npm:^3.3.0": + version: 3.3.1 + resolution: "import-fresh@npm:3.3.1" dependencies: parent-module: "npm:^1.0.0" - resolve-from: "npm:^4.0.0" - checksum: 10c0/7f882953aa6b740d1f0e384d0547158bc86efbf2eea0f1483b8900a6f65c5a5123c2cf09b0d542cc419d0b98a759ecaeb394237e97ea427f2da221dc3cd80cc3 - languageName: node - linkType: hard - -"import-from@npm:^3.0.0": - version: 3.0.0 - resolution: "import-from@npm:3.0.0" - dependencies: - resolve-from: "npm:^5.0.0" - checksum: 10c0/83a40470190f2d9c6ca6a0a2d2de40e9d0b38eedeb2409320a44eaeed48751678e206c9ac7fefef18be19c95ad1cc0e98c844fdf631ab3d9a5597c3476e7525f - languageName: node - linkType: hard - -"import-lazy@npm:^2.1.0": - version: 2.1.0 - resolution: "import-lazy@npm:2.1.0" - checksum: 10c0/c5e5f507d26ee23c5b2ed64577155810361ac37863b322cae0c17f16b6a8cdd15adf370288384ddd95ef9de05602fb8d87bf76ff835190eb037333c84db8062c - languageName: node - linkType: hard - -"imurmurhash@npm:^0.1.4": - version: 0.1.4 - resolution: "imurmurhash@npm:0.1.4" - checksum: 10c0/8b51313850dd33605c6c9d3fd9638b714f4c4c40250cff658209f30d40da60f78992fb2df5dabee4acf589a6a82bbc79ad5486550754bd9ec4e3fc0d4a57d6a6 + resolve-from: "npm:^4.0.0" + checksum: 10c0/bf8cc494872fef783249709385ae883b447e3eb09db0ebd15dcead7d9afe7224dad7bd7591c6b73b0b19b3c0f9640eb8ee884f01cfaf2887ab995b0b36a0cbec languageName: node linkType: hard @@ -1517,30 +1987,54 @@ __metadata: languageName: node linkType: hard -"inherits@npm:2, inherits@npm:2.0.4, inherits@npm:^2.0.3, inherits@npm:^2.0.4, inherits@npm:~2.0.1": +"inherits@npm:2, inherits@npm:^2.0.3, inherits@npm:^2.0.4": version: 2.0.4 resolution: "inherits@npm:2.0.4" checksum: 10c0/4e531f648b29039fb7426fb94075e6545faa1eb9fe83c29f0b6d9e7263aceb4289d2d4557db0d428188eeb449cc7c5e77b0a0b2c4e248ff2a65933a0dee49ef2 languageName: node linkType: hard -"ini@npm:2.0.0": - version: 2.0.0 - resolution: "ini@npm:2.0.0" - checksum: 10c0/2e0c8f386369139029da87819438b20a1ff3fe58372d93fb1a86e9d9344125ace3a806b8ec4eb160a46e64cbc422fe68251869441676af49b7fc441af2389c25 +"ini@npm:4.1.1": + version: 4.1.1 + resolution: "ini@npm:4.1.1" + checksum: 10c0/7fddc8dfd3e63567d4fdd5d999d1bf8a8487f1479d0b34a1d01f28d391a9228d261e19abc38e1a6a1ceb3400c727204fce05725d5eb598dfcf2077a1e3afe211 languageName: node linkType: hard -"ini@npm:^1.3.5, ini@npm:~1.3.0": +"ini@npm:^1.3.4, ini@npm:~1.3.0": version: 1.3.8 resolution: "ini@npm:1.3.8" checksum: 10c0/ec93838d2328b619532e4f1ff05df7909760b6f66d9c9e2ded11e5c1897d6f2f9980c54dd638f88654b00919ce31e827040631eab0a3969e4d1abefa0719516a languageName: node linkType: hard -"inquirer@npm:8.2.0": - version: 8.2.0 - resolution: "inquirer@npm:8.2.0" +"ini@npm:^5.0.0": + version: 5.0.0 + resolution: "ini@npm:5.0.0" + checksum: 10c0/657491ce766cbb4b335ab221ee8f72b9654d9f0e35c32fe5ff2eb7ab8c5ce72237ff6456555b50cde88e6507a719a70e28e327b450782b4fc20c90326ec8c1a8 + languageName: node + linkType: hard + +"inquirer@npm:12.3.0": + version: 12.3.0 + resolution: "inquirer@npm:12.3.0" + dependencies: + "@inquirer/core": "npm:^10.1.2" + "@inquirer/prompts": "npm:^7.2.1" + "@inquirer/type": "npm:^3.0.2" + ansi-escapes: "npm:^4.3.2" + mute-stream: "npm:^2.0.0" + run-async: "npm:^3.0.0" + rxjs: "npm:^7.8.1" + peerDependencies: + "@types/node": ">=18" + checksum: 10c0/37d7e8a527ca1205a8ba62ceab27f8018545eb1d160b55d498b1997b3c94d88c8889d512e8855f3255b8c6444a8d23750e310e2e9752d69adc92dea8c8fc06c5 + languageName: node + linkType: hard + +"inquirer@npm:8.2.6": + version: 8.2.6 + resolution: "inquirer@npm:8.2.6" dependencies: ansi-escapes: "npm:^4.2.1" chalk: "npm:^4.1.1" @@ -1552,22 +2046,12 @@ __metadata: mute-stream: "npm:0.0.8" ora: "npm:^5.4.1" run-async: "npm:^2.4.0" - rxjs: "npm:^7.2.0" + rxjs: "npm:^7.5.5" string-width: "npm:^4.1.0" strip-ansi: "npm:^6.0.0" through: "npm:^2.3.6" - checksum: 10c0/efdd5e40c70fb66a8f87b39d75130cd4d1f8097338c73720eb254e3b66a36a17e136fdad6830aec22a2fdaaf426f0068cb31093ee8b8b60154177babd6c6ea2f - languageName: node - linkType: hard - -"internal-slot@npm:^1.0.3": - version: 1.0.3 - resolution: "internal-slot@npm:1.0.3" - dependencies: - get-intrinsic: "npm:^1.1.0" - has: "npm:^1.0.3" - side-channel: "npm:^1.0.4" - checksum: 10c0/bb41342a474c1b607458b0c716c742d779a6ed9dfaf7986e5d20d1e7f55b7f3676e4d9f416bc253af4fd78d367e1f83e586f74840302bcf2e60c424f9284dde5 + wrap-ansi: "npm:^6.0.1" + checksum: 10c0/eb5724de1778265323f3a68c80acfa899378cb43c24cdcb58661386500e5696b6b0b6c700e046b7aa767fe7b4823c6f04e6ddc268173e3f84116112529016296 languageName: node linkType: hard @@ -1578,27 +2062,13 @@ __metadata: languageName: node linkType: hard -"ip@npm:^1.1.5": - version: 1.1.8 - resolution: "ip@npm:1.1.8" - checksum: 10c0/ab32a5ecfa678d4c158c1381c4c6744fce89a1d793e1b6635ba79d0753c069030b672d765887b6fff55670c711dfa47475895e5d6013efbbcf04687c51cb8db9 - languageName: node - linkType: hard - -"ip@npm:^2.0.0": - version: 2.0.0 - resolution: "ip@npm:2.0.0" - checksum: 10c0/8d186cc5585f57372847ae29b6eba258c68862055e18a75cc4933327232cb5c107f89800ce29715d542eef2c254fbb68b382e780a7414f9ee7caf60b7a473958 - languageName: node - linkType: hard - -"is-arguments@npm:^1.1.0": - version: 1.1.1 - resolution: "is-arguments@npm:1.1.1" +"ip-address@npm:^9.0.5": + version: 9.0.5 + resolution: "ip-address@npm:9.0.5" dependencies: - call-bind: "npm:^1.0.2" - has-tostringtag: "npm:^1.0.0" - checksum: 10c0/5ff1f341ee4475350adfc14b2328b38962564b7c2076be2f5bac7bd9b61779efba99b9f844a7b82ba7654adccf8e8eb19d1bb0cc6d1c1a085e498f6793d4328f + jsbn: "npm:1.1.0" + sprintf-js: "npm:^1.1.3" + checksum: 10c0/331cd07fafcb3b24100613e4b53e1a2b4feab11e671e655d46dc09ee233da5011284d09ca40c4ecbdfe1d0004f462958675c224a804259f2f78d2465a87824bc languageName: node linkType: hard @@ -1609,54 +2079,6 @@ __metadata: languageName: node linkType: hard -"is-bigint@npm:^1.0.1": - version: 1.0.4 - resolution: "is-bigint@npm:1.0.4" - dependencies: - has-bigints: "npm:^1.0.1" - checksum: 10c0/eb9c88e418a0d195ca545aff2b715c9903d9b0a5033bc5922fec600eb0c3d7b1ee7f882dbf2e0d5a6e694e42391be3683e4368737bd3c4a77f8ac293e7773696 - languageName: node - linkType: hard - -"is-boolean-object@npm:^1.1.0": - version: 1.1.2 - resolution: "is-boolean-object@npm:1.1.2" - dependencies: - call-bind: "npm:^1.0.2" - has-tostringtag: "npm:^1.0.0" - checksum: 10c0/6090587f8a8a8534c0f816da868bc94f32810f08807aa72fa7e79f7e11c466d281486ffe7a788178809c2aa71fe3e700b167fe80dd96dad68026bfff8ebf39f7 - languageName: node - linkType: hard - -"is-callable@npm:^1.1.4, is-callable@npm:^1.2.6": - version: 1.2.7 - resolution: "is-callable@npm:1.2.7" - checksum: 10c0/ceebaeb9d92e8adee604076971dd6000d38d6afc40bb843ea8e45c5579b57671c3f3b50d7f04869618242c6cee08d1b67806a8cb8edaaaf7c0748b3720d6066f - languageName: node - linkType: hard - -"is-ci@npm:3.0.1": - version: 3.0.1 - resolution: "is-ci@npm:3.0.1" - dependencies: - ci-info: "npm:^3.2.0" - bin: - is-ci: bin.js - checksum: 10c0/0e81caa62f4520d4088a5bef6d6337d773828a88610346c4b1119fb50c842587ed8bef1e5d9a656835a599e7209405b5761ddf2339668f2d0f4e889a92fe6051 - languageName: node - linkType: hard - -"is-ci@npm:^2.0.0": - version: 2.0.0 - resolution: "is-ci@npm:2.0.0" - dependencies: - ci-info: "npm:^2.0.0" - bin: - is-ci: bin.js - checksum: 10c0/17de4e2cd8f993c56c86472dd53dd9e2c7f126d0ee55afe610557046cdd64de0e8feadbad476edc9eeff63b060523b8673d9094ed2ab294b59efb5a66dd05a9a - languageName: node - linkType: hard - "is-core-module@npm:^2.9.0": version: 2.10.0 resolution: "is-core-module@npm:2.10.0" @@ -1666,21 +2088,12 @@ __metadata: languageName: node linkType: hard -"is-date-object@npm:^1.0.1": - version: 1.0.5 - resolution: "is-date-object@npm:1.0.5" - dependencies: - has-tostringtag: "npm:^1.0.0" - checksum: 10c0/eed21e5dcc619c48ccef804dfc83a739dbb2abee6ca202838ee1bd5f760fe8d8a93444f0d49012ad19bb7c006186e2884a1b92f6e1c056da7fd23d0a9ad5992e - languageName: node - linkType: hard - -"is-docker@npm:^2.0.0": - version: 2.2.1 - resolution: "is-docker@npm:2.2.1" +"is-docker@npm:^3.0.0": + version: 3.0.0 + resolution: "is-docker@npm:3.0.0" bin: is-docker: cli.js - checksum: 10c0/e828365958d155f90c409cdbe958f64051d99e8aedc2c8c4cd7c89dcf35329daed42f7b99346f7828df013e27deb8f721cf9408ba878c76eb9e8290235fbcdcc + checksum: 10c0/d2c4f8e6d3e34df75a5defd44991b6068afad4835bb783b902fa12d13ebdb8f41b2a199dcb0b5ed2cb78bfee9e4c0bbdb69c2d9646f4106464674d3e697a5856 languageName: node linkType: hard @@ -1707,50 +2120,54 @@ __metadata: languageName: node linkType: hard -"is-installed-globally@npm:^0.4.0": - version: 0.4.0 - resolution: "is-installed-globally@npm:0.4.0" - dependencies: - global-dirs: "npm:^3.0.0" - is-path-inside: "npm:^3.0.2" - checksum: 10c0/f3e6220ee5824b845c9ed0d4b42c24272701f1f9926936e30c0e676254ca5b34d1b92c6205cae11b283776f9529212c0cdabb20ec280a6451677d6493ca9c22d +"is-in-ci@npm:^1.0.0": + version: 1.0.0 + resolution: "is-in-ci@npm:1.0.0" + bin: + is-in-ci: cli.js + checksum: 10c0/98f9cec4c35aece4cf731abf35ebf28359a9b0324fac810da05b842515d9ccb33b8999c1d9a679f0362e1a4df3292065c38d7f86327b1387fa667bc0150f4898 languageName: node linkType: hard -"is-interactive@npm:^1.0.0": +"is-inside-container@npm:^1.0.0": version: 1.0.0 - resolution: "is-interactive@npm:1.0.0" - checksum: 10c0/dd47904dbf286cd20aa58c5192161be1a67138485b9836d5a70433b21a45442e9611b8498b8ab1f839fc962c7620667a50535fdfb4a6bc7989b8858645c06b4d + resolution: "is-inside-container@npm:1.0.0" + dependencies: + is-docker: "npm:^3.0.0" + bin: + is-inside-container: cli.js + checksum: 10c0/a8efb0e84f6197e6ff5c64c52890fa9acb49b7b74fed4da7c95383965da6f0fa592b4dbd5e38a79f87fc108196937acdbcd758fcefc9b140e479b39ce1fcd1cd languageName: node linkType: hard -"is-map@npm:^2.0.2": - version: 2.0.2 - resolution: "is-map@npm:2.0.2" - checksum: 10c0/119ff9137a37fd131a72fab3f4ab8c9d6a24b0a1ee26b4eff14dc625900d8675a97785eea5f4174265e2006ed076cc24e89f6e57ebd080a48338d914ec9168a5 +"is-installed-globally@npm:^1.0.0": + version: 1.0.0 + resolution: "is-installed-globally@npm:1.0.0" + dependencies: + global-directory: "npm:^4.0.1" + is-path-inside: "npm:^4.0.0" + checksum: 10c0/5f57745b6e75b2e9e707a26470d0cb74291d9be33c0fe0dc06c6955fe086bc2ca0a8960631b1ecb9677100eac90af33e911aec7a2c0b88097d702bfa3b76486d languageName: node linkType: hard -"is-negative-zero@npm:^2.0.2": - version: 2.0.2 - resolution: "is-negative-zero@npm:2.0.2" - checksum: 10c0/eda024c158f70f2017f3415e471b818d314da5ef5be68f801b16314d4a4b6304a74cbed778acf9e2f955bb9c1c5f2935c1be0c7c99e1ad12286f45366217b6a3 +"is-interactive@npm:^1.0.0": + version: 1.0.0 + resolution: "is-interactive@npm:1.0.0" + checksum: 10c0/dd47904dbf286cd20aa58c5192161be1a67138485b9836d5a70433b21a45442e9611b8498b8ab1f839fc962c7620667a50535fdfb4a6bc7989b8858645c06b4d languageName: node linkType: hard -"is-npm@npm:^5.0.0": - version: 5.0.0 - resolution: "is-npm@npm:5.0.0" - checksum: 10c0/8ded3ae1119bbbda22395fe1c64d2d79d3b3baeb2635c90f9a9dca4b8ce19a67b55fda178269b63421b257b361892fd545807fb5ac212f06776f544d9fcc3ab0 +"is-interactive@npm:^2.0.0": + version: 2.0.0 + resolution: "is-interactive@npm:2.0.0" + checksum: 10c0/801c8f6064f85199dc6bf99b5dd98db3282e930c3bc197b32f2c5b89313bb578a07d1b8a01365c4348c2927229234f3681eb861b9c2c92bee72ff397390fa600 languageName: node linkType: hard -"is-number-object@npm:^1.0.4": - version: 1.0.7 - resolution: "is-number-object@npm:1.0.7" - dependencies: - has-tostringtag: "npm:^1.0.0" - checksum: 10c0/aad266da1e530f1804a2b7bd2e874b4869f71c98590b3964f9d06cc9869b18f8d1f4778f838ecd2a11011bce20aeecb53cb269ba916209b79c24580416b74b1b +"is-npm@npm:^6.0.0": + version: 6.0.0 + resolution: "is-npm@npm:6.0.0" + checksum: 10c0/1f064c66325cba6e494783bee4e635caa2655aad7f853a0e045d086e0bb7d83d2d6cdf1745dc9a7c7c93dacbf816fbee1f8d9179b02d5d01674d4f92541dc0d9 languageName: node linkType: hard @@ -1761,91 +2178,40 @@ __metadata: languageName: node linkType: hard -"is-obj@npm:^2.0.0": - version: 2.0.0 - resolution: "is-obj@npm:2.0.0" - checksum: 10c0/85044ed7ba8bd169e2c2af3a178cacb92a97aa75de9569d02efef7f443a824b5e153eba72b9ae3aca6f8ce81955271aa2dc7da67a8b720575d3e38104208cb4e - languageName: node - linkType: hard - -"is-path-inside@npm:^3.0.2": - version: 3.0.3 - resolution: "is-path-inside@npm:3.0.3" - checksum: 10c0/cf7d4ac35fb96bab6a1d2c3598fe5ebb29aafb52c0aaa482b5a3ed9d8ba3edc11631e3ec2637660c44b3ce0e61a08d54946e8af30dec0b60a7c27296c68ffd05 - languageName: node - linkType: hard - -"is-plain-object@npm:^5.0.0": - version: 5.0.0 - resolution: "is-plain-object@npm:5.0.0" - checksum: 10c0/893e42bad832aae3511c71fd61c0bf61aa3a6d853061c62a307261842727d0d25f761ce9379f7ba7226d6179db2a3157efa918e7fe26360f3bf0842d9f28942c - languageName: node - linkType: hard - -"is-regex@npm:^1.1.4": - version: 1.1.4 - resolution: "is-regex@npm:1.1.4" - dependencies: - call-bind: "npm:^1.0.2" - has-tostringtag: "npm:^1.0.0" - checksum: 10c0/bb72aae604a69eafd4a82a93002058c416ace8cde95873589a97fc5dac96a6c6c78a9977d487b7b95426a8f5073969124dd228f043f9f604f041f32fcc465fc1 - languageName: node - linkType: hard - -"is-set@npm:^2.0.2": - version: 2.0.2 - resolution: "is-set@npm:2.0.2" - checksum: 10c0/5f8bd1880df8c0004ce694e315e6e1e47a3452014be792880bb274a3b2cdb952fdb60789636ca6e084c7947ca8b7ae03ccaf54c93a7fcfed228af810559e5432 +"is-path-inside@npm:^4.0.0": + version: 4.0.0 + resolution: "is-path-inside@npm:4.0.0" + checksum: 10c0/51188d7e2b1d907a9a5f7c18d99a90b60870b951ed87cf97595d9aaa429d4c010652c3350bcbf31182e7f4b0eab9a1860b43e16729b13cb1a44baaa6cdb64c46 languageName: node linkType: hard -"is-shared-array-buffer@npm:^1.0.2": - version: 1.0.2 - resolution: "is-shared-array-buffer@npm:1.0.2" - dependencies: - call-bind: "npm:^1.0.2" - checksum: 10c0/cfeee6f171f1b13e6cbc6f3b6cc44e192b93df39f3fcb31aa66ffb1d2df3b91e05664311659f9701baba62f5e98c83b0673c628e7adc30f55071c4874fcdccec +"is-plain-obj@npm:^4.1.0": + version: 4.1.0 + resolution: "is-plain-obj@npm:4.1.0" + checksum: 10c0/32130d651d71d9564dc88ba7e6fda0e91a1010a3694648e9f4f47bb6080438140696d3e3e15c741411d712e47ac9edc1a8a9de1fe76f3487b0d90be06ac9975e languageName: node linkType: hard -"is-ssh@npm:^1.3.0": - version: 1.4.0 - resolution: "is-ssh@npm:1.4.0" +"is-ssh@npm:^1.4.0": + version: 1.4.1 + resolution: "is-ssh@npm:1.4.1" dependencies: protocols: "npm:^2.0.1" - checksum: 10c0/3eb30d1bcb4507cd25562e7ac61a1c0aa31772134c67cec9c3afe6f4d57ec17e8c2892600a608e8e583f32f53f36465b8968c0305f2855cfbff95acfd049e113 - languageName: node - linkType: hard - -"is-stream@npm:^2.0.0": - version: 2.0.1 - resolution: "is-stream@npm:2.0.1" - checksum: 10c0/7c284241313fc6efc329b8d7f08e16c0efeb6baab1b4cd0ba579eb78e5af1aa5da11e68559896a2067cd6c526bd29241dda4eb1225e627d5aa1a89a76d4635a5 - languageName: node - linkType: hard - -"is-string@npm:^1.0.5, is-string@npm:^1.0.7": - version: 1.0.7 - resolution: "is-string@npm:1.0.7" - dependencies: - has-tostringtag: "npm:^1.0.0" - checksum: 10c0/905f805cbc6eedfa678aaa103ab7f626aac9ebbdc8737abb5243acaa61d9820f8edc5819106b8fcd1839e33db21de9f0116ae20de380c8382d16dc2a601921f6 + checksum: 10c0/021a7355cb032625d58db3cc8266ad9aa698cbabf460b71376a0307405577fd7d3aa0826c0bf1951d7809f134c0ee80403306f6d7633db94a5a3600a0106b398 languageName: node linkType: hard -"is-symbol@npm:^1.0.2, is-symbol@npm:^1.0.3": - version: 1.0.4 - resolution: "is-symbol@npm:1.0.4" - dependencies: - has-symbols: "npm:^1.0.2" - checksum: 10c0/9381dd015f7c8906154dbcbf93fad769de16b4b961edc94f88d26eb8c555935caa23af88bda0c93a18e65560f6d7cca0fd5a3f8a8e1df6f1abbb9bead4502ef7 +"is-stream@npm:^3.0.0": + version: 3.0.0 + resolution: "is-stream@npm:3.0.0" + checksum: 10c0/eb2f7127af02ee9aa2a0237b730e47ac2de0d4e76a4a905a50a11557f2339df5765eaea4ceb8029f1efa978586abe776908720bfcb1900c20c6ec5145f6f29d8 languageName: node linkType: hard -"is-typedarray@npm:^1.0.0": - version: 1.0.0 - resolution: "is-typedarray@npm:1.0.0" - checksum: 10c0/4c096275ba041a17a13cca33ac21c16bc4fd2d7d7eb94525e7cd2c2f2c1a3ab956e37622290642501ff4310601e413b675cf399ad6db49855527d2163b3eeeec +"is-stream@npm:^4.0.1": + version: 4.0.1 + resolution: "is-stream@npm:4.0.1" + checksum: 10c0/2706c7f19b851327ba374687bc4a3940805e14ca496dc672b9629e744d143b1ad9c6f1b162dece81c7bfbc0f83b32b61ccc19ad2e05aad2dd7af347408f60c7f languageName: node linkType: hard @@ -1856,42 +2222,26 @@ __metadata: languageName: node linkType: hard -"is-weakref@npm:^1.0.2": - version: 1.0.2 - resolution: "is-weakref@npm:1.0.2" - dependencies: - call-bind: "npm:^1.0.2" - checksum: 10c0/1545c5d172cb690c392f2136c23eec07d8d78a7f57d0e41f10078aa4f5daf5d7f57b6513a67514ab4f073275ad00c9822fc8935e00229d0a2089e1c02685d4b1 - languageName: node - linkType: hard - -"is-wsl@npm:^2.1.1": - version: 2.2.0 - resolution: "is-wsl@npm:2.2.0" - dependencies: - is-docker: "npm:^2.0.0" - checksum: 10c0/a6fa2d370d21be487c0165c7a440d567274fbba1a817f2f0bfa41cc5e3af25041d84267baa22df66696956038a43973e72fca117918c91431920bdef490fa25e - languageName: node - linkType: hard - -"is-yarn-global@npm:^0.3.0": - version: 0.3.0 - resolution: "is-yarn-global@npm:0.3.0" - checksum: 10c0/9f1ab6f28e6e7961c4b97e564791d1decf2886a0dbe9b92b2176d76156adbb42b4c06c0f33d7107b270c207cbcfe0b2293b7cc4a0ec6774ac6d37af9503d51e1 +"is-unicode-supported@npm:^1.3.0": + version: 1.3.0 + resolution: "is-unicode-supported@npm:1.3.0" + checksum: 10c0/b8674ea95d869f6faabddc6a484767207058b91aea0250803cbf1221345cb0c56f466d4ecea375dc77f6633d248d33c47bd296fb8f4cdba0b4edba8917e83d8a languageName: node linkType: hard -"isarray@npm:0.0.1": - version: 0.0.1 - resolution: "isarray@npm:0.0.1" - checksum: 10c0/ed1e62da617f71fe348907c71743b5ed550448b455f8d269f89a7c7ddb8ae6e962de3dab6a74a237b06f5eb7f6ece7a45ada8ce96d87fe972926530f91ae3311 +"is-unicode-supported@npm:^2.0.0": + version: 2.1.0 + resolution: "is-unicode-supported@npm:2.1.0" + checksum: 10c0/a0f53e9a7c1fdbcf2d2ef6e40d4736fdffff1c9f8944c75e15425118ff3610172c87bf7bc6c34d3903b04be59790bb2212ddbe21ee65b5a97030fc50370545a5 languageName: node linkType: hard -"isarray@npm:^2.0.5": - version: 2.0.5 - resolution: "isarray@npm:2.0.5" - checksum: 10c0/4199f14a7a13da2177c66c31080008b7124331956f47bca57dd0b6ea9f11687aa25e565a2c7a2b519bc86988d10398e3049a1f5df13c9f6b7664154690ae79fd +"is-wsl@npm:^3.1.0": + version: 3.1.0 + resolution: "is-wsl@npm:3.1.0" + dependencies: + is-inside-container: "npm:^1.0.0" + checksum: 10c0/d3317c11995690a32c362100225e22ba793678fe8732660c6de511ae71a0ff05b06980cf21f98a6bf40d7be0e9e9506f859abe00a1118287d63e53d0a3d06947 languageName: node linkType: hard @@ -1902,20 +2252,23 @@ __metadata: languageName: node linkType: hard -"iterate-iterator@npm:^1.0.1": - version: 1.0.2 - resolution: "iterate-iterator@npm:1.0.2" - checksum: 10c0/74609b01a3ebc025601aa68ef40731b05d5e45c9fd4ecf233a14a34f2b3481e6974e1dcff390e87155a0648f056c186336bb4c70df2fdefeab08a9878b2eb1c2 +"issue-parser@npm:7.0.1": + version: 7.0.1 + resolution: "issue-parser@npm:7.0.1" + dependencies: + lodash.capitalize: "npm:^4.2.1" + lodash.escaperegexp: "npm:^4.1.2" + lodash.isplainobject: "npm:^4.0.6" + lodash.isstring: "npm:^4.0.1" + lodash.uniqby: "npm:^4.7.0" + checksum: 10c0/1b2dad16081ae423bb96143132701e89aa8f6345ab0a10f692594ddf5699b514adccaaaf24d7c59afc977c447895bdee15fff2dfc9d6015e177f6966b06f5dcb languageName: node linkType: hard -"iterate-value@npm:^1.0.2": - version: 1.0.2 - resolution: "iterate-value@npm:1.0.2" - dependencies: - es-get-iterator: "npm:^1.0.2" - iterate-iterator: "npm:^1.0.1" - checksum: 10c0/77d32a5ac84877da2133689ff5e3983aa8214bace7faee3c746bf79d4524cc3fb8c0344a20d3699be20a15f0959ecd582d53a05b97f5d04c306bcd426800a650 +"iterare@npm:1.2.1": + version: 1.2.1 + resolution: "iterare@npm:1.2.1" + checksum: 10c0/02667d486e3e83ead028ba8484d927498c2ceab7e8c6a69dd881fd02abc4114f00b13abb36b592252fbb578b6e6f99ca1dfc2835408b9158c9a112a9964f453f languageName: node linkType: hard @@ -1926,22 +2279,21 @@ __metadata: languageName: node linkType: hard -"js-yaml@npm:^3.14.0": - version: 3.14.1 - resolution: "js-yaml@npm:3.14.1" +"js-yaml@npm:^4.1.0": + version: 4.1.0 + resolution: "js-yaml@npm:4.1.0" dependencies: - argparse: "npm:^1.0.7" - esprima: "npm:^4.0.0" + argparse: "npm:^2.0.1" bin: js-yaml: bin/js-yaml.js - checksum: 10c0/6746baaaeac312c4db8e75fa22331d9a04cccb7792d126ed8ce6a0bbcfef0cedaddd0c5098fade53db067c09fe00aa1c957674b4765610a8b06a5a189e46433b + checksum: 10c0/184a24b4eaacfce40ad9074c64fd42ac83cf74d8c8cd137718d456ced75051229e5061b8633c3366b8aada17945a7a356b337828c19da92b51ae62126575018f languageName: node linkType: hard -"json-buffer@npm:3.0.0": - version: 3.0.0 - resolution: "json-buffer@npm:3.0.0" - checksum: 10c0/118c060d84430a8ad8376d0c60250830f350a6381bd56541a1ef257ce7ba82d109d1f71a4c4e92e0be0e7ab7da568fad8f7bf02905910a76e8e0aa338621b944 +"jsbn@npm:1.1.0": + version: 1.1.0 + resolution: "jsbn@npm:1.1.0" + checksum: 10c0/4f907fb78d7b712e11dea8c165fe0921f81a657d3443dde75359ed52eb2b5d33ce6773d97985a089f09a65edd80b11cb75c767b57ba47391fee4c969f7215c96 languageName: node linkType: hard @@ -1952,43 +2304,32 @@ __metadata: languageName: node linkType: hard -"jsonfile@npm:^4.0.0": - version: 4.0.0 - resolution: "jsonfile@npm:4.0.0" +"jsonfile@npm:^6.0.1": + version: 6.1.0 + resolution: "jsonfile@npm:6.1.0" dependencies: graceful-fs: "npm:^4.1.6" + universalify: "npm:^2.0.0" dependenciesMeta: graceful-fs: optional: true - checksum: 10c0/7dc94b628d57a66b71fb1b79510d460d662eb975b5f876d723f81549c2e9cd316d58a2ddf742b2b93a4fa6b17b2accaf1a738a0e2ea114bdfb13a32e5377e480 + checksum: 10c0/4f95b5e8a5622b1e9e8f33c96b7ef3158122f595998114d1e7f03985649ea99cb3cd99ce1ed1831ae94c8c8543ab45ebd044207612f31a56fd08462140e46865 languageName: node linkType: hard -"keyv@npm:^3.0.0": - version: 3.1.0 - resolution: "keyv@npm:3.1.0" - dependencies: - json-buffer: "npm:3.0.0" - checksum: 10c0/6ad784361b4c0213333a8c5bc0bcc59cf46cb7cbbe21fb2f1539ffcc8fe18b8f1562ff913b40552278fdea5f152a15996dfa61ce24ce1a22222560c650be4a1b - languageName: node - linkType: hard - -"latest-version@npm:^5.1.0": - version: 5.1.0 - resolution: "latest-version@npm:5.1.0" - dependencies: - package-json: "npm:^6.3.0" - checksum: 10c0/6219631d8651467c54c58ef1b5d5c5c53e146f5ae2b0ecbb78b202da3eaad55b05b043db2d2d6f1d4230ee071b2ae8c2f85089e01377e4338bad97fa76a963b7 +"ky@npm:^1.2.0": + version: 1.7.5 + resolution: "ky@npm:1.7.5" + checksum: 10c0/9f9c70a4916592f728c90e38ecbe2ed468eb7161b7525a4561a861e457edd5cb706751e2aba615d350380231d021f535147f9ed3ca07271af836465ecc725761 languageName: node linkType: hard -"levn@npm:~0.3.0": - version: 0.3.0 - resolution: "levn@npm:0.3.0" +"latest-version@npm:^9.0.0": + version: 9.0.0 + resolution: "latest-version@npm:9.0.0" dependencies: - prelude-ls: "npm:~1.1.2" - type-check: "npm:~0.3.2" - checksum: 10c0/e440df9de4233da0b389cd55bd61f0f6aaff766400bebbccd1231b81801f6dbc1d816c676ebe8d70566394b749fa624b1ed1c68070e9c94999f0bdecc64cb676 + package-json: "npm:^10.0.0" + checksum: 10c0/643cfda3a58dfb3af221a2950e433393d28a5adbe225d1cbbb358dbcbb04e9f8dce15b892f8ae3e3156f50693428dbd7ca13a69edfbdfcd94e62519480d7041e languageName: node linkType: hard @@ -1999,24 +2340,45 @@ __metadata: languageName: node linkType: hard -"lodash.castarray@npm:^4.4.0": - version: 4.4.0 - resolution: "lodash.castarray@npm:4.4.0" - checksum: 10c0/0bf523ad1596a5bf17869ba047235b4453eee927005013ae152345e2b291b81a02e7f2b7c38f876a1d16f73c34aa3c3241e965193e5b31595035bc8f330c4358 +"lodash-es@npm:^4.17.21": + version: 4.17.21 + resolution: "lodash-es@npm:4.17.21" + checksum: 10c0/fb407355f7e6cd523a9383e76e6b455321f0f153a6c9625e21a8827d10c54c2a2341bd2ae8d034358b60e07325e1330c14c224ff582d04612a46a4f0479ff2f2 languageName: node linkType: hard -"lodash.get@npm:^4.4.2": - version: 4.4.2 - resolution: "lodash.get@npm:4.4.2" - checksum: 10c0/48f40d471a1654397ed41685495acb31498d5ed696185ac8973daef424a749ca0c7871bf7b665d5c14f5cc479394479e0307e781f61d5573831769593411be6e +"lodash.capitalize@npm:^4.2.1": + version: 4.2.1 + resolution: "lodash.capitalize@npm:4.2.1" + checksum: 10c0/b289326497c2e24d6b8afa2af2ca4e068ef6ef007ade36bfb6f70af77ce10ea3f090eeee947d5fdcf2db4bcfa4703c8c10a5857a2b39e308bddfd1d11ad35970 languageName: node linkType: hard -"lodash.set@npm:^4.3.2": - version: 4.3.2 - resolution: "lodash.set@npm:4.3.2" - checksum: 10c0/c641d31905e51df43170dce8a1d11a1cff11356e2e2e75fe2615995408e9687d58c3e1d64c3c284c2df2bc519f79a98af737d2944d382ff82ffd244ff6075c29 +"lodash.escaperegexp@npm:^4.1.2": + version: 4.1.2 + resolution: "lodash.escaperegexp@npm:4.1.2" + checksum: 10c0/484ad4067fa9119bb0f7c19a36ab143d0173a081314993fe977bd00cf2a3c6a487ce417a10f6bac598d968364f992153315f0dbe25c9e38e3eb7581dd333e087 + languageName: node + linkType: hard + +"lodash.isplainobject@npm:^4.0.6": + version: 4.0.6 + resolution: "lodash.isplainobject@npm:4.0.6" + checksum: 10c0/afd70b5c450d1e09f32a737bed06ff85b873ecd3d3d3400458725283e3f2e0bb6bf48e67dbe7a309eb371a822b16a26cca4a63c8c52db3fc7dc9d5f9dd324cbb + languageName: node + linkType: hard + +"lodash.isstring@npm:^4.0.1": + version: 4.0.1 + resolution: "lodash.isstring@npm:4.0.1" + checksum: 10c0/09eaf980a283f9eef58ef95b30ec7fee61df4d6bf4aba3b5f096869cc58f24c9da17900febc8ffd67819b4e29de29793190e88dc96983db92d84c95fa85d1c92 + languageName: node + linkType: hard + +"lodash.uniqby@npm:^4.7.0": + version: 4.7.0 + resolution: "lodash.uniqby@npm:4.7.0" + checksum: 10c0/c505c0de20ca759599a2ba38710e8fb95ff2d2028e24d86c901ef2c74be8056518571b9b754bfb75053b2818d30dd02243e4a4621a6940c206bbb3f7626db656 languageName: node linkType: hard @@ -2037,51 +2399,41 @@ __metadata: languageName: node linkType: hard -"lowercase-keys@npm:^1.0.0, lowercase-keys@npm:^1.0.1": - version: 1.0.1 - resolution: "lowercase-keys@npm:1.0.1" - checksum: 10c0/56776a8e1ef1aca98ecf6c19b30352ae1cf257b65b8ac858b7d8a0e8b348774d12a9b41aa7f59bfea51bff44bc7a198ab63ba4406bfba60dba008799618bef66 - languageName: node - linkType: hard - -"lowercase-keys@npm:^2.0.0": - version: 2.0.0 - resolution: "lowercase-keys@npm:2.0.0" - checksum: 10c0/f82a2b3568910509da4b7906362efa40f5b54ea14c2584778ddb313226f9cbf21020a5db35f9b9a0e95847a9b781d548601f31793d736b22a2b8ae8eb9ab1082 +"log-symbols@npm:^6.0.0": + version: 6.0.0 + resolution: "log-symbols@npm:6.0.0" + dependencies: + chalk: "npm:^5.3.0" + is-unicode-supported: "npm:^1.3.0" + checksum: 10c0/36636cacedba8f067d2deb4aad44e91a89d9efb3ead27e1846e7b82c9a10ea2e3a7bd6ce28a7ca616bebc60954ff25c67b0f92d20a6a746bb3cc52c3701891f6 languageName: node linkType: hard -"lru-cache@npm:^5.1.1": - version: 5.1.1 - resolution: "lru-cache@npm:5.1.1" - dependencies: - yallist: "npm:^3.0.2" - checksum: 10c0/89b2ef2ef45f543011e38737b8a8622a2f8998cddf0e5437174ef8f1f70a8b9d14a918ab3e232cb3ba343b7abddffa667f0b59075b2b80e6b4d63c3de6127482 +"lru-cache@npm:^10.2.0": + version: 10.4.3 + resolution: "lru-cache@npm:10.4.3" + checksum: 10c0/ebd04fbca961e6c1d6c0af3799adcc966a1babe798f685bb84e6599266599cd95d94630b10262f5424539bc4640107e8a33aa28585374abf561d30d16f4b39fb languageName: node linkType: hard -"lru-cache@npm:^6.0.0": - version: 6.0.0 - resolution: "lru-cache@npm:6.0.0" - dependencies: - yallist: "npm:^4.0.0" - checksum: 10c0/cb53e582785c48187d7a188d3379c181b5ca2a9c78d2bce3e7dee36f32761d1c42983da3fe12b55cb74e1779fa94cdc2e5367c028a9b35317184ede0c07a30a9 +"lru-cache@npm:^7.14.1": + version: 7.18.3 + resolution: "lru-cache@npm:7.18.3" + checksum: 10c0/b3a452b491433db885beed95041eb104c157ef7794b9c9b4d647be503be91769d11206bb573849a16b4cc0d03cbd15ffd22df7960997788b74c1d399ac7a4fed languageName: node linkType: hard -"macos-release@npm:^2.5.0": - version: 2.5.0 - resolution: "macos-release@npm:2.5.0" - checksum: 10c0/afc644cccd509b1275a479ca695d7c254b910b156e8d6311a7864b954f004f8e4a20e65f976e456b95046717de1d15d87f08c37ea64b418292abc75622ea2e96 +"macos-release@npm:^3.2.0": + version: 3.3.0 + resolution: "macos-release@npm:3.3.0" + checksum: 10c0/e95a483ba8751280b8c3a8f466c8f57769e85b22a29ed7159bddee5ef7eaf00569f7940d66eeac253c49239b083af2e4c839ba4bfc73df332874f763e6f166cf languageName: node linkType: hard -"make-dir@npm:^3.0.0": - version: 3.1.0 - resolution: "make-dir@npm:3.1.0" - dependencies: - semver: "npm:^6.0.0" - checksum: 10c0/56aaafefc49c2dfef02c5c95f9b196c4eb6988040cf2c712185c7fe5c99b4091591a7fc4d4eafaaefa70ff763a26f6ab8c3ff60b9e75ea19876f49b18667ecaa +"math-intrinsics@npm:^1.1.0": + version: 1.1.0 + resolution: "math-intrinsics@npm:1.1.0" + checksum: 10c0/7579ff94e899e2f76ab64491d76cf606274c874d8f2af4a442c016bd85688927fcfca157ba6bf74b08e9439dc010b248ce05b96cc7c126a354c3bae7fcb48b7f languageName: node linkType: hard @@ -2099,13 +2451,13 @@ __metadata: languageName: node linkType: hard -"micromatch@npm:^4.0.4": - version: 4.0.5 - resolution: "micromatch@npm:4.0.5" +"micromatch@npm:^4.0.8": + version: 4.0.8 + resolution: "micromatch@npm:4.0.8" dependencies: - braces: "npm:^3.0.2" + braces: "npm:^3.0.3" picomatch: "npm:^2.3.1" - checksum: 10c0/3d6505b20f9fa804af5d8c596cb1c5e475b9b0cd05f652c5b56141cf941bd72adaeb7a436fda344235cef93a7f29b7472efc779fcdb83b478eab0867b95cdeff + checksum: 10c0/166fa6eb926b9553f32ef81f5f531d27b4ce7da60e5baf8c021d043b27a388fb95e46a8038d5045877881e673f8134122b59624d5cecbd16eb50a42e7a6b5ca8 languageName: node linkType: hard @@ -2132,10 +2484,17 @@ __metadata: languageName: node linkType: hard -"mimic-response@npm:^1.0.0, mimic-response@npm:^1.0.1": - version: 1.0.1 - resolution: "mimic-response@npm:1.0.1" - checksum: 10c0/c5381a5eae997f1c3b5e90ca7f209ed58c3615caeee850e85329c598f0c000ae7bec40196580eef1781c60c709f47258131dab237cad8786f8f56750594f27fa +"mimic-fn@npm:^4.0.0": + version: 4.0.0 + resolution: "mimic-fn@npm:4.0.0" + checksum: 10c0/de9cc32be9996fd941e512248338e43407f63f6d497abe8441fa33447d922e927de54d4cc3c1a3c6d652857acd770389d5a3823f311a744132760ce2be15ccbf + languageName: node + linkType: hard + +"mimic-function@npm:^5.0.0": + version: 5.0.1 + resolution: "mimic-function@npm:5.0.1" + checksum: 10c0/f3d9464dd1816ecf6bdf2aec6ba32c0728022039d992f178237d8e289b48764fee4131319e72eedd4f7f094e22ded0af836c3187a7edc4595d28dd74368fd81d languageName: node linkType: hard @@ -2148,6 +2507,15 @@ __metadata: languageName: node linkType: hard +"minimatch@npm:^8.0.2": + version: 8.0.4 + resolution: "minimatch@npm:8.0.4" + dependencies: + brace-expansion: "npm:^2.0.1" + checksum: 10c0/a0a394c356dd5b4cb7f821720841a82fa6f07c9c562c5b716909d1b6ec5e56a7e4c4b5029da26dd256b7d2b3a3f38cbf9ddd8680e887b9b5282b09c05501c1ca + languageName: node + linkType: hard + "minimist@npm:^1.2.0": version: 1.2.6 resolution: "minimist@npm:1.2.6" @@ -2155,10 +2523,17 @@ __metadata: languageName: node linkType: hard -"mock-fs@npm:^4.13.0": - version: 4.14.0 - resolution: "mock-fs@npm:4.14.0" - checksum: 10c0/a23bc2ce74f2a01d02053fb20aecc2ea359e62580cd15b5e1029b55929802e2770bbd683ccdc5c1eabb5cecbf452196bb81a0ef61c4629dc819023e10d8303c6 +"minipass@npm:^4.2.4": + version: 4.2.8 + resolution: "minipass@npm:4.2.8" + checksum: 10c0/4ea76b030d97079f4429d6e8a8affd90baf1b6a1898977c8ccce4701c5a2ba2792e033abc6709373f25c2c4d4d95440d9d5e9464b46b7b76ca44d2ce26d939ce + languageName: node + linkType: hard + +"minipass@npm:^5.0.0 || ^6.0.2 || ^7.0.0": + version: 7.1.2 + resolution: "minipass@npm:7.1.2" + checksum: 10c0/b0fd20bb9fb56e5fa9a8bfac539e8915ae07430a619e4b86ff71f5fc757ef3924b23b2c4230393af1eda647ed3d75739e4e0acb250a6b1eb277cf7f8fe449557 languageName: node linkType: hard @@ -2166,9 +2541,9 @@ __metadata: version: 0.0.0-use.local resolution: "monei-python-sdk@workspace:." dependencies: - "@openapitools/openapi-generator-cli": "npm:1.0.18-4.3.1" - "@release-it/bumper": "npm:^2.0.0" - release-it: "npm:^14.10.0" + "@openapitools/openapi-generator-cli": "npm:2.17.0" + "@release-it/bumper": "npm:^7.0.1" + release-it: "npm:^18.1.2" languageName: unknown linkType: soft @@ -2179,6 +2554,13 @@ __metadata: languageName: node linkType: hard +"ms@npm:^2.1.3": + version: 2.1.3 + resolution: "ms@npm:2.1.3" + checksum: 10c0/d924b57e7312b3b63ad21fc5b3dc0af5e78d61a1fc7cfb5457edaf26326bf62be5307cc87ffb6862ef1c2b33b0233cdb5d4f01c4c958cc0d660948b65a287a48 + languageName: node + linkType: hard + "mute-stream@npm:0.0.8": version: 0.0.8 resolution: "mute-stream@npm:0.0.8" @@ -2186,6 +2568,13 @@ __metadata: languageName: node linkType: hard +"mute-stream@npm:^2.0.0": + version: 2.0.0 + resolution: "mute-stream@npm:2.0.0" + checksum: 10c0/2cf48a2087175c60c8dcdbc619908b49c07f7adcfc37d29236b0c5c612d6204f789104c98cc44d38acab7b3c96f4a3ec2cfdc4934d0738d876dbefa2a12c69f4 + languageName: node + linkType: hard + "netmask@npm:^2.0.2": version: 2.0.2 resolution: "netmask@npm:2.0.2" @@ -2193,18 +2582,18 @@ __metadata: languageName: node linkType: hard -"new-github-release-url@npm:1.0.0": - version: 1.0.0 - resolution: "new-github-release-url@npm:1.0.0" +"new-github-release-url@npm:2.0.0": + version: 2.0.0 + resolution: "new-github-release-url@npm:2.0.0" dependencies: - type-fest: "npm:^0.4.1" - checksum: 10c0/114001f700f39f8fec45f046b5f18c0611b2d2299f0970a2b7a826ff2cd99ce2a441e41d81704c8ad3fdf5da2386d901e272071c6368b4bc23000ef11b23c14c + type-fest: "npm:^2.5.1" + checksum: 10c0/9faec009b8b403efbc407f45306d07de5cc58e09df5b00bdd55b01384cd18b0fd29a97aef6915428ba3b5abb0a5c132c3507468c0c3c101e8d737c1337386786 languageName: node linkType: hard -"node-fetch@npm:^2.6.7": - version: 2.6.7 - resolution: "node-fetch@npm:2.6.7" +"node-fetch@npm:^2.6.1": + version: 2.7.0 + resolution: "node-fetch@npm:2.7.0" dependencies: whatwg-url: "npm:^5.0.0" peerDependencies: @@ -2212,60 +2601,39 @@ __metadata: peerDependenciesMeta: encoding: optional: true - checksum: 10c0/fcae80f5ac52fbf5012f5e19df2bd3915e67d3b3ad51cb5942943df2238d32ba15890fecabd0e166876a9f98a581ab50f3f10eb942b09405c49ef8da36b826c7 - languageName: node - linkType: hard - -"normalize-url@npm:^4.1.0": - version: 4.5.1 - resolution: "normalize-url@npm:4.5.1" - checksum: 10c0/6362e9274fdcc310f8b17e20de29754c94e1820d864114f03d3bfd6286a0028fc51705fb3fd4e475013357b5cd7421fc17f3aba93f2289056779a9bb23bccf59 - languageName: node - linkType: hard - -"normalize-url@npm:^6.1.0": - version: 6.1.0 - resolution: "normalize-url@npm:6.1.0" - checksum: 10c0/95d948f9bdd2cfde91aa786d1816ae40f8262946e13700bf6628105994fe0ff361662c20af3961161c38a119dc977adeb41fc0b41b1745eb77edaaf9cb22db23 + checksum: 10c0/b55786b6028208e6fbe594ccccc213cab67a72899c9234eb59dba51062a299ea853210fcf526998eaa2867b0963ad72338824450905679ff0fa304b8c5093ae8 languageName: node linkType: hard -"npm-run-path@npm:^4.0.0, npm-run-path@npm:^4.0.1": - version: 4.0.1 - resolution: "npm-run-path@npm:4.0.1" +"npm-run-path@npm:^5.1.0": + version: 5.3.0 + resolution: "npm-run-path@npm:5.3.0" dependencies: - path-key: "npm:^3.0.0" - checksum: 10c0/6f9353a95288f8455cf64cbeb707b28826a7f29690244c1e4bb61ec573256e021b6ad6651b394eb1ccfd00d6ec50147253aba2c5fe58a57ceb111fad62c519ac + path-key: "npm:^4.0.0" + checksum: 10c0/124df74820c40c2eb9a8612a254ea1d557ddfab1581c3e751f825e3e366d9f00b0d76a3c94ecd8398e7f3eee193018622677e95816e8491f0797b21e30b2deba languageName: node linkType: hard -"object-inspect@npm:^1.12.2, object-inspect@npm:^1.9.0": - version: 1.12.2 - resolution: "object-inspect@npm:1.12.2" - checksum: 10c0/e1bd625f4c44a2f733bd69cfccce6469f71333fb09c6de151f4f346c16d658ef7555727b12652c108e20c2afb908ae7cd165f52ca53745a1d6cbf228cdb46ebe - languageName: node - linkType: hard - -"object-keys@npm:^1.1.1": - version: 1.1.1 - resolution: "object-keys@npm:1.1.1" - checksum: 10c0/b11f7ccdbc6d406d1f186cdadb9d54738e347b2692a14439ca5ac70c225fa6db46db809711b78589866d47b25fc3e8dee0b4c722ac751e11180f9380e3d8601d +"npm-run-path@npm:^6.0.0": + version: 6.0.0 + resolution: "npm-run-path@npm:6.0.0" + dependencies: + path-key: "npm:^4.0.0" + unicorn-magic: "npm:^0.3.0" + checksum: 10c0/b223c8a0dcd608abf95363ea5c3c0ccc3cd877daf0102eaf1b0f2390d6858d8337fbb7c443af2403b067a7d2c116d10691ecd22ab3c5273c44da1ff8d07753bd languageName: node linkType: hard -"object.assign@npm:^4.1.4": - version: 4.1.4 - resolution: "object.assign@npm:4.1.4" +"nth-check@npm:^2.0.1": + version: 2.1.1 + resolution: "nth-check@npm:2.1.1" dependencies: - call-bind: "npm:^1.0.2" - define-properties: "npm:^1.1.4" - has-symbols: "npm:^1.0.3" - object-keys: "npm:^1.1.1" - checksum: 10c0/2f286118c023e557757620e647b02e7c88d3d417e0c568fca0820de8ec9cca68928304854d5b03e99763eddad6e78a6716e2930f7e6372e4b9b843f3fd3056f3 + boolbase: "npm:^1.0.0" + checksum: 10c0/5fee7ff309727763689cfad844d979aedd2204a817fbaaf0e1603794a7c20db28548d7b024692f953557df6ce4a0ee4ae46cd8ebd9b36cfb300b9226b567c479 languageName: node linkType: hard -"once@npm:^1.3.0, once@npm:^1.3.1, once@npm:^1.4.0": +"once@npm:^1.3.0": version: 1.4.0 resolution: "once@npm:1.4.0" dependencies: @@ -2274,7 +2642,7 @@ __metadata: languageName: node linkType: hard -"onetime@npm:^5.1.0, onetime@npm:^5.1.2": +"onetime@npm:^5.1.0": version: 5.1.2 resolution: "onetime@npm:5.1.2" dependencies: @@ -2283,31 +2651,54 @@ __metadata: languageName: node linkType: hard -"open@npm:7.4.2": - version: 7.4.2 - resolution: "open@npm:7.4.2" +"onetime@npm:^6.0.0": + version: 6.0.0 + resolution: "onetime@npm:6.0.0" + dependencies: + mimic-fn: "npm:^4.0.0" + checksum: 10c0/4eef7c6abfef697dd4479345a4100c382d73c149d2d56170a54a07418c50816937ad09500e1ed1e79d235989d073a9bade8557122aee24f0576ecde0f392bb6c + languageName: node + linkType: hard + +"onetime@npm:^7.0.0": + version: 7.0.0 + resolution: "onetime@npm:7.0.0" + dependencies: + mimic-function: "npm:^5.0.0" + checksum: 10c0/5cb9179d74b63f52a196a2e7037ba2b9a893245a5532d3f44360012005c9cadb60851d56716ebff18a6f47129dab7168022445df47c2aff3b276d92585ed1221 + languageName: node + linkType: hard + +"open@npm:10.1.0": + version: 10.1.0 + resolution: "open@npm:10.1.0" dependencies: - is-docker: "npm:^2.0.0" - is-wsl: "npm:^2.1.1" - checksum: 10c0/77573a6a68f7364f3a19a4c80492712720746b63680ee304555112605ead196afe91052bd3c3d165efdf4e9d04d255e87de0d0a77acec11ef47fd5261251813f + default-browser: "npm:^5.2.1" + define-lazy-prop: "npm:^3.0.0" + is-inside-container: "npm:^1.0.0" + is-wsl: "npm:^3.1.0" + checksum: 10c0/c86d0b94503d5f735f674158d5c5d339c25ec2927562f00ee74590727292ed23e1b8d9336cb41ffa7e1fa4d3641d29b199b4ea37c78cb557d72b511743e90ebb languageName: node linkType: hard -"optionator@npm:^0.8.1": - version: 0.8.3 - resolution: "optionator@npm:0.8.3" +"ora@npm:8.1.1": + version: 8.1.1 + resolution: "ora@npm:8.1.1" dependencies: - deep-is: "npm:~0.1.3" - fast-levenshtein: "npm:~2.0.6" - levn: "npm:~0.3.0" - prelude-ls: "npm:~1.1.2" - type-check: "npm:~0.3.2" - word-wrap: "npm:~1.2.3" - checksum: 10c0/ad7000ea661792b3ec5f8f86aac28895850988926f483b5f308f59f4607dfbe24c05df2d049532ee227c040081f39401a268cf7bbf3301512f74c4d760dc6dd8 + chalk: "npm:^5.3.0" + cli-cursor: "npm:^5.0.0" + cli-spinners: "npm:^2.9.2" + is-interactive: "npm:^2.0.0" + is-unicode-supported: "npm:^2.0.0" + log-symbols: "npm:^6.0.0" + stdin-discarder: "npm:^0.2.2" + string-width: "npm:^7.2.0" + strip-ansi: "npm:^7.1.0" + checksum: 10c0/996a81a9e997481339de3a7996c56131ea292c0a0e9e42d1cd454e2390f1ce7015ec925dcdd29e3d74dc5d037a4aa1877e575b491555507bcd9f219df760a63f languageName: node linkType: hard -"ora@npm:5.4.1, ora@npm:^5.4.1": +"ora@npm:^5.4.1": version: 5.4.1 resolution: "ora@npm:5.4.1" dependencies: @@ -2324,13 +2715,13 @@ __metadata: languageName: node linkType: hard -"os-name@npm:4.0.1": - version: 4.0.1 - resolution: "os-name@npm:4.0.1" +"os-name@npm:6.0.0": + version: 6.0.0 + resolution: "os-name@npm:6.0.0" dependencies: - macos-release: "npm:^2.5.0" - windows-release: "npm:^4.0.0" - checksum: 10c0/2a78bb1a25afa04ec53a972ed164948432fee93d9e039afaec3a27ffe30473ffc85afb03c0776ca3e01c8d806f99f61cb85ad3fbc060bc3e37a549c0a4867f3f + macos-release: "npm:^3.2.0" + windows-release: "npm:^6.0.0" + checksum: 10c0/6030f11647d3c8b52fdb529c1021e7c3f04a63a8bf1463552137ccfc56d8ac6c03348955c00b02beaed5f5ee0bf9dd996bfc3bddc4d04b62631aaf16726bdc34 languageName: node linkType: hard @@ -2341,50 +2732,41 @@ __metadata: languageName: node linkType: hard -"p-cancelable@npm:^1.0.0": - version: 1.1.0 - resolution: "p-cancelable@npm:1.1.0" - checksum: 10c0/9f16d7d58897edb07b1a9234b2bfce3665c747f0f13886e25e2144ecab4595412017cc8cc3b0042f89864b997d6dba76c130724e1c0923fc41ff3c9399b87449 - languageName: node - linkType: hard - -"pac-proxy-agent@npm:^5.0.0": - version: 5.0.0 - resolution: "pac-proxy-agent@npm:5.0.0" +"pac-proxy-agent@npm:^7.1.0": + version: 7.2.0 + resolution: "pac-proxy-agent@npm:7.2.0" dependencies: - "@tootallnate/once": "npm:1" - agent-base: "npm:6" - debug: "npm:4" - get-uri: "npm:3" - http-proxy-agent: "npm:^4.0.1" - https-proxy-agent: "npm:5" - pac-resolver: "npm:^5.0.0" - raw-body: "npm:^2.2.0" - socks-proxy-agent: "npm:5" - checksum: 10c0/993ea53f78af6233720bfa1ab82b748dad5eba514f45a6eb2128ee71b4417835e591823c9c4895327d2390c6bccb2924e849308a40d456ce15f88e3b3db073bf + "@tootallnate/quickjs-emscripten": "npm:^0.23.0" + agent-base: "npm:^7.1.2" + debug: "npm:^4.3.4" + get-uri: "npm:^6.0.1" + http-proxy-agent: "npm:^7.0.0" + https-proxy-agent: "npm:^7.0.6" + pac-resolver: "npm:^7.0.1" + socks-proxy-agent: "npm:^8.0.5" + checksum: 10c0/0265c17c9401c2ea735697931a6553a0c6d8b20c4d7d4e3b3a0506080ba69a8d5ad656e2a6be875411212e2b6ed7a4d9526dd3997e08581fdfb1cbcad454c296 languageName: node linkType: hard -"pac-resolver@npm:^5.0.0": - version: 5.0.1 - resolution: "pac-resolver@npm:5.0.1" +"pac-resolver@npm:^7.0.1": + version: 7.0.1 + resolution: "pac-resolver@npm:7.0.1" dependencies: - degenerator: "npm:^3.0.2" - ip: "npm:^1.1.5" + degenerator: "npm:^5.0.0" netmask: "npm:^2.0.2" - checksum: 10c0/51b1b09ceb48c026ea26e9dcd3cadb924c6c5b42888596040d1e6722321204b4a60c5238f962f85daaae55c33be9cdf303d9f1f8923026a8e3ac5f949e418d72 + checksum: 10c0/5f3edd1dd10fded31e7d1f95776442c3ee51aa098c28b74ede4927d9677ebe7cebb2636750c24e945f5b84445e41ae39093d3a1014a994e5ceb9f0b1b88ebff5 languageName: node linkType: hard -"package-json@npm:^6.3.0": - version: 6.5.0 - resolution: "package-json@npm:6.5.0" +"package-json@npm:^10.0.0": + version: 10.0.1 + resolution: "package-json@npm:10.0.1" dependencies: - got: "npm:^9.6.0" - registry-auth-token: "npm:^4.0.0" - registry-url: "npm:^5.0.0" - semver: "npm:^6.2.0" - checksum: 10c0/60c29fe357af43f96c92c334aa0160cebde44e8e65c1e5f9b065efb3f501af812f268ec967a07757b56447834ef7f71458ebbab94425a9f09c271f348f9b764f + ky: "npm:^1.2.0" + registry-auth-token: "npm:^5.0.2" + registry-url: "npm:^6.0.1" + semver: "npm:^7.6.0" + checksum: 10c0/4a55648d820496326730a7b149fd3fd8382e96f3d6def5ec687f46b75063894acf06b21f79832b40bb094c821d97f532cb0f009f85c4102d0084b488d4f492d3 languageName: node linkType: hard @@ -2397,7 +2779,7 @@ __metadata: languageName: node linkType: hard -"parse-json@npm:5.2.0, parse-json@npm:^5.0.0": +"parse-json@npm:^5.2.0": version: 5.2.0 resolution: "parse-json@npm:5.2.0" dependencies: @@ -2409,27 +2791,57 @@ __metadata: languageName: node linkType: hard -"parse-path@npm:^4.0.0": - version: 4.0.4 - resolution: "parse-path@npm:4.0.4" +"parse-ms@npm:^4.0.0": + version: 4.0.0 + resolution: "parse-ms@npm:4.0.0" + checksum: 10c0/a7900f4f1ebac24cbf5e9708c16fb2fd482517fad353aecd7aefb8c2ba2f85ce017913ccb8925d231770404780df46244ea6fec598b3bde6490882358b4d2d16 + languageName: node + linkType: hard + +"parse-path@npm:^7.0.0": + version: 7.0.1 + resolution: "parse-path@npm:7.0.1" + dependencies: + protocols: "npm:^2.0.0" + checksum: 10c0/687804bbd216bf45f3942a5a0a3cd74da0eb9cdaf40d32020fa05a590b3c84c985bab0dc18cb13569db4cf3294c560d3a657be06698c323b32423210e488164b + languageName: node + linkType: hard + +"parse-url@npm:^9.2.0": + version: 9.2.0 + resolution: "parse-url@npm:9.2.0" + dependencies: + "@types/parse-path": "npm:^7.0.0" + parse-path: "npm:^7.0.0" + checksum: 10c0/b8f56cdb01e76616255dff82544f4b5ab4378f6f4bac8604ed6fde03a75b0f71c547d92688386d8f22f38fad3c928c075abf69458677c6185da76c841bfd7a93 + languageName: node + linkType: hard + +"parse5-htmlparser2-tree-adapter@npm:^7.0.0": + version: 7.1.0 + resolution: "parse5-htmlparser2-tree-adapter@npm:7.1.0" dependencies: - is-ssh: "npm:^1.3.0" - protocols: "npm:^1.4.0" - qs: "npm:^6.9.4" - query-string: "npm:^6.13.8" - checksum: 10c0/8eeae3160ebf21e13381c8bacd61d5221d0c855d15b62c8a0e92b09d16a4b2af7331e4d4e981bfea40224793e2ca0235f3c5263aefed0cea11f1cb8d7d3c42f5 + domhandler: "npm:^5.0.3" + parse5: "npm:^7.0.0" + checksum: 10c0/e5a4e0b834c84c9e244b5749f8d007f4baaeafac7a1da2c54be3421ffd9ef8fdec4f198bf55cda22e88e6ba95e9943f6ed5aa3ae5900b39972ebf5dc8c3f4722 languageName: node linkType: hard -"parse-url@npm:^6.0.0": - version: 6.0.5 - resolution: "parse-url@npm:6.0.5" +"parse5-parser-stream@npm:^7.1.2": + version: 7.1.2 + resolution: "parse5-parser-stream@npm:7.1.2" dependencies: - is-ssh: "npm:^1.3.0" - normalize-url: "npm:^6.1.0" - parse-path: "npm:^4.0.0" - protocols: "npm:^1.4.0" - checksum: 10c0/b57884955daa61e1a610414e0754c0565e118127b1a4ad0f5c2247c8351dc23abbe3b56c64aa35ee2d9fd04189faed8e416c9a1269b2880a436c0a67906c222c + parse5: "npm:^7.0.0" + checksum: 10c0/e236c61000d38ecad369e725a48506b051cebad8abb00e6d4e8bff7aa85c183820fcb45db1559cc90955bdbbdbd665ea94c41259594e74566fff411478dc7fcb + languageName: node + linkType: hard + +"parse5@npm:^7.0.0, parse5@npm:^7.1.2": + version: 7.2.1 + resolution: "parse5@npm:7.2.1" + dependencies: + entities: "npm:^4.5.0" + checksum: 10c0/829d37a0c709215a887e410a7118d754f8e1afd7edb529db95bc7bbf8045fb0266a7b67801331d8e8d9d073ea75793624ec27ce9ff3b96862c3b9008f4d68e80 languageName: node linkType: hard @@ -2440,13 +2852,20 @@ __metadata: languageName: node linkType: hard -"path-key@npm:^3.0.0, path-key@npm:^3.1.0": +"path-key@npm:^3.1.0": version: 3.1.1 resolution: "path-key@npm:3.1.1" checksum: 10c0/748c43efd5a569c039d7a00a03b58eecd1d75f3999f5a28303d75f521288df4823bc057d8784eb72358b2895a05f29a070bc9f1f17d28226cc4e62494cc58c4c languageName: node linkType: hard +"path-key@npm:^4.0.0": + version: 4.0.0 + resolution: "path-key@npm:4.0.0" + checksum: 10c0/794efeef32863a65ac312f3c0b0a99f921f3e827ff63afa5cb09a377e202c262b671f7b3832a4e64731003fa94af0263713962d317b9887bd1e0c48a342efba3 + languageName: node + linkType: hard + "path-parse@npm:^1.0.7": version: 1.0.7 resolution: "path-parse@npm:1.0.7" @@ -2454,52 +2873,57 @@ __metadata: languageName: node linkType: hard -"path-type@npm:^4.0.0": - version: 4.0.0 - resolution: "path-type@npm:4.0.0" - checksum: 10c0/666f6973f332f27581371efaf303fd6c272cc43c2057b37aa99e3643158c7e4b2626549555d88626e99ea9e046f82f32e41bbde5f1508547e9a11b149b52387c +"path-scurry@npm:^1.6.1": + version: 1.11.1 + resolution: "path-scurry@npm:1.11.1" + dependencies: + lru-cache: "npm:^10.2.0" + minipass: "npm:^5.0.0 || ^6.0.2 || ^7.0.0" + checksum: 10c0/32a13711a2a505616ae1cc1b5076801e453e7aae6ac40ab55b388bb91b9d0547a52f5aaceff710ea400205f18691120d4431e520afbe4266b836fadede15872d languageName: node linkType: hard -"picomatch@npm:^2.3.1": - version: 2.3.1 - resolution: "picomatch@npm:2.3.1" - checksum: 10c0/26c02b8d06f03206fc2ab8d16f19960f2ff9e81a658f831ecb656d8f17d9edc799e8364b1f4a7873e89d9702dff96204be0fa26fe4181f6843f040f819dac4be +"path-to-regexp@npm:3.3.0": + version: 3.3.0 + resolution: "path-to-regexp@npm:3.3.0" + checksum: 10c0/ffa0ebe7088d38d435a8d08b0fe6e8c93ceb2a81a65d4dd1d9a538f52e09d5e3474ed5f553cb3b180d894b0caa10698a68737ab599fd1e56b4663d1a64c9f77b languageName: node linkType: hard -"prelude-ls@npm:~1.1.2": - version: 1.1.2 - resolution: "prelude-ls@npm:1.1.2" - checksum: 10c0/7284270064f74e0bb7f04eb9bff7be677e4146417e599ccc9c1200f0f640f8b11e592d94eb1b18f7aa9518031913bb42bea9c86af07ba69902864e61005d6f18 +"path-type@npm:^5.0.0": + version: 5.0.0 + resolution: "path-type@npm:5.0.0" + checksum: 10c0/e8f4b15111bf483900c75609e5e74e3fcb79f2ddb73e41470028fcd3e4b5162ec65da9907be077ee5012c18801ff7fffb35f9f37a077f3f81d85a0b7d6578efd languageName: node linkType: hard -"prepend-http@npm:^2.0.0": - version: 2.0.0 - resolution: "prepend-http@npm:2.0.0" - checksum: 10c0/b023721ffd967728e3a25e3a80dd73827e9444e586800ab90a21b3a8e67f362d28023085406ad53a36db1e4d98cb10e43eb37d45c6b733140a9165ead18a0987 +"picomatch@npm:^2.3.1": + version: 2.3.1 + resolution: "picomatch@npm:2.3.1" + checksum: 10c0/26c02b8d06f03206fc2ab8d16f19960f2ff9e81a658f831ecb656d8f17d9edc799e8364b1f4a7873e89d9702dff96204be0fa26fe4181f6843f040f819dac4be languageName: node linkType: hard -"promise.allsettled@npm:1.0.5": - version: 1.0.5 - resolution: "promise.allsettled@npm:1.0.5" +"pretty-ms@npm:^9.0.0": + version: 9.2.0 + resolution: "pretty-ms@npm:9.2.0" dependencies: - array.prototype.map: "npm:^1.0.4" - call-bind: "npm:^1.0.2" - define-properties: "npm:^1.1.3" - es-abstract: "npm:^1.19.1" - get-intrinsic: "npm:^1.1.1" - iterate-value: "npm:^1.0.2" - checksum: 10c0/6cc51174a075b4f63e1a0e2a4526efe3f8ccba25c81ea916bd8398c2208a43b5bec6a64ca95e59fd01d1c72a15f0bc17be496e43a4c2fdcaf200100951b72fd6 + parse-ms: "npm:^4.0.0" + checksum: 10c0/ab6d066f90e9f77020426986e1b018369f41575674544c539aabec2e63a20fec01166d8cf6571d0e165ad11cfe5a8134a2a48a36d42ab291c59c6deca5264cbb + languageName: node + linkType: hard + +"proto-list@npm:~1.2.1": + version: 1.2.4 + resolution: "proto-list@npm:1.2.4" + checksum: 10c0/b9179f99394ec8a68b8afc817690185f3b03933f7b46ce2e22c1930dc84b60d09f5ad222beab4e59e58c6c039c7f7fcf620397235ef441a356f31f9744010e12 languageName: node linkType: hard -"protocols@npm:^1.4.0": - version: 1.4.8 - resolution: "protocols@npm:1.4.8" - checksum: 10c0/59e4b47134dd6092ac818c404f2ae6d8b969a378a35e234b31b098bcb07eac1152b377baeca64e3214d9e0d4ad5338836098cfa34561c5e4639b4bd29fd709b0 +"protocols@npm:^2.0.0": + version: 2.0.2 + resolution: "protocols@npm:2.0.2" + checksum: 10c0/b87d78c1fcf038d33691da28447ce94011d5c7f0c7fd25bcb5fb4d975991c99117873200c84f4b6a9d7f8b9092713a064356236960d1473a7d6fcd4228897b60 languageName: node linkType: hard @@ -2510,66 +2934,35 @@ __metadata: languageName: node linkType: hard -"proxy-agent@npm:5.0.0": - version: 5.0.0 - resolution: "proxy-agent@npm:5.0.0" +"proxy-agent@npm:6.5.0": + version: 6.5.0 + resolution: "proxy-agent@npm:6.5.0" dependencies: - agent-base: "npm:^6.0.0" - debug: "npm:4" - http-proxy-agent: "npm:^4.0.0" - https-proxy-agent: "npm:^5.0.0" - lru-cache: "npm:^5.1.1" - pac-proxy-agent: "npm:^5.0.0" - proxy-from-env: "npm:^1.0.0" - socks-proxy-agent: "npm:^5.0.0" - checksum: 10c0/e6504b085fce8fd62c4c61a4da8a86b6eabe2dd9caae52954a289581903c070343511d55e92ff008ccbb872b1374aef7ab96a5054c3d5bce379732272b7eae30 + agent-base: "npm:^7.1.2" + debug: "npm:^4.3.4" + http-proxy-agent: "npm:^7.0.1" + https-proxy-agent: "npm:^7.0.6" + lru-cache: "npm:^7.14.1" + pac-proxy-agent: "npm:^7.1.0" + proxy-from-env: "npm:^1.1.0" + socks-proxy-agent: "npm:^8.0.5" + checksum: 10c0/7fd4e6f36bf17098a686d4aee3b8394abfc0b0537c2174ce96b0a4223198b9fafb16576c90108a3fcfc2af0168bd7747152bfa1f58e8fee91d3780e79aab7fd8 languageName: node linkType: hard -"proxy-from-env@npm:^1.0.0": +"proxy-from-env@npm:^1.1.0": version: 1.1.0 resolution: "proxy-from-env@npm:1.1.0" checksum: 10c0/fe7dd8b1bdbbbea18d1459107729c3e4a2243ca870d26d34c2c1bcd3e4425b7bcc5112362df2d93cc7fb9746f6142b5e272fd1cc5c86ddf8580175186f6ad42b languageName: node linkType: hard -"pump@npm:^3.0.0": - version: 3.0.0 - resolution: "pump@npm:3.0.0" - dependencies: - end-of-stream: "npm:^1.1.0" - once: "npm:^1.3.1" - checksum: 10c0/bbdeda4f747cdf47db97428f3a135728669e56a0ae5f354a9ac5b74556556f5446a46f720a8f14ca2ece5be9b4d5d23c346db02b555f46739934cc6c093a5478 - languageName: node - linkType: hard - -"pupa@npm:^2.1.1": - version: 2.1.1 - resolution: "pupa@npm:2.1.1" - dependencies: - escape-goat: "npm:^2.0.0" - checksum: 10c0/d2346324780ebae4be847cad052b830e004d816851dd4750fc73faa6cd360f443e358f6b1c83641fd4c904c6055dcb545807f55259a20a52ad86d9477746c724 - languageName: node - linkType: hard - -"qs@npm:^6.9.4": - version: 6.11.0 - resolution: "qs@npm:6.11.0" - dependencies: - side-channel: "npm:^1.0.4" - checksum: 10c0/4e4875e4d7c7c31c233d07a448e7e4650f456178b9dd3766b7cfa13158fdb24ecb8c4f059fa91e820dc6ab9f2d243721d071c9c0378892dcdad86e9e9a27c68f - languageName: node - linkType: hard - -"query-string@npm:^6.13.8": - version: 6.14.1 - resolution: "query-string@npm:6.14.1" +"pupa@npm:^3.1.0": + version: 3.1.0 + resolution: "pupa@npm:3.1.0" dependencies: - decode-uri-component: "npm:^0.2.0" - filter-obj: "npm:^1.1.0" - split-on-first: "npm:^1.0.0" - strict-uri-encode: "npm:^2.0.0" - checksum: 10c0/900e0fa788000e9dc5f929b6f4141742dcf281f02d3bab9714bc83bea65fab3de75169ea8d61f19cda996bc0dcec72e156efe3c5614c6bce65dcf234ac955b14 + escape-goat: "npm:^4.0.0" + checksum: 10c0/02afa6e4547a733484206aaa8f8eb3fbfb12d3dd17d7ca4fa1ea390a7da2cb8f381e38868bbf68009c4d372f8f6059f553171b6a712d8f2802c7cd43d513f06c languageName: node linkType: hard @@ -2580,19 +2973,7 @@ __metadata: languageName: node linkType: hard -"raw-body@npm:^2.2.0": - version: 2.5.1 - resolution: "raw-body@npm:2.5.1" - dependencies: - bytes: "npm:3.1.2" - http-errors: "npm:2.0.0" - iconv-lite: "npm:0.4.24" - unpipe: "npm:1.0.0" - checksum: 10c0/5dad5a3a64a023b894ad7ab4e5c7c1ce34d3497fc7138d02f8c88a3781e68d8a55aa7d4fd3a458616fa8647cc228be314a1c03fb430a07521de78b32c4dd09d2 - languageName: node - linkType: hard - -"rc@npm:1.2.8, rc@npm:^1.2.8": +"rc@npm:1.2.8": version: 1.2.8 resolution: "rc@npm:1.2.8" dependencies: @@ -2606,18 +2987,6 @@ __metadata: languageName: node linkType: hard -"readable-stream@npm:1.1.x": - version: 1.1.14 - resolution: "readable-stream@npm:1.1.14" - dependencies: - core-util-is: "npm:~1.0.0" - inherits: "npm:~2.0.1" - isarray: "npm:0.0.1" - string_decoder: "npm:~0.10.x" - checksum: 10c0/b7f41b16b305103d598e3c8964fa30d52d6e0b5d9fdad567588964521691c24b279c7a8bb71f11927c3613acf355bac72d8396885a43d50425b2caafd49bc83d - languageName: node - linkType: hard - "readable-stream@npm:^3.4.0": version: 3.6.0 resolution: "readable-stream@npm:3.6.0" @@ -2638,73 +3007,77 @@ __metadata: languageName: node linkType: hard -"regexp.prototype.flags@npm:^1.4.3": - version: 1.4.3 - resolution: "regexp.prototype.flags@npm:1.4.3" - dependencies: - call-bind: "npm:^1.0.2" - define-properties: "npm:^1.1.3" - functions-have-names: "npm:^1.2.2" - checksum: 10c0/5d797c7fb95f72a52dd9685a485faf0af3c55a4d1f2fafc1153a7be3df036cc3274b195b3ae051ee3d896a01960b446d726206e0d9a90b749e90d93445bb781f +"reflect-metadata@npm:0.1.13": + version: 0.1.13 + resolution: "reflect-metadata@npm:0.1.13" + checksum: 10c0/728bff0b376b05639fd11ed80c648b61f7fe653c5b506d7ca118e58b6752b9b00810fe0c86227ecf02bd88da6251ab3eb19fd403aaf2e9ff5ef36a2fda643026 languageName: node linkType: hard -"registry-auth-token@npm:^4.0.0": - version: 4.2.2 - resolution: "registry-auth-token@npm:4.2.2" - dependencies: - rc: "npm:1.2.8" - checksum: 10c0/1d0000b8b65e7141a4cc4594926e2551607f48596e01326e7aa2ba2bc688aea86b2aa0471c5cb5de7acc9a59808a3a1ddde9084f974da79bfc67ab67aa48e003 +"regenerator-runtime@npm:^0.14.0": + version: 0.14.1 + resolution: "regenerator-runtime@npm:0.14.1" + checksum: 10c0/1b16eb2c4bceb1665c89de70dcb64126a22bc8eb958feef3cd68fe11ac6d2a4899b5cd1b80b0774c7c03591dc57d16631a7f69d2daa2ec98100e2f29f7ec4cc4 languageName: node linkType: hard -"registry-url@npm:^5.0.0": +"registry-auth-token@npm:^5.0.2": version: 5.1.0 - resolution: "registry-url@npm:5.1.0" + resolution: "registry-auth-token@npm:5.1.0" + dependencies: + "@pnpm/npm-conf": "npm:^2.1.0" + checksum: 10c0/316229bd8a4acc29a362a7a3862ff809e608256f0fd9e0b133412b43d6a9ea18743756a0ec5ee1467a5384e1023602b85461b3d88d1336b11879e42f7cf02c12 + languageName: node + linkType: hard + +"registry-url@npm:^6.0.1": + version: 6.0.1 + resolution: "registry-url@npm:6.0.1" dependencies: - rc: "npm:^1.2.8" - checksum: 10c0/c2c455342b5836cbed5162092eba075c7a02c087d9ce0fde8aeb4dc87a8f4a34a542e58bf4d8ec2d4cb73f04408cb3148ceb1f76647f76b978cfec22047dc6d6 + rc: "npm:1.2.8" + checksum: 10c0/66e2221c8113fc35ee9d23fe58cb516fc8d556a189fb8d6f1011a02efccc846c4c9b5075b4027b99a5d5c9ad1345ac37f297bea3c0ca30d607ec8084bf561b90 languageName: node linkType: hard -"release-it@npm:^14.10.0": - version: 14.14.3 - resolution: "release-it@npm:14.14.3" +"release-it@npm:^18.1.2": + version: 18.1.2 + resolution: "release-it@npm:18.1.2" dependencies: "@iarna/toml": "npm:2.2.5" - "@octokit/rest": "npm:18.12.0" + "@octokit/rest": "npm:21.0.2" async-retry: "npm:1.3.3" - chalk: "npm:4.1.2" - cosmiconfig: "npm:7.0.1" - debug: "npm:4.3.4" - execa: "npm:5.1.1" - form-data: "npm:4.0.0" - git-url-parse: "npm:11.6.0" - globby: "npm:11.0.4" - got: "npm:9.6.0" - import-cwd: "npm:3.0.0" - inquirer: "npm:8.2.0" - is-ci: "npm:3.0.1" + chalk: "npm:5.4.1" + ci-info: "npm:^4.1.0" + cosmiconfig: "npm:9.0.0" + execa: "npm:9.5.2" + git-url-parse: "npm:16.0.0" + globby: "npm:14.0.2" + inquirer: "npm:12.3.0" + issue-parser: "npm:7.0.1" lodash: "npm:4.17.21" mime-types: "npm:2.1.35" - new-github-release-url: "npm:1.0.0" - open: "npm:7.4.2" - ora: "npm:5.4.1" - os-name: "npm:4.0.1" - parse-json: "npm:5.2.0" - promise.allsettled: "npm:1.0.5" - proxy-agent: "npm:5.0.0" - semver: "npm:7.3.5" + new-github-release-url: "npm:2.0.0" + open: "npm:10.1.0" + ora: "npm:8.1.1" + os-name: "npm:6.0.0" + proxy-agent: "npm:6.5.0" + semver: "npm:7.6.3" shelljs: "npm:0.8.5" - update-notifier: "npm:5.1.0" - url-join: "npm:4.0.1" - uuid: "npm:8.3.2" - wildcard-match: "npm:5.1.2" - yaml: "npm:1.10.2" - yargs-parser: "npm:20.2.9" + undici: "npm:6.21.1" + update-notifier: "npm:7.3.1" + url-join: "npm:5.0.0" + wildcard-match: "npm:5.1.4" + yargs-parser: "npm:21.1.1" bin: release-it: bin/release-it.js - checksum: 10c0/44d7a8a8b57009fa1b414bac407bb92bf132f53ca469d2ee6d9bd2400d5fca9005b65a9545781bd4fa6179d1de81e1068f50d5ae167241f8ebe76870cc9ff155 + checksum: 10c0/4786c4fe2a3d4ef17d17edcb462d70aa328c85d3072b4b04d627b8feee59c6b81f37f8467f2916462c1a36758eaed394081ee783ab7f6648a387b4a3716470bc + languageName: node + linkType: hard + +"require-directory@npm:^2.1.1": + version: 2.1.1 + resolution: "require-directory@npm:2.1.1" + checksum: 10c0/83aa76a7bc1531f68d92c75a2ca2f54f1b01463cb566cf3fbc787d0de8be30c9dbc211d1d46be3497dac5785fe296f2dd11d531945ac29730643357978966e99 languageName: node linkType: hard @@ -2715,13 +3088,6 @@ __metadata: languageName: node linkType: hard -"resolve-from@npm:^5.0.0": - version: 5.0.0 - resolution: "resolve-from@npm:5.0.0" - checksum: 10c0/b21cb7f1fb746de8107b9febab60095187781137fd803e6a59a76d421444b1531b641bba5857f5dc011974d8a5c635d61cec49e6bd3b7fc20e01f0fafc4efbf2 - languageName: node - linkType: hard - "resolve@npm:^1.1.6": version: 1.22.1 resolution: "resolve@npm:1.22.1" @@ -2748,15 +3114,6 @@ __metadata: languageName: node linkType: hard -"responselike@npm:^1.0.2": - version: 1.0.2 - resolution: "responselike@npm:1.0.2" - dependencies: - lowercase-keys: "npm:^1.0.0" - checksum: 10c0/1c2861d1950790da96159ca490eda645130eaf9ccc4d76db20f685ba944feaf30f45714b4318f550b8cd72990710ad68355ff15c41da43ed9a93c102c0ffa403 - languageName: node - linkType: hard - "restore-cursor@npm:^3.1.0": version: 3.1.0 resolution: "restore-cursor@npm:3.1.0" @@ -2767,6 +3124,16 @@ __metadata: languageName: node linkType: hard +"restore-cursor@npm:^5.0.0": + version: 5.1.0 + resolution: "restore-cursor@npm:5.1.0" + dependencies: + onetime: "npm:^7.0.0" + signal-exit: "npm:^4.1.0" + checksum: 10c0/c2ba89131eea791d1b25205bdfdc86699767e2b88dee2a590b1a6caa51737deac8bad0260a5ded2f7c074b7db2f3a626bcf1fcf3cdf35974cbeea5e2e6764f60 + languageName: node + linkType: hard + "retry@npm:0.13.1": version: 0.13.1 resolution: "retry@npm:0.13.1" @@ -2781,6 +3148,13 @@ __metadata: languageName: node linkType: hard +"run-applescript@npm:^7.0.0": + version: 7.0.0 + resolution: "run-applescript@npm:7.0.0" + checksum: 10c0/bd821bbf154b8e6c8ecffeaf0c33cebbb78eb2987476c3f6b420d67ab4c5301faa905dec99ded76ebb3a7042b4e440189ae6d85bbbd3fc6e8d493347ecda8bfe + languageName: node + linkType: hard + "run-async@npm:^2.4.0": version: 2.4.1 resolution: "run-async@npm:2.4.1" @@ -2788,6 +3162,13 @@ __metadata: languageName: node linkType: hard +"run-async@npm:^3.0.0": + version: 3.0.0 + resolution: "run-async@npm:3.0.0" + checksum: 10c0/b18b562ae37c3020083dcaae29642e4cc360c824fbfb6b7d50d809a9d5227bb986152d09310255842c8dce40526e82ca768f02f00806c91ba92a8dfa6159cb85 + languageName: node + linkType: hard + "run-parallel@npm:^1.1.9": version: 1.2.0 resolution: "run-parallel@npm:1.2.0" @@ -2797,73 +3178,62 @@ __metadata: languageName: node linkType: hard -"rxjs@npm:^7.2.0": - version: 7.5.7 - resolution: "rxjs@npm:7.5.7" +"rxjs@npm:7.8.1": + version: 7.8.1 + resolution: "rxjs@npm:7.8.1" dependencies: tslib: "npm:^2.1.0" - checksum: 10c0/283620b3c90b85467c3549f7cda0dd768bc18719cccbbdd9aacadb0f0946827ab20d036f1a00d78066d769764e73070bfee8706091d77b8d971975598f6cbbd4 + checksum: 10c0/3c49c1ecd66170b175c9cacf5cef67f8914dcbc7cd0162855538d365c83fea631167cacb644b3ce533b2ea0e9a4d0b12175186985f89d75abe73dbd8f7f06f68 languageName: node linkType: hard -"safe-buffer@npm:~5.2.0": - version: 5.2.1 - resolution: "safe-buffer@npm:5.2.1" - checksum: 10c0/6501914237c0a86e9675d4e51d89ca3c21ffd6a31642efeba25ad65720bce6921c9e7e974e5be91a786b25aa058b5303285d3c15dbabf983a919f5f630d349f3 +"rxjs@npm:^6.6.3": + version: 6.6.7 + resolution: "rxjs@npm:6.6.7" + dependencies: + tslib: "npm:^1.9.0" + checksum: 10c0/e556a13a9aa89395e5c9d825eabcfa325568d9c9990af720f3f29f04a888a3b854f25845c2b55875d875381abcae2d8100af9cacdc57576e7ed6be030a01d2fe languageName: node linkType: hard -"safe-regex-test@npm:^1.0.0": - version: 1.0.0 - resolution: "safe-regex-test@npm:1.0.0" +"rxjs@npm:^7.5.5, rxjs@npm:^7.8.1": + version: 7.8.2 + resolution: "rxjs@npm:7.8.2" dependencies: - call-bind: "npm:^1.0.2" - get-intrinsic: "npm:^1.1.3" - is-regex: "npm:^1.1.4" - checksum: 10c0/14a81a7e683f97b2d6e9c8be61fddcf8ed7a02f4e64a825515f96bb1738eb007145359313741d2704d28b55b703a0f6300c749dde7c1dbc13952a2b85048ede2 + tslib: "npm:^2.1.0" + checksum: 10c0/1fcd33d2066ada98ba8f21fcbbcaee9f0b271de1d38dc7f4e256bfbc6ffcdde68c8bfb69093de7eeb46f24b1fb820620bf0223706cff26b4ab99a7ff7b2e2c45 languageName: node linkType: hard -"safer-buffer@npm:>= 2.1.2 < 3": - version: 2.1.2 - resolution: "safer-buffer@npm:2.1.2" - checksum: 10c0/7e3c8b2e88a1841c9671094bbaeebd94448111dd90a81a1f606f3f67708a6ec57763b3b47f06da09fc6054193e0e6709e77325415dc8422b04497a8070fa02d4 +"safe-buffer@npm:~5.2.0": + version: 5.2.1 + resolution: "safe-buffer@npm:5.2.1" + checksum: 10c0/6501914237c0a86e9675d4e51d89ca3c21ffd6a31642efeba25ad65720bce6921c9e7e974e5be91a786b25aa058b5303285d3c15dbabf983a919f5f630d349f3 languageName: node linkType: hard -"semver-diff@npm:^3.1.1": - version: 3.1.1 - resolution: "semver-diff@npm:3.1.1" - dependencies: - semver: "npm:^6.3.0" - checksum: 10c0/7d350f1450b9577d538ef866a9bc4cd97bfbf1f1d92070291495a31d0ec3aa808e826c223e5454ea9877cc06eaa886ffd71bb3a1f331b44bc210f9ff525c68d2 +"safer-buffer@npm:>= 2.1.2 < 3, safer-buffer@npm:>= 2.1.2 < 3.0.0": + version: 2.1.2 + resolution: "safer-buffer@npm:2.1.2" + checksum: 10c0/7e3c8b2e88a1841c9671094bbaeebd94448111dd90a81a1f606f3f67708a6ec57763b3b47f06da09fc6054193e0e6709e77325415dc8422b04497a8070fa02d4 languageName: node linkType: hard -"semver@npm:7.3.5, semver@npm:^7.3.4": - version: 7.3.5 - resolution: "semver@npm:7.3.5" - dependencies: - lru-cache: "npm:^6.0.0" +"semver@npm:7.6.3": + version: 7.6.3 + resolution: "semver@npm:7.6.3" bin: semver: bin/semver.js - checksum: 10c0/d450455b2601396dbc7d9f058a6709b1c0b99d74a911f9436c77887600ffcdb5f63d5adffa0c3b8f0092937d8a41cc61c6437bcba375ef4151cb1335ebe4f1f9 + checksum: 10c0/88f33e148b210c153873cb08cfe1e281d518aaa9a666d4d148add6560db5cd3c582f3a08ccb91f38d5f379ead256da9931234ed122057f40bb5766e65e58adaf languageName: node linkType: hard -"semver@npm:^6.0.0, semver@npm:^6.2.0, semver@npm:^6.3.0": - version: 6.3.0 - resolution: "semver@npm:6.3.0" +"semver@npm:^7.6.0, semver@npm:^7.6.3": + version: 7.7.1 + resolution: "semver@npm:7.7.1" bin: - semver: ./bin/semver.js - checksum: 10c0/1f4959e15bcfbaf727e964a4920f9260141bb8805b399793160da4e7de128e42a7d1f79c1b7d5cd21a6073fba0d55feb9966f5fef3e5ccb8e1d7ead3d7527458 - languageName: node - linkType: hard - -"setprototypeof@npm:1.2.0": - version: 1.2.0 - resolution: "setprototypeof@npm:1.2.0" - checksum: 10c0/68733173026766fa0d9ecaeb07f0483f4c2dc70ca376b3b7c40b7cda909f94b0918f6c5ad5ce27a9160bdfb475efaa9d5e705a11d8eaae18f9835d20976028bc + semver: bin/semver.js + checksum: 10c0/fd603a6fb9c399c6054015433051bdbe7b99a940a8fb44b85c2b524c4004b023d7928d47cb22154f8d054ea7ee8597f586605e05b52047f048278e4ac56ae958 languageName: node linkType: hard @@ -2896,28 +3266,24 @@ __metadata: languageName: node linkType: hard -"side-channel@npm:^1.0.4": - version: 1.0.4 - resolution: "side-channel@npm:1.0.4" - dependencies: - call-bind: "npm:^1.0.0" - get-intrinsic: "npm:^1.0.2" - object-inspect: "npm:^1.9.0" - checksum: 10c0/054a5d23ee35054b2c4609b9fd2a0587760737782b5d765a9c7852264710cc39c6dcb56a9bbd6c12cd84071648aea3edb2359d2f6e560677eedadce511ac1da5 - languageName: node - linkType: hard - -"signal-exit@npm:^3.0.2, signal-exit@npm:^3.0.3": +"signal-exit@npm:^3.0.2": version: 3.0.7 resolution: "signal-exit@npm:3.0.7" checksum: 10c0/25d272fa73e146048565e08f3309d5b942c1979a6f4a58a8c59d5fa299728e9c2fcd1a759ec870863b1fd38653670240cd420dad2ad9330c71f36608a6a1c912 languageName: node linkType: hard -"slash@npm:^3.0.0": - version: 3.0.0 - resolution: "slash@npm:3.0.0" - checksum: 10c0/e18488c6a42bdfd4ac5be85b2ced3ccd0224773baae6ad42cfbb9ec74fc07f9fa8396bd35ee638084ead7a2a0818eb5e7151111544d4731ce843019dab4be47b +"signal-exit@npm:^4.1.0": + version: 4.1.0 + resolution: "signal-exit@npm:4.1.0" + checksum: 10c0/41602dce540e46d599edba9d9860193398d135f7ff72cab629db5171516cfae628d21e7bfccde1bbfdf11c48726bc2a6d1a8fb8701125852fbfda7cf19c6aa83 + languageName: node + linkType: hard + +"slash@npm:^5.1.0": + version: 5.1.0 + resolution: "slash@npm:5.1.0" + checksum: 10c0/eb48b815caf0bdc390d0519d41b9e0556a14380f6799c72ba35caf03544d501d18befdeeef074bc9c052acf69654bc9e0d79d7f1de0866284137a40805299eb3 languageName: node linkType: hard @@ -2928,24 +3294,24 @@ __metadata: languageName: node linkType: hard -"socks-proxy-agent@npm:5, socks-proxy-agent@npm:^5.0.0": - version: 5.0.1 - resolution: "socks-proxy-agent@npm:5.0.1" +"socks-proxy-agent@npm:^8.0.5": + version: 8.0.5 + resolution: "socks-proxy-agent@npm:8.0.5" dependencies: - agent-base: "npm:^6.0.2" - debug: "npm:4" - socks: "npm:^2.3.3" - checksum: 10c0/2bc4d996d3e6cb65f69d84aa94d5dcfabac5c264e777ecdb24511703a614d0a426b40adc2c6b456a9c590e6d4c0a67da70e2d59742ac0411dd7f46a49ce07c73 + agent-base: "npm:^7.1.2" + debug: "npm:^4.3.4" + socks: "npm:^2.8.3" + checksum: 10c0/5d2c6cecba6821389aabf18728325730504bf9bb1d9e342e7987a5d13badd7a98838cc9a55b8ed3cb866ad37cc23e1086f09c4d72d93105ce9dfe76330e9d2a6 languageName: node linkType: hard -"socks@npm:^2.3.3": - version: 2.7.0 - resolution: "socks@npm:2.7.0" +"socks@npm:^2.8.3": + version: 2.8.4 + resolution: "socks@npm:2.8.4" dependencies: - ip: "npm:^2.0.0" + ip-address: "npm:^9.0.5" smart-buffer: "npm:^4.2.0" - checksum: 10c0/5cc9ea8d0f1fae370d7ac319b5dd8973fa24bc58d0194a8140687fd10be53a1f348b1b02b97932ce67ddae0edf459e5da0fe4b13cd5dd22ce46ac4d1a83239ec + checksum: 10c0/00c3271e233ccf1fb83a3dd2060b94cc37817e0f797a93c560b9a7a86c4a0ec2961fb31263bdd24a3c28945e24868b5f063cd98744171d9e942c513454b50ae5 languageName: node linkType: hard @@ -2956,35 +3322,28 @@ __metadata: languageName: node linkType: hard -"split-on-first@npm:^1.0.0": - version: 1.1.0 - resolution: "split-on-first@npm:1.1.0" - checksum: 10c0/56df8344f5a5de8521898a5c090023df1d8b8c75be6228f56c52491e0fc1617a5236f2ac3a066adb67a73231eac216ccea7b5b4a2423a543c277cb2f48d24c29 - languageName: node - linkType: hard - -"sprintf-js@npm:~1.0.2": - version: 1.0.3 - resolution: "sprintf-js@npm:1.0.3" - checksum: 10c0/ecadcfe4c771890140da5023d43e190b7566d9cf8b2d238600f31bec0fc653f328da4450eb04bd59a431771a8e9cc0e118f0aa3974b683a4981b4e07abc2a5bb +"spawn-command@npm:^0.0.2-1": + version: 0.0.2 + resolution: "spawn-command@npm:0.0.2" + checksum: 10c0/b22f2d71239e6e628a400831861ba747750bbb40c0a53323754cf7b84330b73d81e40ff1f9055e6d1971818679510208a9302e13d9ff3b32feb67e74d7a1b3ef languageName: node linkType: hard -"statuses@npm:2.0.1": - version: 2.0.1 - resolution: "statuses@npm:2.0.1" - checksum: 10c0/34378b207a1620a24804ce8b5d230fea0c279f00b18a7209646d5d47e419d1cc23e7cbf33a25a1e51ac38973dc2ac2e1e9c647a8e481ef365f77668d72becfd0 +"sprintf-js@npm:^1.1.3": + version: 1.1.3 + resolution: "sprintf-js@npm:1.1.3" + checksum: 10c0/09270dc4f30d479e666aee820eacd9e464215cdff53848b443964202bf4051490538e5dd1b42e1a65cf7296916ca17640aebf63dae9812749c7542ee5f288dec languageName: node linkType: hard -"strict-uri-encode@npm:^2.0.0": - version: 2.0.0 - resolution: "strict-uri-encode@npm:2.0.0" - checksum: 10c0/010cbc78da0e2cf833b0f5dc769e21ae74cdc5d5f5bd555f14a4a4876c8ad2c85ab8b5bdf9a722dc71a11dcd3184085e1c3c0bd50ec6bb85fffc0f28cf82597d +"stdin-discarder@npm:^0.2.2": + version: 0.2.2 + resolution: "stdin-discarder@npm:0.2.2" + checksum: 10c0/c78375e82e956d7a64be6e63c809c7f058f5303efcaf62ea48350af072bacdb99c06cba39209b45a071c1acbd49116af30df1df9abb448df78a6005b72f10537 languageName: node linkType: hard -"string-width@npm:^4.0.0, string-width@npm:^4.1.0, string-width@npm:^4.2.2": +"string-width@npm:^4.1.0, string-width@npm:^4.2.0": version: 4.2.3 resolution: "string-width@npm:4.2.3" dependencies: @@ -2995,25 +3354,14 @@ __metadata: languageName: node linkType: hard -"string.prototype.trimend@npm:^1.0.5": - version: 1.0.5 - resolution: "string.prototype.trimend@npm:1.0.5" - dependencies: - call-bind: "npm:^1.0.2" - define-properties: "npm:^1.1.4" - es-abstract: "npm:^1.19.5" - checksum: 10c0/efcb7d4e943366efde2786be9abf7a79ac9e427bb184aeb4c532ce81d7cb94e1a4d323b256f706dafe6ed5a4ee3d6025a65ec4337d47d07014802be5bcdd4864 - languageName: node - linkType: hard - -"string.prototype.trimstart@npm:^1.0.5": - version: 1.0.5 - resolution: "string.prototype.trimstart@npm:1.0.5" +"string-width@npm:^7.0.0, string-width@npm:^7.2.0": + version: 7.2.0 + resolution: "string-width@npm:7.2.0" dependencies: - call-bind: "npm:^1.0.2" - define-properties: "npm:^1.1.4" - es-abstract: "npm:^1.19.5" - checksum: 10c0/c42d2f7732a98d9402aabcfb6ac05e4e36bbc429f5aa98bd199b5e55162b19b87db941ed68382c68ec6527a200a3d01cb3d4c16f668296c383e63693d8493772 + emoji-regex: "npm:^10.3.0" + get-east-asian-width: "npm:^1.0.0" + strip-ansi: "npm:^7.1.0" + checksum: 10c0/eb0430dd43f3199c7a46dcbf7a0b34539c76fe3aa62763d0b0655acdcbdf360b3f66f3d58ca25ba0205f42ea3491fa00f09426d3b7d3040e506878fc7664c9b9 languageName: node linkType: hard @@ -3026,13 +3374,6 @@ __metadata: languageName: node linkType: hard -"string_decoder@npm:~0.10.x": - version: 0.10.31 - resolution: "string_decoder@npm:0.10.31" - checksum: 10c0/1c628d78f974aa7539c496029f48e7019acc32487fc695464f9d6bdfec98edd7d933a06b3216bc2016918f6e75074c611d84430a53cb0e43071597d6c1ac5e25 - languageName: node - linkType: hard - "strip-ansi@npm:^6.0.0, strip-ansi@npm:^6.0.1": version: 6.0.1 resolution: "strip-ansi@npm:6.0.1" @@ -3042,10 +3383,26 @@ __metadata: languageName: node linkType: hard -"strip-final-newline@npm:^2.0.0": - version: 2.0.0 - resolution: "strip-final-newline@npm:2.0.0" - checksum: 10c0/bddf8ccd47acd85c0e09ad7375409d81653f645fda13227a9d459642277c253d877b68f2e5e4d819fe75733b0e626bac7e954c04f3236f6d196f79c94fa4a96f +"strip-ansi@npm:^7.1.0": + version: 7.1.0 + resolution: "strip-ansi@npm:7.1.0" + dependencies: + ansi-regex: "npm:^6.0.1" + checksum: 10c0/a198c3762e8832505328cbf9e8c8381de14a4fa50a4f9b2160138158ea88c0f5549fb50cb13c651c3088f47e63a108b34622ec18c0499b6c8c3a5ddf6b305ac4 + languageName: node + linkType: hard + +"strip-final-newline@npm:^3.0.0": + version: 3.0.0 + resolution: "strip-final-newline@npm:3.0.0" + checksum: 10c0/a771a17901427bac6293fd416db7577e2bc1c34a19d38351e9d5478c3c415f523f391003b42ed475f27e33a78233035df183525395f731d3bfb8cdcbd4da08ce + languageName: node + linkType: hard + +"strip-final-newline@npm:^4.0.0": + version: 4.0.0 + resolution: "strip-final-newline@npm:4.0.0" + checksum: 10c0/b0cf2b62d597a1b0e3ebc42b88767f0a0d45601f89fd379a928a1812c8779440c81abba708082c946445af1d6b62d5f16e2a7cf4f30d9d6587b89425fae801ff languageName: node linkType: hard @@ -3056,6 +3413,13 @@ __metadata: languageName: node linkType: hard +"stubborn-fs@npm:^1.2.5": + version: 1.2.5 + resolution: "stubborn-fs@npm:1.2.5" + checksum: 10c0/0676befd9901d4dd4e162700fa0396f11d523998589cd6b61b06d1021db811dc4c1e6713869748c6cfa49d58beb9b6f0dc5b6aca6b075811b949e1602ce1e26f + languageName: node + linkType: hard + "supports-color@npm:^5.3.0": version: 5.5.0 resolution: "supports-color@npm:5.5.0" @@ -3074,6 +3438,15 @@ __metadata: languageName: node linkType: hard +"supports-color@npm:^8.1.0": + version: 8.1.1 + resolution: "supports-color@npm:8.1.1" + dependencies: + has-flag: "npm:^4.0.0" + checksum: 10c0/ea1d3c275dd604c974670f63943ed9bd83623edc102430c05adb8efc56ba492746b6e95386e7831b872ec3807fd89dd8eb43f735195f37b5ec343e4234cc7e89 + languageName: node + linkType: hard + "supports-preserve-symlinks-flag@npm:^1.0.0": version: 1.0.0 resolution: "supports-preserve-symlinks-flag@npm:1.0.0" @@ -3097,13 +3470,6 @@ __metadata: languageName: node linkType: hard -"to-readable-stream@npm:^1.0.0": - version: 1.0.0 - resolution: "to-readable-stream@npm:1.0.0" - checksum: 10c0/79cb836e2fb4f2885745a8c212eab7ebc52e93758ff0737feceaed96df98e4d04b8903fe8c27f2e9f3f856a5068ac332918b235c5d801b3efe02a51a3fa0eb36 - languageName: node - linkType: hard - "to-regex-range@npm:^5.0.1": version: 5.0.1 resolution: "to-regex-range@npm:5.0.1" @@ -3113,13 +3479,6 @@ __metadata: languageName: node linkType: hard -"toidentifier@npm:1.0.1": - version: 1.0.1 - resolution: "toidentifier@npm:1.0.1" - checksum: 10c0/93937279934bd66cc3270016dd8d0afec14fb7c94a05c72dc57321f8bd1fa97e5bea6d1f7c89e728d077ca31ea125b78320a616a6c6cd0e6b9cb94cb864381c1 - languageName: node - linkType: hard - "tr46@npm:~0.0.3": version: 0.0.3 resolution: "tr46@npm:0.0.3" @@ -3127,26 +3486,33 @@ __metadata: languageName: node linkType: hard -"tslib@npm:^2.0.1, tslib@npm:^2.1.0": - version: 2.4.0 - resolution: "tslib@npm:2.4.0" - checksum: 10c0/eb19bda3ae545b03caea6a244b34593468e23d53b26bf8649fbc20fce43e9b21a71127fd6d2b9662c0fe48ee6ff668ead48fd00d3b88b2b716b1c12edae25b5d +"tree-kill@npm:^1.2.2": + version: 1.2.2 + resolution: "tree-kill@npm:1.2.2" + bin: + tree-kill: cli.js + checksum: 10c0/7b1b7c7f17608a8f8d20a162e7957ac1ef6cd1636db1aba92f4e072dc31818c2ff0efac1e3d91064ede67ed5dc57c565420531a8134090a12ac10cf792ab14d2 languageName: node linkType: hard -"type-check@npm:~0.3.2": - version: 0.3.2 - resolution: "type-check@npm:0.3.2" - dependencies: - prelude-ls: "npm:~1.1.2" - checksum: 10c0/776217116b2b4e50e368c7ee0c22c0a85e982881c16965b90d52f216bc296d6a52ef74f9202d22158caacc092a7645b0b8d5fe529a96e3fe35d0fb393966c875 +"tslib@npm:2.8.1": + version: 2.8.1 + resolution: "tslib@npm:2.8.1" + checksum: 10c0/9c4759110a19c53f992d9aae23aac5ced636e99887b51b9e61def52611732872ff7668757d4e4c61f19691e36f4da981cd9485e869b4a7408d689f6bf1f14e62 languageName: node linkType: hard -"type-fest@npm:^0.20.2": - version: 0.20.2 - resolution: "type-fest@npm:0.20.2" - checksum: 10c0/dea9df45ea1f0aaa4e2d3bed3f9a0bfe9e5b2592bddb92eb1bf06e50bcf98dbb78189668cd8bc31a0511d3fc25539b4cd5c704497e53e93e2d40ca764b10bfc3 +"tslib@npm:^1.9.0": + version: 1.14.1 + resolution: "tslib@npm:1.14.1" + checksum: 10c0/69ae09c49eea644bc5ebe1bca4fa4cc2c82b7b3e02f43b84bd891504edf66dbc6b2ec0eef31a957042de2269139e4acff911e6d186a258fb14069cd7f6febce2 + languageName: node + linkType: hard + +"tslib@npm:^2.0.1, tslib@npm:^2.1.0": + version: 2.4.0 + resolution: "tslib@npm:2.4.0" + checksum: 10c0/eb19bda3ae545b03caea6a244b34593468e23d53b26bf8649fbc20fce43e9b21a71127fd6d2b9662c0fe48ee6ff668ead48fd00d3b88b2b716b1c12edae25b5d languageName: node linkType: hard @@ -3157,106 +3523,86 @@ __metadata: languageName: node linkType: hard -"type-fest@npm:^0.4.1": - version: 0.4.1 - resolution: "type-fest@npm:0.4.1" - checksum: 10c0/2e65f43209492638244842f70d86e7325361c92dd1cc8e3bf5728c96b980305087fa5ba60652e9053d56c302ef4f1beb9652a91b72a50da0ea66c6b851f3b9cb +"type-fest@npm:^2.5.1": + version: 2.19.0 + resolution: "type-fest@npm:2.19.0" + checksum: 10c0/a5a7ecf2e654251613218c215c7493574594951c08e52ab9881c9df6a6da0aeca7528c213c622bc374b4e0cb5c443aa3ab758da4e3c959783ce884c3194e12cb languageName: node linkType: hard -"typedarray-to-buffer@npm:^3.1.5": - version: 3.1.5 - resolution: "typedarray-to-buffer@npm:3.1.5" - dependencies: - is-typedarray: "npm:^1.0.0" - checksum: 10c0/4ac5b7a93d604edabf3ac58d3a2f7e07487e9f6e98195a080e81dbffdc4127817f470f219d794a843b87052cedef102b53ac9b539855380b8c2172054b7d5027 +"type-fest@npm:^4.18.2, type-fest@npm:^4.21.0": + version: 4.37.0 + resolution: "type-fest@npm:4.37.0" + checksum: 10c0/5bad189f66fbe3431e5d36befa08cab6010e56be68b7467530b7ef94c3cf81ef775a8ac3047c8bbda4dd3159929285870357498d7bc1df062714f9c5c3a84926 languageName: node linkType: hard -"unbox-primitive@npm:^1.0.2": - version: 1.0.2 - resolution: "unbox-primitive@npm:1.0.2" +"uid@npm:2.0.2": + version: 2.0.2 + resolution: "uid@npm:2.0.2" dependencies: - call-bind: "npm:^1.0.2" - has-bigints: "npm:^1.0.2" - has-symbols: "npm:^1.0.3" - which-boxed-primitive: "npm:^1.0.2" - checksum: 10c0/81ca2e81134167cc8f75fa79fbcc8a94379d6c61de67090986a2273850989dd3bae8440c163121b77434b68263e34787a675cbdcb34bb2f764c6b9c843a11b66 + "@lukeed/csprng": "npm:^1.0.0" + checksum: 10c0/e9d02d0562c74e74b5a2519e586db9d7f8204978e476cddd191ee1a9efb85efafdbab2dbf3fc3dde0f5da01fd9da161f37d604dabf513447fd2c03d008f1324c languageName: node linkType: hard -"undici-types@npm:~5.26.4": - version: 5.26.5 - resolution: "undici-types@npm:5.26.5" - checksum: 10c0/bb673d7876c2d411b6eb6c560e0c571eef4a01c1c19925175d16e3a30c4c428181fb8d7ae802a261f283e4166a0ac435e2f505743aa9e45d893f9a3df017b501 +"undici@npm:6.21.1, undici@npm:^6.19.5": + version: 6.21.1 + resolution: "undici@npm:6.21.1" + checksum: 10c0/d604080e4f8db89b35a63b483b5f96a5f8b19ec9f716e934639345449405809d2997e1dd7212d67048f210e54534143384d712bd9075e4394f0788895ef9ca8e languageName: node linkType: hard -"unique-string@npm:^2.0.0": - version: 2.0.0 - resolution: "unique-string@npm:2.0.0" - dependencies: - crypto-random-string: "npm:^2.0.0" - checksum: 10c0/11820db0a4ba069d174bedfa96c588fc2c96b083066fafa186851e563951d0de78181ac79c744c1ed28b51f9d82ac5b8196ff3e4560d0178046ef455d8c2244b +"unicorn-magic@npm:^0.1.0": + version: 0.1.0 + resolution: "unicorn-magic@npm:0.1.0" + checksum: 10c0/e4ed0de05b0a05e735c7d8a2930881e5efcfc3ec897204d5d33e7e6247f4c31eac92e383a15d9a6bccb7319b4271ee4bea946e211bf14951fec6ff2cbbb66a92 languageName: node linkType: hard -"universal-user-agent@npm:^6.0.0": - version: 6.0.0 - resolution: "universal-user-agent@npm:6.0.0" - checksum: 10c0/ebeb0206963666c13bcf9ebc86d0577c7daed5870c05cd34d4972ee7a43b9ef20679baf2a8c83bf1b71d899bae67243ac4982d84ddaf9ba0355ff76595819961 +"unicorn-magic@npm:^0.3.0": + version: 0.3.0 + resolution: "unicorn-magic@npm:0.3.0" + checksum: 10c0/0a32a997d6c15f1c2a077a15b1c4ca6f268d574cf5b8975e778bb98e6f8db4ef4e86dfcae4e158cd4c7e38fb4dd383b93b13eefddc7f178dea13d3ac8a603271 languageName: node linkType: hard -"universalify@npm:^0.1.0": - version: 0.1.2 - resolution: "universalify@npm:0.1.2" - checksum: 10c0/e70e0339f6b36f34c9816f6bf9662372bd241714dc77508d231d08386d94f2c4aa1ba1318614f92015f40d45aae1b9075cd30bd490efbe39387b60a76ca3f045 +"universal-user-agent@npm:^7.0.0, universal-user-agent@npm:^7.0.2": + version: 7.0.2 + resolution: "universal-user-agent@npm:7.0.2" + checksum: 10c0/e60517ee929813e6b3ac0ceb3c66deccafadc71341edca160279ff046319c684fd7090a60d63aa61cd34a06c2d2acebeb8c2f8d364244ae7bf8ab788e20cd8c8 languageName: node linkType: hard -"unpipe@npm:1.0.0": - version: 1.0.0 - resolution: "unpipe@npm:1.0.0" - checksum: 10c0/193400255bd48968e5c5383730344fbb4fa114cdedfab26e329e50dd2d81b134244bb8a72c6ac1b10ab0281a58b363d06405632c9d49ca9dfd5e90cbd7d0f32c +"universalify@npm:^2.0.0": + version: 2.0.1 + resolution: "universalify@npm:2.0.1" + checksum: 10c0/73e8ee3809041ca8b818efb141801a1004e3fc0002727f1531f4de613ea281b494a40909596dae4a042a4fb6cd385af5d4db2e137b1362e0e91384b828effd3a languageName: node linkType: hard -"update-notifier@npm:5.1.0": - version: 5.1.0 - resolution: "update-notifier@npm:5.1.0" +"update-notifier@npm:7.3.1": + version: 7.3.1 + resolution: "update-notifier@npm:7.3.1" dependencies: - boxen: "npm:^5.0.0" - chalk: "npm:^4.1.0" - configstore: "npm:^5.0.1" - has-yarn: "npm:^2.1.0" - import-lazy: "npm:^2.1.0" - is-ci: "npm:^2.0.0" - is-installed-globally: "npm:^0.4.0" - is-npm: "npm:^5.0.0" - is-yarn-global: "npm:^0.3.0" - latest-version: "npm:^5.1.0" - pupa: "npm:^2.1.1" - semver: "npm:^7.3.4" - semver-diff: "npm:^3.1.1" - xdg-basedir: "npm:^4.0.0" - checksum: 10c0/0dde6db5ac1e5244e1f8bf5b26895a0d53c00797ea2bdbc1302623dd1aecab5cfb88b4f324d482cbd4c8b089464383d8c83db64dec5798ec0136820e22478e47 - languageName: node - linkType: hard - -"url-join@npm:4.0.1": - version: 4.0.1 - resolution: "url-join@npm:4.0.1" - checksum: 10c0/ac65e2c7c562d7b49b68edddcf55385d3e922bc1dd5d90419ea40b53b6de1607d1e45ceb71efb9d60da02c681d13c6cb3a1aa8b13fc0c989dfc219df97ee992d + boxen: "npm:^8.0.1" + chalk: "npm:^5.3.0" + configstore: "npm:^7.0.0" + is-in-ci: "npm:^1.0.0" + is-installed-globally: "npm:^1.0.0" + is-npm: "npm:^6.0.0" + latest-version: "npm:^9.0.0" + pupa: "npm:^3.1.0" + semver: "npm:^7.6.3" + xdg-basedir: "npm:^5.1.0" + checksum: 10c0/678839453840f46bb75e8cfebc0ff522262d2d3ece343fca722dd506039832e2a952d14ae39153f05f684467c8293ebc4c6479c9652c1bf97908fcaf300c2b31 languageName: node linkType: hard -"url-parse-lax@npm:^3.0.0": - version: 3.0.0 - resolution: "url-parse-lax@npm:3.0.0" - dependencies: - prepend-http: "npm:^2.0.0" - checksum: 10c0/16f918634d41a4fab9e03c5f9702968c9930f7c29aa1a8c19a6dc01f97d02d9b700ab9f47f8da0b9ace6e0c0e99c27848994de1465b494bced6940c653481e55 +"url-join@npm:5.0.0": + version: 5.0.0 + resolution: "url-join@npm:5.0.0" + checksum: 10c0/ed2b166b4b5a98adcf6828a48b6bd6df1dac4c8a464a73cf4d8e2457ed410dd8da6be0d24855b86026cd7f5c5a3657c1b7b2c7a7c5b8870af17635a41387b04c languageName: node linkType: hard @@ -3267,28 +3613,7 @@ __metadata: languageName: node linkType: hard -"uuid@npm:8.3.2": - version: 8.3.2 - resolution: "uuid@npm:8.3.2" - bin: - uuid: dist/bin/uuid - checksum: 10c0/bcbb807a917d374a49f475fae2e87fdca7da5e5530820ef53f65ba1d12131bd81a92ecf259cc7ce317cbe0f289e7d79fdfebcef9bfa3087c8c8a2fa304c9be54 - languageName: node - linkType: hard - -"vm2@npm:^3.9.8": - version: 3.9.11 - resolution: "vm2@npm:3.9.11" - dependencies: - acorn: "npm:^8.7.0" - acorn-walk: "npm:^8.2.0" - bin: - vm2: bin/vm2 - checksum: 10c0/54cc1ef2627314a2ccc7f889e3014a9b016eeedf6c13f33b6d96fce8052470b7a387a7c6a39e4faba3627699e2148b366a8af90c9b53f4424face69d783c3162 - languageName: node - linkType: hard - -"wcwidth@npm:^1.0.1": +"wcwidth@npm:>=1.0.1, wcwidth@npm:^1.0.1": version: 1.0.1 resolution: "wcwidth@npm:1.0.1" dependencies: @@ -3304,6 +3629,22 @@ __metadata: languageName: node linkType: hard +"whatwg-encoding@npm:^3.1.1": + version: 3.1.1 + resolution: "whatwg-encoding@npm:3.1.1" + dependencies: + iconv-lite: "npm:0.6.3" + checksum: 10c0/273b5f441c2f7fda3368a496c3009edbaa5e43b71b09728f90425e7f487e5cef9eb2b846a31bd760dd8077739c26faf6b5ca43a5f24033172b003b72cf61a93e + languageName: node + linkType: hard + +"whatwg-mimetype@npm:^4.0.0": + version: 4.0.0 + resolution: "whatwg-mimetype@npm:4.0.0" + checksum: 10c0/a773cdc8126b514d790bdae7052e8bf242970cebd84af62fb2f35a33411e78e981f6c0ab9ed1fe6ec5071b09d5340ac9178e05b52d35a9c4bcf558ba1b1551df + languageName: node + linkType: hard + "whatwg-url@npm:^5.0.0": version: 5.0.0 resolution: "whatwg-url@npm:5.0.0" @@ -3314,16 +3655,10 @@ __metadata: languageName: node linkType: hard -"which-boxed-primitive@npm:^1.0.2": - version: 1.0.2 - resolution: "which-boxed-primitive@npm:1.0.2" - dependencies: - is-bigint: "npm:^1.0.1" - is-boolean-object: "npm:^1.1.0" - is-number-object: "npm:^1.0.4" - is-string: "npm:^1.0.5" - is-symbol: "npm:^1.0.3" - checksum: 10c0/0a62a03c00c91dd4fb1035b2f0733c341d805753b027eebd3a304b9cb70e8ce33e25317add2fe9b5fea6f53a175c0633ae701ff812e604410ddd049777cd435e +"when-exit@npm:^2.1.1": + version: 2.1.4 + resolution: "when-exit@npm:2.1.4" + checksum: 10c0/d8ffba54afca880de6f366ab06a32e8fab99fa298a3f79b2d5304bab19d290f55c5f081336cdaa65d0b6e9a842b46a46bab0800e94e755ea599a2082224a8cc0 languageName: node linkType: hard @@ -3338,35 +3673,39 @@ __metadata: languageName: node linkType: hard -"widest-line@npm:^3.1.0": - version: 3.1.0 - resolution: "widest-line@npm:3.1.0" +"widest-line@npm:^5.0.0": + version: 5.0.0 + resolution: "widest-line@npm:5.0.0" dependencies: - string-width: "npm:^4.0.0" - checksum: 10c0/b1e623adcfb9df35350dd7fc61295d6d4a1eaa65a406ba39c4b8360045b614af95ad10e05abf704936ed022569be438c4bfa02d6d031863c4166a238c301119f + string-width: "npm:^7.0.0" + checksum: 10c0/6bd6cca8cda502ef50e05353fd25de0df8c704ffc43ada7e0a9cf9a5d4f4e12520485d80e0b77cec8a21f6c3909042fcf732aa9281e5dbb98cc9384a138b2578 languageName: node linkType: hard -"wildcard-match@npm:5.1.2": - version: 5.1.2 - resolution: "wildcard-match@npm:5.1.2" - checksum: 10c0/47e54e5a0307c844f1b87844fc632d9481bc936235f85a83310aeb0b52f8d47b6aa06e3e0aa7681e3f3a8c724b9c90a89db58f8891a585ebe6aefe4484ff0289 +"wildcard-match@npm:5.1.4": + version: 5.1.4 + resolution: "wildcard-match@npm:5.1.4" + checksum: 10c0/2f37e2fedceca003ec48d064e57c20792a71529ca5765c2d0d67c0964f3a184b33ed61efd8765ed78fd18086c9cf951b381c7277b8f0edb550638f76e3e17897 languageName: node linkType: hard -"windows-release@npm:^4.0.0": - version: 4.0.0 - resolution: "windows-release@npm:4.0.0" +"windows-release@npm:^6.0.0": + version: 6.0.1 + resolution: "windows-release@npm:6.0.1" dependencies: - execa: "npm:^4.0.2" - checksum: 10c0/5c0ce2603a85e25e9a5c78eb1ef646aac7036da2fb942643f2120b11fc33ed94fbcdd340b2abbf27daa522efc9e52df36fe95b1c03cd9acd8d6c6c39f88f106b + execa: "npm:^8.0.1" + checksum: 10c0/e589a64030e780925cb6e88805937feb3dc28eb7a081808e452a26f453f7544826c822360e70d66ad295f973939f735ac6c222c83edfb6bfe218428367201a11 languageName: node linkType: hard -"word-wrap@npm:~1.2.3": - version: 1.2.3 - resolution: "word-wrap@npm:1.2.3" - checksum: 10c0/1cb6558996deb22c909330db1f01d672feee41d7f0664492912de3de282da3f28ba2d49e87b723024e99d56ba2dac2f3ab28f8db07ac199f5e5d5e2e437833de +"wrap-ansi@npm:^6.0.1, wrap-ansi@npm:^6.2.0": + version: 6.2.0 + resolution: "wrap-ansi@npm:6.2.0" + dependencies: + ansi-styles: "npm:^4.0.0" + string-width: "npm:^4.1.0" + strip-ansi: "npm:^6.0.0" + checksum: 10c0/baad244e6e33335ea24e86e51868fe6823626e3a3c88d9a6674642afff1d34d9a154c917e74af8d845fd25d170c4ea9cf69a47133c3f3656e1252b3d462d9f6c languageName: node linkType: hard @@ -3381,6 +3720,17 @@ __metadata: languageName: node linkType: hard +"wrap-ansi@npm:^9.0.0": + version: 9.0.0 + resolution: "wrap-ansi@npm:9.0.0" + dependencies: + ansi-styles: "npm:^6.2.1" + string-width: "npm:^7.0.0" + strip-ansi: "npm:^7.1.0" + checksum: 10c0/a139b818da9573677548dd463bd626a5a5286271211eb6e4e82f34a4f643191d74e6d4a9bb0a3c26ec90e6f904f679e0569674ac099ea12378a8b98e20706066 + languageName: node + linkType: hard + "wrappy@npm:1": version: 1.0.2 resolution: "wrappy@npm:1.0.2" @@ -3388,56 +3738,59 @@ __metadata: languageName: node linkType: hard -"write-file-atomic@npm:^3.0.0": - version: 3.0.3 - resolution: "write-file-atomic@npm:3.0.3" - dependencies: - imurmurhash: "npm:^0.1.4" - is-typedarray: "npm:^1.0.0" - signal-exit: "npm:^3.0.2" - typedarray-to-buffer: "npm:^3.1.5" - checksum: 10c0/7fb67affd811c7a1221bed0c905c26e28f0041e138fb19ccf02db57a0ef93ea69220959af3906b920f9b0411d1914474cdd90b93a96e5cd9e8368d9777caac0e +"xdg-basedir@npm:^5.1.0": + version: 5.1.0 + resolution: "xdg-basedir@npm:5.1.0" + checksum: 10c0/c88efabc71ffd996ba9ad8923a8cc1c7c020a03e2c59f0ffa72e06be9e724ad2a0fccef488757bc6ed3d8849d753dd25082d1035d95cb179e79eae4d034d0b80 languageName: node linkType: hard -"xdg-basedir@npm:^4.0.0": - version: 4.0.0 - resolution: "xdg-basedir@npm:4.0.0" - checksum: 10c0/1b5d70d58355af90363a4e0a51c992e77fc5a1d8de5822699c7d6e96a6afea9a1e048cb93312be6870f338ca45ebe97f000425028fa149c1e87d1b5b8b212a06 +"y18n@npm:^5.0.5": + version: 5.0.8 + resolution: "y18n@npm:5.0.8" + checksum: 10c0/4df2842c36e468590c3691c894bc9cdbac41f520566e76e24f59401ba7d8b4811eb1e34524d57e54bc6d864bcb66baab7ffd9ca42bf1eda596618f9162b91249 languageName: node linkType: hard -"xregexp@npm:2.0.0": - version: 2.0.0 - resolution: "xregexp@npm:2.0.0" - checksum: 10c0/0a5f9134fad3f4d5bffce55eb8e4f00a20e29ad4d0355bf5579e7c5a386355d39e896d4bc941b4b19ea4a04f388980f05ef96cf33574961ba82416ffae78ad65 +"yargs-parser@npm:21.1.1": + version: 21.1.1 + resolution: "yargs-parser@npm:21.1.1" + checksum: 10c0/f84b5e48169479d2f402239c59f084cfd1c3acc197a05c59b98bab067452e6b3ea46d4dd8ba2985ba7b3d32a343d77df0debd6b343e5dae3da2aab2cdf5886b2 languageName: node linkType: hard -"yallist@npm:^3.0.2": - version: 3.1.1 - resolution: "yallist@npm:3.1.1" - checksum: 10c0/c66a5c46bc89af1625476f7f0f2ec3653c1a1791d2f9407cfb4c2ba812a1e1c9941416d71ba9719876530e3340a99925f697142989371b72d93b9ee628afd8c1 +"yargs-parser@npm:^20.2.2": + version: 20.2.9 + resolution: "yargs-parser@npm:20.2.9" + checksum: 10c0/0685a8e58bbfb57fab6aefe03c6da904a59769bd803a722bb098bd5b0f29d274a1357762c7258fb487512811b8063fb5d2824a3415a0a4540598335b3b086c72 languageName: node linkType: hard -"yallist@npm:^4.0.0": - version: 4.0.0 - resolution: "yallist@npm:4.0.0" - checksum: 10c0/2286b5e8dbfe22204ab66e2ef5cc9bbb1e55dfc873bbe0d568aa943eb255d131890dfd5bf243637273d31119b870f49c18fcde2c6ffbb7a7a092b870dc90625a +"yargs@npm:^16.2.0": + version: 16.2.0 + resolution: "yargs@npm:16.2.0" + dependencies: + cliui: "npm:^7.0.2" + escalade: "npm:^3.1.1" + get-caller-file: "npm:^2.0.5" + require-directory: "npm:^2.1.1" + string-width: "npm:^4.2.0" + y18n: "npm:^5.0.5" + yargs-parser: "npm:^20.2.2" + checksum: 10c0/b1dbfefa679848442454b60053a6c95d62f2d2e21dd28def92b647587f415969173c6e99a0f3bab4f1b67ee8283bf735ebe3544013f09491186ba9e8a9a2b651 languageName: node linkType: hard -"yaml@npm:1.10.2, yaml@npm:^1.10.0": - version: 1.10.2 - resolution: "yaml@npm:1.10.2" - checksum: 10c0/5c28b9eb7adc46544f28d9a8d20c5b3cb1215a886609a2fd41f51628d8aaa5878ccd628b755dbcd29f6bb4921bd04ffbc6dcc370689bb96e594e2f9813d2605f +"yoctocolors-cjs@npm:^2.1.2": + version: 2.1.2 + resolution: "yoctocolors-cjs@npm:2.1.2" + checksum: 10c0/a0e36eb88fea2c7981eab22d1ba45e15d8d268626e6c4143305e2c1628fa17ebfaa40cd306161a8ce04c0a60ee0262058eab12567493d5eb1409780853454c6f languageName: node linkType: hard -"yargs-parser@npm:20.2.9": - version: 20.2.9 - resolution: "yargs-parser@npm:20.2.9" - checksum: 10c0/0685a8e58bbfb57fab6aefe03c6da904a59769bd803a722bb098bd5b0f29d274a1357762c7258fb487512811b8063fb5d2824a3415a0a4540598335b3b086c72 +"yoctocolors@npm:^2.0.0": + version: 2.1.1 + resolution: "yoctocolors@npm:2.1.1" + checksum: 10c0/85903f7fa96f1c70badee94789fade709f9d83dab2ec92753d612d84fcea6d34c772337a9f8914c6bed2f5fc03a428ac5d893e76fab636da5f1236ab725486d0 languageName: node linkType: hard diff --git a/requirements.txt b/requirements.txt index eb358ef..96947f6 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,6 +1,3 @@ -certifi >= 14.05.14 -future; python_version<="2.7" -six >= 1.10 python_dateutil >= 2.5.3 setuptools >= 21.0.0 -urllib3 >= 1.15.1 +urllib3 >= 1.25.3 diff --git a/test-requirements.txt b/test-requirements.txt index 4ed3991..bb4f22b 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -1,3 +1 @@ -pytest~=4.6.7 # needed for python 2.7+3.4 pytest-cov>=2.8.1 -pytest-randomly==1.2.3 # needed for python 2.7+3.4 diff --git a/test/test_apple_pay_domain_register200_response.py b/test/test_apple_pay_domain_register200_response.py new file mode 100644 index 0000000..5a5308a --- /dev/null +++ b/test/test_apple_pay_domain_register200_response.py @@ -0,0 +1,35 @@ +""" + MONEI API v1 + +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 + + The version of the OpenAPI document: 1.5.0 + Generated by: https://openapi-generator.tech +""" + + +import sys +import unittest + +import Monei +from Monei.model.apple_pay_domain_register200_response import ApplePayDomainRegister200Response + + +class TestApplePayDomainRegister200Response(unittest.TestCase): + """ApplePayDomainRegister200Response unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testApplePayDomainRegister200Response(self): + """Test ApplePayDomainRegister200Response""" + # FIXME: construct object with mandatory attributes with example values + # model = ApplePayDomainRegister200Response() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_apple_pay_domain_register400_response.py b/test/test_apple_pay_domain_register400_response.py new file mode 100644 index 0000000..af0cab7 --- /dev/null +++ b/test/test_apple_pay_domain_register400_response.py @@ -0,0 +1,37 @@ +""" + MONEI API v1 + +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 + + The version of the OpenAPI document: 1.5.0 + Generated by: https://openapi-generator.tech +""" + + +import sys +import unittest + +import Monei +from Monei.model.error import Error +globals()['Error'] = Error +from Monei.model.apple_pay_domain_register400_response import ApplePayDomainRegister400Response + + +class TestApplePayDomainRegister400Response(unittest.TestCase): + """ApplePayDomainRegister400Response unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testApplePayDomainRegister400Response(self): + """Test ApplePayDomainRegister400Response""" + # FIXME: construct object with mandatory attributes with example values + # model = ApplePayDomainRegister400Response() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_apple_pay_domain_register401_response.py b/test/test_apple_pay_domain_register401_response.py new file mode 100644 index 0000000..e79db25 --- /dev/null +++ b/test/test_apple_pay_domain_register401_response.py @@ -0,0 +1,37 @@ +""" + MONEI API v1 + +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 + + The version of the OpenAPI document: 1.5.0 + Generated by: https://openapi-generator.tech +""" + + +import sys +import unittest + +import Monei +from Monei.model.error import Error +globals()['Error'] = Error +from Monei.model.apple_pay_domain_register401_response import ApplePayDomainRegister401Response + + +class TestApplePayDomainRegister401Response(unittest.TestCase): + """ApplePayDomainRegister401Response unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testApplePayDomainRegister401Response(self): + """Test ApplePayDomainRegister401Response""" + # FIXME: construct object with mandatory attributes with example values + # model = ApplePayDomainRegister401Response() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_apple_pay_domain_register404_response.py b/test/test_apple_pay_domain_register404_response.py new file mode 100644 index 0000000..7551c39 --- /dev/null +++ b/test/test_apple_pay_domain_register404_response.py @@ -0,0 +1,37 @@ +""" + MONEI API v1 + +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 + + The version of the OpenAPI document: 1.5.0 + Generated by: https://openapi-generator.tech +""" + + +import sys +import unittest + +import Monei +from Monei.model.error import Error +globals()['Error'] = Error +from Monei.model.apple_pay_domain_register404_response import ApplePayDomainRegister404Response + + +class TestApplePayDomainRegister404Response(unittest.TestCase): + """ApplePayDomainRegister404Response unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testApplePayDomainRegister404Response(self): + """Test ApplePayDomainRegister404Response""" + # FIXME: construct object with mandatory attributes with example values + # model = ApplePayDomainRegister404Response() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_apple_pay_domain_register422_response.py b/test/test_apple_pay_domain_register422_response.py new file mode 100644 index 0000000..7c61cd6 --- /dev/null +++ b/test/test_apple_pay_domain_register422_response.py @@ -0,0 +1,37 @@ +""" + MONEI API v1 + +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 + + The version of the OpenAPI document: 1.5.0 + Generated by: https://openapi-generator.tech +""" + + +import sys +import unittest + +import Monei +from Monei.model.error import Error +globals()['Error'] = Error +from Monei.model.apple_pay_domain_register422_response import ApplePayDomainRegister422Response + + +class TestApplePayDomainRegister422Response(unittest.TestCase): + """ApplePayDomainRegister422Response unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testApplePayDomainRegister422Response(self): + """Test ApplePayDomainRegister422Response""" + # FIXME: construct object with mandatory attributes with example values + # model = ApplePayDomainRegister422Response() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_apple_pay_domain_register500_response.py b/test/test_apple_pay_domain_register500_response.py new file mode 100644 index 0000000..667e048 --- /dev/null +++ b/test/test_apple_pay_domain_register500_response.py @@ -0,0 +1,37 @@ +""" + MONEI API v1 + +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 + + The version of the OpenAPI document: 1.5.0 + Generated by: https://openapi-generator.tech +""" + + +import sys +import unittest + +import Monei +from Monei.model.error import Error +globals()['Error'] = Error +from Monei.model.apple_pay_domain_register500_response import ApplePayDomainRegister500Response + + +class TestApplePayDomainRegister500Response(unittest.TestCase): + """ApplePayDomainRegister500Response unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testApplePayDomainRegister500Response(self): + """Test ApplePayDomainRegister500Response""" + # FIXME: construct object with mandatory attributes with example values + # model = ApplePayDomainRegister500Response() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_apple_pay_domain_register503_response.py b/test/test_apple_pay_domain_register503_response.py new file mode 100644 index 0000000..47d7c08 --- /dev/null +++ b/test/test_apple_pay_domain_register503_response.py @@ -0,0 +1,37 @@ +""" + MONEI API v1 + +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 + + The version of the OpenAPI document: 1.5.0 + Generated by: https://openapi-generator.tech +""" + + +import sys +import unittest + +import Monei +from Monei.model.error import Error +globals()['Error'] = Error +from Monei.model.apple_pay_domain_register503_response import ApplePayDomainRegister503Response + + +class TestApplePayDomainRegister503Response(unittest.TestCase): + """ApplePayDomainRegister503Response unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testApplePayDomainRegister503Response(self): + """Test ApplePayDomainRegister503Response""" + # FIXME: construct object with mandatory attributes with example values + # model = ApplePayDomainRegister503Response() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_bizum_validate_phone200_response.py b/test/test_bizum_validate_phone200_response.py new file mode 100644 index 0000000..8665b2c --- /dev/null +++ b/test/test_bizum_validate_phone200_response.py @@ -0,0 +1,35 @@ +""" + MONEI API v1 + +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 + + The version of the OpenAPI document: 1.5.0 + Generated by: https://openapi-generator.tech +""" + + +import sys +import unittest + +import Monei +from Monei.model.bizum_validate_phone200_response import BizumValidatePhone200Response + + +class TestBizumValidatePhone200Response(unittest.TestCase): + """BizumValidatePhone200Response unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testBizumValidatePhone200Response(self): + """Test BizumValidatePhone200Response""" + # FIXME: construct object with mandatory attributes with example values + # model = BizumValidatePhone200Response() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_payment_methods.py b/test/test_payment_methods.py new file mode 100644 index 0000000..29357c2 --- /dev/null +++ b/test/test_payment_methods.py @@ -0,0 +1,105 @@ +# coding: utf-8 + +""" + MONEI API v1 + +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 + + The version of the OpenAPI document: 1.4.8 + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest +import datetime + +import Monei +from Monei.models.payment_methods import PaymentMethods # noqa: E501 +from Monei.rest import ApiException + +class TestPaymentMethods(unittest.TestCase): + """PaymentMethods unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional): + """Test PaymentMethods + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # model = Monei.models.payment_methods.PaymentMethods() # noqa: E501 + if include_optional : + return PaymentMethods( + livemode = False, + payment_methods = ["bizum","applePay","googlePay","alipay","bancontact","blik","cofidis","cofidisLoan","eps","iDeal","mbway","multibanco","sofort","trustly","sepa","klarna","giropay","card"], + metadata = Monei.models.payment_methods_metadata.PaymentMethods-Metadata( + alipay = Monei.models.payment_methods_metadata_alipay.PaymentMethods_Metadata_alipay( + countries = ["CN"], ), + bancontact = Monei.models.payment_methods_metadata_bancontact.PaymentMethods_Metadata_bancontact( + countries = ["BE"], ), + bizum = Monei.models.payment_methods_metadata_bizum.PaymentMethods_Metadata_bizum( + countries = ["ES"], ), + blik = Monei.models.payment_methods_metadata_blik.PaymentMethods_Metadata_blik( + countries = ["PL"], ), + card = Monei.models.payment_methods_metadata_card.PaymentMethods_Metadata_card( + brands = ["visa","mastercard"], ), + eps = Monei.models.payment_methods_metadata_eps.PaymentMethods_Metadata_eps( + countries = ["AT"], ), + i_deal = Monei.models.payment_methods_metadata_i_deal.PaymentMethods_Metadata_iDeal( + countries = ["NL"], ), + mbway = Monei.models.payment_methods_metadata_mbway.PaymentMethods_Metadata_mbway( + countries = ["PT"], ), + multibanco = Monei.models.payment_methods_metadata_mbway.PaymentMethods_Metadata_mbway( + countries = ["PT"], ), + sofort = Monei.models.payment_methods_metadata_sofort.PaymentMethods_Metadata_sofort( + countries = ["AT","BE","DE","ES","IT","NL","CH","PL"], ), + trustly = Monei.models.payment_methods_metadata_trustly.PaymentMethods_Metadata_trustly( + countries = ["DE","DK","EE","ES","FI","GB","LT","LV","NL","NO","PL","SE","SK"], ), + sepa = Monei.models.payment_methods_metadata_sepa.PaymentMethods_Metadata_sepa( + countries = ["AT","BE","BG","HR","CY","CZ","DK","EE","FI","FR","DE","GR","HU","IE","IT","LV","LT","LU","MT","NL","PL","PT","RO","SK","SI","ES","SE","IS","LI","NO","AD","SM","MC","VA","PF","TF","GI","GG","IM","JE","BL","PM","CH","GB","WF"], ), + klarna = Monei.models.payment_methods_metadata_klarna.PaymentMethods_Metadata_klarna( + countries = ["AT","BE","CH","DE","DK","ES","FI","FR","GB","IT","NL","NO","SE"], ), + giropay = Monei.models.payment_methods_metadata_giropay.PaymentMethods_Metadata_giropay( + countries = ["DE"], ), + google_pay = Monei.models.payment_methods_metadata_google_pay.PaymentMethods_Metadata_googlePay( + merchant_id = '12345678901234567890', + cvc_required = False, ), + apple_pay = Monei.models.payment_methods_metadata_apple_pay.PaymentMethods_Metadata_applePay( + merchant_id = 'merchant.com.monei', ), + click_to_pay = Monei.models.payment_methods_metadata_click_to_pay.PaymentMethods_Metadata_clickToPay( + token_support = True, + preselected = False, + visa = Monei.models.payment_methods_metadata_click_to_pay_visa.PaymentMethods_Metadata_clickToPay_visa( + srci_dpa_id = 'f47ac10b-58cc-4372-a567-0e02b2c3d479', + src_initiator_id = '550e8400-e29b-41d4-a716-446655440000', ), + mastercard = Monei.models.payment_methods_metadata_click_to_pay_mastercard.PaymentMethods_Metadata_clickToPay_mastercard( + srci_dpa_id = '6ba7b810-9dad-11d1-80b4-00c04fd430c8', + src_initiator_id = 'a0eebc99-9c0b-4ef8-bb6d-6bb9bd380a11', ), + discover = Monei.models.payment_methods_metadata_click_to_pay_discover.PaymentMethods_Metadata_clickToPay_discover( + srci_dpa_id = '71f0c4d5-9947-4d1c-9cb3-d6a3f7c4e701', + src_initiator_id = 'c2d06c25-9ddb-4a5e-9d5a-3ff1c8d98467', ), ), ), + merchant_name = 'MONEI', + merchant_url = 'https://monei.com/', + country_code = 'ES', + account_id = 'aa9333ba-82de-400c-9ae7-087b9f8d2242', + amount = 10, + currency = 'EUR' + ) + else : + return PaymentMethods( + ) + + def testPaymentMethods(self): + """Test PaymentMethods""" + inst_req_only = self.make_instance(include_optional=False) + inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_payment_methods_api.py b/test/test_payment_methods_api.py new file mode 100644 index 0000000..08b4375 --- /dev/null +++ b/test/test_payment_methods_api.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + MONEI API v1 + +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 + + The version of the OpenAPI document: 1.4.8 + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest + +import Monei +from Monei.api.payment_methods_api import PaymentMethodsApi # noqa: E501 +from Monei.rest import ApiException + + +class TestPaymentMethodsApi(unittest.TestCase): + """PaymentMethodsApi unit test stubs""" + + def setUp(self): + self.api = Monei.api.payment_methods_api.PaymentMethodsApi() # noqa: E501 + + def tearDown(self): + pass + + def test_get(self): + """Test case for get + + Get Payment Methods # noqa: E501 + """ + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_payment_methods_metadata.py b/test/test_payment_methods_metadata.py new file mode 100644 index 0000000..2e116d9 --- /dev/null +++ b/test/test_payment_methods_metadata.py @@ -0,0 +1,96 @@ +# coding: utf-8 + +""" + MONEI API v1 + +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 + + The version of the OpenAPI document: 1.4.8 + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest +import datetime + +import Monei +from Monei.models.payment_methods_metadata import PaymentMethodsMetadata # noqa: E501 +from Monei.rest import ApiException + +class TestPaymentMethodsMetadata(unittest.TestCase): + """PaymentMethodsMetadata unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional): + """Test PaymentMethodsMetadata + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # model = Monei.models.payment_methods_metadata.PaymentMethodsMetadata() # noqa: E501 + if include_optional : + return PaymentMethodsMetadata( + alipay = Monei.models.payment_methods_metadata_alipay.PaymentMethods_Metadata_alipay( + countries = ["CN"], ), + bancontact = Monei.models.payment_methods_metadata_bancontact.PaymentMethods_Metadata_bancontact( + countries = ["BE"], ), + bizum = Monei.models.payment_methods_metadata_bizum.PaymentMethods_Metadata_bizum( + countries = ["ES"], ), + blik = Monei.models.payment_methods_metadata_blik.PaymentMethods_Metadata_blik( + countries = ["PL"], ), + card = Monei.models.payment_methods_metadata_card.PaymentMethods_Metadata_card( + brands = ["visa","mastercard"], ), + eps = Monei.models.payment_methods_metadata_eps.PaymentMethods_Metadata_eps( + countries = ["AT"], ), + i_deal = Monei.models.payment_methods_metadata_i_deal.PaymentMethods_Metadata_iDeal( + countries = ["NL"], ), + mbway = Monei.models.payment_methods_metadata_mbway.PaymentMethods_Metadata_mbway( + countries = ["PT"], ), + multibanco = Monei.models.payment_methods_metadata_mbway.PaymentMethods_Metadata_mbway( + countries = ["PT"], ), + sofort = Monei.models.payment_methods_metadata_sofort.PaymentMethods_Metadata_sofort( + countries = ["AT","BE","DE","ES","IT","NL","CH","PL"], ), + trustly = Monei.models.payment_methods_metadata_trustly.PaymentMethods_Metadata_trustly( + countries = ["DE","DK","EE","ES","FI","GB","LT","LV","NL","NO","PL","SE","SK"], ), + sepa = Monei.models.payment_methods_metadata_sepa.PaymentMethods_Metadata_sepa( + countries = ["AT","BE","BG","HR","CY","CZ","DK","EE","FI","FR","DE","GR","HU","IE","IT","LV","LT","LU","MT","NL","PL","PT","RO","SK","SI","ES","SE","IS","LI","NO","AD","SM","MC","VA","PF","TF","GI","GG","IM","JE","BL","PM","CH","GB","WF"], ), + klarna = Monei.models.payment_methods_metadata_klarna.PaymentMethods_Metadata_klarna( + countries = ["AT","BE","CH","DE","DK","ES","FI","FR","GB","IT","NL","NO","SE"], ), + giropay = Monei.models.payment_methods_metadata_giropay.PaymentMethods_Metadata_giropay( + countries = ["DE"], ), + google_pay = Monei.models.payment_methods_metadata_google_pay.PaymentMethods_Metadata_googlePay( + merchant_id = '12345678901234567890', + cvc_required = False, ), + apple_pay = Monei.models.payment_methods_metadata_apple_pay.PaymentMethods_Metadata_applePay( + merchant_id = 'merchant.com.monei', ), + click_to_pay = Monei.models.payment_methods_metadata_click_to_pay.PaymentMethods_Metadata_clickToPay( + token_support = True, + preselected = False, + visa = Monei.models.payment_methods_metadata_click_to_pay_visa.PaymentMethods_Metadata_clickToPay_visa( + srci_dpa_id = 'f47ac10b-58cc-4372-a567-0e02b2c3d479', + src_initiator_id = '550e8400-e29b-41d4-a716-446655440000', ), + mastercard = Monei.models.payment_methods_metadata_click_to_pay_mastercard.PaymentMethods_Metadata_clickToPay_mastercard( + srci_dpa_id = '6ba7b810-9dad-11d1-80b4-00c04fd430c8', + src_initiator_id = 'a0eebc99-9c0b-4ef8-bb6d-6bb9bd380a11', ), + discover = Monei.models.payment_methods_metadata_click_to_pay_discover.PaymentMethods_Metadata_clickToPay_discover( + srci_dpa_id = '71f0c4d5-9947-4d1c-9cb3-d6a3f7c4e701', + src_initiator_id = 'c2d06c25-9ddb-4a5e-9d5a-3ff1c8d98467', ), ) + ) + else : + return PaymentMethodsMetadata( + ) + + def testPaymentMethodsMetadata(self): + """Test PaymentMethodsMetadata""" + inst_req_only = self.make_instance(include_optional=False) + inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_payment_methods_metadata_alipay.py b/test/test_payment_methods_metadata_alipay.py new file mode 100644 index 0000000..780285b --- /dev/null +++ b/test/test_payment_methods_metadata_alipay.py @@ -0,0 +1,52 @@ +# coding: utf-8 + +""" + MONEI API v1 + +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 + + The version of the OpenAPI document: 1.4.8 + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest +import datetime + +import Monei +from Monei.models.payment_methods_metadata_alipay import PaymentMethodsMetadataAlipay # noqa: E501 +from Monei.rest import ApiException + +class TestPaymentMethodsMetadataAlipay(unittest.TestCase): + """PaymentMethodsMetadataAlipay unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional): + """Test PaymentMethodsMetadataAlipay + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # model = Monei.models.payment_methods_metadata_alipay.PaymentMethodsMetadataAlipay() # noqa: E501 + if include_optional : + return PaymentMethodsMetadataAlipay( + countries = ["CN"] + ) + else : + return PaymentMethodsMetadataAlipay( + ) + + def testPaymentMethodsMetadataAlipay(self): + """Test PaymentMethodsMetadataAlipay""" + inst_req_only = self.make_instance(include_optional=False) + inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_payment_methods_metadata_apple_pay.py b/test/test_payment_methods_metadata_apple_pay.py new file mode 100644 index 0000000..24c1d64 --- /dev/null +++ b/test/test_payment_methods_metadata_apple_pay.py @@ -0,0 +1,52 @@ +# coding: utf-8 + +""" + MONEI API v1 + +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 + + The version of the OpenAPI document: 1.4.8 + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest +import datetime + +import Monei +from Monei.models.payment_methods_metadata_apple_pay import PaymentMethodsMetadataApplePay # noqa: E501 +from Monei.rest import ApiException + +class TestPaymentMethodsMetadataApplePay(unittest.TestCase): + """PaymentMethodsMetadataApplePay unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional): + """Test PaymentMethodsMetadataApplePay + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # model = Monei.models.payment_methods_metadata_apple_pay.PaymentMethodsMetadataApplePay() # noqa: E501 + if include_optional : + return PaymentMethodsMetadataApplePay( + merchant_id = 'merchant.com.monei' + ) + else : + return PaymentMethodsMetadataApplePay( + ) + + def testPaymentMethodsMetadataApplePay(self): + """Test PaymentMethodsMetadataApplePay""" + inst_req_only = self.make_instance(include_optional=False) + inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_payment_methods_metadata_bancontact.py b/test/test_payment_methods_metadata_bancontact.py new file mode 100644 index 0000000..ebfe974 --- /dev/null +++ b/test/test_payment_methods_metadata_bancontact.py @@ -0,0 +1,52 @@ +# coding: utf-8 + +""" + MONEI API v1 + +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 + + The version of the OpenAPI document: 1.4.8 + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest +import datetime + +import Monei +from Monei.models.payment_methods_metadata_bancontact import PaymentMethodsMetadataBancontact # noqa: E501 +from Monei.rest import ApiException + +class TestPaymentMethodsMetadataBancontact(unittest.TestCase): + """PaymentMethodsMetadataBancontact unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional): + """Test PaymentMethodsMetadataBancontact + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # model = Monei.models.payment_methods_metadata_bancontact.PaymentMethodsMetadataBancontact() # noqa: E501 + if include_optional : + return PaymentMethodsMetadataBancontact( + countries = ["BE"] + ) + else : + return PaymentMethodsMetadataBancontact( + ) + + def testPaymentMethodsMetadataBancontact(self): + """Test PaymentMethodsMetadataBancontact""" + inst_req_only = self.make_instance(include_optional=False) + inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_payment_methods_metadata_bizum.py b/test/test_payment_methods_metadata_bizum.py new file mode 100644 index 0000000..cee8182 --- /dev/null +++ b/test/test_payment_methods_metadata_bizum.py @@ -0,0 +1,52 @@ +# coding: utf-8 + +""" + MONEI API v1 + +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 + + The version of the OpenAPI document: 1.4.8 + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest +import datetime + +import Monei +from Monei.models.payment_methods_metadata_bizum import PaymentMethodsMetadataBizum # noqa: E501 +from Monei.rest import ApiException + +class TestPaymentMethodsMetadataBizum(unittest.TestCase): + """PaymentMethodsMetadataBizum unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional): + """Test PaymentMethodsMetadataBizum + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # model = Monei.models.payment_methods_metadata_bizum.PaymentMethodsMetadataBizum() # noqa: E501 + if include_optional : + return PaymentMethodsMetadataBizum( + countries = ["ES"] + ) + else : + return PaymentMethodsMetadataBizum( + ) + + def testPaymentMethodsMetadataBizum(self): + """Test PaymentMethodsMetadataBizum""" + inst_req_only = self.make_instance(include_optional=False) + inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_payment_methods_metadata_blik.py b/test/test_payment_methods_metadata_blik.py new file mode 100644 index 0000000..524bc08 --- /dev/null +++ b/test/test_payment_methods_metadata_blik.py @@ -0,0 +1,52 @@ +# coding: utf-8 + +""" + MONEI API v1 + +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 + + The version of the OpenAPI document: 1.4.8 + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest +import datetime + +import Monei +from Monei.models.payment_methods_metadata_blik import PaymentMethodsMetadataBlik # noqa: E501 +from Monei.rest import ApiException + +class TestPaymentMethodsMetadataBlik(unittest.TestCase): + """PaymentMethodsMetadataBlik unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional): + """Test PaymentMethodsMetadataBlik + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # model = Monei.models.payment_methods_metadata_blik.PaymentMethodsMetadataBlik() # noqa: E501 + if include_optional : + return PaymentMethodsMetadataBlik( + countries = ["PL"] + ) + else : + return PaymentMethodsMetadataBlik( + ) + + def testPaymentMethodsMetadataBlik(self): + """Test PaymentMethodsMetadataBlik""" + inst_req_only = self.make_instance(include_optional=False) + inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_payment_methods_metadata_card.py b/test/test_payment_methods_metadata_card.py new file mode 100644 index 0000000..268b2ce --- /dev/null +++ b/test/test_payment_methods_metadata_card.py @@ -0,0 +1,52 @@ +# coding: utf-8 + +""" + MONEI API v1 + +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 + + The version of the OpenAPI document: 1.4.8 + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest +import datetime + +import Monei +from Monei.models.payment_methods_metadata_card import PaymentMethodsMetadataCard # noqa: E501 +from Monei.rest import ApiException + +class TestPaymentMethodsMetadataCard(unittest.TestCase): + """PaymentMethodsMetadataCard unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional): + """Test PaymentMethodsMetadataCard + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # model = Monei.models.payment_methods_metadata_card.PaymentMethodsMetadataCard() # noqa: E501 + if include_optional : + return PaymentMethodsMetadataCard( + brands = ["visa","mastercard"] + ) + else : + return PaymentMethodsMetadataCard( + ) + + def testPaymentMethodsMetadataCard(self): + """Test PaymentMethodsMetadataCard""" + inst_req_only = self.make_instance(include_optional=False) + inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_payment_methods_metadata_click_to_pay.py b/test/test_payment_methods_metadata_click_to_pay.py new file mode 100644 index 0000000..99035be --- /dev/null +++ b/test/test_payment_methods_metadata_click_to_pay.py @@ -0,0 +1,62 @@ +# coding: utf-8 + +""" + MONEI API v1 + +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 + + The version of the OpenAPI document: 1.4.8 + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest +import datetime + +import Monei +from Monei.models.payment_methods_metadata_click_to_pay import PaymentMethodsMetadataClickToPay # noqa: E501 +from Monei.rest import ApiException + +class TestPaymentMethodsMetadataClickToPay(unittest.TestCase): + """PaymentMethodsMetadataClickToPay unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional): + """Test PaymentMethodsMetadataClickToPay + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # model = Monei.models.payment_methods_metadata_click_to_pay.PaymentMethodsMetadataClickToPay() # noqa: E501 + if include_optional : + return PaymentMethodsMetadataClickToPay( + token_support = True, + preselected = False, + visa = Monei.models.payment_methods_metadata_click_to_pay_visa.PaymentMethods_Metadata_clickToPay_visa( + srci_dpa_id = 'f47ac10b-58cc-4372-a567-0e02b2c3d479', + src_initiator_id = '550e8400-e29b-41d4-a716-446655440000', ), + mastercard = Monei.models.payment_methods_metadata_click_to_pay_mastercard.PaymentMethods_Metadata_clickToPay_mastercard( + srci_dpa_id = '6ba7b810-9dad-11d1-80b4-00c04fd430c8', + src_initiator_id = 'a0eebc99-9c0b-4ef8-bb6d-6bb9bd380a11', ), + discover = Monei.models.payment_methods_metadata_click_to_pay_discover.PaymentMethods_Metadata_clickToPay_discover( + srci_dpa_id = '71f0c4d5-9947-4d1c-9cb3-d6a3f7c4e701', + src_initiator_id = 'c2d06c25-9ddb-4a5e-9d5a-3ff1c8d98467', ) + ) + else : + return PaymentMethodsMetadataClickToPay( + ) + + def testPaymentMethodsMetadataClickToPay(self): + """Test PaymentMethodsMetadataClickToPay""" + inst_req_only = self.make_instance(include_optional=False) + inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_payment_methods_metadata_click_to_pay_discover.py b/test/test_payment_methods_metadata_click_to_pay_discover.py new file mode 100644 index 0000000..a0897c4 --- /dev/null +++ b/test/test_payment_methods_metadata_click_to_pay_discover.py @@ -0,0 +1,53 @@ +# coding: utf-8 + +""" + MONEI API v1 + +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 + + The version of the OpenAPI document: 1.4.8 + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest +import datetime + +import Monei +from Monei.models.payment_methods_metadata_click_to_pay_discover import PaymentMethodsMetadataClickToPayDiscover # noqa: E501 +from Monei.rest import ApiException + +class TestPaymentMethodsMetadataClickToPayDiscover(unittest.TestCase): + """PaymentMethodsMetadataClickToPayDiscover unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional): + """Test PaymentMethodsMetadataClickToPayDiscover + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # model = Monei.models.payment_methods_metadata_click_to_pay_discover.PaymentMethodsMetadataClickToPayDiscover() # noqa: E501 + if include_optional : + return PaymentMethodsMetadataClickToPayDiscover( + srci_dpa_id = '71f0c4d5-9947-4d1c-9cb3-d6a3f7c4e701', + src_initiator_id = 'c2d06c25-9ddb-4a5e-9d5a-3ff1c8d98467' + ) + else : + return PaymentMethodsMetadataClickToPayDiscover( + ) + + def testPaymentMethodsMetadataClickToPayDiscover(self): + """Test PaymentMethodsMetadataClickToPayDiscover""" + inst_req_only = self.make_instance(include_optional=False) + inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_payment_methods_metadata_click_to_pay_mastercard.py b/test/test_payment_methods_metadata_click_to_pay_mastercard.py new file mode 100644 index 0000000..b188955 --- /dev/null +++ b/test/test_payment_methods_metadata_click_to_pay_mastercard.py @@ -0,0 +1,53 @@ +# coding: utf-8 + +""" + MONEI API v1 + +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 + + The version of the OpenAPI document: 1.4.8 + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest +import datetime + +import Monei +from Monei.models.payment_methods_metadata_click_to_pay_mastercard import PaymentMethodsMetadataClickToPayMastercard # noqa: E501 +from Monei.rest import ApiException + +class TestPaymentMethodsMetadataClickToPayMastercard(unittest.TestCase): + """PaymentMethodsMetadataClickToPayMastercard unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional): + """Test PaymentMethodsMetadataClickToPayMastercard + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # model = Monei.models.payment_methods_metadata_click_to_pay_mastercard.PaymentMethodsMetadataClickToPayMastercard() # noqa: E501 + if include_optional : + return PaymentMethodsMetadataClickToPayMastercard( + srci_dpa_id = '6ba7b810-9dad-11d1-80b4-00c04fd430c8', + src_initiator_id = 'a0eebc99-9c0b-4ef8-bb6d-6bb9bd380a11' + ) + else : + return PaymentMethodsMetadataClickToPayMastercard( + ) + + def testPaymentMethodsMetadataClickToPayMastercard(self): + """Test PaymentMethodsMetadataClickToPayMastercard""" + inst_req_only = self.make_instance(include_optional=False) + inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_payment_methods_metadata_click_to_pay_visa.py b/test/test_payment_methods_metadata_click_to_pay_visa.py new file mode 100644 index 0000000..4cb670b --- /dev/null +++ b/test/test_payment_methods_metadata_click_to_pay_visa.py @@ -0,0 +1,53 @@ +# coding: utf-8 + +""" + MONEI API v1 + +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 + + The version of the OpenAPI document: 1.4.8 + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest +import datetime + +import Monei +from Monei.models.payment_methods_metadata_click_to_pay_visa import PaymentMethodsMetadataClickToPayVisa # noqa: E501 +from Monei.rest import ApiException + +class TestPaymentMethodsMetadataClickToPayVisa(unittest.TestCase): + """PaymentMethodsMetadataClickToPayVisa unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional): + """Test PaymentMethodsMetadataClickToPayVisa + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # model = Monei.models.payment_methods_metadata_click_to_pay_visa.PaymentMethodsMetadataClickToPayVisa() # noqa: E501 + if include_optional : + return PaymentMethodsMetadataClickToPayVisa( + srci_dpa_id = 'f47ac10b-58cc-4372-a567-0e02b2c3d479', + src_initiator_id = '550e8400-e29b-41d4-a716-446655440000' + ) + else : + return PaymentMethodsMetadataClickToPayVisa( + ) + + def testPaymentMethodsMetadataClickToPayVisa(self): + """Test PaymentMethodsMetadataClickToPayVisa""" + inst_req_only = self.make_instance(include_optional=False) + inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_payment_methods_metadata_eps.py b/test/test_payment_methods_metadata_eps.py new file mode 100644 index 0000000..9c0e8fb --- /dev/null +++ b/test/test_payment_methods_metadata_eps.py @@ -0,0 +1,52 @@ +# coding: utf-8 + +""" + MONEI API v1 + +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 + + The version of the OpenAPI document: 1.4.8 + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest +import datetime + +import Monei +from Monei.models.payment_methods_metadata_eps import PaymentMethodsMetadataEps # noqa: E501 +from Monei.rest import ApiException + +class TestPaymentMethodsMetadataEps(unittest.TestCase): + """PaymentMethodsMetadataEps unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional): + """Test PaymentMethodsMetadataEps + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # model = Monei.models.payment_methods_metadata_eps.PaymentMethodsMetadataEps() # noqa: E501 + if include_optional : + return PaymentMethodsMetadataEps( + countries = ["AT"] + ) + else : + return PaymentMethodsMetadataEps( + ) + + def testPaymentMethodsMetadataEps(self): + """Test PaymentMethodsMetadataEps""" + inst_req_only = self.make_instance(include_optional=False) + inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_payment_methods_metadata_giropay.py b/test/test_payment_methods_metadata_giropay.py new file mode 100644 index 0000000..ed1b96f --- /dev/null +++ b/test/test_payment_methods_metadata_giropay.py @@ -0,0 +1,52 @@ +# coding: utf-8 + +""" + MONEI API v1 + +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 + + The version of the OpenAPI document: 1.4.8 + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest +import datetime + +import Monei +from Monei.models.payment_methods_metadata_giropay import PaymentMethodsMetadataGiropay # noqa: E501 +from Monei.rest import ApiException + +class TestPaymentMethodsMetadataGiropay(unittest.TestCase): + """PaymentMethodsMetadataGiropay unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional): + """Test PaymentMethodsMetadataGiropay + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # model = Monei.models.payment_methods_metadata_giropay.PaymentMethodsMetadataGiropay() # noqa: E501 + if include_optional : + return PaymentMethodsMetadataGiropay( + countries = ["DE"] + ) + else : + return PaymentMethodsMetadataGiropay( + ) + + def testPaymentMethodsMetadataGiropay(self): + """Test PaymentMethodsMetadataGiropay""" + inst_req_only = self.make_instance(include_optional=False) + inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_payment_methods_metadata_google_pay.py b/test/test_payment_methods_metadata_google_pay.py new file mode 100644 index 0000000..36e2f23 --- /dev/null +++ b/test/test_payment_methods_metadata_google_pay.py @@ -0,0 +1,53 @@ +# coding: utf-8 + +""" + MONEI API v1 + +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 + + The version of the OpenAPI document: 1.4.8 + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest +import datetime + +import Monei +from Monei.models.payment_methods_metadata_google_pay import PaymentMethodsMetadataGooglePay # noqa: E501 +from Monei.rest import ApiException + +class TestPaymentMethodsMetadataGooglePay(unittest.TestCase): + """PaymentMethodsMetadataGooglePay unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional): + """Test PaymentMethodsMetadataGooglePay + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # model = Monei.models.payment_methods_metadata_google_pay.PaymentMethodsMetadataGooglePay() # noqa: E501 + if include_optional : + return PaymentMethodsMetadataGooglePay( + merchant_id = '12345678901234567890', + cvc_required = False + ) + else : + return PaymentMethodsMetadataGooglePay( + ) + + def testPaymentMethodsMetadataGooglePay(self): + """Test PaymentMethodsMetadataGooglePay""" + inst_req_only = self.make_instance(include_optional=False) + inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_payment_methods_metadata_i_deal.py b/test/test_payment_methods_metadata_i_deal.py new file mode 100644 index 0000000..8e5ef2d --- /dev/null +++ b/test/test_payment_methods_metadata_i_deal.py @@ -0,0 +1,52 @@ +# coding: utf-8 + +""" + MONEI API v1 + +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 + + The version of the OpenAPI document: 1.4.8 + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest +import datetime + +import Monei +from Monei.models.payment_methods_metadata_i_deal import PaymentMethodsMetadataIDeal # noqa: E501 +from Monei.rest import ApiException + +class TestPaymentMethodsMetadataIDeal(unittest.TestCase): + """PaymentMethodsMetadataIDeal unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional): + """Test PaymentMethodsMetadataIDeal + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # model = Monei.models.payment_methods_metadata_i_deal.PaymentMethodsMetadataIDeal() # noqa: E501 + if include_optional : + return PaymentMethodsMetadataIDeal( + countries = ["NL"] + ) + else : + return PaymentMethodsMetadataIDeal( + ) + + def testPaymentMethodsMetadataIDeal(self): + """Test PaymentMethodsMetadataIDeal""" + inst_req_only = self.make_instance(include_optional=False) + inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_payment_methods_metadata_klarna.py b/test/test_payment_methods_metadata_klarna.py new file mode 100644 index 0000000..4ddeccc --- /dev/null +++ b/test/test_payment_methods_metadata_klarna.py @@ -0,0 +1,52 @@ +# coding: utf-8 + +""" + MONEI API v1 + +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 + + The version of the OpenAPI document: 1.4.8 + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest +import datetime + +import Monei +from Monei.models.payment_methods_metadata_klarna import PaymentMethodsMetadataKlarna # noqa: E501 +from Monei.rest import ApiException + +class TestPaymentMethodsMetadataKlarna(unittest.TestCase): + """PaymentMethodsMetadataKlarna unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional): + """Test PaymentMethodsMetadataKlarna + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # model = Monei.models.payment_methods_metadata_klarna.PaymentMethodsMetadataKlarna() # noqa: E501 + if include_optional : + return PaymentMethodsMetadataKlarna( + countries = ["AT","BE","CH","DE","DK","ES","FI","FR","GB","IT","NL","NO","SE"] + ) + else : + return PaymentMethodsMetadataKlarna( + ) + + def testPaymentMethodsMetadataKlarna(self): + """Test PaymentMethodsMetadataKlarna""" + inst_req_only = self.make_instance(include_optional=False) + inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_payment_methods_metadata_mbway.py b/test/test_payment_methods_metadata_mbway.py new file mode 100644 index 0000000..292b9d5 --- /dev/null +++ b/test/test_payment_methods_metadata_mbway.py @@ -0,0 +1,52 @@ +# coding: utf-8 + +""" + MONEI API v1 + +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 + + The version of the OpenAPI document: 1.4.8 + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest +import datetime + +import Monei +from Monei.models.payment_methods_metadata_mbway import PaymentMethodsMetadataMbway # noqa: E501 +from Monei.rest import ApiException + +class TestPaymentMethodsMetadataMbway(unittest.TestCase): + """PaymentMethodsMetadataMbway unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional): + """Test PaymentMethodsMetadataMbway + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # model = Monei.models.payment_methods_metadata_mbway.PaymentMethodsMetadataMbway() # noqa: E501 + if include_optional : + return PaymentMethodsMetadataMbway( + countries = ["PT"] + ) + else : + return PaymentMethodsMetadataMbway( + ) + + def testPaymentMethodsMetadataMbway(self): + """Test PaymentMethodsMetadataMbway""" + inst_req_only = self.make_instance(include_optional=False) + inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_payment_methods_metadata_sepa.py b/test/test_payment_methods_metadata_sepa.py new file mode 100644 index 0000000..a4db481 --- /dev/null +++ b/test/test_payment_methods_metadata_sepa.py @@ -0,0 +1,52 @@ +# coding: utf-8 + +""" + MONEI API v1 + +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 + + The version of the OpenAPI document: 1.4.8 + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest +import datetime + +import Monei +from Monei.models.payment_methods_metadata_sepa import PaymentMethodsMetadataSepa # noqa: E501 +from Monei.rest import ApiException + +class TestPaymentMethodsMetadataSepa(unittest.TestCase): + """PaymentMethodsMetadataSepa unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional): + """Test PaymentMethodsMetadataSepa + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # model = Monei.models.payment_methods_metadata_sepa.PaymentMethodsMetadataSepa() # noqa: E501 + if include_optional : + return PaymentMethodsMetadataSepa( + countries = ["AT","BE","BG","HR","CY","CZ","DK","EE","FI","FR","DE","GR","HU","IE","IT","LV","LT","LU","MT","NL","PL","PT","RO","SK","SI","ES","SE","IS","LI","NO","AD","SM","MC","VA","PF","TF","GI","GG","IM","JE","BL","PM","CH","GB","WF"] + ) + else : + return PaymentMethodsMetadataSepa( + ) + + def testPaymentMethodsMetadataSepa(self): + """Test PaymentMethodsMetadataSepa""" + inst_req_only = self.make_instance(include_optional=False) + inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_payment_methods_metadata_sofort.py b/test/test_payment_methods_metadata_sofort.py new file mode 100644 index 0000000..a27a102 --- /dev/null +++ b/test/test_payment_methods_metadata_sofort.py @@ -0,0 +1,52 @@ +# coding: utf-8 + +""" + MONEI API v1 + +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 + + The version of the OpenAPI document: 1.4.8 + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest +import datetime + +import Monei +from Monei.models.payment_methods_metadata_sofort import PaymentMethodsMetadataSofort # noqa: E501 +from Monei.rest import ApiException + +class TestPaymentMethodsMetadataSofort(unittest.TestCase): + """PaymentMethodsMetadataSofort unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional): + """Test PaymentMethodsMetadataSofort + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # model = Monei.models.payment_methods_metadata_sofort.PaymentMethodsMetadataSofort() # noqa: E501 + if include_optional : + return PaymentMethodsMetadataSofort( + countries = ["AT","BE","DE","ES","IT","NL","CH","PL"] + ) + else : + return PaymentMethodsMetadataSofort( + ) + + def testPaymentMethodsMetadataSofort(self): + """Test PaymentMethodsMetadataSofort""" + inst_req_only = self.make_instance(include_optional=False) + inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_payment_methods_metadata_trustly.py b/test/test_payment_methods_metadata_trustly.py new file mode 100644 index 0000000..4caed0a --- /dev/null +++ b/test/test_payment_methods_metadata_trustly.py @@ -0,0 +1,52 @@ +# coding: utf-8 + +""" + MONEI API v1 + +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 + + The version of the OpenAPI document: 1.4.8 + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest +import datetime + +import Monei +from Monei.models.payment_methods_metadata_trustly import PaymentMethodsMetadataTrustly # noqa: E501 +from Monei.rest import ApiException + +class TestPaymentMethodsMetadataTrustly(unittest.TestCase): + """PaymentMethodsMetadataTrustly unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional): + """Test PaymentMethodsMetadataTrustly + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # model = Monei.models.payment_methods_metadata_trustly.PaymentMethodsMetadataTrustly() # noqa: E501 + if include_optional : + return PaymentMethodsMetadataTrustly( + countries = ["DE","DK","EE","ES","FI","GB","LT","LV","NL","NO","PL","SE","SK"] + ) + else : + return PaymentMethodsMetadataTrustly( + ) + + def testPaymentMethodsMetadataTrustly(self): + """Test PaymentMethodsMetadataTrustly""" + inst_req_only = self.make_instance(include_optional=False) + inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_payment_methods_methods.py b/test/test_payment_methods_methods.py new file mode 100644 index 0000000..3d78dca --- /dev/null +++ b/test/test_payment_methods_methods.py @@ -0,0 +1,35 @@ +""" + MONEI API v1 + +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 + + The version of the OpenAPI document: 1.5.0 + Generated by: https://openapi-generator.tech +""" + + +import sys +import unittest + +import Monei +from Monei.model.payment_methods_methods import PaymentMethodsMethods + + +class TestPaymentMethodsMethods(unittest.TestCase): + """PaymentMethodsMethods unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testPaymentMethodsMethods(self): + """Test PaymentMethodsMethods""" + # FIXME: construct object with mandatory attributes with example values + # model = PaymentMethodsMethods() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_register_apple_pay_domain_request.py b/test/test_register_apple_pay_domain_request.py new file mode 100644 index 0000000..10619bb --- /dev/null +++ b/test/test_register_apple_pay_domain_request.py @@ -0,0 +1,53 @@ +# coding: utf-8 + +""" + MONEI API v1 + +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 + + The version of the OpenAPI document: 1.4.8 + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest +import datetime + +import Monei +from Monei.models.register_apple_pay_domain_request import RegisterApplePayDomainRequest # noqa: E501 +from Monei.rest import ApiException + +class TestRegisterApplePayDomainRequest(unittest.TestCase): + """RegisterApplePayDomainRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional): + """Test RegisterApplePayDomainRequest + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # model = Monei.models.register_apple_pay_domain_request.RegisterApplePayDomainRequest() # noqa: E501 + if include_optional : + return RegisterApplePayDomainRequest( + domain_name = 'example.com' + ) + else : + return RegisterApplePayDomainRequest( + domain_name = 'example.com', + ) + + def testRegisterApplePayDomainRequest(self): + """Test RegisterApplePayDomainRequest""" + inst_req_only = self.make_instance(include_optional=False) + inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_send_payment_request_request.py b/test/test_send_payment_request_request.py new file mode 100644 index 0000000..fbbd8ed --- /dev/null +++ b/test/test_send_payment_request_request.py @@ -0,0 +1,54 @@ +# coding: utf-8 + +""" + MONEI API v1 + +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 + + The version of the OpenAPI document: 1.4.8 + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest +import datetime + +import Monei +from Monei.models.send_payment_request_request import SendPaymentRequestRequest # noqa: E501 +from Monei.rest import ApiException + +class TestSendPaymentRequestRequest(unittest.TestCase): + """SendPaymentRequestRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional): + """Test SendPaymentRequestRequest + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # model = Monei.models.send_payment_request_request.SendPaymentRequestRequest() # noqa: E501 + if include_optional : + return SendPaymentRequestRequest( + phone_number = '+34500000000', + language = 'en' + ) + else : + return SendPaymentRequestRequest( + phone_number = '+34500000000', + ) + + def testSendPaymentRequestRequest(self): + """Test SendPaymentRequestRequest""" + inst_req_only = self.make_instance(include_optional=False) + inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_send_subscription_link_request.py b/test/test_send_subscription_link_request.py new file mode 100644 index 0000000..1bcdb61 --- /dev/null +++ b/test/test_send_subscription_link_request.py @@ -0,0 +1,55 @@ +# coding: utf-8 + +""" + MONEI API v1 + +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 + + The version of the OpenAPI document: 1.4.8 + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest +import datetime + +import Monei +from Monei.models.send_subscription_link_request import SendSubscriptionLinkRequest # noqa: E501 +from Monei.rest import ApiException + +class TestSendSubscriptionLinkRequest(unittest.TestCase): + """SendSubscriptionLinkRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional): + """Test SendSubscriptionLinkRequest + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # model = Monei.models.send_subscription_link_request.SendSubscriptionLinkRequest() # noqa: E501 + if include_optional : + return SendSubscriptionLinkRequest( + customer_email = '0', + customer_phone = '0', + channel = 'email', + language = '0' + ) + else : + return SendSubscriptionLinkRequest( + ) + + def testSendSubscriptionLinkRequest(self): + """Test SendSubscriptionLinkRequest""" + inst_req_only = self.make_instance(include_optional=False) + inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_send_subscription_status_request.py b/test/test_send_subscription_status_request.py new file mode 100644 index 0000000..c271e51 --- /dev/null +++ b/test/test_send_subscription_status_request.py @@ -0,0 +1,55 @@ +# coding: utf-8 + +""" + MONEI API v1 + +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 + + The version of the OpenAPI document: 1.4.8 + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest +import datetime + +import Monei +from Monei.models.send_subscription_status_request import SendSubscriptionStatusRequest # noqa: E501 +from Monei.rest import ApiException + +class TestSendSubscriptionStatusRequest(unittest.TestCase): + """SendSubscriptionStatusRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional): + """Test SendSubscriptionStatusRequest + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # model = Monei.models.send_subscription_status_request.SendSubscriptionStatusRequest() # noqa: E501 + if include_optional : + return SendSubscriptionStatusRequest( + customer_email = '0', + customer_phone = '0', + channel = 'email', + language = '0' + ) + else : + return SendSubscriptionStatusRequest( + ) + + def testSendSubscriptionStatusRequest(self): + """Test SendSubscriptionStatusRequest""" + inst_req_only = self.make_instance(include_optional=False) + inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_subscription_retry_schedule.py b/test/test_subscription_retry_schedule.py new file mode 100644 index 0000000..6c433d3 --- /dev/null +++ b/test/test_subscription_retry_schedule.py @@ -0,0 +1,37 @@ +""" + MONEI API v1 + +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 + + The version of the OpenAPI document: 1.5.0 + Generated by: https://openapi-generator.tech +""" + + +import sys +import unittest + +import Monei +from Monei.model.subscription_retry_schedule_inner import SubscriptionRetryScheduleInner +globals()['SubscriptionRetryScheduleInner'] = SubscriptionRetryScheduleInner +from Monei.model.subscription_retry_schedule import SubscriptionRetrySchedule + + +class TestSubscriptionRetrySchedule(unittest.TestCase): + """SubscriptionRetrySchedule unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testSubscriptionRetrySchedule(self): + """Test SubscriptionRetrySchedule""" + # FIXME: construct object with mandatory attributes with example values + # model = SubscriptionRetrySchedule() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_subscription_retry_schedule_inner.py b/test/test_subscription_retry_schedule_inner.py new file mode 100644 index 0000000..75c6202 --- /dev/null +++ b/test/test_subscription_retry_schedule_inner.py @@ -0,0 +1,35 @@ +""" + MONEI API v1 + +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 + + The version of the OpenAPI document: 1.5.0 + Generated by: https://openapi-generator.tech +""" + + +import sys +import unittest + +import Monei +from Monei.model.subscription_retry_schedule_inner import SubscriptionRetryScheduleInner + + +class TestSubscriptionRetryScheduleInner(unittest.TestCase): + """SubscriptionRetryScheduleInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testSubscriptionRetryScheduleInner(self): + """Test SubscriptionRetryScheduleInner""" + # FIXME: construct object with mandatory attributes with example values + # model = SubscriptionRetryScheduleInner() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/tox.ini b/tox.ini index 7b2805f..9d0c844 100644 --- a/tox.ini +++ b/tox.ini @@ -1,5 +1,5 @@ [tox] -envlist = py27, py3 +envlist = py3 [testenv] deps=-r{toxinidir}/requirements.txt From 18e416c976b3c9b6dee534df009b903c7725b35c Mon Sep 17 00:00:00 2001 From: Dmitriy Date: Thu, 6 Mar 2025 14:55:00 +0100 Subject: [PATCH 02/13] Add uv support and update README with installation and testing instructions - Update .gitignore with uv-specific cache and environment directories - Expand README with uv installation and development workflow - Add testing section with pytest configuration and usage examples - Update test-requirements.txt with latest pytest dependencies --- .gitignore | 12 +++++++- .uv/uv.toml | 14 +++++++++ README.md | 58 ++++++++++++++++++++++++++++++++++++ main.py | 6 ++++ pyproject.toml | 54 +++++++++++++++++++++++++++++++++ pytest.ini | 12 ++++++++ requirements-lock.txt | 18 +++++++++++ test-requirements.txt | 4 ++- test/conftest.py | 64 ++++++++++++++++++++++++++++++++++++++++ test/test_client.py | 44 +++++++++++++++++++++++++++ test/test_main.py | 39 ++++++++++++++++++++++++ test/test_payments.py | 33 +++++++++++++++++++++ test/unit/test_client.py | 40 +++++++++++++++++++++++++ uv-dev.lock | 42 ++++++++++++++++++++++++++ uv.lock | 14 +++++++++ 15 files changed, 452 insertions(+), 2 deletions(-) create mode 100644 .uv/uv.toml create mode 100644 main.py create mode 100644 pyproject.toml create mode 100644 pytest.ini create mode 100644 requirements-lock.txt create mode 100644 test/conftest.py create mode 100644 test/test_client.py create mode 100644 test/test_main.py create mode 100644 test/test_payments.py create mode 100644 test/unit/test_client.py create mode 100644 uv-dev.lock create mode 100644 uv.lock diff --git a/.gitignore b/.gitignore index 4e13c70..b5294e1 100644 --- a/.gitignore +++ b/.gitignore @@ -81,4 +81,14 @@ test.py !/build/.yarn/plugins !/build/.yarn/releases !/build/.yarn/sdks -!/build/.yarn/versions \ No newline at end of file +!/build/.yarn/versions + +##### UV specific +.uv/.cache/ +.uv/.tmp/ +.uv/links/ +.uv/storage/ +.uv/indexes/ +.uv/network/ +.uv/pythons/ +.venv/ \ No newline at end of file diff --git a/.uv/uv.toml b/.uv/uv.toml new file mode 100644 index 0000000..59f4a00 --- /dev/null +++ b/.uv/uv.toml @@ -0,0 +1,14 @@ +[python] +python-version = "3.12" + +[venv] +location = ".venv" +use-local-python = true + +[install] +upgrade-strategy = "eager" + +[sync] +dev-groups = ["test", "lint"] +no-deps = false +index-url = "https://pypi.org/simple" diff --git a/README.md b/README.md index 173b854..f68a137 100644 --- a/README.md +++ b/README.md @@ -14,6 +14,42 @@ Python 2.7 and 3.4+ ## Installation & Usage +### Using uv (Recommended) + +[uv](https://github.com/astral-sh/uv) is a modern Python package installer and resolver that's significantly faster than pip. To install and use this package with uv: + +```sh +# Install uv if you don't have it yet +curl -sSf https://astral.sh/uv/install.sh | sh + +# Create a virtual environment and install the package +uv venv +uv pip install --upgrade Monei +``` + +For development: + +```sh +# Clone the repository +git clone https://github.com/monei/monei-python-sdk.git +cd monei-python-sdk + +# Create a virtual environment and install dependencies +uv venv +uv pip install -e . + +# Install development dependencies +uv pip install -e ".[test,lint]" + +# Create lock files +uv pip compile pyproject.toml -o uv.lock +uv pip compile pyproject.toml --extra test --extra lint -o uv-dev.lock + +# Sync dependencies using lock files +uv pip sync uv.lock # For production dependencies +uv pip sync uv-dev.lock # For development dependencies +``` + ### pip install If the python package is hosted on a repository, you can install directly using: @@ -83,3 +119,25 @@ except ApiException as e: ## Documentation for API Endpoints For more detailed information about this library and the full list of methods, please refer to [our documentation portal](https://docs.monei.com/api/). + +## Testing + +This project uses pytest for testing. The tests are automatically generated by the OpenAPI Generator, with additional tests for the main functionality. + +To run the tests: + +```sh +# Install test dependencies +uv pip install -e ".[test]" + +# Run all tests +python -m pytest + +# Run specific tests +python -m pytest test/test_main.py + +# Run tests with coverage +python -m pytest --cov=Monei +``` + +The test configuration is defined in `pytest.ini` and includes settings for test discovery, coverage reporting, and custom markers. diff --git a/main.py b/main.py new file mode 100644 index 0000000..a2808b8 --- /dev/null +++ b/main.py @@ -0,0 +1,6 @@ +def main(): + print("Hello from monei-python-sdk!") + + +if __name__ == "__main__": + main() diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..5de91ed --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,54 @@ +[project] +name = "monei-python-sdk" +version = "0.1.0" +description = "MONEI Python SDK" +readme = "README.md" +requires-python = ">=3.12" +license = { text = "MIT" } +authors = [{ name = "MONEI", email = "hi@monei.com" }] +maintainers = [{ name = "MONEI", email = "support@monei.com" }] +keywords = [ + "monei", + "monei pay", + "pay", + "payments", + "payment gateway", + "python", + "sdk", + "rest", + "api", +] +dependencies = [ + "urllib3>=1.25.3", + "python_dateutil>=2.5.3", + "setuptools>=21.0.0", + "six>=1.10", + "certifi", +] +classifiers = [ + "Development Status :: 5 - Production/Stable", + "Intended Audience :: Developers", + "License :: OSI Approved :: MIT License", + "Operating System :: OS Independent", + "Topic :: Software Development :: Libraries :: Python Modules", + "Programming Language :: Python :: 3.12", +] + +[build-system] +requires = ["hatchling"] +build-backend = "hatchling.build" + +[tool.hatch.build.targets.wheel] +packages = ["Monei"] + +[project.optional-dependencies] +test = ["pytest>=7.0.0", "pytest-cov>=4.0.0"] +lint = ["ruff>=0.1.0", "black>=23.0.0"] + +[tool.ruff] +line-length = 100 +target-version = "py312" + +[tool.black] +line-length = 100 +target-version = ["py312"] diff --git a/pytest.ini b/pytest.ini new file mode 100644 index 0000000..54abd12 --- /dev/null +++ b/pytest.ini @@ -0,0 +1,12 @@ +[pytest] +testpaths = test +python_files = test_*.py +python_classes = Test* +python_functions = test_* +addopts = --cov=Monei --cov-report=term --cov-report=xml:coverage.xml +markers = + unit: Unit tests + integration: Integration tests + api: API tests + slow: Slow running tests + e2e: End-to-end tests \ No newline at end of file diff --git a/requirements-lock.txt b/requirements-lock.txt new file mode 100644 index 0000000..49a5916 --- /dev/null +++ b/requirements-lock.txt @@ -0,0 +1,18 @@ +black==25.1.0 +certifi==2025.1.31 +click==8.1.8 +coverage==7.6.12 +iniconfig==2.0.0 +-e file:///Users/dmitriy/Work/MONEI/monei-python-sdk +mypy-extensions==1.0.0 +packaging==24.2 +pathspec==0.12.1 +platformdirs==4.3.6 +pluggy==1.5.0 +pytest==8.3.5 +pytest-cov==6.0.0 +python-dateutil==2.9.0.post0 +ruff==0.9.9 +setuptools==75.8.2 +six==1.17.0 +urllib3==2.3.0 diff --git a/test-requirements.txt b/test-requirements.txt index bb4f22b..ba4bd9d 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -1 +1,3 @@ -pytest-cov>=2.8.1 +pytest>=7.0.0 +pytest-cov>=4.0.0 +pytest-mock>=3.10.0 diff --git a/test/conftest.py b/test/conftest.py new file mode 100644 index 0000000..2bdaf30 --- /dev/null +++ b/test/conftest.py @@ -0,0 +1,64 @@ +""" +Pytest configuration file with fixtures for testing the MONEI Python SDK. +""" + +import pytest +from unittest.mock import MagicMock, patch + + +@pytest.fixture +def api_key(): + """Return a test API key.""" + return "test_api_key_12345" + + +@pytest.fixture +def monei_client(api_key): + """Return a MONEI client instance with a test API key.""" + # Import here to avoid circular imports + from Monei import MoneiClient + return MoneiClient(api_key=api_key) + + +@pytest.fixture +def mock_response(): + """Return a mock response object.""" + mock = MagicMock() + mock.status_code = 200 + mock.json.return_value = {"success": True} + return mock + + +@pytest.fixture +def mock_payment_response(): + """Return a mock payment response.""" + return { + "id": "pay_test123456789", + "amount": 1250, + "currency": "EUR", + "status": "COMPLETED", + "orderId": "order_123", + "description": "Test payment", + "customer": {"email": "test@example.com", "name": "Test Customer"}, + "createdAt": "2023-01-01T12:00:00.000Z", + "updatedAt": "2023-01-01T12:01:00.000Z", + } + + +@pytest.fixture +def mock_error_response(): + """Return a mock error response.""" + return { + "error": { + "code": "invalid_request", + "message": "Invalid request parameters", + "param": "amount", + } + } + + +@pytest.fixture +def mock_http_client(): + """Return a mock HTTP client.""" + with patch("Monei.api_client.ApiClient.request") as mock_request: + yield mock_request diff --git a/test/test_client.py b/test/test_client.py new file mode 100644 index 0000000..9fd1976 --- /dev/null +++ b/test/test_client.py @@ -0,0 +1,44 @@ +""" +Unit tests for the MONEI client. +""" + +import pytest +from unittest.mock import patch + + +class TestMoneiClient: + """Tests for the MoneiClient class.""" + + def test_client_initialization(self, api_key): + """Test that the client is initialized with the correct API key.""" + # Import here to avoid circular imports + from Monei import MoneiClient + client = MoneiClient(api_key=api_key) + assert client.api_key == api_key + assert client.api_client is not None + + def test_client_initialization_without_api_key(self): + """Test that an error is raised when no API key is provided.""" + # Import here to avoid circular imports + from Monei import MoneiClient + with pytest.raises(ValueError, match="API key is required"): + MoneiClient(api_key=None) + + @patch("Monei.api_client.ApiClient") + def test_client_with_custom_configuration(self, mock_api_client, api_key): + """Test that the client can be initialized with a custom configuration.""" + # Import here to avoid circular imports + from Monei import MoneiClient + MoneiClient( + api_key=api_key, + host="https://custom-api.monei.com", + ssl_ca_cert="/path/to/cert", + verify_ssl=False, + ) + + # Check that the configuration was passed to the API client + mock_api_client.assert_called_once() + config = mock_api_client.call_args[0][0] + assert config.host == "https://custom-api.monei.com" + assert config.ssl_ca_cert == "/path/to/cert" + assert config.verify_ssl is False \ No newline at end of file diff --git a/test/test_main.py b/test/test_main.py new file mode 100644 index 0000000..fe583c8 --- /dev/null +++ b/test/test_main.py @@ -0,0 +1,39 @@ +""" +Unit tests for the main.py file. +""" + +import io +import sys +from unittest.mock import patch + +from main import main + + +class TestMain: + """Tests for the main function.""" + + @patch("sys.stdout", new_callable=io.StringIO) + def test_main_output(self, mock_stdout): + """Test that the main function prints the expected output.""" + main() + assert mock_stdout.getvalue() == "Hello from monei-python-sdk!\n" + + @patch("main.main") + def test_main_is_called_when_script_is_run_directly(self, mock_main): + """Test that main() is called when the script is run directly.""" + # Store the original value of __name__ + original_name = sys.modules["main"].__name__ + + try: + # Set __name__ to "__main__" to simulate running the script directly + sys.modules["main"].__name__ = "__main__" + + # Re-execute the if block from main.py + if sys.modules["main"].__name__ == "__main__": + mock_main() + + # Check that main() was called + mock_main.assert_called_once() + finally: + # Restore the original value + sys.modules["main"].__name__ = original_name \ No newline at end of file diff --git a/test/test_payments.py b/test/test_payments.py new file mode 100644 index 0000000..a0ae9e4 --- /dev/null +++ b/test/test_payments.py @@ -0,0 +1,33 @@ +""" +Unit tests for the payments API. +""" + +from unittest.mock import MagicMock + + +class TestPaymentsApi: + """Tests for the payments API.""" + + def test_create_payment(self, monei_client, mock_payment_response, mock_http_client): + """Test creating a payment.""" + # Configure the mock to return a successful response + mock_response = MagicMock() + mock_response.data = mock_payment_response + mock_http_client.return_value = mock_response + + # Create a payment + payment_data = { + "amount": 1250, + "orderId": "100200000001", + "currency": "EUR", + "description": "Test payment", + "customer": {"email": "john.doe@monei.com", "name": "John Doe"}, + } + result = monei_client.payments.create(payment_data) + + # Check that the request was made correctly + mock_http_client.assert_called_once() + assert result == mock_payment_response + assert result["amount"] == 1250 + assert result["currency"] == "EUR" + assert result["status"] == "COMPLETED" \ No newline at end of file diff --git a/test/unit/test_client.py b/test/unit/test_client.py new file mode 100644 index 0000000..07fa912 --- /dev/null +++ b/test/unit/test_client.py @@ -0,0 +1,40 @@ +""" +Unit tests for the MONEI client. +""" + +import pytest +from unittest.mock import patch + +import Monei + + +class TestMoneiClient: + """Tests for the MoneiClient class.""" + + def test_client_initialization(self, api_key): + """Test that the client is initialized with the correct API key.""" + client = Monei.MoneiClient(api_key=api_key) + assert client.api_key == api_key + assert client.api_client is not None + + def test_client_initialization_without_api_key(self): + """Test that an error is raised when no API key is provided.""" + with pytest.raises(ValueError, match="API key is required"): + Monei.MoneiClient(api_key=None) + + @patch("Monei.api_client.ApiClient") + def test_client_with_custom_configuration(self, mock_api_client, api_key): + """Test that the client can be initialized with a custom configuration.""" + Monei.MoneiClient( + api_key=api_key, + host="https://custom-api.monei.com", + ssl_ca_cert="/path/to/cert", + verify_ssl=False, + ) + + # Check that the configuration was passed to the API client + mock_api_client.assert_called_once() + config = mock_api_client.call_args[0][0] + assert config.host == "https://custom-api.monei.com" + assert config.ssl_ca_cert == "/path/to/cert" + assert config.verify_ssl is False diff --git a/uv-dev.lock b/uv-dev.lock new file mode 100644 index 0000000..af8ea67 --- /dev/null +++ b/uv-dev.lock @@ -0,0 +1,42 @@ +# This file was autogenerated by uv via the following command: +# uv pip compile pyproject.toml --extra test --extra lint -o uv-dev.lock +black==25.1.0 + # via monei-python-sdk (pyproject.toml) +certifi==2025.1.31 + # via monei-python-sdk (pyproject.toml) +click==8.1.8 + # via black +coverage==7.6.12 + # via pytest-cov +iniconfig==2.0.0 + # via pytest +mypy-extensions==1.0.0 + # via black +packaging==24.2 + # via + # black + # pytest +pathspec==0.12.1 + # via black +platformdirs==4.3.6 + # via black +pluggy==1.5.0 + # via pytest +pytest==8.3.5 + # via + # monei-python-sdk (pyproject.toml) + # pytest-cov +pytest-cov==6.0.0 + # via monei-python-sdk (pyproject.toml) +python-dateutil==2.9.0.post0 + # via monei-python-sdk (pyproject.toml) +ruff==0.9.9 + # via monei-python-sdk (pyproject.toml) +setuptools==75.8.2 + # via monei-python-sdk (pyproject.toml) +six==1.17.0 + # via + # monei-python-sdk (pyproject.toml) + # python-dateutil +urllib3==2.3.0 + # via monei-python-sdk (pyproject.toml) diff --git a/uv.lock b/uv.lock new file mode 100644 index 0000000..dc78d0d --- /dev/null +++ b/uv.lock @@ -0,0 +1,14 @@ +# This file was autogenerated by uv via the following command: +# uv pip compile pyproject.toml -o uv.lock +certifi==2025.1.31 + # via monei-python-sdk (pyproject.toml) +python-dateutil==2.9.0.post0 + # via monei-python-sdk (pyproject.toml) +setuptools==75.8.2 + # via monei-python-sdk (pyproject.toml) +six==1.17.0 + # via + # monei-python-sdk (pyproject.toml) + # python-dateutil +urllib3==2.3.0 + # via monei-python-sdk (pyproject.toml) From d2e4209751335e7145f6ad667d09d1f2c4bee00e Mon Sep 17 00:00:00 2001 From: Dmitriy Date: Thu, 6 Mar 2025 15:11:29 +0100 Subject: [PATCH 03/13] Add MONEI Connect support with account ID and custom user agent - Enhance MoneiClient to support setting account ID for partners - Add validation for user agent when using account ID - Implement methods to set and remove account ID dynamically - Update README with MONEI Connect integration examples - Add test cases for account ID and user agent functionality --- Monei/__init__.py | 11 +- Monei/monei_client.py | 93 ++++++++-- README.md | 396 ++++++++++++++++++++++++++++++++++------ main.py | 32 ++++ test/test_account_id.py | 59 ++++++ 5 files changed, 510 insertions(+), 81 deletions(-) create mode 100644 test/test_account_id.py diff --git a/Monei/__init__.py b/Monei/__init__.py index 4dc34ca..b625189 100644 --- a/Monei/__init__.py +++ b/Monei/__init__.py @@ -1,12 +1,12 @@ # flake8: noqa """ - MONEI API v1 +MONEI API v1 -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - The version of the OpenAPI document: 1.5.0 - Generated by: https://openapi-generator.tech +The version of the OpenAPI document: 1.5.0 +Generated by: https://openapi-generator.tech """ @@ -25,5 +25,6 @@ from Monei.exceptions import ApiValueError from Monei.exceptions import ApiKeyError from Monei.exceptions import ApiException -# import custom MoneiClient + +# Import MoneiClient at the end to avoid circular imports from Monei.monei_client import MoneiClient diff --git a/Monei/monei_client.py b/Monei/monei_client.py index 742d74e..d7289e5 100644 --- a/Monei/monei_client.py +++ b/Monei/monei_client.py @@ -2,32 +2,96 @@ import hmac import hashlib -from Monei import Configuration, ApiClient, PaymentsApi, ApiException, SubscriptionsApi, ApplePayDomainApi, __version__ +# Import specific modules instead of importing from Monei +from Monei.configuration import Configuration +from Monei.api_client import ApiClient +from Monei.exceptions import ApiException +from Monei.api.payments_api import PaymentsApi +from Monei.api.subscriptions_api import SubscriptionsApi +from Monei.api.apple_pay_domain_api import ApplePayDomainApi +import Monei + + +DEFAULT_USER_AGENT = f"MONEI/Python/{Monei.__version__}" class MoneiClient(object): _default = None - def __init__(self, api_key=None, config=None): + def __init__(self, api_key=None, config=None, account_id=None, user_agent=None): + """Initialize the MONEI client + Args: + api_key (str): Your MONEI API key + config (Configuration, optional): Custom configuration + account_id (str, optional): The merchant's account ID to act on behalf of + user_agent (str, optional): Custom User-Agent string + """ self.api_key = api_key + self.account_id = account_id + self.user_agent = user_agent or DEFAULT_USER_AGENT self.config = config if config else Configuration() - self.config.api_key = { - 'Authorization': api_key - } + self.config.api_key = {"Authorization": api_key} # Enter a context with an instance of the API client with ApiClient(self.config) as api_client: - api_client.user_agent = "MONEI/Python/" + __version__ + # Set user agent + api_client.user_agent = self.user_agent + + # Set account ID if provided + if self.account_id: + # Validate that a custom user agent is set when using account ID + if self.user_agent == DEFAULT_USER_AGENT: + raise ApiException( + status=400, reason="User-Agent must be provided when using Account ID" + ) + api_client.set_default_header("MONEI-Account-ID", self.account_id) + + # Initialize API instances self.Payments = PaymentsApi(api_client) self.Subscriptions = SubscriptionsApi(api_client) self.ApplePayDomain = ApplePayDomainApi(api_client) + # Store the api_client for later use + self._api_client = api_client + # aliases self.payments = self.Payments + def set_account_id(self, account_id): + """Set the account ID to act on behalf of a merchant + + Args: + account_id (str): The merchant's account ID + + Raises: + ApiException: If trying to set account_id with default User-Agent + """ + # If setting accountId and using default User-Agent + if account_id and self.user_agent == DEFAULT_USER_AGENT: + raise ApiException(status=400, reason="User-Agent must be set before using Account ID") + + self.account_id = account_id + + # Update headers in api_client + if account_id: + self._api_client.set_default_header("MONEI-Account-ID", account_id) + else: + # Remove the header if account_id is None + if "MONEI-Account-ID" in self._api_client.default_headers: + del self._api_client.default_headers["MONEI-Account-ID"] + + def set_user_agent(self, user_agent): + """Set a custom User-Agent header + + Args: + user_agent (str): Custom User-Agent string + """ + self.user_agent = user_agent + self._api_client.user_agent = user_agent + def verify_signature(self, body, signature): """Verifies response signature :param body: string JSON content to be verified @@ -36,21 +100,18 @@ def verify_signature(self, body, signature): """ parts_dict = {} - signature_parts = signature.split(',') + signature_parts = signature.split(",") for part in signature_parts: - parts = part.split('=') + parts = part.split("=") parts_dict[parts[0]] = parts[1] calculated_hmac = hmac.new( - bytes(self.api_key, 'utf-8'), - msg=bytes('{}.{}'.format(parts_dict['t'], body), 'utf-8'), - digestmod=hashlib.sha256 + bytes(self.api_key, "utf-8"), + msg=bytes("{}.{}".format(parts_dict["t"], body), "utf-8"), + digestmod=hashlib.sha256, ).hexdigest() - if calculated_hmac != parts_dict['v1']: - raise ApiException( - status=401, - reason='[401] Signature verification failed' - ) + if calculated_hmac != parts_dict["v1"]: + raise ApiException(status=401, reason="[401] Signature verification failed") return json.loads(body) diff --git a/README.md b/README.md index f68a137..56b6217 100644 --- a/README.md +++ b/README.md @@ -4,15 +4,7 @@ The MONEI API is organized around [REST](https://en.wikipedia.org/wiki/Represent This library is intended to help you develop an integration around our API, by using the MONEI Python Client and it's methods. -## Docs in our portal - -**You can find the complete information and details in [our documentation portal](https://docs.monei.com/api/).** - -## Requirements - -Python 2.7 and 3.4+ - -## Installation & Usage +## Installation ### Using uv (Recommended) @@ -27,29 +19,6 @@ uv venv uv pip install --upgrade Monei ``` -For development: - -```sh -# Clone the repository -git clone https://github.com/monei/monei-python-sdk.git -cd monei-python-sdk - -# Create a virtual environment and install dependencies -uv venv -uv pip install -e . - -# Install development dependencies -uv pip install -e ".[test,lint]" - -# Create lock files -uv pip compile pyproject.toml -o uv.lock -uv pip compile pyproject.toml --extra test --extra lint -o uv-dev.lock - -# Sync dependencies using lock files -uv pip sync uv.lock # For production dependencies -uv pip sync uv-dev.lock # For development dependencies -``` - ### pip install If the python package is hosted on a repository, you can install directly using: @@ -64,61 +33,368 @@ Then import the package: import Monei ``` -### Setuptools +## Quick Start + +```python +import Monei +from Monei import ApiException +from pprint import pprint -Install via [Setuptools](http://pypi.python.org/pypi/setuptools). +# Initialize the client with your API key +monei = Monei.MoneiClient(api_key='YOUR_API_KEY') -```sh -python setup.py install --user +try: + # Create a payment + payment = monei.payments.create({ + 'amount': 1250, # 12.50€ + 'currency': 'EUR', + 'orderId': '123456', + 'description': 'Order #123456', + 'customer': { + 'email': 'customer@example.com', + 'name': 'John Doe' + } + }) + + print(f"Payment created with ID: {payment.id}") + print(f"Redirect URL: {payment.nextAction.redirectUrl}") + +except ApiException as e: + print(f"Error: {e}") ``` -(or `sudo python setup.py install` to install the package for all users) -Then import the package: +## Creating a Payment + +To create a payment, you need to provide the amount, currency, and other details: + +```python +payment = monei.payments.create({ + 'amount': 1250, # Amount in cents (12.50€) + 'currency': 'EUR', + 'orderId': '123456', + 'description': 'Order #123456', + 'completeUrl': 'https://example.com/complete', + 'cancelUrl': 'https://example.com/cancel', + 'callbackUrl': 'https://example.com/webhook', + 'customer': { + 'email': 'customer@example.com', + 'name': 'John Doe' + } +}) +``` + +### Hosted Payment Page Flow + +1. **Create a payment** + +```python +payment = monei.payments.create({ + 'amount': 1250, + 'currency': 'EUR', + 'orderId': '123456', + 'description': 'Order #123456', + 'completeUrl': 'https://example.com/complete', + 'cancelUrl': 'https://example.com/cancel', + 'callbackUrl': 'https://example.com/webhook' +}) +``` + +After creating a payment, you'll receive a response with a `nextAction.redirectUrl`. Redirect your customer to this URL to show them the MONEI Hosted payment page. + +2. **Customer completes the payment** + +The customer enters their payment information and completes any required verification steps (like 3D Secure). + +3. **Customer is redirected back to your website** + * If the customer completes the payment, they are redirected to the `completeUrl` with a `payment_id` query parameter + * If the customer cancels, they are redirected to the `cancelUrl` + +4. **Receive asynchronous notification** + +MONEI sends an HTTP POST request to your `callbackUrl` with the payment result. This ensures you receive the payment status even if the customer closes their browser during the redirect. + +For more information about the hosted payment page, visit the MONEI Hosted Payment Page documentation. + +## Webhooks + +Webhooks can be configured in the MONEI Dashboard → Settings → Webhooks. + +### Signature Verification + +When receiving webhooks from MONEI, you should verify the signature to ensure the request is authentic: + ```python import Monei +from flask import Flask, request, jsonify + +app = Flask(__name__) +monei = Monei.MoneiClient(api_key='YOUR_API_KEY') + +# Parse raw body for signature verification +@app.route('/webhook', methods=['POST']) +def webhook(): + try: + # Get the signature from the headers + signature = request.headers.get('monei-signature') + + # Verify the signature and get the decoded payload + payload = monei.verify_signature(request.data.decode('utf-8'), signature) + + # Process the webhook + event_type = payload['type'] + + # The data field contains the Payment object + payment = payload['object'] + + # Access Payment object properties directly + payment_id = payment['id'] + amount = payment['amount'] + currency = payment['currency'] + status = payment['status'] + + # Handle the event based on its type + if event_type == 'payment.succeeded': + # Handle successful payment + print(f"Payment {payment_id} succeeded: {amount/100} {currency}") + elif event_type == 'payment.failed': + # Handle failed payment + print(f"Payment {payment_id} failed with status: {status}") + # Handle other event types + + return jsonify({'received': True}), 200 + except Exception as e: + print(f"Webhook signature verification failed: {e}") + return jsonify({'error': 'Invalid signature'}), 401 + +if __name__ == '__main__': + app.run(port=3000) ``` -## Authorization +### Handling Payment Callbacks + +MONEI sends an HTTP POST request to your `callbackUrl` with the payment result. This ensures you receive the payment status even if the customer closes their browser during the redirect. + +Example of handling the callback in a Flask server: + +```python +from Monei.model.payment_status import PaymentStatus + +@app.route('/checkout/callback', methods=['POST']) +def callback(): + signature = request.headers.get('monei-signature') + + try: + # Verify the signature + payment = monei.verify_signature(request.data.decode('utf-8'), signature) + + # Update your order status based on the payment status + # Could be PaymentStatus.AUTHORIZED for pre-authorization payments + if payment['status'] == PaymentStatus.SUCCEEDED: + # Payment successful - fulfill the order + pass + elif payment['status'] == PaymentStatus.FAILED: + # Payment failed - notify the customer + pass + + # Acknowledge receipt of the webhook + return jsonify({'received': True}), 200 + except Exception as e: + print(f"Invalid webhook signature: {e}") + return jsonify({'error': 'Invalid signature'}), 401 +``` + +#### Important Notes About Webhooks + +1. Always verify the signature to ensure the webhook is coming from MONEI +2. Use the raw request body for signature verification +3. Return a 2xx status code to acknowledge receipt of the webhook +4. Process webhooks asynchronously for time-consuming operations +5. Implement idempotency to handle duplicate webhook events + +For more information about webhooks, visit the MONEI Webhooks documentation. -The MONEI API uses API key to authenticate requests. You can view and manage your API key in the [MONEI Dashboard](https://dashboard.monei.com/settings/api). +## MONEI Connect for Partners -For more information about this process, please refer to [our documentation portal](https://docs.monei.com/api/#section/Authentication). +If you're a partner or platform integrating with MONEI, you can act on behalf of your merchants by providing their Account ID. This is part of MONEI Connect, which allows platforms to manage multiple merchant accounts. +**Important:** When using Account ID functionality, you must: +1. Use a partner API key (not a regular merchant API key) +2. Provide a custom User-Agent to identify your platform -## Getting Started +For more information about MONEI Connect and becoming a partner, visit the MONEI Connect documentation. -Please follow the [installation procedure](#installation--usage) and then run the following: +### Account ID + +#### Setting Account ID in the constructor ```python import Monei from Monei import ApiException -from pprint import pprint -# Instantiate the client using the API key -monei = Monei.MoneiClient(api_key='YOUR_API_KEY') +# Initialize with Account ID and User-Agent using a partner API key +monei = Monei.MoneiClient( + api_key='pk_partner_test_...', + account_id='merchant_account_id', + user_agent='MONEI/YourPlatform/1.0.0' +) +# Make API calls on behalf of the merchant try: - # Create Payment - result = monei.payments.create({ - 'amount': 1250, # 12.50€ - 'orderId': '100200000001', - 'currency': 'EUR', - 'description': 'Items description', - 'customer': { - 'email': 'john.doe@monei.com', - 'name': 'John Doe' - } + payment = monei.payments.create({ + 'orderId': '12345', + 'amount': 1100, + 'currency': 'EUR' }) - pprint(result) + print(payment) except ApiException as e: - print("Error while creating payment: %s\n" % e) + print(f"Error: {e}") +``` +#### Setting Account ID after initialization + +```python +import Monei +from Monei import ApiException + +# Initialize with a partner API key +monei = Monei.MoneiClient(api_key='pk_partner_test_...') + +# Set User-Agent for your platform (required before setting Account ID) +monei.set_user_agent('MONEI/YourPlatform/1.0.0') + +# Set Account ID to act on behalf of a merchant +monei.set_account_id('merchant_account_id') + +# Make API calls on behalf of the merchant +try: + payment = monei.payments.create({ + 'orderId': '12345', + 'amount': 1100, + 'currency': 'EUR' + }) + print(payment) +except ApiException as e: + print(f"Error: {e}") + +# Remove Account ID to stop acting on behalf of the merchant +monei.set_account_id(None) +``` + +### Custom User-Agent + +You can set a custom User-Agent to identify your application or platform. This is required when using Account ID. + +When integrating as a MONEI Connect partner, your User-Agent should follow this format: + +``` +MONEI// +``` + +For example: `MONEI/YourPlatform/1.0.0` + +This format helps MONEI identify your platform in API requests and is required when using the Partner API Key. + +```python +import Monei +from Monei import ApiException + +# Set User-Agent in constructor with proper format +monei = Monei.MoneiClient( + api_key='pk_partner_test_...', + user_agent='MONEI/YourPlatform/1.0.0' +) + +# Or set it after initialization +monei.set_user_agent('MONEI/YourPlatform/1.0.0') ``` -## Documentation for API Endpoints +#### Examples with Proper User-Agent Format -For more detailed information about this library and the full list of methods, please refer to [our documentation portal](https://docs.monei.com/api/). +```python +import Monei +from Monei import ApiException + +# For a platform named "ShopManager" with version 2.1.0 +monei = Monei.MoneiClient( + api_key='pk_partner_test_...', + account_id='merchant_account_id', + user_agent='MONEI/ShopManager/2.1.0' +) + +# For a platform named "PaymentHub" with version 3.0.1 +monei.set_user_agent('MONEI/PaymentHub/3.0.1') +``` + +### Managing Multiple Merchant Accounts + +```python +import Monei +from Monei import ApiException +import time + +# Initialize with a partner API key +monei = Monei.MoneiClient( + api_key='pk_partner_test_...', + user_agent='MONEI/YourPlatform/1.0.0' +) + +# Function to process payments for multiple merchants +def process_payments_for_merchants(merchant_accounts): + results = {} + + for merchant_id in merchant_accounts: + # Set the current merchant account + monei.set_account_id(merchant_id) + + # Process payment for this merchant + try: + payment = monei.payments.create({ + 'orderId': f'order-{merchant_id}-{int(time.time())}', + 'amount': 1000, + 'currency': 'EUR' + }) + + results[merchant_id] = {'success': True, 'payment': payment} + except ApiException as e: + results[merchant_id] = {'success': False, 'error': str(e)} + + return results + +# Example usage +merchant_accounts = ['merchant_1', 'merchant_2', 'merchant_3'] +results = process_payments_for_merchants(merchant_accounts) +print(results) +``` + +## Documentation + +For the full documentation, check our [Documentation portal](https://docs.monei.com/api/). + +## Development + +For development: + +```sh +# Clone the repository +git clone https://github.com/monei/monei-python-sdk.git +cd monei-python-sdk + +# Create a virtual environment and install dependencies +uv venv +uv pip install -e . + +# Install development dependencies +uv pip install -e ".[test,lint]" + +# Create lock files +uv pip compile pyproject.toml -o uv.lock +uv pip compile pyproject.toml --extra test --extra lint -o uv-dev.lock + +# Sync dependencies using lock files +uv pip sync uv.lock # For production dependencies +uv pip sync uv-dev.lock # For development dependencies +``` ## Testing diff --git a/main.py b/main.py index a2808b8..6e154dd 100644 --- a/main.py +++ b/main.py @@ -1,6 +1,38 @@ +from Monei import MoneiClient, ApiException + + def main(): print("Hello from monei-python-sdk!") + # Example of using the SDK with accountId and user agent + try: + # Initialize the client with API key only + client = MoneiClient(api_key="YOUR_API_KEY") + print(f"Initialized client with default user agent: {client.user_agent}") + + # Set a custom user agent + client.set_user_agent("YourApp/1.0.0 (contact@example.com)") + print(f"Updated user agent: {client.user_agent}") + + # Set an account ID to act on behalf of a merchant + client.set_account_id("MERCHANT_ACCOUNT_ID") + print(f"Set account ID: {client.account_id}") + + # Now all API calls will be made on behalf of the merchant + # For example: + # payment = client.payments.create({ + # 'amount': 1250, + # 'currency': 'EUR', + # 'description': 'Order from platform', + # }) + + # Remove the account ID to make calls as the platform again + client.set_account_id(None) + print("Removed account ID") + + except ApiException as e: + print(f"Error: {e}") + if __name__ == "__main__": main() diff --git a/test/test_account_id.py b/test/test_account_id.py new file mode 100644 index 0000000..37e7ebd --- /dev/null +++ b/test/test_account_id.py @@ -0,0 +1,59 @@ +import unittest +import pytest +from Monei import MoneiClient, ApiException + + +class TestAccountId(unittest.TestCase): + """Test case for accountId and user agent functionality""" + + def test_init_with_account_id_no_user_agent(self): + """Test initialization with account_id but no custom user_agent""" + with pytest.raises(ApiException) as excinfo: + MoneiClient(api_key="test_key", account_id="test_account_id") + assert "User-Agent must be provided when using Account ID" in str(excinfo.value) + + def test_init_with_account_id_and_user_agent(self): + """Test initialization with account_id and custom user_agent""" + client = MoneiClient( + api_key="test_key", account_id="test_account_id", user_agent="TestApp/1.0.0" + ) + assert client.account_id == "test_account_id" + assert client.user_agent == "TestApp/1.0.0" + assert client._api_client.default_headers["User-Agent"] == "TestApp/1.0.0" + assert client._api_client.default_headers["MONEI-Account-ID"] == "test_account_id" + + def test_set_account_id_no_user_agent(self): + """Test setting account_id without custom user_agent""" + client = MoneiClient(api_key="test_key") + with pytest.raises(ApiException) as excinfo: + client.set_account_id("test_account_id") + assert "User-Agent must be set before using Account ID" in str(excinfo.value) + + def test_set_account_id_with_user_agent(self): + """Test setting account_id with custom user_agent""" + client = MoneiClient(api_key="test_key", user_agent="TestApp/1.0.0") + client.set_account_id("test_account_id") + assert client.account_id == "test_account_id" + assert client._api_client.default_headers["MONEI-Account-ID"] == "test_account_id" + + def test_set_user_agent(self): + """Test setting user_agent""" + client = MoneiClient(api_key="test_key") + client.set_user_agent("TestApp/1.0.0") + assert client.user_agent == "TestApp/1.0.0" + assert client._api_client.default_headers["User-Agent"] == "TestApp/1.0.0" + + def test_remove_account_id(self): + """Test removing account_id""" + client = MoneiClient( + api_key="test_key", account_id="test_account_id", user_agent="TestApp/1.0.0" + ) + assert "MONEI-Account-ID" in client._api_client.default_headers + + client.set_account_id(None) + assert client.account_id is None + assert "MONEI-Account-ID" not in client._api_client.default_headers + + +if __name__ == "__main__": + unittest.main() From 32faacd4b6e6954e5872bad0da77d293cc4a4a2d Mon Sep 17 00:00:00 2001 From: Dmitriy Date: Thu, 6 Mar 2025 16:55:54 +0100 Subject: [PATCH 04/13] Set up project configuration and build scripts for MONEI Python SDK - Add package.json with build and release scripts - Configure OpenAPI generator with config.json and openapitools.json - Create post-build and release shell scripts - Update .gitignore for Yarn and project-specific files - Add .yarnrc.yml to configure node modules linking --- .gitignore | 16 +- build/.yarnrc.yml => .yarnrc.yml | 0 build/config.json => config.json | 0 build/openapitools.json => openapitools.json | 0 build/package.json => package.json | 0 build/post-build.sh => post-build.sh | 0 build/release.sh => release.sh | 0 build/yarn.lock => yarn.lock | 227 +++++-------------- 8 files changed, 63 insertions(+), 180 deletions(-) rename build/.yarnrc.yml => .yarnrc.yml (100%) rename build/config.json => config.json (100%) rename build/openapitools.json => openapitools.json (100%) rename build/package.json => package.json (100%) rename build/post-build.sh => post-build.sh (100%) rename build/release.sh => release.sh (100%) rename build/yarn.lock => yarn.lock (94%) diff --git a/.gitignore b/.gitignore index b5294e1..5bd592d 100644 --- a/.gitignore +++ b/.gitignore @@ -69,19 +69,19 @@ target/ ##### MONEI Custom -build/node_modules/ -build/openapi.json +node_modules/ +openapi.json test.py .idea # Yarn -/build/.yarn/* -!/build/.yarn/patches -!/build/.yarn/plugins -!/build/.yarn/releases -!/build/.yarn/sdks -!/build/.yarn/versions +.yarn/* +!.yarn/patches +!.yarn/plugins +!.yarn/releases +!.yarn/sdks +!.yarn/versions ##### UV specific .uv/.cache/ diff --git a/build/.yarnrc.yml b/.yarnrc.yml similarity index 100% rename from build/.yarnrc.yml rename to .yarnrc.yml diff --git a/build/config.json b/config.json similarity index 100% rename from build/config.json rename to config.json diff --git a/build/openapitools.json b/openapitools.json similarity index 100% rename from build/openapitools.json rename to openapitools.json diff --git a/build/package.json b/package.json similarity index 100% rename from build/package.json rename to package.json diff --git a/build/post-build.sh b/post-build.sh similarity index 100% rename from build/post-build.sh rename to post-build.sh diff --git a/build/release.sh b/release.sh similarity index 100% rename from build/release.sh rename to release.sh diff --git a/build/yarn.lock b/yarn.lock similarity index 94% rename from build/yarn.lock rename to yarn.lock index d2eb1ad..72ca62a 100644 --- a/build/yarn.lock +++ b/yarn.lock @@ -6,29 +6,20 @@ __metadata: cacheKey: 10c0 "@babel/code-frame@npm:^7.0.0": - version: 7.18.6 - resolution: "@babel/code-frame@npm:7.18.6" + version: 7.26.2 + resolution: "@babel/code-frame@npm:7.26.2" dependencies: - "@babel/highlight": "npm:^7.18.6" - checksum: 10c0/e3966f2717b7ebd9610524730e10b75ee74154f62617e5e115c97dbbbabc5351845c9aa850788012cb4d9aee85c3dc59fe6bef36690f244e8dcfca34bd35e9c9 - languageName: node - linkType: hard - -"@babel/helper-validator-identifier@npm:^7.18.6": - version: 7.19.1 - resolution: "@babel/helper-validator-identifier@npm:7.19.1" - checksum: 10c0/f978ecfea840f65b64ab9e17fac380625a45f4fe1361eeb29867fcfd1c9eaa72abd7023f2f40ac3168587d7e5153660d16cfccb352a557be2efd347a051b4b20 + "@babel/helper-validator-identifier": "npm:^7.25.9" + js-tokens: "npm:^4.0.0" + picocolors: "npm:^1.0.0" + checksum: 10c0/7d79621a6849183c415486af99b1a20b84737e8c11cd55b6544f688c51ce1fd710e6d869c3dd21232023da272a79b91efb3e83b5bc2dc65c1187c5fcd1b72ea8 languageName: node linkType: hard -"@babel/highlight@npm:^7.18.6": - version: 7.18.6 - resolution: "@babel/highlight@npm:7.18.6" - dependencies: - "@babel/helper-validator-identifier": "npm:^7.18.6" - chalk: "npm:^2.0.0" - js-tokens: "npm:^4.0.0" - checksum: 10c0/a6a6928d25099ef04c337fcbb829fab8059bb67d31ac37212efd611bdbe247d0e71a5096c4524272cb56399f40251fac57c025e42d3bc924db0183a6435a60ac +"@babel/helper-validator-identifier@npm:^7.25.9": + version: 7.25.9 + resolution: "@babel/helper-validator-identifier@npm:7.25.9" + checksum: 10c0/4fc6f830177b7b7e887ad3277ddb3b91d81e6c4a24151540d9d1023e8dc6b1c0505f0f0628ae653601eb4388a8db45c1c14b2c07a9173837aef7e4116456259d languageName: node linkType: hard @@ -658,15 +649,6 @@ __metadata: languageName: node linkType: hard -"ansi-styles@npm:^3.2.1": - version: 3.2.1 - resolution: "ansi-styles@npm:3.2.1" - dependencies: - color-convert: "npm:^1.9.0" - checksum: 10c0/ece5a8ef069fcc5298f67e3f4771a663129abd174ea2dfa87923a2be2abf6cd367ef72ac87942da00ce85bd1d651d4cd8595aebdb1b385889b89b205860e977b - languageName: node - linkType: hard - "ansi-styles@npm:^4.0.0, ansi-styles@npm:^4.1.0": version: 4.3.0 resolution: "ansi-styles@npm:4.3.0" @@ -886,17 +868,6 @@ __metadata: languageName: node linkType: hard -"chalk@npm:^2.0.0": - version: 2.4.2 - resolution: "chalk@npm:2.4.2" - dependencies: - ansi-styles: "npm:^3.2.1" - escape-string-regexp: "npm:^1.0.5" - supports-color: "npm:^5.3.0" - checksum: 10c0/e6543f02ec877732e3a2d1c3c3323ddb4d39fbab687c23f526e25bd4c6a9bf3b83a696e8c769d078e04e5754921648f7821b2a2acfd16c550435fd630026e073 - languageName: node - linkType: hard - "chardet@npm:^0.7.0": version: 0.7.0 resolution: "chardet@npm:0.7.0" @@ -969,14 +940,7 @@ __metadata: languageName: node linkType: hard -"cli-spinners@npm:^2.5.0": - version: 2.7.0 - resolution: "cli-spinners@npm:2.7.0" - checksum: 10c0/5c781ace5c8f304ae4d138837f19cf88f03a97de3c3e388f9d1d6434146f06f6ce2a161d6237b3bb86448a05fbcbb20084f3fea96077e42a655b273e39c6f08d - languageName: node - linkType: hard - -"cli-spinners@npm:^2.9.2": +"cli-spinners@npm:^2.5.0, cli-spinners@npm:^2.9.2": version: 2.9.2 resolution: "cli-spinners@npm:2.9.2" checksum: 10c0/907a1c227ddf0d7a101e7ab8b300affc742ead4b4ebe920a5bf1bc6d45dce2958fcd195eb28fa25275062fe6fa9b109b93b63bc8033396ed3bcb50297008b3a3 @@ -1015,15 +979,6 @@ __metadata: languageName: node linkType: hard -"color-convert@npm:^1.9.0": - version: 1.9.3 - resolution: "color-convert@npm:1.9.3" - dependencies: - color-name: "npm:1.1.3" - checksum: 10c0/5ad3c534949a8c68fca8fbc6f09068f435f0ad290ab8b2f76841b9e6af7e0bb57b98cb05b0e19fe33f5d91e5a8611ad457e5f69e0a484caad1f7487fd0e8253c - languageName: node - linkType: hard - "color-convert@npm:^2.0.1": version: 2.0.1 resolution: "color-convert@npm:2.0.1" @@ -1033,13 +988,6 @@ __metadata: languageName: node linkType: hard -"color-name@npm:1.1.3": - version: 1.1.3 - resolution: "color-name@npm:1.1.3" - checksum: 10c0/566a3d42cca25b9b3cd5528cd7754b8e89c0eb646b7f214e8e2eaddb69994ac5f0557d9c175eb5d8f0ad73531140d9c47525085ee752a91a2ab15ab459caf6d6 - languageName: node - linkType: hard - "color-name@npm:~1.1.4": version: 1.1.4 resolution: "color-name@npm:1.1.4" @@ -1151,13 +1099,13 @@ __metadata: linkType: hard "cross-spawn@npm:^7.0.3": - version: 7.0.3 - resolution: "cross-spawn@npm:7.0.3" + version: 7.0.6 + resolution: "cross-spawn@npm:7.0.6" dependencies: path-key: "npm:^3.1.0" shebang-command: "npm:^2.0.0" which: "npm:^2.0.1" - checksum: 10c0/5738c312387081c98d69c98e105b6327b069197f864a60593245d64c8089c8a0a744e16349281210d56835bb9274130d825a78b2ad6853ca13cfbeffc0c31750 + checksum: 10c0/053ea8b2135caff68a9e81470e845613e374e7309a47731e81639de3eaeb90c3d01af0e0b44d2ab9d50b43467223b88567dfeb3262db942dc063b9976718ffc1 languageName: node linkType: hard @@ -1197,19 +1145,7 @@ __metadata: languageName: node linkType: hard -"debug@npm:4": - version: 4.3.4 - resolution: "debug@npm:4.3.4" - dependencies: - ms: "npm:2.1.2" - peerDependenciesMeta: - supports-color: - optional: true - checksum: 10c0/cedbec45298dd5c501d01b92b119cd3faebe5438c3917ff11ae1bff86a6c722930ac9c8659792824013168ba6db7c4668225d845c633fbdafbbf902a6389f736 - languageName: node - linkType: hard - -"debug@npm:^4.3.4": +"debug@npm:4, debug@npm:^4.3.4": version: 4.4.0 resolution: "debug@npm:4.4.0" dependencies: @@ -1246,11 +1182,11 @@ __metadata: linkType: hard "defaults@npm:^1.0.3": - version: 1.0.3 - resolution: "defaults@npm:1.0.3" + version: 1.0.4 + resolution: "defaults@npm:1.0.4" dependencies: clone: "npm:^1.0.2" - checksum: 10c0/c9ba6718eb293fa701652e28967b87102fc13d8e33997748191ad8ed3b2235714bd3661e8505bed06994e6b4604a1281c35462ec328c2bbedd79ebbf7e82adb2 + checksum: 10c0/9cfbe498f5c8ed733775db62dfd585780387d93c17477949e1670bfcfb9346e0281ce8c4bf9f4ac1fc0f9b851113bd6dc9e41182ea1644ccd97de639fa13c35a languageName: node linkType: hard @@ -1577,11 +1513,11 @@ __metadata: linkType: hard "fastq@npm:^1.6.0": - version: 1.13.0 - resolution: "fastq@npm:1.13.0" + version: 1.19.1 + resolution: "fastq@npm:1.19.1" dependencies: reusify: "npm:^1.0.4" - checksum: 10c0/76c7b5dafb93c7e74359a3e6de834ce7a7c2e3a3184050ed4cb652661de55cf8d4895178d8d3ccd23069395056c7bb15450660d38fb382ca88c142b22694d7c9 + checksum: 10c0/ebc6e50ac7048daaeb8e64522a1ea7a26e92b3cee5cd1c7f2316cdca81ba543aa40a136b53891446ea5c3a67ec215fbaca87ad405f102dd97012f62916905630 languageName: node linkType: hard @@ -1652,13 +1588,6 @@ __metadata: languageName: node linkType: hard -"function-bind@npm:^1.1.1": - version: 1.1.1 - resolution: "function-bind@npm:1.1.1" - checksum: 10c0/60b74b2407e1942e1ed7f8c284f8ef714d0689dcfce5319985a5b7da3fc727f40b4a59ec72dc55aa83365ad7b8fa4fac3a30d93c850a2b452f29ae03dbc10a1e - languageName: node - linkType: hard - "function-bind@npm:^1.1.2": version: 1.1.2 resolution: "function-bind@npm:1.1.2" @@ -1820,27 +1749,20 @@ __metadata: languageName: node linkType: hard -"graceful-fs@npm:4.2.10, graceful-fs@npm:^4.1.6, graceful-fs@npm:^4.2.0": +"graceful-fs@npm:4.2.10": version: 4.2.10 resolution: "graceful-fs@npm:4.2.10" checksum: 10c0/4223a833e38e1d0d2aea630c2433cfb94ddc07dfc11d511dbd6be1d16688c5be848acc31f9a5d0d0ddbfb56d2ee5a6ae0278aceeb0ca6a13f27e06b9956fb952 languageName: node linkType: hard -"graceful-fs@npm:^4.2.11": +"graceful-fs@npm:^4.1.6, graceful-fs@npm:^4.2.0, graceful-fs@npm:^4.2.11": version: 4.2.11 resolution: "graceful-fs@npm:4.2.11" checksum: 10c0/386d011a553e02bc594ac2ca0bd6d9e4c22d7fa8cfbfc448a6d148c59ea881b092db9dbe3547ae4b88e55f1b01f7c4a2ecc53b310c042793e63aa44cf6c257f2 languageName: node linkType: hard -"has-flag@npm:^3.0.0": - version: 3.0.0 - resolution: "has-flag@npm:3.0.0" - checksum: 10c0/1c6c83b14b8b1b3c25b0727b8ba3e3b647f99e9e6e13eb7322107261de07a4c1be56fc0d45678fc376e09772a3a1642ccdaf8fc69bdf123b6c086598397ce473 - languageName: node - linkType: hard - "has-flag@npm:^4.0.0": version: 4.0.0 resolution: "has-flag@npm:4.0.0" @@ -1848,14 +1770,7 @@ __metadata: languageName: node linkType: hard -"has-symbols@npm:^1.0.3": - version: 1.0.3 - resolution: "has-symbols@npm:1.0.3" - checksum: 10c0/e6922b4345a3f37069cdfe8600febbca791c94988c01af3394d86ca3360b4b93928bbf395859158f88099cb10b19d98e3bbab7c9ff2c1bd09cf665ee90afa2c3 - languageName: node - linkType: hard - -"has-symbols@npm:^1.1.0": +"has-symbols@npm:^1.0.3, has-symbols@npm:^1.1.0": version: 1.1.0 resolution: "has-symbols@npm:1.1.0" checksum: 10c0/dde0a734b17ae51e84b10986e651c664379018d10b91b6b0e9b293eddb32f0f069688c841fb40f19e9611546130153e0a2a48fd7f512891fb000ddfa36f5a20e @@ -1871,15 +1786,6 @@ __metadata: languageName: node linkType: hard -"has@npm:^1.0.3": - version: 1.0.3 - resolution: "has@npm:1.0.3" - dependencies: - function-bind: "npm:^1.1.1" - checksum: 10c0/e1da0d2bd109f116b632f27782cf23182b42f14972ca9540e4c5aa7e52647407a0a4a76937334fddcb56befe94a3494825ec22b19b51f5e5507c3153fd1a5e1b - languageName: node - linkType: hard - "hasown@npm:^2.0.2": version: 2.0.2 resolution: "hasown@npm:2.0.2" @@ -2079,12 +1985,12 @@ __metadata: languageName: node linkType: hard -"is-core-module@npm:^2.9.0": - version: 2.10.0 - resolution: "is-core-module@npm:2.10.0" +"is-core-module@npm:^2.16.0": + version: 2.16.1 + resolution: "is-core-module@npm:2.16.1" dependencies: - has: "npm:^1.0.3" - checksum: 10c0/af7c3b24cb3375688a84306dcfa71c9305fd03af6548aaeb51ed345f85abafe22e071835b3a5f4bb1e87b434404410ec31ee45749f617a7acf2a4dcb9f677ae7 + hasown: "npm:^2.0.2" + checksum: 10c0/898443c14780a577e807618aaae2b6f745c8538eca5c7bc11388a3f2dc6de82b9902bcc7eb74f07be672b11bbe82dd6a6edded44a00cb3d8f933d0459905eedd languageName: node linkType: hard @@ -2517,9 +2423,9 @@ __metadata: linkType: hard "minimist@npm:^1.2.0": - version: 1.2.6 - resolution: "minimist@npm:1.2.6" - checksum: 10c0/d0b566204044481c4401abbd24cc75814e753b37268e7fe7ccc78612bf3e37bf1e45a6c43fb0b119445ea1c413c000bde013f320b7211974f2f49bcbec1d0dbf + version: 1.2.8 + resolution: "minimist@npm:1.2.8" + checksum: 10c0/19d3fcdca050087b84c2029841a093691a91259a47def2f18222f41e7645a0b7c44ef4b40e88a1e58a40c84d2ef0ee6047c55594d298146d0eb3f6b737c20ce6 languageName: node linkType: hard @@ -2547,13 +2453,6 @@ __metadata: languageName: unknown linkType: soft -"ms@npm:2.1.2": - version: 2.1.2 - resolution: "ms@npm:2.1.2" - checksum: 10c0/a437714e2f90dbf881b5191d35a6db792efbca5badf112f87b9e1c712aace4b4b9b742dd6537f3edf90fd6f684de897cec230abde57e87883766712ddda297cc - languageName: node - linkType: hard - "ms@npm:^2.1.3": version: 2.1.3 resolution: "ms@npm:2.1.3" @@ -2897,6 +2796,13 @@ __metadata: languageName: node linkType: hard +"picocolors@npm:^1.0.0": + version: 1.1.1 + resolution: "picocolors@npm:1.1.1" + checksum: 10c0/e2e3e8170ab9d7c7421969adaa7e1b31434f789afb9b3f115f6b96d91945041ac3ceb02e9ec6fe6510ff036bcc0bf91e69a1772edc0b707e12b19c0f2d6bcf58 + languageName: node + linkType: hard + "picomatch@npm:^2.3.1": version: 2.3.1 resolution: "picomatch@npm:2.3.1" @@ -2920,20 +2826,13 @@ __metadata: languageName: node linkType: hard -"protocols@npm:^2.0.0": +"protocols@npm:^2.0.0, protocols@npm:^2.0.1": version: 2.0.2 resolution: "protocols@npm:2.0.2" checksum: 10c0/b87d78c1fcf038d33691da28447ce94011d5c7f0c7fd25bcb5fb4d975991c99117873200c84f4b6a9d7f8b9092713a064356236960d1473a7d6fcd4228897b60 languageName: node linkType: hard -"protocols@npm:^2.0.1": - version: 2.0.1 - resolution: "protocols@npm:2.0.1" - checksum: 10c0/016cc58a596e401004a028a2f7005e3444bf89ee8f606409c411719374d1e8bba0464fc142a065cce0d19f41669b2f7ffe25a8bde4f16ce3b6eb01fabc51f2e7 - languageName: node - linkType: hard - "proxy-agent@npm:6.5.0": version: 6.5.0 resolution: "proxy-agent@npm:6.5.0" @@ -2988,13 +2887,13 @@ __metadata: linkType: hard "readable-stream@npm:^3.4.0": - version: 3.6.0 - resolution: "readable-stream@npm:3.6.0" + version: 3.6.2 + resolution: "readable-stream@npm:3.6.2" dependencies: inherits: "npm:^2.0.3" string_decoder: "npm:^1.1.1" util-deprecate: "npm:^1.0.1" - checksum: 10c0/937bedd29ac8a68331666291922bea892fa2be1a33269e582de9f844a2002f146cf831e39cd49fe6a378d3f0c27358f259ed0e20d20f0bdc6a3f8fc21fce42dc + checksum: 10c0/e37be5c79c376fdd088a45fa31ea2e423e5d48854be7a22a58869b4e84d25047b193f6acb54f1012331e1bcd667ffb569c01b99d36b0bd59658fb33f513511b7 languageName: node linkType: hard @@ -3089,28 +2988,28 @@ __metadata: linkType: hard "resolve@npm:^1.1.6": - version: 1.22.1 - resolution: "resolve@npm:1.22.1" + version: 1.22.10 + resolution: "resolve@npm:1.22.10" dependencies: - is-core-module: "npm:^2.9.0" + is-core-module: "npm:^2.16.0" path-parse: "npm:^1.0.7" supports-preserve-symlinks-flag: "npm:^1.0.0" bin: resolve: bin/resolve - checksum: 10c0/6d58b1cb40f3fc80b9e45dd799d84cdc3829a993e4b9fa3b59d331e1dfacd0870e1851f4d0eb549d68c796e0b7087b43d1aec162653ccccff9e18191221a6e7d + checksum: 10c0/8967e1f4e2cc40f79b7e080b4582b9a8c5ee36ffb46041dccb20e6461161adf69f843b43067b4a375de926a2cd669157e29a29578191def399dd5ef89a1b5203 languageName: node linkType: hard "resolve@patch:resolve@npm%3A^1.1.6#optional!builtin": - version: 1.22.1 - resolution: "resolve@patch:resolve@npm%3A1.22.1#optional!builtin::version=1.22.1&hash=c3c19d" + version: 1.22.10 + resolution: "resolve@patch:resolve@npm%3A1.22.10#optional!builtin::version=1.22.10&hash=c3c19d" dependencies: - is-core-module: "npm:^2.9.0" + is-core-module: "npm:^2.16.0" path-parse: "npm:^1.0.7" supports-preserve-symlinks-flag: "npm:^1.0.0" bin: resolve: bin/resolve - checksum: 10c0/0d8ccceba5537769c42aa75e4aa75ae854aac866a11d7e9ffdb1663f0158ee646a0d48fc2818ed5e7fb364d64220a1fb9092a160e11e00cbdd5fbab39a13092c + checksum: 10c0/52a4e505bbfc7925ac8f4cd91fd8c4e096b6a89728b9f46861d3b405ac9a1ccf4dcbf8befb4e89a2e11370dacd0160918163885cbc669369590f2f31f4c58939 languageName: node linkType: hard @@ -3142,9 +3041,9 @@ __metadata: linkType: hard "reusify@npm:^1.0.4": - version: 1.0.4 - resolution: "reusify@npm:1.0.4" - checksum: 10c0/c19ef26e4e188f408922c46f7ff480d38e8dfc55d448310dfb518736b23ed2c4f547fb64a6ed5bdba92cd7e7ddc889d36ff78f794816d5e71498d645ef476107 + version: 1.1.0 + resolution: "reusify@npm:1.1.0" + checksum: 10c0/4eff0d4a5f9383566c7d7ec437b671cc51b25963bd61bf127c3f3d3f68e44a026d99b8d2f1ad344afff8d278a8fe70a8ea092650a716d22287e8bef7126bb2fa languageName: node linkType: hard @@ -3420,15 +3319,6 @@ __metadata: languageName: node linkType: hard -"supports-color@npm:^5.3.0": - version: 5.5.0 - resolution: "supports-color@npm:5.5.0" - dependencies: - has-flag: "npm:^3.0.0" - checksum: 10c0/6ae5ff319bfbb021f8a86da8ea1f8db52fac8bd4d499492e30ec17095b58af11f0c55f8577390a749b1c4dde691b6a0315dab78f5f54c9b3d83f8fb5905c1c05 - languageName: node - linkType: hard - "supports-color@npm:^7.1.0": version: 7.2.0 resolution: "supports-color@npm:7.2.0" @@ -3495,7 +3385,7 @@ __metadata: languageName: node linkType: hard -"tslib@npm:2.8.1": +"tslib@npm:2.8.1, tslib@npm:^2.0.1, tslib@npm:^2.1.0": version: 2.8.1 resolution: "tslib@npm:2.8.1" checksum: 10c0/9c4759110a19c53f992d9aae23aac5ced636e99887b51b9e61def52611732872ff7668757d4e4c61f19691e36f4da981cd9485e869b4a7408d689f6bf1f14e62 @@ -3509,13 +3399,6 @@ __metadata: languageName: node linkType: hard -"tslib@npm:^2.0.1, tslib@npm:^2.1.0": - version: 2.4.0 - resolution: "tslib@npm:2.4.0" - checksum: 10c0/eb19bda3ae545b03caea6a244b34593468e23d53b26bf8649fbc20fce43e9b21a71127fd6d2b9662c0fe48ee6ff668ead48fd00d3b88b2b716b1c12edae25b5d - languageName: node - linkType: hard - "type-fest@npm:^0.21.3": version: 0.21.3 resolution: "type-fest@npm:0.21.3" From a49159d821322ab4be1487b40d9f87f05d64ff4a Mon Sep 17 00:00:00 2001 From: Dmitriy Date: Thu, 6 Mar 2025 18:12:12 +0100 Subject: [PATCH 05/13] Refactor project structure and remove deprecated files - Remove deprecated model and test files from Monei/model and test directories - Consolidate models in Monei/models directory - Update OpenAPI generator version to 7.12.0 - Remove unused scripts and lock files - Update configuration and test settings --- .cursor/rules/general.mdc | 5 + .github/workflows/python.yml | 31 + .openapi-generator/FILES | 189 +- .openapi-generator/VERSION | 2 +- Monei/__init__.py | 112 +- Monei/api/__init__.py | 12 +- Monei/api/apple_pay_domain_api.py | 459 +- Monei/api/bizum_api.py | 459 +- Monei/api/payment_methods_api.py | 461 +- Monei/api/payments_api.py | 4435 +++++++++++------ Monei/api/subscriptions_api.py | 3952 ++++++++++----- Monei/api_client.py | 1223 +++-- Monei/api_response.py | 21 + Monei/apis/__init__.py | 21 - Monei/configuration.py | 330 +- Monei/exceptions.py | 120 +- Monei/model/__init__.py | 5 - Monei/model/activate_subscription_request.py | 291 -- Monei/model/address.py | 283 -- .../apple_pay_domain_register200_response.py | 263 - .../apple_pay_domain_register400_response.py | 335 -- .../apple_pay_domain_register401_response.py | 335 -- .../apple_pay_domain_register404_response.py | 335 -- .../apple_pay_domain_register422_response.py | 335 -- .../apple_pay_domain_register500_response.py | 335 -- .../apple_pay_domain_register503_response.py | 335 -- .../model/bizum_validate_phone200_response.py | 263 - Monei/model/cancel_payment_request.py | 269 - Monei/model/cancel_subscription_request.py | 263 - Monei/model/capture_payment_request.py | 263 - Monei/model/card.py | 283 -- Monei/model/confirm_payment_request.py | 305 -- .../confirm_payment_request_payment_method.py | 269 - ...irm_payment_request_payment_method_card.py | 267 - Monei/model/create_payment_request.py | 389 -- Monei/model/create_subscription_request.py | 339 -- Monei/model/domain_register200_response.py | 263 - Monei/model/error.py | 293 -- Monei/model/pause_subscription_request.py | 267 - Monei/model/payment.py | 411 -- Monei/model/payment_billing_details.py | 289 -- Monei/model/payment_cancellation_reason.py | 291 -- Monei/model/payment_customer.py | 271 - Monei/model/payment_last_refund_reason.py | 291 -- Monei/model/payment_message_channel.py | 291 -- Monei/model/payment_message_language.py | 295 -- Monei/model/payment_methods.py | 303 -- Monei/model/payment_methods_metadata.py | 363 -- .../model/payment_methods_metadata_alipay.py | 263 - .../payment_methods_metadata_apple_pay.py | 263 - .../payment_methods_metadata_bancontact.py | 263 - Monei/model/payment_methods_metadata_bizum.py | 263 - Monei/model/payment_methods_metadata_blik.py | 263 - Monei/model/payment_methods_metadata_card.py | 263 - .../payment_methods_metadata_click_to_pay.py | 289 -- ..._methods_metadata_click_to_pay_discover.py | 267 - ...ethods_metadata_click_to_pay_mastercard.py | 267 - ...ment_methods_metadata_click_to_pay_visa.py | 267 - Monei/model/payment_methods_metadata_eps.py | 263 - .../model/payment_methods_metadata_giropay.py | 263 - .../payment_methods_metadata_google_pay.py | 267 - .../model/payment_methods_metadata_i_deal.py | 263 - .../model/payment_methods_metadata_klarna.py | 263 - Monei/model/payment_methods_metadata_mbway.py | 263 - Monei/model/payment_methods_metadata_sepa.py | 263 - .../model/payment_methods_metadata_sofort.py | 263 - .../model/payment_methods_metadata_trustly.py | 263 - Monei/model/payment_methods_methods.py | 286 -- Monei/model/payment_next_action.py | 278 -- Monei/model/payment_payment_method.py | 338 -- Monei/model/payment_payment_method_bizum.py | 263 - .../payment_payment_method_bizum_input.py | 263 - Monei/model/payment_payment_method_card.py | 327 -- .../payment_payment_method_card_input.py | 283 -- Monei/model/payment_payment_method_cofidis.py | 263 - Monei/model/payment_payment_method_input.py | 275 - Monei/model/payment_payment_method_klarna.py | 285 -- Monei/model/payment_payment_method_mbway.py | 263 - Monei/model/payment_payment_method_paypal.py | 263 - Monei/model/payment_payment_method_sepa.py | 295 -- Monei/model/payment_payment_method_trustly.py | 263 - Monei/model/payment_payment_methods.py | 286 -- Monei/model/payment_refund_reason.py | 291 -- Monei/model/payment_sequence.py | 284 -- Monei/model/payment_sequence_recurring.py | 267 - Monei/model/payment_session_details.py | 327 -- Monei/model/payment_shipping_details.py | 289 -- Monei/model/payment_shop.py | 267 - Monei/model/payment_status.py | 296 -- Monei/model/payment_trace_details.py | 335 -- Monei/model/payment_transaction_type.py | 284 -- Monei/model/recurring_payment_request.py | 313 -- Monei/model/refund_payment_request.py | 273 - .../register_apple_pay_domain_request.py | 269 - Monei/model/register_domain_request.py | 269 - Monei/model/send_payment_link_request.py | 283 -- Monei/model/send_payment_receipt_request.py | 283 -- Monei/model/send_payment_request_request.py | 279 -- Monei/model/send_subscription_link_request.py | 279 -- .../model/send_subscription_status_request.py | 279 -- Monei/model/subscription.py | 405 -- Monei/model/subscription_interval.py | 292 -- Monei/model/subscription_last_payment.py | 281 -- Monei/model/subscription_payment_method.py | 276 - .../model/subscription_payment_method_card.py | 300 -- Monei/model/subscription_retry_schedule.py | 291 -- .../subscription_retry_schedule_inner.py | 285 -- Monei/model/subscription_status.py | 295 -- Monei/model/update_subscription_request.py | 333 -- Monei/model/validate_bizum_phone_request.py | 279 -- Monei/model_utils.py | 2058 -------- Monei/models/__init__.py | 192 +- Monei/models/activate_subscription_request.py | 389 +- Monei/models/address.py | 327 +- .../apple_pay_domain_register200_response.py | 87 + .../bizum_validate_phone200_response.py | 87 + Monei/models/cancel_payment_request.py | 156 +- Monei/models/cancel_subscription_request.py | 157 +- Monei/models/capture_payment_request.py | 157 +- Monei/models/card.py | 262 - Monei/models/confirm_payment_request.py | 370 +- .../confirm_payment_request_payment_method.py | 163 +- ...irm_payment_request_payment_method_card.py | 199 +- Monei/models/create_payment_request.py | 915 +--- Monei/models/create_subscription_request.py | 589 +-- Monei/models/error.py | 303 +- Monei/models/inline_object.py | 122 - Monei/models/inline_response200.py | 120 - Monei/models/inline_response2001.py | 120 - Monei/models/pause_subscription_request.py | 199 +- Monei/models/payment.py | 1098 +--- Monei/models/payment_billing_details.py | 329 +- Monei/models/payment_cancellation_reason.py | 101 +- Monei/models/payment_customer.py | 229 +- Monei/models/payment_last_refund_reason.py | 101 +- Monei/models/payment_message_channel.py | 101 +- Monei/models/payment_message_language.py | 109 +- Monei/models/payment_methods.py | 440 +- Monei/models/payment_methods_metadata.py | 696 +-- .../models/payment_methods_metadata_alipay.py | 157 +- .../payment_methods_metadata_apple_pay.py | 157 +- .../payment_methods_metadata_bancontact.py | 157 +- .../models/payment_methods_metadata_bizum.py | 157 +- Monei/models/payment_methods_metadata_blik.py | 157 +- Monei/models/payment_methods_metadata_card.py | 157 +- .../payment_methods_metadata_click_to_pay.py | 303 +- ..._methods_metadata_click_to_pay_discover.py | 195 +- ...ethods_metadata_click_to_pay_mastercard.py | 195 +- ...ment_methods_metadata_click_to_pay_visa.py | 195 +- Monei/models/payment_methods_metadata_eps.py | 157 +- .../payment_methods_metadata_giropay.py | 157 +- .../payment_methods_metadata_google_pay.py | 199 +- .../models/payment_methods_metadata_i_deal.py | 157 +- .../models/payment_methods_metadata_klarna.py | 157 +- .../models/payment_methods_metadata_mbway.py | 157 +- Monei/models/payment_methods_metadata_sepa.py | 157 +- .../models/payment_methods_metadata_sofort.py | 157 +- .../payment_methods_metadata_trustly.py | 157 +- Monei/models/payment_next_action.py | 245 +- Monei/models/payment_payment_method.py | 486 +- Monei/models/payment_payment_method_bizum.py | 157 +- .../payment_payment_method_bizum_input.py | 157 +- Monei/models/payment_payment_method_card.py | 543 +- .../payment_payment_method_card_input.py | 327 +- .../models/payment_payment_method_cofidis.py | 157 +- Monei/models/payment_payment_method_input.py | 211 +- Monei/models/payment_payment_method_klarna.py | 227 +- Monei/models/payment_payment_method_mbway.py | 157 +- Monei/models/payment_payment_method_paypal.py | 157 +- Monei/models/payment_payment_method_sepa.py | 419 +- .../models/payment_payment_method_trustly.py | 157 +- Monei/models/payment_refund_reason.py | 101 +- Monei/models/payment_sequence.py | 221 +- Monei/models/payment_sequence_recurring.py | 199 +- Monei/models/payment_session_details.py | 659 +-- Monei/models/payment_shipping_details.py | 329 +- Monei/models/payment_shop.py | 199 +- Monei/models/payment_status.py | 111 +- Monei/models/payment_trace_details.py | 719 +-- Monei/models/payment_transaction_type.py | 103 +- Monei/models/recurring_payment_request.py | 431 +- Monei/models/refund_payment_request.py | 198 +- .../register_apple_pay_domain_request.py | 158 +- Monei/models/register_domain_request.py | 123 - Monei/models/send_payment_link_request.py | 265 +- Monei/models/send_payment_receipt_request.py | 265 +- Monei/models/send_payment_request.py | 149 - Monei/models/send_payment_request_request.py | 199 +- .../models/send_subscription_link_request.py | 283 +- .../send_subscription_status_request.py | 283 +- Monei/models/subscription.py | 1101 +--- Monei/models/subscription_interval.py | 103 +- Monei/models/subscription_last_payment.py | 266 +- Monei/models/subscription_payment_method.py | 225 +- .../subscription_payment_method_card.py | 389 +- .../subscription_retry_schedule_inner.py | 97 + Monei/models/subscription_status.py | 109 +- Monei/models/update_subscription_request.py | 616 +-- Monei/models/validate_bizum_phone_request.py | 231 +- Monei/monei_client.py | 11 + Monei/py.typed | 0 Monei/rest.py | 378 +- config.json | 5 +- main.py | 38 - openapitools.json | 22 +- package.json | 6 +- post-build.sh | 3 - pyproject.toml | 129 +- pytest.ini | 7 +- requirements.txt | 7 +- scripts/build.sh | 14 + scripts/post-build.sh | 3 + release.sh => scripts/release.sh | 0 test-requirements.txt | 9 +- test/conftest.py | 107 +- test/test_account_id.py | 59 - test/test_activate_subscription_request.py | 48 +- test/test_address.py | 43 +- test/test_api_client_integration.py | 160 + test/test_apple_pay_domain_api.py | 24 +- test/test_apple_pay_domain_api_integration.py | 75 + ...t_apple_pay_domain_register200_response.py | 40 +- ...t_apple_pay_domain_register400_response.py | 37 - ...t_apple_pay_domain_register401_response.py | 37 - ...t_apple_pay_domain_register404_response.py | 37 - ...t_apple_pay_domain_register422_response.py | 37 - ...t_apple_pay_domain_register500_response.py | 37 - ...t_apple_pay_domain_register503_response.py | 37 - test/test_bizum_api.py | 24 +- test/test_bizum_api_integration.py | 60 + test/test_bizum_validate_phone200_response.py | 40 +- test/test_cancel_payment_request.py | 33 +- test/test_cancel_subscription_request.py | 33 +- test/test_capture_payment_request.py | 35 +- test/test_card.py | 55 - test/test_client.py | 44 - test/test_confirm_payment_request.py | 80 +- ..._confirm_payment_request_payment_method.py | 33 +- ...irm_payment_request_payment_method_card.py | 35 +- test/test_create_payment_request.py | 136 +- test/test_create_subscription_request.py | 76 +- test/test_domain_register200_response.py | 35 - test/test_error.py | 46 +- test/test_inline_object.py | 52 - test/test_inline_response200.py | 52 - test/test_inline_response2001.py | 52 - test/test_main.py | 39 - test/test_monei_client.py | 113 + test/test_pause_subscription_request.py | 35 +- test/test_payment.py | 232 +- test/test_payment_billing_details.py | 46 +- test/test_payment_cancellation_reason.py | 32 +- test/test_payment_customer.py | 39 +- test/test_payment_last_refund_reason.py | 32 +- test/test_payment_message_channel.py | 32 +- test/test_payment_message_language.py | 32 +- test/test_payment_methods.py | 49 +- test/test_payment_methods_api.py | 24 +- test/test_payment_methods_api_integration.py | 133 + test/test_payment_methods_metadata.py | 65 +- test/test_payment_methods_metadata_alipay.py | 33 +- ...test_payment_methods_metadata_apple_pay.py | 33 +- ...est_payment_methods_metadata_bancontact.py | 33 +- test/test_payment_methods_metadata_bizum.py | 33 +- test/test_payment_methods_metadata_blik.py | 33 +- test/test_payment_methods_metadata_card.py | 33 +- ...t_payment_methods_metadata_click_to_pay.py | 41 +- ..._methods_metadata_click_to_pay_discover.py | 35 +- ...ethods_metadata_click_to_pay_mastercard.py | 35 +- ...ment_methods_metadata_click_to_pay_visa.py | 35 +- test/test_payment_methods_metadata_eps.py | 33 +- test/test_payment_methods_metadata_giropay.py | 33 +- ...est_payment_methods_metadata_google_pay.py | 35 +- test/test_payment_methods_metadata_i_deal.py | 33 +- test/test_payment_methods_metadata_klarna.py | 33 +- test/test_payment_methods_metadata_mbway.py | 33 +- test/test_payment_methods_metadata_sepa.py | 33 +- test/test_payment_methods_metadata_sofort.py | 33 +- test/test_payment_methods_metadata_trustly.py | 33 +- test/test_payment_methods_methods.py | 35 - test/test_payment_next_action.py | 33 +- test/test_payment_payment_method.py | 73 +- test/test_payment_payment_method_bizum.py | 35 +- ...test_payment_payment_method_bizum_input.py | 35 +- test/test_payment_payment_method_card.py | 50 +- .../test_payment_payment_method_card_input.py | 43 +- test/test_payment_payment_method_cofidis.py | 35 +- test/test_payment_payment_method_input.py | 47 +- test/test_payment_payment_method_klarna.py | 37 +- test/test_payment_payment_method_mbway.py | 35 +- test/test_payment_payment_method_paypal.py | 35 +- test/test_payment_payment_method_sepa.py | 51 +- test/test_payment_payment_method_trustly.py | 35 +- test/test_payment_payment_methods.py | 35 - test/test_payment_refund_reason.py | 32 +- test/test_payment_sequence.py | 37 +- test/test_payment_sequence_recurring.py | 35 +- test/test_payment_session_details.py | 62 +- test/test_payment_shipping_details.py | 46 +- test/test_payment_shop.py | 35 +- test/test_payment_status.py | 32 +- test/test_payment_trace_details.py | 64 +- test/test_payment_transaction_type.py | 32 +- test/test_payments.py | 33 - test/test_payments_api.py | 69 +- test/test_payments_api_example.py | 15 + test/test_payments_api_integration.py | 232 + test/test_recurring_payment_request.py | 80 +- test/test_refund_payment_request.py | 35 +- .../test_register_apple_pay_domain_request.py | 33 +- test/test_register_domain_request.py | 53 - test/test_send_payment_link_request.py | 37 +- test/test_send_payment_receipt_request.py | 37 +- test/test_send_payment_request.py | 53 - test/test_send_payment_request_request.py | 35 +- test/test_send_subscription_link_request.py | 41 +- test/test_send_subscription_status_request.py | 41 +- test/test_subscription.py | 120 +- test/test_subscription_interval.py | 32 +- test/test_subscription_last_payment.py | 41 +- test/test_subscription_payment_method.py | 41 +- test/test_subscription_payment_method_card.py | 45 +- test/test_subscription_retry_schedule.py | 37 - .../test_subscription_retry_schedule_inner.py | 43 +- test/test_subscription_status.py | 32 +- test/test_subscriptions_api.py | 62 +- test/test_subscriptions_api_integration.py | 226 + test/test_update_subscription_request.py | 75 +- test/test_validate_bizum_phone_request.py | 37 +- test/unit/test_client.py | 40 - uv-dev.lock | 42 - uv.lock | 292 +- yarn.lock | 219 +- 333 files changed, 17657 insertions(+), 53076 deletions(-) create mode 100644 .cursor/rules/general.mdc create mode 100644 .github/workflows/python.yml create mode 100644 Monei/api_response.py delete mode 100644 Monei/apis/__init__.py delete mode 100644 Monei/model/__init__.py delete mode 100644 Monei/model/activate_subscription_request.py delete mode 100644 Monei/model/address.py delete mode 100644 Monei/model/apple_pay_domain_register200_response.py delete mode 100644 Monei/model/apple_pay_domain_register400_response.py delete mode 100644 Monei/model/apple_pay_domain_register401_response.py delete mode 100644 Monei/model/apple_pay_domain_register404_response.py delete mode 100644 Monei/model/apple_pay_domain_register422_response.py delete mode 100644 Monei/model/apple_pay_domain_register500_response.py delete mode 100644 Monei/model/apple_pay_domain_register503_response.py delete mode 100644 Monei/model/bizum_validate_phone200_response.py delete mode 100644 Monei/model/cancel_payment_request.py delete mode 100644 Monei/model/cancel_subscription_request.py delete mode 100644 Monei/model/capture_payment_request.py delete mode 100644 Monei/model/card.py delete mode 100644 Monei/model/confirm_payment_request.py delete mode 100644 Monei/model/confirm_payment_request_payment_method.py delete mode 100644 Monei/model/confirm_payment_request_payment_method_card.py delete mode 100644 Monei/model/create_payment_request.py delete mode 100644 Monei/model/create_subscription_request.py delete mode 100644 Monei/model/domain_register200_response.py delete mode 100644 Monei/model/error.py delete mode 100644 Monei/model/pause_subscription_request.py delete mode 100644 Monei/model/payment.py delete mode 100644 Monei/model/payment_billing_details.py delete mode 100644 Monei/model/payment_cancellation_reason.py delete mode 100644 Monei/model/payment_customer.py delete mode 100644 Monei/model/payment_last_refund_reason.py delete mode 100644 Monei/model/payment_message_channel.py delete mode 100644 Monei/model/payment_message_language.py delete mode 100644 Monei/model/payment_methods.py delete mode 100644 Monei/model/payment_methods_metadata.py delete mode 100644 Monei/model/payment_methods_metadata_alipay.py delete mode 100644 Monei/model/payment_methods_metadata_apple_pay.py delete mode 100644 Monei/model/payment_methods_metadata_bancontact.py delete mode 100644 Monei/model/payment_methods_metadata_bizum.py delete mode 100644 Monei/model/payment_methods_metadata_blik.py delete mode 100644 Monei/model/payment_methods_metadata_card.py delete mode 100644 Monei/model/payment_methods_metadata_click_to_pay.py delete mode 100644 Monei/model/payment_methods_metadata_click_to_pay_discover.py delete mode 100644 Monei/model/payment_methods_metadata_click_to_pay_mastercard.py delete mode 100644 Monei/model/payment_methods_metadata_click_to_pay_visa.py delete mode 100644 Monei/model/payment_methods_metadata_eps.py delete mode 100644 Monei/model/payment_methods_metadata_giropay.py delete mode 100644 Monei/model/payment_methods_metadata_google_pay.py delete mode 100644 Monei/model/payment_methods_metadata_i_deal.py delete mode 100644 Monei/model/payment_methods_metadata_klarna.py delete mode 100644 Monei/model/payment_methods_metadata_mbway.py delete mode 100644 Monei/model/payment_methods_metadata_sepa.py delete mode 100644 Monei/model/payment_methods_metadata_sofort.py delete mode 100644 Monei/model/payment_methods_metadata_trustly.py delete mode 100644 Monei/model/payment_methods_methods.py delete mode 100644 Monei/model/payment_next_action.py delete mode 100644 Monei/model/payment_payment_method.py delete mode 100644 Monei/model/payment_payment_method_bizum.py delete mode 100644 Monei/model/payment_payment_method_bizum_input.py delete mode 100644 Monei/model/payment_payment_method_card.py delete mode 100644 Monei/model/payment_payment_method_card_input.py delete mode 100644 Monei/model/payment_payment_method_cofidis.py delete mode 100644 Monei/model/payment_payment_method_input.py delete mode 100644 Monei/model/payment_payment_method_klarna.py delete mode 100644 Monei/model/payment_payment_method_mbway.py delete mode 100644 Monei/model/payment_payment_method_paypal.py delete mode 100644 Monei/model/payment_payment_method_sepa.py delete mode 100644 Monei/model/payment_payment_method_trustly.py delete mode 100644 Monei/model/payment_payment_methods.py delete mode 100644 Monei/model/payment_refund_reason.py delete mode 100644 Monei/model/payment_sequence.py delete mode 100644 Monei/model/payment_sequence_recurring.py delete mode 100644 Monei/model/payment_session_details.py delete mode 100644 Monei/model/payment_shipping_details.py delete mode 100644 Monei/model/payment_shop.py delete mode 100644 Monei/model/payment_status.py delete mode 100644 Monei/model/payment_trace_details.py delete mode 100644 Monei/model/payment_transaction_type.py delete mode 100644 Monei/model/recurring_payment_request.py delete mode 100644 Monei/model/refund_payment_request.py delete mode 100644 Monei/model/register_apple_pay_domain_request.py delete mode 100644 Monei/model/register_domain_request.py delete mode 100644 Monei/model/send_payment_link_request.py delete mode 100644 Monei/model/send_payment_receipt_request.py delete mode 100644 Monei/model/send_payment_request_request.py delete mode 100644 Monei/model/send_subscription_link_request.py delete mode 100644 Monei/model/send_subscription_status_request.py delete mode 100644 Monei/model/subscription.py delete mode 100644 Monei/model/subscription_interval.py delete mode 100644 Monei/model/subscription_last_payment.py delete mode 100644 Monei/model/subscription_payment_method.py delete mode 100644 Monei/model/subscription_payment_method_card.py delete mode 100644 Monei/model/subscription_retry_schedule.py delete mode 100644 Monei/model/subscription_retry_schedule_inner.py delete mode 100644 Monei/model/subscription_status.py delete mode 100644 Monei/model/update_subscription_request.py delete mode 100644 Monei/model/validate_bizum_phone_request.py delete mode 100644 Monei/model_utils.py create mode 100644 Monei/models/apple_pay_domain_register200_response.py create mode 100644 Monei/models/bizum_validate_phone200_response.py delete mode 100644 Monei/models/card.py delete mode 100644 Monei/models/inline_object.py delete mode 100644 Monei/models/inline_response200.py delete mode 100644 Monei/models/inline_response2001.py delete mode 100644 Monei/models/register_domain_request.py delete mode 100644 Monei/models/send_payment_request.py create mode 100644 Monei/models/subscription_retry_schedule_inner.py create mode 100644 Monei/py.typed delete mode 100644 main.py delete mode 100755 post-build.sh create mode 100755 scripts/build.sh create mode 100755 scripts/post-build.sh rename release.sh => scripts/release.sh (100%) delete mode 100644 test/test_account_id.py create mode 100644 test/test_api_client_integration.py create mode 100644 test/test_apple_pay_domain_api_integration.py delete mode 100644 test/test_apple_pay_domain_register400_response.py delete mode 100644 test/test_apple_pay_domain_register401_response.py delete mode 100644 test/test_apple_pay_domain_register404_response.py delete mode 100644 test/test_apple_pay_domain_register422_response.py delete mode 100644 test/test_apple_pay_domain_register500_response.py delete mode 100644 test/test_apple_pay_domain_register503_response.py create mode 100644 test/test_bizum_api_integration.py delete mode 100644 test/test_card.py delete mode 100644 test/test_client.py delete mode 100644 test/test_domain_register200_response.py delete mode 100644 test/test_inline_object.py delete mode 100644 test/test_inline_response200.py delete mode 100644 test/test_inline_response2001.py delete mode 100644 test/test_main.py create mode 100644 test/test_monei_client.py create mode 100644 test/test_payment_methods_api_integration.py delete mode 100644 test/test_payment_methods_methods.py delete mode 100644 test/test_payment_payment_methods.py delete mode 100644 test/test_payments.py create mode 100644 test/test_payments_api_example.py create mode 100644 test/test_payments_api_integration.py delete mode 100644 test/test_register_domain_request.py delete mode 100644 test/test_send_payment_request.py delete mode 100644 test/test_subscription_retry_schedule.py create mode 100644 test/test_subscriptions_api_integration.py delete mode 100644 test/unit/test_client.py delete mode 100644 uv-dev.lock diff --git a/.cursor/rules/general.mdc b/.cursor/rules/general.mdc new file mode 100644 index 0000000..e9c39be --- /dev/null +++ b/.cursor/rules/general.mdc @@ -0,0 +1,5 @@ +--- +description: General rules +globs: +--- +- always use `uv` instead of `pip` directly diff --git a/.github/workflows/python.yml b/.github/workflows/python.yml new file mode 100644 index 0000000..dd318a6 --- /dev/null +++ b/.github/workflows/python.yml @@ -0,0 +1,31 @@ +# NOTE: This file is auto generated by OpenAPI Generator. +# URL: https://openapi-generator.tech +# +# ref: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python + +name: Monei Python package + +on: [push, pull_request] + +jobs: + build: + + runs-on: ubuntu-latest + strategy: + matrix: + python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"] + + steps: + - uses: actions/checkout@v4 + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v4 + with: + python-version: ${{ matrix.python-version }} + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install -r requirements.txt + pip install -r test-requirements.txt + - name: Test with pytest + run: | + pytest --cov=Monei diff --git a/.openapi-generator/FILES b/.openapi-generator/FILES index d36cda9..273b81a 100644 --- a/.openapi-generator/FILES +++ b/.openapi-generator/FILES @@ -1,3 +1,4 @@ +.github/workflows/python.yml Monei/__init__.py Monei/api/__init__.py Monei/api/apple_pay_domain_api.py @@ -6,115 +7,95 @@ Monei/api/payment_methods_api.py Monei/api/payments_api.py Monei/api/subscriptions_api.py Monei/api_client.py -Monei/apis/__init__.py +Monei/api_response.py Monei/configuration.py Monei/exceptions.py -Monei/model/__init__.py -Monei/model/activate_subscription_request.py -Monei/model/address.py -Monei/model/apple_pay_domain_register200_response.py -Monei/model/apple_pay_domain_register400_response.py -Monei/model/apple_pay_domain_register401_response.py -Monei/model/apple_pay_domain_register404_response.py -Monei/model/apple_pay_domain_register422_response.py -Monei/model/apple_pay_domain_register500_response.py -Monei/model/apple_pay_domain_register503_response.py -Monei/model/bizum_validate_phone200_response.py -Monei/model/cancel_payment_request.py -Monei/model/cancel_subscription_request.py -Monei/model/capture_payment_request.py -Monei/model/confirm_payment_request.py -Monei/model/confirm_payment_request_payment_method.py -Monei/model/confirm_payment_request_payment_method_card.py -Monei/model/create_payment_request.py -Monei/model/create_subscription_request.py -Monei/model/error.py -Monei/model/pause_subscription_request.py -Monei/model/payment.py -Monei/model/payment_billing_details.py -Monei/model/payment_cancellation_reason.py -Monei/model/payment_customer.py -Monei/model/payment_last_refund_reason.py -Monei/model/payment_message_channel.py -Monei/model/payment_message_language.py -Monei/model/payment_methods.py -Monei/model/payment_methods_metadata.py -Monei/model/payment_methods_metadata_alipay.py -Monei/model/payment_methods_metadata_apple_pay.py -Monei/model/payment_methods_metadata_bancontact.py -Monei/model/payment_methods_metadata_bizum.py -Monei/model/payment_methods_metadata_blik.py -Monei/model/payment_methods_metadata_card.py -Monei/model/payment_methods_metadata_click_to_pay.py -Monei/model/payment_methods_metadata_click_to_pay_discover.py -Monei/model/payment_methods_metadata_click_to_pay_mastercard.py -Monei/model/payment_methods_metadata_click_to_pay_visa.py -Monei/model/payment_methods_metadata_eps.py -Monei/model/payment_methods_metadata_giropay.py -Monei/model/payment_methods_metadata_google_pay.py -Monei/model/payment_methods_metadata_i_deal.py -Monei/model/payment_methods_metadata_klarna.py -Monei/model/payment_methods_metadata_mbway.py -Monei/model/payment_methods_metadata_sepa.py -Monei/model/payment_methods_metadata_sofort.py -Monei/model/payment_methods_metadata_trustly.py -Monei/model/payment_methods_methods.py -Monei/model/payment_next_action.py -Monei/model/payment_payment_method.py -Monei/model/payment_payment_method_bizum.py -Monei/model/payment_payment_method_bizum_input.py -Monei/model/payment_payment_method_card.py -Monei/model/payment_payment_method_card_input.py -Monei/model/payment_payment_method_cofidis.py -Monei/model/payment_payment_method_input.py -Monei/model/payment_payment_method_klarna.py -Monei/model/payment_payment_method_mbway.py -Monei/model/payment_payment_method_paypal.py -Monei/model/payment_payment_method_sepa.py -Monei/model/payment_payment_method_trustly.py -Monei/model/payment_payment_methods.py -Monei/model/payment_refund_reason.py -Monei/model/payment_sequence.py -Monei/model/payment_sequence_recurring.py -Monei/model/payment_session_details.py -Monei/model/payment_shipping_details.py -Monei/model/payment_shop.py -Monei/model/payment_status.py -Monei/model/payment_trace_details.py -Monei/model/payment_transaction_type.py -Monei/model/recurring_payment_request.py -Monei/model/refund_payment_request.py -Monei/model/register_apple_pay_domain_request.py -Monei/model/send_payment_link_request.py -Monei/model/send_payment_receipt_request.py -Monei/model/send_payment_request_request.py -Monei/model/send_subscription_link_request.py -Monei/model/send_subscription_status_request.py -Monei/model/subscription.py -Monei/model/subscription_interval.py -Monei/model/subscription_last_payment.py -Monei/model/subscription_payment_method.py -Monei/model/subscription_payment_method_card.py -Monei/model/subscription_retry_schedule.py -Monei/model/subscription_retry_schedule_inner.py -Monei/model/subscription_status.py -Monei/model/update_subscription_request.py -Monei/model/validate_bizum_phone_request.py -Monei/model_utils.py Monei/models/__init__.py +Monei/models/activate_subscription_request.py +Monei/models/address.py +Monei/models/apple_pay_domain_register200_response.py +Monei/models/bizum_validate_phone200_response.py +Monei/models/cancel_payment_request.py +Monei/models/cancel_subscription_request.py +Monei/models/capture_payment_request.py +Monei/models/confirm_payment_request.py +Monei/models/confirm_payment_request_payment_method.py +Monei/models/confirm_payment_request_payment_method_card.py +Monei/models/create_payment_request.py +Monei/models/create_subscription_request.py +Monei/models/error.py +Monei/models/pause_subscription_request.py +Monei/models/payment.py +Monei/models/payment_billing_details.py +Monei/models/payment_cancellation_reason.py +Monei/models/payment_customer.py +Monei/models/payment_last_refund_reason.py +Monei/models/payment_message_channel.py +Monei/models/payment_message_language.py +Monei/models/payment_methods.py +Monei/models/payment_methods_metadata.py +Monei/models/payment_methods_metadata_alipay.py +Monei/models/payment_methods_metadata_apple_pay.py +Monei/models/payment_methods_metadata_bancontact.py +Monei/models/payment_methods_metadata_bizum.py +Monei/models/payment_methods_metadata_blik.py +Monei/models/payment_methods_metadata_card.py +Monei/models/payment_methods_metadata_click_to_pay.py +Monei/models/payment_methods_metadata_click_to_pay_discover.py +Monei/models/payment_methods_metadata_click_to_pay_mastercard.py +Monei/models/payment_methods_metadata_click_to_pay_visa.py +Monei/models/payment_methods_metadata_eps.py +Monei/models/payment_methods_metadata_giropay.py +Monei/models/payment_methods_metadata_google_pay.py +Monei/models/payment_methods_metadata_i_deal.py +Monei/models/payment_methods_metadata_klarna.py +Monei/models/payment_methods_metadata_mbway.py +Monei/models/payment_methods_metadata_sepa.py +Monei/models/payment_methods_metadata_sofort.py +Monei/models/payment_methods_metadata_trustly.py +Monei/models/payment_next_action.py +Monei/models/payment_payment_method.py +Monei/models/payment_payment_method_bizum.py +Monei/models/payment_payment_method_bizum_input.py +Monei/models/payment_payment_method_card.py +Monei/models/payment_payment_method_card_input.py +Monei/models/payment_payment_method_cofidis.py +Monei/models/payment_payment_method_input.py +Monei/models/payment_payment_method_klarna.py +Monei/models/payment_payment_method_mbway.py +Monei/models/payment_payment_method_paypal.py +Monei/models/payment_payment_method_sepa.py +Monei/models/payment_payment_method_trustly.py +Monei/models/payment_refund_reason.py +Monei/models/payment_sequence.py +Monei/models/payment_sequence_recurring.py +Monei/models/payment_session_details.py +Monei/models/payment_shipping_details.py +Monei/models/payment_shop.py +Monei/models/payment_status.py +Monei/models/payment_trace_details.py +Monei/models/payment_transaction_type.py +Monei/models/recurring_payment_request.py +Monei/models/refund_payment_request.py +Monei/models/register_apple_pay_domain_request.py +Monei/models/send_payment_link_request.py +Monei/models/send_payment_receipt_request.py +Monei/models/send_payment_request_request.py +Monei/models/send_subscription_link_request.py +Monei/models/send_subscription_status_request.py +Monei/models/subscription.py +Monei/models/subscription_interval.py +Monei/models/subscription_last_payment.py +Monei/models/subscription_payment_method.py +Monei/models/subscription_payment_method_card.py +Monei/models/subscription_retry_schedule_inner.py +Monei/models/subscription_status.py +Monei/models/update_subscription_request.py +Monei/models/validate_bizum_phone_request.py +Monei/py.typed Monei/rest.py +pyproject.toml requirements.txt test-requirements.txt test/__init__.py -test/test_apple_pay_domain_register200_response.py -test/test_apple_pay_domain_register400_response.py -test/test_apple_pay_domain_register401_response.py -test/test_apple_pay_domain_register404_response.py -test/test_apple_pay_domain_register422_response.py -test/test_apple_pay_domain_register500_response.py -test/test_apple_pay_domain_register503_response.py -test/test_bizum_validate_phone200_response.py -test/test_payment_methods_methods.py -test/test_subscription_retry_schedule.py -test/test_subscription_retry_schedule_inner.py tox.ini diff --git a/.openapi-generator/VERSION b/.openapi-generator/VERSION index 6d54bbd..5f84a81 100644 --- a/.openapi-generator/VERSION +++ b/.openapi-generator/VERSION @@ -1 +1 @@ -6.0.1 \ No newline at end of file +7.12.0 diff --git a/Monei/__init__.py b/Monei/__init__.py index b625189..e74bfd5 100644 --- a/Monei/__init__.py +++ b/Monei/__init__.py @@ -1,30 +1,120 @@ +# coding: utf-8 + # flake8: noqa """ -MONEI API v1 + MONEI API v1 -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

-The version of the OpenAPI document: 1.5.0 -Generated by: https://openapi-generator.tech -""" + The version of the OpenAPI document: 1.5.1 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 __version__ = "1.2.6" +# import apis into sdk package +from Monei.api.apple_pay_domain_api import ApplePayDomainApi +from Monei.api.bizum_api import BizumApi +from Monei.api.payment_methods_api import PaymentMethodsApi +from Monei.api.payments_api import PaymentsApi +from Monei.api.subscriptions_api import SubscriptionsApi + # import ApiClient +from Monei.api_response import ApiResponse from Monei.api_client import ApiClient - -# import Configuration from Monei.configuration import Configuration - -# import exceptions from Monei.exceptions import OpenApiException -from Monei.exceptions import ApiAttributeError from Monei.exceptions import ApiTypeError from Monei.exceptions import ApiValueError from Monei.exceptions import ApiKeyError +from Monei.exceptions import ApiAttributeError from Monei.exceptions import ApiException -# Import MoneiClient at the end to avoid circular imports +# import models into sdk package +from Monei.models.activate_subscription_request import ActivateSubscriptionRequest +from Monei.models.address import Address +from Monei.models.apple_pay_domain_register200_response import ApplePayDomainRegister200Response +from Monei.models.bizum_validate_phone200_response import BizumValidatePhone200Response +from Monei.models.cancel_payment_request import CancelPaymentRequest +from Monei.models.cancel_subscription_request import CancelSubscriptionRequest +from Monei.models.capture_payment_request import CapturePaymentRequest +from Monei.models.confirm_payment_request import ConfirmPaymentRequest +from Monei.models.confirm_payment_request_payment_method import ConfirmPaymentRequestPaymentMethod +from Monei.models.confirm_payment_request_payment_method_card import ConfirmPaymentRequestPaymentMethodCard +from Monei.models.create_payment_request import CreatePaymentRequest +from Monei.models.create_subscription_request import CreateSubscriptionRequest +from Monei.models.error import Error +from Monei.models.pause_subscription_request import PauseSubscriptionRequest +from Monei.models.payment import Payment +from Monei.models.payment_billing_details import PaymentBillingDetails +from Monei.models.payment_cancellation_reason import PaymentCancellationReason +from Monei.models.payment_customer import PaymentCustomer +from Monei.models.payment_last_refund_reason import PaymentLastRefundReason +from Monei.models.payment_message_channel import PaymentMessageChannel +from Monei.models.payment_message_language import PaymentMessageLanguage +from Monei.models.payment_methods import PaymentMethods +from Monei.models.payment_methods_metadata import PaymentMethodsMetadata +from Monei.models.payment_methods_metadata_alipay import PaymentMethodsMetadataAlipay +from Monei.models.payment_methods_metadata_apple_pay import PaymentMethodsMetadataApplePay +from Monei.models.payment_methods_metadata_bancontact import PaymentMethodsMetadataBancontact +from Monei.models.payment_methods_metadata_bizum import PaymentMethodsMetadataBizum +from Monei.models.payment_methods_metadata_blik import PaymentMethodsMetadataBlik +from Monei.models.payment_methods_metadata_card import PaymentMethodsMetadataCard +from Monei.models.payment_methods_metadata_click_to_pay import PaymentMethodsMetadataClickToPay +from Monei.models.payment_methods_metadata_click_to_pay_discover import PaymentMethodsMetadataClickToPayDiscover +from Monei.models.payment_methods_metadata_click_to_pay_mastercard import PaymentMethodsMetadataClickToPayMastercard +from Monei.models.payment_methods_metadata_click_to_pay_visa import PaymentMethodsMetadataClickToPayVisa +from Monei.models.payment_methods_metadata_eps import PaymentMethodsMetadataEps +from Monei.models.payment_methods_metadata_giropay import PaymentMethodsMetadataGiropay +from Monei.models.payment_methods_metadata_google_pay import PaymentMethodsMetadataGooglePay +from Monei.models.payment_methods_metadata_i_deal import PaymentMethodsMetadataIDeal +from Monei.models.payment_methods_metadata_klarna import PaymentMethodsMetadataKlarna +from Monei.models.payment_methods_metadata_mbway import PaymentMethodsMetadataMbway +from Monei.models.payment_methods_metadata_sepa import PaymentMethodsMetadataSepa +from Monei.models.payment_methods_metadata_sofort import PaymentMethodsMetadataSofort +from Monei.models.payment_methods_metadata_trustly import PaymentMethodsMetadataTrustly +from Monei.models.payment_next_action import PaymentNextAction +from Monei.models.payment_payment_method import PaymentPaymentMethod +from Monei.models.payment_payment_method_bizum import PaymentPaymentMethodBizum +from Monei.models.payment_payment_method_bizum_input import PaymentPaymentMethodBizumInput +from Monei.models.payment_payment_method_card import PaymentPaymentMethodCard +from Monei.models.payment_payment_method_card_input import PaymentPaymentMethodCardInput +from Monei.models.payment_payment_method_cofidis import PaymentPaymentMethodCofidis +from Monei.models.payment_payment_method_input import PaymentPaymentMethodInput +from Monei.models.payment_payment_method_klarna import PaymentPaymentMethodKlarna +from Monei.models.payment_payment_method_mbway import PaymentPaymentMethodMbway +from Monei.models.payment_payment_method_paypal import PaymentPaymentMethodPaypal +from Monei.models.payment_payment_method_sepa import PaymentPaymentMethodSepa +from Monei.models.payment_payment_method_trustly import PaymentPaymentMethodTrustly +from Monei.models.payment_refund_reason import PaymentRefundReason +from Monei.models.payment_sequence import PaymentSequence +from Monei.models.payment_sequence_recurring import PaymentSequenceRecurring +from Monei.models.payment_session_details import PaymentSessionDetails +from Monei.models.payment_shipping_details import PaymentShippingDetails +from Monei.models.payment_shop import PaymentShop +from Monei.models.payment_status import PaymentStatus +from Monei.models.payment_trace_details import PaymentTraceDetails +from Monei.models.payment_transaction_type import PaymentTransactionType +from Monei.models.recurring_payment_request import RecurringPaymentRequest +from Monei.models.refund_payment_request import RefundPaymentRequest +from Monei.models.register_apple_pay_domain_request import RegisterApplePayDomainRequest +from Monei.models.send_payment_link_request import SendPaymentLinkRequest +from Monei.models.send_payment_receipt_request import SendPaymentReceiptRequest +from Monei.models.send_payment_request_request import SendPaymentRequestRequest +from Monei.models.send_subscription_link_request import SendSubscriptionLinkRequest +from Monei.models.send_subscription_status_request import SendSubscriptionStatusRequest +from Monei.models.subscription import Subscription +from Monei.models.subscription_interval import SubscriptionInterval +from Monei.models.subscription_last_payment import SubscriptionLastPayment +from Monei.models.subscription_payment_method import SubscriptionPaymentMethod +from Monei.models.subscription_payment_method_card import SubscriptionPaymentMethodCard +from Monei.models.subscription_retry_schedule_inner import SubscriptionRetryScheduleInner +from Monei.models.subscription_status import SubscriptionStatus +from Monei.models.update_subscription_request import UpdateSubscriptionRequest +from Monei.models.validate_bizum_phone_request import ValidateBizumPhoneRequest +# import custom MoneiClient from Monei.monei_client import MoneiClient diff --git a/Monei/api/__init__.py b/Monei/api/__init__.py index fc05745..3ce3c08 100644 --- a/Monei/api/__init__.py +++ b/Monei/api/__init__.py @@ -1,3 +1,9 @@ -# do not import all apis into this module because that uses a lot of memory and stack frames -# if you need the ability to import all apis from one package, import them with -# from Monei.apis import ApplePayDomainApi +# flake8: noqa + +# import apis into api package +from Monei.api.apple_pay_domain_api import ApplePayDomainApi +from Monei.api.bizum_api import BizumApi +from Monei.api.payment_methods_api import PaymentMethodsApi +from Monei.api.payments_api import PaymentsApi +from Monei.api.subscriptions_api import SubscriptionsApi + diff --git a/Monei/api/apple_pay_domain_api.py b/Monei/api/apple_pay_domain_api.py index 50a6ff3..c2a080d 100644 --- a/Monei/api/apple_pay_domain_api.py +++ b/Monei/api/apple_pay_domain_api.py @@ -1,180 +1,329 @@ +# coding: utf-8 + """ MONEI API v1 -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

- The version of the OpenAPI document: 1.5.0 - Generated by: https://openapi-generator.tech -""" + The version of the OpenAPI document: 1.5.1 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +import warnings +from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt +from typing import Any, Dict, List, Optional, Tuple, Union +from typing_extensions import Annotated + +from Monei.models.apple_pay_domain_register200_response import ApplePayDomainRegister200Response +from Monei.models.register_apple_pay_domain_request import RegisterApplePayDomainRequest + +from Monei.api_client import ApiClient, RequestSerialized +from Monei.api_response import ApiResponse +from Monei.rest import RESTResponseType -import re # noqa: F401 -import sys # noqa: F401 - -from Monei.api_client import ApiClient, Endpoint as _Endpoint -from Monei.model_utils import ( # noqa: F401 - check_allowed_values, - check_validations, - date, - datetime, - file_type, - none_type, - validate_and_convert_types -) -from Monei.model.apple_pay_domain_register200_response import ApplePayDomainRegister200Response -from Monei.model.apple_pay_domain_register400_response import ApplePayDomainRegister400Response -from Monei.model.apple_pay_domain_register401_response import ApplePayDomainRegister401Response -from Monei.model.apple_pay_domain_register404_response import ApplePayDomainRegister404Response -from Monei.model.apple_pay_domain_register422_response import ApplePayDomainRegister422Response -from Monei.model.apple_pay_domain_register500_response import ApplePayDomainRegister500Response -from Monei.model.apple_pay_domain_register503_response import ApplePayDomainRegister503Response -from Monei.model.register_apple_pay_domain_request import RegisterApplePayDomainRequest - - -class ApplePayDomainApi(object): +class ApplePayDomainApi: """NOTE: This class is auto generated by OpenAPI Generator Ref: https://openapi-generator.tech Do not edit the class manually. """ - def __init__(self, api_client=None): + def __init__(self, api_client=None) -> None: if api_client is None: - api_client = ApiClient() + api_client = ApiClient.get_default() self.api_client = api_client - self.register_endpoint = _Endpoint( - settings={ - 'response_type': (ApplePayDomainRegister200Response,), - 'auth': [ - 'APIKey' - ], - 'endpoint_path': '/apple-pay/domains', - 'operation_id': 'register', - 'http_method': 'POST', - 'servers': None, - }, - params_map={ - 'all': [ - 'register_apple_pay_domain_request', - ], - 'required': [ - 'register_apple_pay_domain_request', - ], - 'nullable': [ - ], - 'enum': [ - ], - 'validation': [ - ] - }, - root_map={ - 'validations': { - }, - 'allowed_values': { - }, - 'openapi_types': { - 'register_apple_pay_domain_request': - (RegisterApplePayDomainRequest,), - }, - 'attribute_map': { - }, - 'location_map': { - 'register_apple_pay_domain_request': 'body', - }, - 'collection_format_map': { - } - }, - headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [ - 'application/json' - ] - }, - api_client=api_client - ) + + @validate_call def register( self, - register_apple_pay_domain_request, - **kwargs - ): - """Register Domain # noqa: E501 - -

Registers a domain with Apple Pay.

This endpoint allows you to register your website domain with Apple Pay, which is required before you can accept Apple Pay payments on your website. The domain must be accessible via HTTPS and have a valid SSL certificate.

Before registering, you must download this domain association file and host it at /.well-known/apple-developer-merchantid-domain-association on your site.

For example, if you're registering example.com, make that file available at https://example.com/.well-known/apple-developer-merchantid-domain-association.

After registration, Apple will verify your domain. Once verified, you can display Apple Pay buttons and process Apple Pay payments on your website.

# noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.register(register_apple_pay_domain_request, async_req=True) - >>> result = thread.get() - - Args: - register_apple_pay_domain_request (RegisterApplePayDomainRequest): - - Keyword Args: - _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 - will be returned without reading/decoding response data. - Default is True. - _request_timeout (int/float/tuple): timeout setting for this request. If - one number provided, it will be total request timeout. It can also - be a pair (tuple) of (connection, read) timeouts. - Default is None. - _check_input_type (bool): specifies if type checking - should be done one the data sent to the server. - Default is True. - _check_return_type (bool): specifies if type checking - should be done one the data received from the server. - Default is True. - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _content_type (str/None): force body content-type. - Default is None and content-type will be predicted by allowed - content-types and body. - _host_index (int/None): specifies the index of the server - that we want to use. - Default is read from the configuration. - _request_auths (list): set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - Default is None - async_req (bool): execute request asynchronously - - Returns: - ApplePayDomainRegister200Response - If the method is called asynchronously, returns the request - thread. - """ - kwargs['async_req'] = kwargs.get( - 'async_req', False + register_apple_pay_domain_request: RegisterApplePayDomainRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApplePayDomainRegister200Response: + """Register Domain + +

Registers a domain with Apple Pay.

This endpoint allows you to register your website domain with Apple Pay, which is required before you can accept Apple Pay payments on your website. The domain must be accessible via HTTPS and have a valid SSL certificate.

Before registering, you must download this domain association file and host it at /.well-known/apple-developer-merchantid-domain-association on your site.

For example, if you're registering example.com, make that file available at https://example.com/.well-known/apple-developer-merchantid-domain-association.

After registration, Apple will verify your domain. Once verified, you can display Apple Pay buttons and process Apple Pay payments on your website.

+ + :param register_apple_pay_domain_request: (required) + :type register_apple_pay_domain_request: RegisterApplePayDomainRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._register_serialize( + register_apple_pay_domain_request=register_apple_pay_domain_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index ) - kwargs['_return_http_data_only'] = kwargs.get( - '_return_http_data_only', True + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ApplePayDomainRegister200Response", + '400': "Error", + '401': "Error", + '404': "Error", + '422': "Error", + '500': "Error", + '503': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout ) - kwargs['_preload_content'] = kwargs.get( - '_preload_content', True + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def register_with_http_info( + self, + register_apple_pay_domain_request: RegisterApplePayDomainRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[ApplePayDomainRegister200Response]: + """Register Domain + +

Registers a domain with Apple Pay.

This endpoint allows you to register your website domain with Apple Pay, which is required before you can accept Apple Pay payments on your website. The domain must be accessible via HTTPS and have a valid SSL certificate.

Before registering, you must download this domain association file and host it at /.well-known/apple-developer-merchantid-domain-association on your site.

For example, if you're registering example.com, make that file available at https://example.com/.well-known/apple-developer-merchantid-domain-association.

After registration, Apple will verify your domain. Once verified, you can display Apple Pay buttons and process Apple Pay payments on your website.

+ + :param register_apple_pay_domain_request: (required) + :type register_apple_pay_domain_request: RegisterApplePayDomainRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._register_serialize( + register_apple_pay_domain_request=register_apple_pay_domain_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index ) - kwargs['_request_timeout'] = kwargs.get( - '_request_timeout', None + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ApplePayDomainRegister200Response", + '400': "Error", + '401': "Error", + '404': "Error", + '422': "Error", + '500': "Error", + '503': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout ) - kwargs['_check_input_type'] = kwargs.get( - '_check_input_type', True + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, ) - kwargs['_check_return_type'] = kwargs.get( - '_check_return_type', True + + + @validate_call + def register_without_preload_content( + self, + register_apple_pay_domain_request: RegisterApplePayDomainRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Register Domain + +

Registers a domain with Apple Pay.

This endpoint allows you to register your website domain with Apple Pay, which is required before you can accept Apple Pay payments on your website. The domain must be accessible via HTTPS and have a valid SSL certificate.

Before registering, you must download this domain association file and host it at /.well-known/apple-developer-merchantid-domain-association on your site.

For example, if you're registering example.com, make that file available at https://example.com/.well-known/apple-developer-merchantid-domain-association.

After registration, Apple will verify your domain. Once verified, you can display Apple Pay buttons and process Apple Pay payments on your website.

+ + :param register_apple_pay_domain_request: (required) + :type register_apple_pay_domain_request: RegisterApplePayDomainRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._register_serialize( + register_apple_pay_domain_request=register_apple_pay_domain_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index ) - kwargs['_spec_property_naming'] = kwargs.get( - '_spec_property_naming', False + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ApplePayDomainRegister200Response", + '400': "Error", + '401': "Error", + '404': "Error", + '422': "Error", + '500': "Error", + '503': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _register_serialize( + self, + register_apple_pay_domain_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if register_apple_pay_domain_request is not None: + _body_params = register_apple_pay_domain_request + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'APIKey' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/apple-pay/domains', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth ) - kwargs['_content_type'] = kwargs.get( - '_content_type') - kwargs['_host_index'] = kwargs.get('_host_index') - kwargs['_request_auths'] = kwargs.get('_request_auths', None) - kwargs['register_apple_pay_domain_request'] = \ - register_apple_pay_domain_request - return self.register_endpoint.call_with_http_info(**kwargs) + diff --git a/Monei/api/bizum_api.py b/Monei/api/bizum_api.py index 00766e1..30626c1 100644 --- a/Monei/api/bizum_api.py +++ b/Monei/api/bizum_api.py @@ -1,180 +1,329 @@ +# coding: utf-8 + """ MONEI API v1 -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

- The version of the OpenAPI document: 1.5.0 - Generated by: https://openapi-generator.tech -""" + The version of the OpenAPI document: 1.5.1 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +import warnings +from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt +from typing import Any, Dict, List, Optional, Tuple, Union +from typing_extensions import Annotated + +from Monei.models.bizum_validate_phone200_response import BizumValidatePhone200Response +from Monei.models.validate_bizum_phone_request import ValidateBizumPhoneRequest + +from Monei.api_client import ApiClient, RequestSerialized +from Monei.api_response import ApiResponse +from Monei.rest import RESTResponseType -import re # noqa: F401 -import sys # noqa: F401 - -from Monei.api_client import ApiClient, Endpoint as _Endpoint -from Monei.model_utils import ( # noqa: F401 - check_allowed_values, - check_validations, - date, - datetime, - file_type, - none_type, - validate_and_convert_types -) -from Monei.model.apple_pay_domain_register400_response import ApplePayDomainRegister400Response -from Monei.model.apple_pay_domain_register401_response import ApplePayDomainRegister401Response -from Monei.model.apple_pay_domain_register404_response import ApplePayDomainRegister404Response -from Monei.model.apple_pay_domain_register422_response import ApplePayDomainRegister422Response -from Monei.model.apple_pay_domain_register500_response import ApplePayDomainRegister500Response -from Monei.model.apple_pay_domain_register503_response import ApplePayDomainRegister503Response -from Monei.model.bizum_validate_phone200_response import BizumValidatePhone200Response -from Monei.model.validate_bizum_phone_request import ValidateBizumPhoneRequest - - -class BizumApi(object): +class BizumApi: """NOTE: This class is auto generated by OpenAPI Generator Ref: https://openapi-generator.tech Do not edit the class manually. """ - def __init__(self, api_client=None): + def __init__(self, api_client=None) -> None: if api_client is None: - api_client = ApiClient() + api_client = ApiClient.get_default() self.api_client = api_client - self.validate_phone_endpoint = _Endpoint( - settings={ - 'response_type': (BizumValidatePhone200Response,), - 'auth': [ - 'APIKey' - ], - 'endpoint_path': '/bizum/validate-phone', - 'operation_id': 'validate_phone', - 'http_method': 'POST', - 'servers': None, - }, - params_map={ - 'all': [ - 'validate_bizum_phone_request', - ], - 'required': [ - 'validate_bizum_phone_request', - ], - 'nullable': [ - ], - 'enum': [ - ], - 'validation': [ - ] - }, - root_map={ - 'validations': { - }, - 'allowed_values': { - }, - 'openapi_types': { - 'validate_bizum_phone_request': - (ValidateBizumPhoneRequest,), - }, - 'attribute_map': { - }, - 'location_map': { - 'validate_bizum_phone_request': 'body', - }, - 'collection_format_map': { - } - }, - headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [ - 'application/json' - ] - }, - api_client=api_client - ) + + @validate_call def validate_phone( self, - validate_bizum_phone_request, - **kwargs - ): - """Validate Phone # noqa: E501 - -

Validates if a phone number is registered with Bizum.

Use this endpoint to check if a customer's phone number can be used for Bizum payments before attempting to process a payment. This helps provide a better user experience by preventing failed payment attempts for non-registered numbers.

The response will indicate whether the phone number is valid for Bizum payments.

# noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.validate_phone(validate_bizum_phone_request, async_req=True) - >>> result = thread.get() - - Args: - validate_bizum_phone_request (ValidateBizumPhoneRequest): - - Keyword Args: - _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 - will be returned without reading/decoding response data. - Default is True. - _request_timeout (int/float/tuple): timeout setting for this request. If - one number provided, it will be total request timeout. It can also - be a pair (tuple) of (connection, read) timeouts. - Default is None. - _check_input_type (bool): specifies if type checking - should be done one the data sent to the server. - Default is True. - _check_return_type (bool): specifies if type checking - should be done one the data received from the server. - Default is True. - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _content_type (str/None): force body content-type. - Default is None and content-type will be predicted by allowed - content-types and body. - _host_index (int/None): specifies the index of the server - that we want to use. - Default is read from the configuration. - _request_auths (list): set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - Default is None - async_req (bool): execute request asynchronously - - Returns: - BizumValidatePhone200Response - If the method is called asynchronously, returns the request - thread. - """ - kwargs['async_req'] = kwargs.get( - 'async_req', False + validate_bizum_phone_request: ValidateBizumPhoneRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> BizumValidatePhone200Response: + """Validate Phone + +

Validates if a phone number is registered with Bizum.

Use this endpoint to check if a customer's phone number can be used for Bizum payments before attempting to process a payment. This helps provide a better user experience by preventing failed payment attempts for non-registered numbers.

The response will indicate whether the phone number is valid for Bizum payments.

+ + :param validate_bizum_phone_request: (required) + :type validate_bizum_phone_request: ValidateBizumPhoneRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._validate_phone_serialize( + validate_bizum_phone_request=validate_bizum_phone_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index ) - kwargs['_return_http_data_only'] = kwargs.get( - '_return_http_data_only', True + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BizumValidatePhone200Response", + '400': "Error", + '401': "Error", + '404': "Error", + '422': "Error", + '500': "Error", + '503': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout ) - kwargs['_preload_content'] = kwargs.get( - '_preload_content', True + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def validate_phone_with_http_info( + self, + validate_bizum_phone_request: ValidateBizumPhoneRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[BizumValidatePhone200Response]: + """Validate Phone + +

Validates if a phone number is registered with Bizum.

Use this endpoint to check if a customer's phone number can be used for Bizum payments before attempting to process a payment. This helps provide a better user experience by preventing failed payment attempts for non-registered numbers.

The response will indicate whether the phone number is valid for Bizum payments.

+ + :param validate_bizum_phone_request: (required) + :type validate_bizum_phone_request: ValidateBizumPhoneRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._validate_phone_serialize( + validate_bizum_phone_request=validate_bizum_phone_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index ) - kwargs['_request_timeout'] = kwargs.get( - '_request_timeout', None + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BizumValidatePhone200Response", + '400': "Error", + '401': "Error", + '404': "Error", + '422': "Error", + '500': "Error", + '503': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout ) - kwargs['_check_input_type'] = kwargs.get( - '_check_input_type', True + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, ) - kwargs['_check_return_type'] = kwargs.get( - '_check_return_type', True + + + @validate_call + def validate_phone_without_preload_content( + self, + validate_bizum_phone_request: ValidateBizumPhoneRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Validate Phone + +

Validates if a phone number is registered with Bizum.

Use this endpoint to check if a customer's phone number can be used for Bizum payments before attempting to process a payment. This helps provide a better user experience by preventing failed payment attempts for non-registered numbers.

The response will indicate whether the phone number is valid for Bizum payments.

+ + :param validate_bizum_phone_request: (required) + :type validate_bizum_phone_request: ValidateBizumPhoneRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._validate_phone_serialize( + validate_bizum_phone_request=validate_bizum_phone_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index ) - kwargs['_spec_property_naming'] = kwargs.get( - '_spec_property_naming', False + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BizumValidatePhone200Response", + '400': "Error", + '401': "Error", + '404': "Error", + '422': "Error", + '500': "Error", + '503': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _validate_phone_serialize( + self, + validate_bizum_phone_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if validate_bizum_phone_request is not None: + _body_params = validate_bizum_phone_request + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'APIKey' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/bizum/validate-phone', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth ) - kwargs['_content_type'] = kwargs.get( - '_content_type') - kwargs['_host_index'] = kwargs.get('_host_index') - kwargs['_request_auths'] = kwargs.get('_request_auths', None) - kwargs['validate_bizum_phone_request'] = \ - validate_bizum_phone_request - return self.validate_phone_endpoint.call_with_http_info(**kwargs) + diff --git a/Monei/api/payment_methods_api.py b/Monei/api/payment_methods_api.py index b0b615e..897c53d 100644 --- a/Monei/api/payment_methods_api.py +++ b/Monei/api/payment_methods_api.py @@ -1,175 +1,336 @@ +# coding: utf-8 + """ MONEI API v1 -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

- The version of the OpenAPI document: 1.5.0 - Generated by: https://openapi-generator.tech -""" + The version of the OpenAPI document: 1.5.1 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +import warnings +from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt +from typing import Any, Dict, List, Optional, Tuple, Union +from typing_extensions import Annotated + +from pydantic import Field, StrictStr +from typing import Optional +from typing_extensions import Annotated +from Monei.models.payment_methods import PaymentMethods +from Monei.api_client import ApiClient, RequestSerialized +from Monei.api_response import ApiResponse +from Monei.rest import RESTResponseType -import re # noqa: F401 -import sys # noqa: F401 - -from Monei.api_client import ApiClient, Endpoint as _Endpoint -from Monei.model_utils import ( # noqa: F401 - check_allowed_values, - check_validations, - date, - datetime, - file_type, - none_type, - validate_and_convert_types -) -from Monei.model.apple_pay_domain_register400_response import ApplePayDomainRegister400Response -from Monei.model.apple_pay_domain_register404_response import ApplePayDomainRegister404Response -from Monei.model.apple_pay_domain_register422_response import ApplePayDomainRegister422Response -from Monei.model.apple_pay_domain_register500_response import ApplePayDomainRegister500Response -from Monei.model.apple_pay_domain_register503_response import ApplePayDomainRegister503Response -from Monei.model.payment_methods import PaymentMethods - - -class PaymentMethodsApi(object): + +class PaymentMethodsApi: """NOTE: This class is auto generated by OpenAPI Generator Ref: https://openapi-generator.tech Do not edit the class manually. """ - def __init__(self, api_client=None): + def __init__(self, api_client=None) -> None: if api_client is None: - api_client = ApiClient() + api_client = ApiClient.get_default() self.api_client = api_client - self.get_endpoint = _Endpoint( - settings={ - 'response_type': (PaymentMethods,), - 'auth': [], - 'endpoint_path': '/payment-methods', - 'operation_id': 'get', - 'http_method': 'GET', - 'servers': None, - }, - params_map={ - 'all': [ - 'account_id', - 'payment_id', - ], - 'required': [], - 'nullable': [ - ], - 'enum': [ - ], - 'validation': [ - ] - }, - root_map={ - 'validations': { - }, - 'allowed_values': { - }, - 'openapi_types': { - 'account_id': - (str,), - 'payment_id': - (str,), - }, - 'attribute_map': { - 'account_id': 'accountId', - 'payment_id': 'paymentId', - }, - 'location_map': { - 'account_id': 'query', - 'payment_id': 'query', - }, - 'collection_format_map': { - } - }, - headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [], - }, - api_client=api_client - ) + + @validate_call def get( self, - **kwargs - ): - """Get Payment Methods # noqa: E501 - -

Retrieve available payment methods for an account or a specific payment.

You can provide either an accountId or a paymentId as a query parameter to get the available payment methods.

When providing a paymentId, the response will include additional payment-specific information such as amount and currency. This is useful when you want to show payment options that are specifically available for a particular transaction.

When providing an accountId, the response will include all payment methods available for that account based on the merchant's configuration and supported payment methods.

# 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(async_req=True) - >>> result = thread.get() - - - Keyword Args: - account_id (str): The ID of the account to get payment methods for. [optional] - payment_id (str): The ID of the payment to get payment methods for. [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 - will be returned without reading/decoding response data. - Default is True. - _request_timeout (int/float/tuple): timeout setting for this request. If - one number provided, it will be total request timeout. It can also - be a pair (tuple) of (connection, read) timeouts. - Default is None. - _check_input_type (bool): specifies if type checking - should be done one the data sent to the server. - Default is True. - _check_return_type (bool): specifies if type checking - should be done one the data received from the server. - Default is True. - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _content_type (str/None): force body content-type. - Default is None and content-type will be predicted by allowed - content-types and body. - _host_index (int/None): specifies the index of the server - that we want to use. - Default is read from the configuration. - _request_auths (list): set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - Default is None - async_req (bool): execute request asynchronously - - Returns: - PaymentMethods - If the method is called asynchronously, returns the request - thread. - """ - kwargs['async_req'] = kwargs.get( - 'async_req', False + account_id: Annotated[Optional[StrictStr], Field(description="The ID of the account to get payment methods for")] = None, + payment_id: Annotated[Optional[StrictStr], Field(description="The ID of the payment to get payment methods for")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> PaymentMethods: + """Get Payment Methods + +

Retrieve available payment methods for an account or a specific payment.

You can provide either an accountId or a paymentId as a query parameter to get the available payment methods.

When providing a paymentId, the response will include additional payment-specific information such as amount and currency. This is useful when you want to show payment options that are specifically available for a particular transaction.

When providing an accountId, the response will include all payment methods available for that account based on the merchant's configuration and supported payment methods.

+ + :param account_id: The ID of the account to get payment methods for + :type account_id: str + :param payment_id: The ID of the payment to get payment methods for + :type payment_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_serialize( + account_id=account_id, + payment_id=payment_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index ) - kwargs['_return_http_data_only'] = kwargs.get( - '_return_http_data_only', True + + _response_types_map: Dict[str, Optional[str]] = { + '200': "PaymentMethods", + '400': "Error", + '401': "Error", + '404': "Error", + '422': "Error", + '500': "Error", + '503': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout ) - kwargs['_preload_content'] = kwargs.get( - '_preload_content', True + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def get_with_http_info( + self, + account_id: Annotated[Optional[StrictStr], Field(description="The ID of the account to get payment methods for")] = None, + payment_id: Annotated[Optional[StrictStr], Field(description="The ID of the payment to get payment methods for")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[PaymentMethods]: + """Get Payment Methods + +

Retrieve available payment methods for an account or a specific payment.

You can provide either an accountId or a paymentId as a query parameter to get the available payment methods.

When providing a paymentId, the response will include additional payment-specific information such as amount and currency. This is useful when you want to show payment options that are specifically available for a particular transaction.

When providing an accountId, the response will include all payment methods available for that account based on the merchant's configuration and supported payment methods.

+ + :param account_id: The ID of the account to get payment methods for + :type account_id: str + :param payment_id: The ID of the payment to get payment methods for + :type payment_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_serialize( + account_id=account_id, + payment_id=payment_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index ) - kwargs['_request_timeout'] = kwargs.get( - '_request_timeout', None + + _response_types_map: Dict[str, Optional[str]] = { + '200': "PaymentMethods", + '400': "Error", + '401': "Error", + '404': "Error", + '422': "Error", + '500': "Error", + '503': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout ) - kwargs['_check_input_type'] = kwargs.get( - '_check_input_type', True + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, ) - kwargs['_check_return_type'] = kwargs.get( - '_check_return_type', True + + + @validate_call + def get_without_preload_content( + self, + account_id: Annotated[Optional[StrictStr], Field(description="The ID of the account to get payment methods for")] = None, + payment_id: Annotated[Optional[StrictStr], Field(description="The ID of the payment to get payment methods for")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get Payment Methods + +

Retrieve available payment methods for an account or a specific payment.

You can provide either an accountId or a paymentId as a query parameter to get the available payment methods.

When providing a paymentId, the response will include additional payment-specific information such as amount and currency. This is useful when you want to show payment options that are specifically available for a particular transaction.

When providing an accountId, the response will include all payment methods available for that account based on the merchant's configuration and supported payment methods.

+ + :param account_id: The ID of the account to get payment methods for + :type account_id: str + :param payment_id: The ID of the payment to get payment methods for + :type payment_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_serialize( + account_id=account_id, + payment_id=payment_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index ) - kwargs['_spec_property_naming'] = kwargs.get( - '_spec_property_naming', False + + _response_types_map: Dict[str, Optional[str]] = { + '200': "PaymentMethods", + '400': "Error", + '401': "Error", + '404': "Error", + '422': "Error", + '500': "Error", + '503': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_serialize( + self, + account_id, + payment_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if account_id is not None: + + _query_params.append(('accountId', account_id)) + + if payment_id is not None: + + _query_params.append(('paymentId', payment_id)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/payment-methods', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth ) - kwargs['_content_type'] = kwargs.get( - '_content_type') - kwargs['_host_index'] = kwargs.get('_host_index') - kwargs['_request_auths'] = kwargs.get('_request_auths', None) - return self.get_endpoint.call_with_http_info(**kwargs) + diff --git a/Monei/api/payments_api.py b/Monei/api/payments_api.py index 68c73a5..f47745b 100644 --- a/Monei/api/payments_api.py +++ b/Monei/api/payments_api.py @@ -1,1454 +1,3075 @@ +# coding: utf-8 + """ MONEI API v1 -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - - The version of the OpenAPI document: 1.5.0 - Generated by: https://openapi-generator.tech -""" +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

+ The version of the OpenAPI document: 1.5.1 + Generated by OpenAPI Generator (https://openapi-generator.tech) -import re # noqa: F401 -import sys # noqa: F401 - -from Monei.api_client import ApiClient, Endpoint as _Endpoint -from Monei.model_utils import ( # noqa: F401 - check_allowed_values, - check_validations, - date, - datetime, - file_type, - none_type, - validate_and_convert_types -) -from Monei.model.apple_pay_domain_register400_response import ApplePayDomainRegister400Response -from Monei.model.apple_pay_domain_register401_response import ApplePayDomainRegister401Response -from Monei.model.apple_pay_domain_register404_response import ApplePayDomainRegister404Response -from Monei.model.apple_pay_domain_register422_response import ApplePayDomainRegister422Response -from Monei.model.apple_pay_domain_register500_response import ApplePayDomainRegister500Response -from Monei.model.apple_pay_domain_register503_response import ApplePayDomainRegister503Response -from Monei.model.cancel_payment_request import CancelPaymentRequest -from Monei.model.capture_payment_request import CapturePaymentRequest -from Monei.model.confirm_payment_request import ConfirmPaymentRequest -from Monei.model.create_payment_request import CreatePaymentRequest -from Monei.model.payment import Payment -from Monei.model.recurring_payment_request import RecurringPaymentRequest -from Monei.model.refund_payment_request import RefundPaymentRequest -from Monei.model.send_payment_link_request import SendPaymentLinkRequest -from Monei.model.send_payment_receipt_request import SendPaymentReceiptRequest -from Monei.model.send_payment_request_request import SendPaymentRequestRequest - - -class PaymentsApi(object): + Do not edit the class manually. +""" # noqa: E501 + +import warnings +from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt +from typing import Any, Dict, List, Optional, Tuple, Union +from typing_extensions import Annotated + +from pydantic import Field, StrictStr +from typing import Optional +from typing_extensions import Annotated +from Monei.models.cancel_payment_request import CancelPaymentRequest +from Monei.models.capture_payment_request import CapturePaymentRequest +from Monei.models.confirm_payment_request import ConfirmPaymentRequest +from Monei.models.create_payment_request import CreatePaymentRequest +from Monei.models.payment import Payment +from Monei.models.recurring_payment_request import RecurringPaymentRequest +from Monei.models.refund_payment_request import RefundPaymentRequest +from Monei.models.send_payment_link_request import SendPaymentLinkRequest +from Monei.models.send_payment_receipt_request import SendPaymentReceiptRequest +from Monei.models.send_payment_request_request import SendPaymentRequestRequest + +from Monei.api_client import ApiClient, RequestSerialized +from Monei.api_response import ApiResponse +from Monei.rest import RESTResponseType + + +class PaymentsApi: """NOTE: This class is auto generated by OpenAPI Generator Ref: https://openapi-generator.tech Do not edit the class manually. """ - def __init__(self, api_client=None): + def __init__(self, api_client=None) -> None: if api_client is None: - api_client = ApiClient() + api_client = ApiClient.get_default() self.api_client = api_client - self.cancel_endpoint = _Endpoint( - settings={ - 'response_type': (Payment,), - 'auth': [ - 'APIKey' - ], - 'endpoint_path': '/payments/{id}/cancel', - 'operation_id': 'cancel', - 'http_method': 'POST', - 'servers': None, - }, - params_map={ - 'all': [ - 'id', - 'cancel_payment_request', - ], - 'required': [ - 'id', - ], - 'nullable': [ - ], - 'enum': [ - ], - 'validation': [ - ] - }, - root_map={ - 'validations': { - }, - 'allowed_values': { - }, - 'openapi_types': { - 'id': - (str,), - 'cancel_payment_request': - (CancelPaymentRequest,), - }, - 'attribute_map': { - 'id': 'id', - }, - 'location_map': { - 'id': 'path', - 'cancel_payment_request': 'body', - }, - 'collection_format_map': { - } - }, - headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [ - 'application/json' - ] - }, - api_client=api_client - ) - self.capture_endpoint = _Endpoint( - settings={ - 'response_type': (Payment,), - 'auth': [ - 'APIKey' - ], - 'endpoint_path': '/payments/{id}/capture', - 'operation_id': 'capture', - 'http_method': 'POST', - 'servers': None, - }, - params_map={ - 'all': [ - 'id', - 'capture_payment_request', - ], - 'required': [ - 'id', - ], - 'nullable': [ - ], - 'enum': [ - ], - 'validation': [ - ] - }, - root_map={ - 'validations': { - }, - 'allowed_values': { - }, - 'openapi_types': { - 'id': - (str,), - 'capture_payment_request': - (CapturePaymentRequest,), - }, - 'attribute_map': { - 'id': 'id', - }, - 'location_map': { - 'id': 'path', - 'capture_payment_request': 'body', - }, - 'collection_format_map': { - } - }, - headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [ - 'application/json' - ] - }, - api_client=api_client - ) - self.confirm_endpoint = _Endpoint( - settings={ - 'response_type': (Payment,), - 'auth': [ - 'APIKey' - ], - 'endpoint_path': '/payments/{id}/confirm', - 'operation_id': 'confirm', - 'http_method': 'POST', - 'servers': None, - }, - params_map={ - 'all': [ - 'id', - 'confirm_payment_request', - ], - 'required': [ - 'id', - ], - 'nullable': [ - ], - 'enum': [ - ], - 'validation': [ - ] - }, - root_map={ - 'validations': { - }, - 'allowed_values': { - }, - 'openapi_types': { - 'id': - (str,), - 'confirm_payment_request': - (ConfirmPaymentRequest,), - }, - 'attribute_map': { - 'id': 'id', - }, - 'location_map': { - 'id': 'path', - 'confirm_payment_request': 'body', - }, - 'collection_format_map': { - } - }, - headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [ - 'application/json' - ] - }, - api_client=api_client - ) - self.create_endpoint = _Endpoint( - settings={ - 'response_type': (Payment,), - 'auth': [ - 'APIKey' - ], - 'endpoint_path': '/payments', - 'operation_id': 'create', - 'http_method': 'POST', - 'servers': None, - }, - params_map={ - 'all': [ - 'create_payment_request', - ], - 'required': [ - 'create_payment_request', - ], - 'nullable': [ - ], - 'enum': [ - ], - 'validation': [ - ] - }, - root_map={ - 'validations': { - }, - 'allowed_values': { - }, - 'openapi_types': { - 'create_payment_request': - (CreatePaymentRequest,), - }, - 'attribute_map': { - }, - 'location_map': { - 'create_payment_request': 'body', - }, - 'collection_format_map': { - } - }, - headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [ - 'application/json' - ] - }, - api_client=api_client - ) - self.get_endpoint = _Endpoint( - settings={ - 'response_type': (Payment,), - 'auth': [ - 'APIKey' - ], - 'endpoint_path': '/payments/{id}', - 'operation_id': 'get', - 'http_method': 'GET', - 'servers': None, - }, - params_map={ - 'all': [ - 'id', - ], - 'required': [ - 'id', - ], - 'nullable': [ - ], - 'enum': [ - ], - 'validation': [ - ] - }, - root_map={ - 'validations': { - }, - 'allowed_values': { - }, - 'openapi_types': { - 'id': - (str,), - }, - 'attribute_map': { - 'id': 'id', - }, - 'location_map': { - 'id': 'path', - }, - 'collection_format_map': { - } - }, - headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [], - }, - api_client=api_client - ) - self.recurring_endpoint = _Endpoint( - settings={ - 'response_type': (Payment,), - 'auth': [ - 'APIKey' - ], - 'endpoint_path': '/payments/{sequenceId}/recurring', - 'operation_id': 'recurring', - 'http_method': 'POST', - 'servers': None, - }, - params_map={ - 'all': [ - 'sequence_id', - 'recurring_payment_request', - ], - 'required': [ - 'sequence_id', - ], - 'nullable': [ - ], - 'enum': [ - ], - 'validation': [ - ] - }, - root_map={ - 'validations': { - }, - 'allowed_values': { - }, - 'openapi_types': { - 'sequence_id': - (str,), - 'recurring_payment_request': - (RecurringPaymentRequest,), - }, - 'attribute_map': { - 'sequence_id': 'sequenceId', - }, - 'location_map': { - 'sequence_id': 'path', - 'recurring_payment_request': 'body', - }, - 'collection_format_map': { - } - }, - headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [ - 'application/json' - ] - }, - api_client=api_client - ) - self.refund_endpoint = _Endpoint( - settings={ - 'response_type': (Payment,), - 'auth': [ - 'APIKey' - ], - 'endpoint_path': '/payments/{id}/refund', - 'operation_id': 'refund', - 'http_method': 'POST', - 'servers': None, - }, - params_map={ - 'all': [ - 'id', - 'refund_payment_request', - ], - 'required': [ - 'id', - ], - 'nullable': [ - ], - 'enum': [ - ], - 'validation': [ - ] - }, - root_map={ - 'validations': { - }, - 'allowed_values': { - }, - 'openapi_types': { - 'id': - (str,), - 'refund_payment_request': - (RefundPaymentRequest,), - }, - 'attribute_map': { - 'id': 'id', - }, - 'location_map': { - 'id': 'path', - 'refund_payment_request': 'body', - }, - 'collection_format_map': { - } - }, - headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [ - 'application/json' - ] - }, - api_client=api_client - ) - self.send_link_endpoint = _Endpoint( - settings={ - 'response_type': (Payment,), - 'auth': [ - 'APIKey' - ], - 'endpoint_path': '/payments/{id}/link', - 'operation_id': 'send_link', - 'http_method': 'POST', - 'servers': None, - }, - params_map={ - 'all': [ - 'id', - 'send_payment_link_request', - ], - 'required': [ - 'id', - ], - 'nullable': [ - ], - 'enum': [ - ], - 'validation': [ - ] - }, - root_map={ - 'validations': { - }, - 'allowed_values': { - }, - 'openapi_types': { - 'id': - (str,), - 'send_payment_link_request': - (SendPaymentLinkRequest,), - }, - 'attribute_map': { - 'id': 'id', - }, - 'location_map': { - 'id': 'path', - 'send_payment_link_request': 'body', - }, - 'collection_format_map': { - } - }, - headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [ - 'application/json' - ] - }, - api_client=api_client - ) - self.send_receipt_endpoint = _Endpoint( - settings={ - 'response_type': (Payment,), - 'auth': [ - 'APIKey' - ], - 'endpoint_path': '/payments/{id}/receipt', - 'operation_id': 'send_receipt', - 'http_method': 'POST', - 'servers': None, - }, - params_map={ - 'all': [ - 'id', - 'send_payment_receipt_request', - ], - 'required': [ - 'id', - ], - 'nullable': [ - ], - 'enum': [ - ], - 'validation': [ - ] - }, - root_map={ - 'validations': { - }, - 'allowed_values': { - }, - 'openapi_types': { - 'id': - (str,), - 'send_payment_receipt_request': - (SendPaymentReceiptRequest,), - }, - 'attribute_map': { - 'id': 'id', - }, - 'location_map': { - 'id': 'path', - 'send_payment_receipt_request': 'body', - }, - 'collection_format_map': { - } - }, - headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [ - 'application/json' - ] - }, - api_client=api_client - ) - self.send_request_endpoint = _Endpoint( - settings={ - 'response_type': (Payment,), - 'auth': [ - 'APIKey' - ], - 'endpoint_path': '/payments/{id}/rtp', - 'operation_id': 'send_request', - 'http_method': 'POST', - 'servers': None, - }, - params_map={ - 'all': [ - 'id', - 'send_payment_request_request', - ], - 'required': [ - 'id', - 'send_payment_request_request', - ], - 'nullable': [ - ], - 'enum': [ - ], - 'validation': [ - ] - }, - root_map={ - 'validations': { - }, - 'allowed_values': { - }, - 'openapi_types': { - 'id': - (str,), - 'send_payment_request_request': - (SendPaymentRequestRequest,), - }, - 'attribute_map': { - 'id': 'id', - }, - 'location_map': { - 'id': 'path', - 'send_payment_request_request': 'body', - }, - 'collection_format_map': { - } - }, - headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [ - 'application/json' - ] - }, - api_client=api_client - ) + + @validate_call def cancel( + self, + id: Annotated[StrictStr, Field(description="The payment ID")], + cancel_payment_request: Optional[CancelPaymentRequest] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> Payment: + """Cancel Payment + +

Releases reserved funds from a previously authorized payment. This endpoint can only be used with payments in AUTHORIZED status.

This operation is part of the two-step authorization flow:

  1. Authorize: Create a payment with transactionType: AUTH to reserve funds
  2. Cancel: Release the reserved funds if you decide not to capture the payment

Cancellation makes the reserved funds available to the customer again and prevents you from being able to capture those funds in the future. Once cancelled, an authorization cannot be reactivated.

+ + :param id: The payment ID (required) + :type id: str + :param cancel_payment_request: + :type cancel_payment_request: CancelPaymentRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._cancel_serialize( + id=id, + cancel_payment_request=cancel_payment_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Payment", + '400': "Error", + '401': "Error", + '404': "Error", + '422': "Error", + '500': "Error", + '503': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def cancel_with_http_info( + self, + id: Annotated[StrictStr, Field(description="The payment ID")], + cancel_payment_request: Optional[CancelPaymentRequest] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[Payment]: + """Cancel Payment + +

Releases reserved funds from a previously authorized payment. This endpoint can only be used with payments in AUTHORIZED status.

This operation is part of the two-step authorization flow:

  1. Authorize: Create a payment with transactionType: AUTH to reserve funds
  2. Cancel: Release the reserved funds if you decide not to capture the payment

Cancellation makes the reserved funds available to the customer again and prevents you from being able to capture those funds in the future. Once cancelled, an authorization cannot be reactivated.

+ + :param id: The payment ID (required) + :type id: str + :param cancel_payment_request: + :type cancel_payment_request: CancelPaymentRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._cancel_serialize( + id=id, + cancel_payment_request=cancel_payment_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Payment", + '400': "Error", + '401': "Error", + '404': "Error", + '422': "Error", + '500': "Error", + '503': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def cancel_without_preload_content( + self, + id: Annotated[StrictStr, Field(description="The payment ID")], + cancel_payment_request: Optional[CancelPaymentRequest] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Cancel Payment + +

Releases reserved funds from a previously authorized payment. This endpoint can only be used with payments in AUTHORIZED status.

This operation is part of the two-step authorization flow:

  1. Authorize: Create a payment with transactionType: AUTH to reserve funds
  2. Cancel: Release the reserved funds if you decide not to capture the payment

Cancellation makes the reserved funds available to the customer again and prevents you from being able to capture those funds in the future. Once cancelled, an authorization cannot be reactivated.

+ + :param id: The payment ID (required) + :type id: str + :param cancel_payment_request: + :type cancel_payment_request: CancelPaymentRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._cancel_serialize( + id=id, + cancel_payment_request=cancel_payment_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Payment", + '400': "Error", + '401': "Error", + '404': "Error", + '422': "Error", + '500': "Error", + '503': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _cancel_serialize( self, id, - **kwargs - ): - """Cancel Payment # noqa: E501 - -

Releases reserved funds from a previously authorized payment. This endpoint can only be used with payments in AUTHORIZED status.

This operation is part of the two-step authorization flow:

  1. Authorize: Create a payment with transactionType: AUTH to reserve funds
  2. Cancel: Release the reserved funds if you decide not to capture the payment

Cancellation makes the reserved funds available to the customer again and prevents you from being able to capture those funds in the future. Once cancelled, an authorization cannot be reactivated.

# 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(id, async_req=True) - >>> result = thread.get() - - Args: - id (str): The payment ID - - Keyword Args: - cancel_payment_request (CancelPaymentRequest): [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 - will be returned without reading/decoding response data. - Default is True. - _request_timeout (int/float/tuple): timeout setting for this request. If - one number provided, it will be total request timeout. It can also - be a pair (tuple) of (connection, read) timeouts. - Default is None. - _check_input_type (bool): specifies if type checking - should be done one the data sent to the server. - Default is True. - _check_return_type (bool): specifies if type checking - should be done one the data received from the server. - Default is True. - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _content_type (str/None): force body content-type. - Default is None and content-type will be predicted by allowed - content-types and body. - _host_index (int/None): specifies the index of the server - that we want to use. - Default is read from the configuration. - _request_auths (list): set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - Default is None - async_req (bool): execute request asynchronously - - Returns: - Payment - If the method is called asynchronously, returns the request - thread. - """ - kwargs['async_req'] = kwargs.get( - 'async_req', False - ) - kwargs['_return_http_data_only'] = kwargs.get( - '_return_http_data_only', True - ) - kwargs['_preload_content'] = kwargs.get( - '_preload_content', True - ) - kwargs['_request_timeout'] = kwargs.get( - '_request_timeout', None - ) - kwargs['_check_input_type'] = kwargs.get( - '_check_input_type', True - ) - kwargs['_check_return_type'] = kwargs.get( - '_check_return_type', True - ) - kwargs['_spec_property_naming'] = kwargs.get( - '_spec_property_naming', False - ) - kwargs['_content_type'] = kwargs.get( - '_content_type') - kwargs['_host_index'] = kwargs.get('_host_index') - kwargs['_request_auths'] = kwargs.get('_request_auths', None) - kwargs['id'] = \ - id - return self.cancel_endpoint.call_with_http_info(**kwargs) - + cancel_payment_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if id is not None: + _path_params['id'] = id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if cancel_payment_request is not None: + _body_params = cancel_payment_request + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'APIKey' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/payments/{id}/cancel', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call def capture( + self, + id: Annotated[StrictStr, Field(description="The payment ID")], + capture_payment_request: Optional[CapturePaymentRequest] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> Payment: + """Capture Payment + +

Captures funds from a previously authorized payment. This endpoint can only be used with payments in AUTHORIZED status.

This operation completes the two-step authorization flow:

  1. Authorize: Create a payment with transactionType: AUTH to reserve funds
  2. Capture: Transfer the reserved funds to your account when ready to fulfill the order

Important: Authorized payments expire after exactly seven days. After expiration, they will be marked as EXPIRED and can no longer be captured. Be sure to capture funds within this timeframe or communicate with your customer about a new payment.

+ + :param id: The payment ID (required) + :type id: str + :param capture_payment_request: + :type capture_payment_request: CapturePaymentRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._capture_serialize( + id=id, + capture_payment_request=capture_payment_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Payment", + '400': "Error", + '401': "Error", + '404': "Error", + '422': "Error", + '500': "Error", + '503': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def capture_with_http_info( + self, + id: Annotated[StrictStr, Field(description="The payment ID")], + capture_payment_request: Optional[CapturePaymentRequest] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[Payment]: + """Capture Payment + +

Captures funds from a previously authorized payment. This endpoint can only be used with payments in AUTHORIZED status.

This operation completes the two-step authorization flow:

  1. Authorize: Create a payment with transactionType: AUTH to reserve funds
  2. Capture: Transfer the reserved funds to your account when ready to fulfill the order

Important: Authorized payments expire after exactly seven days. After expiration, they will be marked as EXPIRED and can no longer be captured. Be sure to capture funds within this timeframe or communicate with your customer about a new payment.

+ + :param id: The payment ID (required) + :type id: str + :param capture_payment_request: + :type capture_payment_request: CapturePaymentRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._capture_serialize( + id=id, + capture_payment_request=capture_payment_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Payment", + '400': "Error", + '401': "Error", + '404': "Error", + '422': "Error", + '500': "Error", + '503': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def capture_without_preload_content( + self, + id: Annotated[StrictStr, Field(description="The payment ID")], + capture_payment_request: Optional[CapturePaymentRequest] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Capture Payment + +

Captures funds from a previously authorized payment. This endpoint can only be used with payments in AUTHORIZED status.

This operation completes the two-step authorization flow:

  1. Authorize: Create a payment with transactionType: AUTH to reserve funds
  2. Capture: Transfer the reserved funds to your account when ready to fulfill the order

Important: Authorized payments expire after exactly seven days. After expiration, they will be marked as EXPIRED and can no longer be captured. Be sure to capture funds within this timeframe or communicate with your customer about a new payment.

+ + :param id: The payment ID (required) + :type id: str + :param capture_payment_request: + :type capture_payment_request: CapturePaymentRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._capture_serialize( + id=id, + capture_payment_request=capture_payment_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Payment", + '400': "Error", + '401': "Error", + '404': "Error", + '422': "Error", + '500': "Error", + '503': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _capture_serialize( self, id, - **kwargs - ): - """Capture Payment # noqa: E501 - -

Captures funds from a previously authorized payment. This endpoint can only be used with payments in AUTHORIZED status.

This operation completes the two-step authorization flow:

  1. Authorize: Create a payment with transactionType: AUTH to reserve funds
  2. Capture: Transfer the reserved funds to your account when ready to fulfill the order

Important: Authorized payments expire after exactly seven days. After expiration, they will be marked as EXPIRED and can no longer be captured. Be sure to capture funds within this timeframe or communicate with your customer about a new payment.

# 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(id, async_req=True) - >>> result = thread.get() - - Args: - id (str): The payment ID - - Keyword Args: - capture_payment_request (CapturePaymentRequest): [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 - will be returned without reading/decoding response data. - Default is True. - _request_timeout (int/float/tuple): timeout setting for this request. If - one number provided, it will be total request timeout. It can also - be a pair (tuple) of (connection, read) timeouts. - Default is None. - _check_input_type (bool): specifies if type checking - should be done one the data sent to the server. - Default is True. - _check_return_type (bool): specifies if type checking - should be done one the data received from the server. - Default is True. - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _content_type (str/None): force body content-type. - Default is None and content-type will be predicted by allowed - content-types and body. - _host_index (int/None): specifies the index of the server - that we want to use. - Default is read from the configuration. - _request_auths (list): set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - Default is None - async_req (bool): execute request asynchronously - - Returns: - Payment - If the method is called asynchronously, returns the request - thread. - """ - kwargs['async_req'] = kwargs.get( - 'async_req', False - ) - kwargs['_return_http_data_only'] = kwargs.get( - '_return_http_data_only', True - ) - kwargs['_preload_content'] = kwargs.get( - '_preload_content', True - ) - kwargs['_request_timeout'] = kwargs.get( - '_request_timeout', None - ) - kwargs['_check_input_type'] = kwargs.get( - '_check_input_type', True - ) - kwargs['_check_return_type'] = kwargs.get( - '_check_return_type', True - ) - kwargs['_spec_property_naming'] = kwargs.get( - '_spec_property_naming', False - ) - kwargs['_content_type'] = kwargs.get( - '_content_type') - kwargs['_host_index'] = kwargs.get('_host_index') - kwargs['_request_auths'] = kwargs.get('_request_auths', None) - kwargs['id'] = \ - id - return self.capture_endpoint.call_with_http_info(**kwargs) - + capture_payment_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if id is not None: + _path_params['id'] = id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if capture_payment_request is not None: + _body_params = capture_payment_request + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'APIKey' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/payments/{id}/capture', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call def confirm( + self, + id: Annotated[StrictStr, Field(description="The payment ID")], + confirm_payment_request: Optional[ConfirmPaymentRequest] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> Payment: + """Confirm Payment + +

Confirms a payment that was created without payment details. This endpoint can only be used with payments in PENDING status.

The two-step payment flow:

  1. Create: First, create a payment without payment details (status: PENDING)
  2. Confirm: Then provide payment details to complete the transaction

When confirming a payment, you can use:

  • A newly generated paymentToken from monei.js Components
  • A permanent paymentToken from a previous payment (generated with generatePaymentToken: true)

Using permanent payment tokens enables one-click checkout experiences for returning customers without requiring them to re-enter their payment information.

You can provide additional customer information during confirmation, which will override any corresponding information originally passed in the payment creation request.

+ + :param id: The payment ID (required) + :type id: str + :param confirm_payment_request: + :type confirm_payment_request: ConfirmPaymentRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._confirm_serialize( + id=id, + confirm_payment_request=confirm_payment_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Payment", + '400': "Error", + '401': "Error", + '404': "Error", + '422': "Error", + '500': "Error", + '503': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def confirm_with_http_info( + self, + id: Annotated[StrictStr, Field(description="The payment ID")], + confirm_payment_request: Optional[ConfirmPaymentRequest] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[Payment]: + """Confirm Payment + +

Confirms a payment that was created without payment details. This endpoint can only be used with payments in PENDING status.

The two-step payment flow:

  1. Create: First, create a payment without payment details (status: PENDING)
  2. Confirm: Then provide payment details to complete the transaction

When confirming a payment, you can use:

  • A newly generated paymentToken from monei.js Components
  • A permanent paymentToken from a previous payment (generated with generatePaymentToken: true)

Using permanent payment tokens enables one-click checkout experiences for returning customers without requiring them to re-enter their payment information.

You can provide additional customer information during confirmation, which will override any corresponding information originally passed in the payment creation request.

+ + :param id: The payment ID (required) + :type id: str + :param confirm_payment_request: + :type confirm_payment_request: ConfirmPaymentRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._confirm_serialize( + id=id, + confirm_payment_request=confirm_payment_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Payment", + '400': "Error", + '401': "Error", + '404': "Error", + '422': "Error", + '500': "Error", + '503': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def confirm_without_preload_content( + self, + id: Annotated[StrictStr, Field(description="The payment ID")], + confirm_payment_request: Optional[ConfirmPaymentRequest] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Confirm Payment + +

Confirms a payment that was created without payment details. This endpoint can only be used with payments in PENDING status.

The two-step payment flow:

  1. Create: First, create a payment without payment details (status: PENDING)
  2. Confirm: Then provide payment details to complete the transaction

When confirming a payment, you can use:

  • A newly generated paymentToken from monei.js Components
  • A permanent paymentToken from a previous payment (generated with generatePaymentToken: true)

Using permanent payment tokens enables one-click checkout experiences for returning customers without requiring them to re-enter their payment information.

You can provide additional customer information during confirmation, which will override any corresponding information originally passed in the payment creation request.

+ + :param id: The payment ID (required) + :type id: str + :param confirm_payment_request: + :type confirm_payment_request: ConfirmPaymentRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._confirm_serialize( + id=id, + confirm_payment_request=confirm_payment_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Payment", + '400': "Error", + '401': "Error", + '404': "Error", + '422': "Error", + '500': "Error", + '503': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _confirm_serialize( self, id, - **kwargs - ): - """Confirm Payment # noqa: E501 - -

Confirms a payment that was created without payment details. This endpoint can only be used with payments in PENDING status.

The two-step payment flow:

  1. Create: First, create a payment without payment details (status: PENDING)
  2. Confirm: Then provide payment details to complete the transaction

When confirming a payment, you can use:

  • A newly generated paymentToken from monei.js Components
  • A permanent paymentToken from a previous payment (generated with generatePaymentToken: true)

Using permanent payment tokens enables one-click checkout experiences for returning customers without requiring them to re-enter their payment information.

You can provide additional customer information during confirmation, which will override any corresponding information originally passed in the payment creation 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.confirm(id, async_req=True) - >>> result = thread.get() - - Args: - id (str): The payment ID - - Keyword Args: - confirm_payment_request (ConfirmPaymentRequest): [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 - will be returned without reading/decoding response data. - Default is True. - _request_timeout (int/float/tuple): timeout setting for this request. If - one number provided, it will be total request timeout. It can also - be a pair (tuple) of (connection, read) timeouts. - Default is None. - _check_input_type (bool): specifies if type checking - should be done one the data sent to the server. - Default is True. - _check_return_type (bool): specifies if type checking - should be done one the data received from the server. - Default is True. - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _content_type (str/None): force body content-type. - Default is None and content-type will be predicted by allowed - content-types and body. - _host_index (int/None): specifies the index of the server - that we want to use. - Default is read from the configuration. - _request_auths (list): set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - Default is None - async_req (bool): execute request asynchronously - - Returns: - Payment - If the method is called asynchronously, returns the request - thread. - """ - kwargs['async_req'] = kwargs.get( - 'async_req', False - ) - kwargs['_return_http_data_only'] = kwargs.get( - '_return_http_data_only', True - ) - kwargs['_preload_content'] = kwargs.get( - '_preload_content', True - ) - kwargs['_request_timeout'] = kwargs.get( - '_request_timeout', None - ) - kwargs['_check_input_type'] = kwargs.get( - '_check_input_type', True - ) - kwargs['_check_return_type'] = kwargs.get( - '_check_return_type', True - ) - kwargs['_spec_property_naming'] = kwargs.get( - '_spec_property_naming', False - ) - kwargs['_content_type'] = kwargs.get( - '_content_type') - kwargs['_host_index'] = kwargs.get('_host_index') - kwargs['_request_auths'] = kwargs.get('_request_auths', None) - kwargs['id'] = \ - id - return self.confirm_endpoint.call_with_http_info(**kwargs) - + confirm_payment_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if id is not None: + _path_params['id'] = id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if confirm_payment_request is not None: + _body_params = confirm_payment_request + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'APIKey' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/payments/{id}/confirm', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call def create( + self, + create_payment_request: CreatePaymentRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> Payment: + """Create Payment + +

Creates a new payment with the specified parameters.

You can create a payment in two ways:

  1. Immediate processing: Provide a paymentToken or paymentMethod - The payment will be processed instantly
  2. Deferred processing: Create without payment details - The payment remains in PENDING status until you confirm it later using the confirm endpoint

When creating a payment without payment details, you can redirect customers to the hosted payment page where they can select their preferred payment method and complete the transaction.

For immediate processing, use one of these token options:

  • A temporary paymentToken generated on the frontend using monei.js Components
  • A permanent paymentToken from a previous successful payment (when generatePaymentToken: true was included)

Permanent tokens enable one-click checkout experiences for returning customers by allowing you to securely store and reuse payment details without requiring customers to re-enter their information.

+ + :param create_payment_request: (required) + :type create_payment_request: CreatePaymentRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_serialize( + create_payment_request=create_payment_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Payment", + '400': "Error", + '401': "Error", + '404': "Error", + '422': "Error", + '500': "Error", + '503': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def create_with_http_info( + self, + create_payment_request: CreatePaymentRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[Payment]: + """Create Payment + +

Creates a new payment with the specified parameters.

You can create a payment in two ways:

  1. Immediate processing: Provide a paymentToken or paymentMethod - The payment will be processed instantly
  2. Deferred processing: Create without payment details - The payment remains in PENDING status until you confirm it later using the confirm endpoint

When creating a payment without payment details, you can redirect customers to the hosted payment page where they can select their preferred payment method and complete the transaction.

For immediate processing, use one of these token options:

  • A temporary paymentToken generated on the frontend using monei.js Components
  • A permanent paymentToken from a previous successful payment (when generatePaymentToken: true was included)

Permanent tokens enable one-click checkout experiences for returning customers by allowing you to securely store and reuse payment details without requiring customers to re-enter their information.

+ + :param create_payment_request: (required) + :type create_payment_request: CreatePaymentRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_serialize( + create_payment_request=create_payment_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Payment", + '400': "Error", + '401': "Error", + '404': "Error", + '422': "Error", + '500': "Error", + '503': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def create_without_preload_content( + self, + create_payment_request: CreatePaymentRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Create Payment + +

Creates a new payment with the specified parameters.

You can create a payment in two ways:

  1. Immediate processing: Provide a paymentToken or paymentMethod - The payment will be processed instantly
  2. Deferred processing: Create without payment details - The payment remains in PENDING status until you confirm it later using the confirm endpoint

When creating a payment without payment details, you can redirect customers to the hosted payment page where they can select their preferred payment method and complete the transaction.

For immediate processing, use one of these token options:

  • A temporary paymentToken generated on the frontend using monei.js Components
  • A permanent paymentToken from a previous successful payment (when generatePaymentToken: true was included)

Permanent tokens enable one-click checkout experiences for returning customers by allowing you to securely store and reuse payment details without requiring customers to re-enter their information.

+ + :param create_payment_request: (required) + :type create_payment_request: CreatePaymentRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_serialize( + create_payment_request=create_payment_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Payment", + '400': "Error", + '401': "Error", + '404': "Error", + '422': "Error", + '500': "Error", + '503': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _create_serialize( self, create_payment_request, - **kwargs - ): - """Create Payment # noqa: E501 - -

Creates a new payment with the specified parameters.

You can create a payment in two ways:

  1. Immediate processing: Provide a paymentToken or paymentMethod - The payment will be processed instantly
  2. Deferred processing: Create without payment details - The payment remains in PENDING status until you confirm it later using the confirm endpoint

When creating a payment without payment details, you can redirect customers to the hosted payment page where they can select their preferred payment method and complete the transaction.

For immediate processing, use one of these token options:

  • A temporary paymentToken generated on the frontend using monei.js Components
  • A permanent paymentToken from a previous successful payment (when generatePaymentToken: true was included)

Permanent tokens enable one-click checkout experiences for returning customers by allowing you to securely store and reuse payment details without requiring customers to re-enter their information.

# 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(create_payment_request, async_req=True) - >>> result = thread.get() - - Args: - create_payment_request (CreatePaymentRequest): - - Keyword Args: - _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 - will be returned without reading/decoding response data. - Default is True. - _request_timeout (int/float/tuple): timeout setting for this request. If - one number provided, it will be total request timeout. It can also - be a pair (tuple) of (connection, read) timeouts. - Default is None. - _check_input_type (bool): specifies if type checking - should be done one the data sent to the server. - Default is True. - _check_return_type (bool): specifies if type checking - should be done one the data received from the server. - Default is True. - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _content_type (str/None): force body content-type. - Default is None and content-type will be predicted by allowed - content-types and body. - _host_index (int/None): specifies the index of the server - that we want to use. - Default is read from the configuration. - _request_auths (list): set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - Default is None - async_req (bool): execute request asynchronously - - Returns: - Payment - If the method is called asynchronously, returns the request - thread. - """ - kwargs['async_req'] = kwargs.get( - 'async_req', False - ) - kwargs['_return_http_data_only'] = kwargs.get( - '_return_http_data_only', True - ) - kwargs['_preload_content'] = kwargs.get( - '_preload_content', True - ) - kwargs['_request_timeout'] = kwargs.get( - '_request_timeout', None - ) - kwargs['_check_input_type'] = kwargs.get( - '_check_input_type', True - ) - kwargs['_check_return_type'] = kwargs.get( - '_check_return_type', True - ) - kwargs['_spec_property_naming'] = kwargs.get( - '_spec_property_naming', False - ) - kwargs['_content_type'] = kwargs.get( - '_content_type') - kwargs['_host_index'] = kwargs.get('_host_index') - kwargs['_request_auths'] = kwargs.get('_request_auths', None) - kwargs['create_payment_request'] = \ - create_payment_request - return self.create_endpoint.call_with_http_info(**kwargs) - + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if create_payment_request is not None: + _body_params = create_payment_request + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'APIKey' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/payments', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call def get( + self, + id: Annotated[StrictStr, Field(description="The payment ID")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> Payment: + """Get Payment + +

Retrieves the complete details of an existing payment by its unique ID.

This endpoint returns all available information about the payment, including its current status, amount, customer details, timestamps, and transaction history. Use this to check the status of a payment, verify payment details, or retrieve information for your records.

Supply the unique payment ID that was returned from your previous request.

+ + :param id: The payment ID (required) + :type id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_serialize( + id=id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Payment", + '400': "Error", + '401': "Error", + '404': "Error", + '422': "Error", + '500': "Error", + '503': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def get_with_http_info( + self, + id: Annotated[StrictStr, Field(description="The payment ID")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[Payment]: + """Get Payment + +

Retrieves the complete details of an existing payment by its unique ID.

This endpoint returns all available information about the payment, including its current status, amount, customer details, timestamps, and transaction history. Use this to check the status of a payment, verify payment details, or retrieve information for your records.

Supply the unique payment ID that was returned from your previous request.

+ + :param id: The payment ID (required) + :type id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_serialize( + id=id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Payment", + '400': "Error", + '401': "Error", + '404': "Error", + '422': "Error", + '500': "Error", + '503': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def get_without_preload_content( + self, + id: Annotated[StrictStr, Field(description="The payment ID")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get Payment + +

Retrieves the complete details of an existing payment by its unique ID.

This endpoint returns all available information about the payment, including its current status, amount, customer details, timestamps, and transaction history. Use this to check the status of a payment, verify payment details, or retrieve information for your records.

Supply the unique payment ID that was returned from your previous request.

+ + :param id: The payment ID (required) + :type id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_serialize( + id=id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Payment", + '400': "Error", + '401': "Error", + '404': "Error", + '422': "Error", + '500': "Error", + '503': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_serialize( self, id, - **kwargs - ): - """Get Payment # noqa: E501 - -

Retrieves the complete details of an existing payment by its unique ID.

This endpoint returns all available information about the payment, including its current status, amount, customer details, timestamps, and transaction history. Use this to check the status of a payment, verify payment details, or retrieve information for your records.

Supply the unique payment ID that was returned from your previous 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.get(id, async_req=True) - >>> result = thread.get() - - Args: - id (str): The payment ID - - Keyword Args: - _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 - will be returned without reading/decoding response data. - Default is True. - _request_timeout (int/float/tuple): timeout setting for this request. If - one number provided, it will be total request timeout. It can also - be a pair (tuple) of (connection, read) timeouts. - Default is None. - _check_input_type (bool): specifies if type checking - should be done one the data sent to the server. - Default is True. - _check_return_type (bool): specifies if type checking - should be done one the data received from the server. - Default is True. - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _content_type (str/None): force body content-type. - Default is None and content-type will be predicted by allowed - content-types and body. - _host_index (int/None): specifies the index of the server - that we want to use. - Default is read from the configuration. - _request_auths (list): set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - Default is None - async_req (bool): execute request asynchronously - - Returns: - Payment - If the method is called asynchronously, returns the request - thread. - """ - kwargs['async_req'] = kwargs.get( - 'async_req', False - ) - kwargs['_return_http_data_only'] = kwargs.get( - '_return_http_data_only', True - ) - kwargs['_preload_content'] = kwargs.get( - '_preload_content', True - ) - kwargs['_request_timeout'] = kwargs.get( - '_request_timeout', None - ) - kwargs['_check_input_type'] = kwargs.get( - '_check_input_type', True - ) - kwargs['_check_return_type'] = kwargs.get( - '_check_return_type', True - ) - kwargs['_spec_property_naming'] = kwargs.get( - '_spec_property_naming', False - ) - kwargs['_content_type'] = kwargs.get( - '_content_type') - kwargs['_host_index'] = kwargs.get('_host_index') - kwargs['_request_auths'] = kwargs.get('_request_auths', None) - kwargs['id'] = \ - id - return self.get_endpoint.call_with_http_info(**kwargs) + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if id is not None: + _path_params['id'] = id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'APIKey' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/payments/{id}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + @validate_call def recurring( + self, + sequence_id: Annotated[StrictStr, Field(description="The sequence ID")], + recurring_payment_request: Optional[RecurringPaymentRequest] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> Payment: + """Recurring Payment + +

Creates a subsequent charge using the payment details from a previous transaction.

This endpoint enables recurring billing and subscription payments by:

  • Using the same payment method as the original payment
  • Charging the customer without requiring them to re-enter payment details
  • Supporting variable or fixed amounts (defaults to the original payment amount if not specified)

Prerequisites:

  1. The initial payment must be created with the sequence parameter
  2. The initial payment will return a sequenceId in the response
  3. This sequenceId must be provided in the URL path when making subsequent recurring charges

Ideal for subscription services, membership renewals, and installment payments.

Need more advanced subscription management? For comprehensive subscription management with features like billing cycles, trial periods, and automatic recurring billing, consider using the Subscriptions API instead. It provides a complete solution for creating and managing subscription-based services.

+ + :param sequence_id: The sequence ID (required) + :type sequence_id: str + :param recurring_payment_request: + :type recurring_payment_request: RecurringPaymentRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._recurring_serialize( + sequence_id=sequence_id, + recurring_payment_request=recurring_payment_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Payment", + '400': "Error", + '401': "Error", + '404': "Error", + '422': "Error", + '500': "Error", + '503': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def recurring_with_http_info( + self, + sequence_id: Annotated[StrictStr, Field(description="The sequence ID")], + recurring_payment_request: Optional[RecurringPaymentRequest] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[Payment]: + """Recurring Payment + +

Creates a subsequent charge using the payment details from a previous transaction.

This endpoint enables recurring billing and subscription payments by:

  • Using the same payment method as the original payment
  • Charging the customer without requiring them to re-enter payment details
  • Supporting variable or fixed amounts (defaults to the original payment amount if not specified)

Prerequisites:

  1. The initial payment must be created with the sequence parameter
  2. The initial payment will return a sequenceId in the response
  3. This sequenceId must be provided in the URL path when making subsequent recurring charges

Ideal for subscription services, membership renewals, and installment payments.

Need more advanced subscription management? For comprehensive subscription management with features like billing cycles, trial periods, and automatic recurring billing, consider using the Subscriptions API instead. It provides a complete solution for creating and managing subscription-based services.

+ + :param sequence_id: The sequence ID (required) + :type sequence_id: str + :param recurring_payment_request: + :type recurring_payment_request: RecurringPaymentRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._recurring_serialize( + sequence_id=sequence_id, + recurring_payment_request=recurring_payment_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Payment", + '400': "Error", + '401': "Error", + '404': "Error", + '422': "Error", + '500': "Error", + '503': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def recurring_without_preload_content( + self, + sequence_id: Annotated[StrictStr, Field(description="The sequence ID")], + recurring_payment_request: Optional[RecurringPaymentRequest] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Recurring Payment + +

Creates a subsequent charge using the payment details from a previous transaction.

This endpoint enables recurring billing and subscription payments by:

  • Using the same payment method as the original payment
  • Charging the customer without requiring them to re-enter payment details
  • Supporting variable or fixed amounts (defaults to the original payment amount if not specified)

Prerequisites:

  1. The initial payment must be created with the sequence parameter
  2. The initial payment will return a sequenceId in the response
  3. This sequenceId must be provided in the URL path when making subsequent recurring charges

Ideal for subscription services, membership renewals, and installment payments.

Need more advanced subscription management? For comprehensive subscription management with features like billing cycles, trial periods, and automatic recurring billing, consider using the Subscriptions API instead. It provides a complete solution for creating and managing subscription-based services.

+ + :param sequence_id: The sequence ID (required) + :type sequence_id: str + :param recurring_payment_request: + :type recurring_payment_request: RecurringPaymentRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._recurring_serialize( + sequence_id=sequence_id, + recurring_payment_request=recurring_payment_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Payment", + '400': "Error", + '401': "Error", + '404': "Error", + '422': "Error", + '500': "Error", + '503': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _recurring_serialize( self, sequence_id, - **kwargs - ): - """Recurring Payment # noqa: E501 - -

Creates a subsequent charge using the payment details from a previous transaction.

This endpoint enables recurring billing and subscription payments by:

  • Using the same payment method as the original payment
  • Charging the customer without requiring them to re-enter payment details
  • Supporting variable or fixed amounts (defaults to the original payment amount if not specified)

Prerequisites:

  1. The initial payment must be created with the sequence parameter
  2. The initial payment will return a sequenceId in the response
  3. This sequenceId must be provided in the URL path when making subsequent recurring charges

Ideal for subscription services, membership renewals, and installment payments.

Need more advanced subscription management? For comprehensive subscription management with features like billing cycles, trial periods, and automatic recurring billing, consider using the Subscriptions API instead. It provides a complete solution for creating and managing subscription-based services.

# noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.recurring(sequence_id, async_req=True) - >>> result = thread.get() - - Args: - sequence_id (str): The sequence ID - - Keyword Args: - recurring_payment_request (RecurringPaymentRequest): [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 - will be returned without reading/decoding response data. - Default is True. - _request_timeout (int/float/tuple): timeout setting for this request. If - one number provided, it will be total request timeout. It can also - be a pair (tuple) of (connection, read) timeouts. - Default is None. - _check_input_type (bool): specifies if type checking - should be done one the data sent to the server. - Default is True. - _check_return_type (bool): specifies if type checking - should be done one the data received from the server. - Default is True. - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _content_type (str/None): force body content-type. - Default is None and content-type will be predicted by allowed - content-types and body. - _host_index (int/None): specifies the index of the server - that we want to use. - Default is read from the configuration. - _request_auths (list): set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - Default is None - async_req (bool): execute request asynchronously - - Returns: - Payment - If the method is called asynchronously, returns the request - thread. - """ - kwargs['async_req'] = kwargs.get( - 'async_req', False - ) - kwargs['_return_http_data_only'] = kwargs.get( - '_return_http_data_only', True - ) - kwargs['_preload_content'] = kwargs.get( - '_preload_content', True - ) - kwargs['_request_timeout'] = kwargs.get( - '_request_timeout', None - ) - kwargs['_check_input_type'] = kwargs.get( - '_check_input_type', True - ) - kwargs['_check_return_type'] = kwargs.get( - '_check_return_type', True - ) - kwargs['_spec_property_naming'] = kwargs.get( - '_spec_property_naming', False - ) - kwargs['_content_type'] = kwargs.get( - '_content_type') - kwargs['_host_index'] = kwargs.get('_host_index') - kwargs['_request_auths'] = kwargs.get('_request_auths', None) - kwargs['sequence_id'] = \ - sequence_id - return self.recurring_endpoint.call_with_http_info(**kwargs) - + recurring_payment_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if sequence_id is not None: + _path_params['sequenceId'] = sequence_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if recurring_payment_request is not None: + _body_params = recurring_payment_request + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'APIKey' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/payments/{sequenceId}/recurring', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call def refund( + self, + id: Annotated[StrictStr, Field(description="The payment ID")], + refund_payment_request: Optional[RefundPaymentRequest] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> Payment: + """Refund Payment + +

Returns funds from a completed payment back to the customer's original payment method.

Refund options:

  • Full refund: Return the entire payment amount
  • Partial refund: Specify an amount less than the original payment
  • Multiple partial refunds: Issue several partial refunds until the total payment amount is reached

Limitations:

  • You can only refund payments that have been successfully processed
  • A payment can only be refunded up to its original amount
  • Once fully refunded, a payment cannot be refunded again
  • Attempting to refund more than the remaining available amount will result in an error
+ + :param id: The payment ID (required) + :type id: str + :param refund_payment_request: + :type refund_payment_request: RefundPaymentRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._refund_serialize( + id=id, + refund_payment_request=refund_payment_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Payment", + '400': "Error", + '401': "Error", + '404': "Error", + '422': "Error", + '500': "Error", + '503': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def refund_with_http_info( + self, + id: Annotated[StrictStr, Field(description="The payment ID")], + refund_payment_request: Optional[RefundPaymentRequest] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[Payment]: + """Refund Payment + +

Returns funds from a completed payment back to the customer's original payment method.

Refund options:

  • Full refund: Return the entire payment amount
  • Partial refund: Specify an amount less than the original payment
  • Multiple partial refunds: Issue several partial refunds until the total payment amount is reached

Limitations:

  • You can only refund payments that have been successfully processed
  • A payment can only be refunded up to its original amount
  • Once fully refunded, a payment cannot be refunded again
  • Attempting to refund more than the remaining available amount will result in an error
+ + :param id: The payment ID (required) + :type id: str + :param refund_payment_request: + :type refund_payment_request: RefundPaymentRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._refund_serialize( + id=id, + refund_payment_request=refund_payment_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Payment", + '400': "Error", + '401': "Error", + '404': "Error", + '422': "Error", + '500': "Error", + '503': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def refund_without_preload_content( + self, + id: Annotated[StrictStr, Field(description="The payment ID")], + refund_payment_request: Optional[RefundPaymentRequest] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Refund Payment + +

Returns funds from a completed payment back to the customer's original payment method.

Refund options:

  • Full refund: Return the entire payment amount
  • Partial refund: Specify an amount less than the original payment
  • Multiple partial refunds: Issue several partial refunds until the total payment amount is reached

Limitations:

  • You can only refund payments that have been successfully processed
  • A payment can only be refunded up to its original amount
  • Once fully refunded, a payment cannot be refunded again
  • Attempting to refund more than the remaining available amount will result in an error
+ + :param id: The payment ID (required) + :type id: str + :param refund_payment_request: + :type refund_payment_request: RefundPaymentRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._refund_serialize( + id=id, + refund_payment_request=refund_payment_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Payment", + '400': "Error", + '401': "Error", + '404': "Error", + '422': "Error", + '500': "Error", + '503': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _refund_serialize( self, id, - **kwargs - ): - """Refund Payment # noqa: E501 - -

Returns funds from a completed payment back to the customer's original payment method.

Refund options:

  • Full refund: Return the entire payment amount
  • Partial refund: Specify an amount less than the original payment
  • Multiple partial refunds: Issue several partial refunds until the total payment amount is reached

Limitations:

  • You can only refund payments that have been successfully processed
  • A payment can only be refunded up to its original amount
  • Once fully refunded, a payment cannot be refunded again
  • Attempting to refund more than the remaining available amount will result in an error
# noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.refund(id, async_req=True) - >>> result = thread.get() - - Args: - id (str): The payment ID - - Keyword Args: - refund_payment_request (RefundPaymentRequest): [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 - will be returned without reading/decoding response data. - Default is True. - _request_timeout (int/float/tuple): timeout setting for this request. If - one number provided, it will be total request timeout. It can also - be a pair (tuple) of (connection, read) timeouts. - Default is None. - _check_input_type (bool): specifies if type checking - should be done one the data sent to the server. - Default is True. - _check_return_type (bool): specifies if type checking - should be done one the data received from the server. - Default is True. - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _content_type (str/None): force body content-type. - Default is None and content-type will be predicted by allowed - content-types and body. - _host_index (int/None): specifies the index of the server - that we want to use. - Default is read from the configuration. - _request_auths (list): set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - Default is None - async_req (bool): execute request asynchronously - - Returns: - Payment - If the method is called asynchronously, returns the request - thread. - """ - kwargs['async_req'] = kwargs.get( - 'async_req', False - ) - kwargs['_return_http_data_only'] = kwargs.get( - '_return_http_data_only', True - ) - kwargs['_preload_content'] = kwargs.get( - '_preload_content', True - ) - kwargs['_request_timeout'] = kwargs.get( - '_request_timeout', None - ) - kwargs['_check_input_type'] = kwargs.get( - '_check_input_type', True - ) - kwargs['_check_return_type'] = kwargs.get( - '_check_return_type', True - ) - kwargs['_spec_property_naming'] = kwargs.get( - '_spec_property_naming', False - ) - kwargs['_content_type'] = kwargs.get( - '_content_type') - kwargs['_host_index'] = kwargs.get('_host_index') - kwargs['_request_auths'] = kwargs.get('_request_auths', None) - kwargs['id'] = \ - id - return self.refund_endpoint.call_with_http_info(**kwargs) - + refund_payment_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if id is not None: + _path_params['id'] = id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if refund_payment_request is not None: + _body_params = refund_payment_request + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'APIKey' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/payments/{id}/refund', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call def send_link( + self, + id: Annotated[StrictStr, Field(description="The payment ID")], + send_payment_link_request: Optional[SendPaymentLinkRequest] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> Payment: + """Send Payment Link + +

Sends a payment link to the customer through their preferred communication channel.

This API can only be used for payments with the following status:

  • Pending

Delivery channels are automatically selected based on available customer information:

  • If customer email is available: Link is sent via email
  • If customer phone is available: Link is sent via WhatsApp
  • If WhatsApp delivery fails: Link is sent via SMS as a fallback

The payment link allows customers to complete the payment at their convenience using their preferred payment method on the secure MONEI payment page. If no customer contact information is provided, the system will use the details stored in the payment record.

+ + :param id: The payment ID (required) + :type id: str + :param send_payment_link_request: + :type send_payment_link_request: SendPaymentLinkRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._send_link_serialize( + id=id, + send_payment_link_request=send_payment_link_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Payment", + '400': "Error", + '401': "Error", + '404': "Error", + '422': "Error", + '500': "Error", + '503': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def send_link_with_http_info( + self, + id: Annotated[StrictStr, Field(description="The payment ID")], + send_payment_link_request: Optional[SendPaymentLinkRequest] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[Payment]: + """Send Payment Link + +

Sends a payment link to the customer through their preferred communication channel.

This API can only be used for payments with the following status:

  • Pending

Delivery channels are automatically selected based on available customer information:

  • If customer email is available: Link is sent via email
  • If customer phone is available: Link is sent via WhatsApp
  • If WhatsApp delivery fails: Link is sent via SMS as a fallback

The payment link allows customers to complete the payment at their convenience using their preferred payment method on the secure MONEI payment page. If no customer contact information is provided, the system will use the details stored in the payment record.

+ + :param id: The payment ID (required) + :type id: str + :param send_payment_link_request: + :type send_payment_link_request: SendPaymentLinkRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._send_link_serialize( + id=id, + send_payment_link_request=send_payment_link_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Payment", + '400': "Error", + '401': "Error", + '404': "Error", + '422': "Error", + '500': "Error", + '503': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def send_link_without_preload_content( + self, + id: Annotated[StrictStr, Field(description="The payment ID")], + send_payment_link_request: Optional[SendPaymentLinkRequest] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Send Payment Link + +

Sends a payment link to the customer through their preferred communication channel.

This API can only be used for payments with the following status:

  • Pending

Delivery channels are automatically selected based on available customer information:

  • If customer email is available: Link is sent via email
  • If customer phone is available: Link is sent via WhatsApp
  • If WhatsApp delivery fails: Link is sent via SMS as a fallback

The payment link allows customers to complete the payment at their convenience using their preferred payment method on the secure MONEI payment page. If no customer contact information is provided, the system will use the details stored in the payment record.

+ + :param id: The payment ID (required) + :type id: str + :param send_payment_link_request: + :type send_payment_link_request: SendPaymentLinkRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._send_link_serialize( + id=id, + send_payment_link_request=send_payment_link_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Payment", + '400': "Error", + '401': "Error", + '404': "Error", + '422': "Error", + '500': "Error", + '503': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _send_link_serialize( self, id, - **kwargs - ): - """Send Payment Link # noqa: E501 - -

Sends a payment link to the customer through their preferred communication channel.

This API can only be used for payments with the following status:

  • Pending

Delivery channels are automatically selected based on available customer information:

  • If customer email is available: Link is sent via email
  • If customer phone is available: Link is sent via WhatsApp
  • If WhatsApp delivery fails: Link is sent via SMS as a fallback

The payment link allows customers to complete the payment at their convenience using their preferred payment method on the secure MONEI payment page. If no customer contact information is provided, the system will use the details stored in the payment record.

# noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.send_link(id, async_req=True) - >>> result = thread.get() - - Args: - id (str): The payment ID - - Keyword Args: - send_payment_link_request (SendPaymentLinkRequest): [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 - will be returned without reading/decoding response data. - Default is True. - _request_timeout (int/float/tuple): timeout setting for this request. If - one number provided, it will be total request timeout. It can also - be a pair (tuple) of (connection, read) timeouts. - Default is None. - _check_input_type (bool): specifies if type checking - should be done one the data sent to the server. - Default is True. - _check_return_type (bool): specifies if type checking - should be done one the data received from the server. - Default is True. - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _content_type (str/None): force body content-type. - Default is None and content-type will be predicted by allowed - content-types and body. - _host_index (int/None): specifies the index of the server - that we want to use. - Default is read from the configuration. - _request_auths (list): set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - Default is None - async_req (bool): execute request asynchronously - - Returns: - Payment - If the method is called asynchronously, returns the request - thread. - """ - kwargs['async_req'] = kwargs.get( - 'async_req', False - ) - kwargs['_return_http_data_only'] = kwargs.get( - '_return_http_data_only', True - ) - kwargs['_preload_content'] = kwargs.get( - '_preload_content', True - ) - kwargs['_request_timeout'] = kwargs.get( - '_request_timeout', None - ) - kwargs['_check_input_type'] = kwargs.get( - '_check_input_type', True - ) - kwargs['_check_return_type'] = kwargs.get( - '_check_return_type', True - ) - kwargs['_spec_property_naming'] = kwargs.get( - '_spec_property_naming', False - ) - kwargs['_content_type'] = kwargs.get( - '_content_type') - kwargs['_host_index'] = kwargs.get('_host_index') - kwargs['_request_auths'] = kwargs.get('_request_auths', None) - kwargs['id'] = \ - id - return self.send_link_endpoint.call_with_http_info(**kwargs) - + send_payment_link_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if id is not None: + _path_params['id'] = id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if send_payment_link_request is not None: + _body_params = send_payment_link_request + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'APIKey' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/payments/{id}/link', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call def send_receipt( + self, + id: Annotated[StrictStr, Field(description="The payment ID")], + send_payment_receipt_request: Optional[SendPaymentReceiptRequest] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> Payment: + """Send Payment Receipt + +

Sends a payment receipt to the customer through their preferred communication channel.

This API can only be used for payments with the following status:

  • Succeeded

Delivery channels are automatically selected based on available customer information:

  • If customer email is available: Receipt is sent via email
  • If customer phone is available: Receipt is sent via WhatsApp
  • If WhatsApp delivery fails: Receipt is sent via SMS as a fallback

The receipt includes payment details such as amount, date, transaction ID, and merchant information, providing customers with a record of their successful transaction. If no customer contact information is provided, the system will use the details stored in the payment record.

+ + :param id: The payment ID (required) + :type id: str + :param send_payment_receipt_request: + :type send_payment_receipt_request: SendPaymentReceiptRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._send_receipt_serialize( + id=id, + send_payment_receipt_request=send_payment_receipt_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Payment", + '400': "Error", + '401': "Error", + '404': "Error", + '422': "Error", + '500': "Error", + '503': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def send_receipt_with_http_info( + self, + id: Annotated[StrictStr, Field(description="The payment ID")], + send_payment_receipt_request: Optional[SendPaymentReceiptRequest] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[Payment]: + """Send Payment Receipt + +

Sends a payment receipt to the customer through their preferred communication channel.

This API can only be used for payments with the following status:

  • Succeeded

Delivery channels are automatically selected based on available customer information:

  • If customer email is available: Receipt is sent via email
  • If customer phone is available: Receipt is sent via WhatsApp
  • If WhatsApp delivery fails: Receipt is sent via SMS as a fallback

The receipt includes payment details such as amount, date, transaction ID, and merchant information, providing customers with a record of their successful transaction. If no customer contact information is provided, the system will use the details stored in the payment record.

+ + :param id: The payment ID (required) + :type id: str + :param send_payment_receipt_request: + :type send_payment_receipt_request: SendPaymentReceiptRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._send_receipt_serialize( + id=id, + send_payment_receipt_request=send_payment_receipt_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Payment", + '400': "Error", + '401': "Error", + '404': "Error", + '422': "Error", + '500': "Error", + '503': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def send_receipt_without_preload_content( + self, + id: Annotated[StrictStr, Field(description="The payment ID")], + send_payment_receipt_request: Optional[SendPaymentReceiptRequest] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Send Payment Receipt + +

Sends a payment receipt to the customer through their preferred communication channel.

This API can only be used for payments with the following status:

  • Succeeded

Delivery channels are automatically selected based on available customer information:

  • If customer email is available: Receipt is sent via email
  • If customer phone is available: Receipt is sent via WhatsApp
  • If WhatsApp delivery fails: Receipt is sent via SMS as a fallback

The receipt includes payment details such as amount, date, transaction ID, and merchant information, providing customers with a record of their successful transaction. If no customer contact information is provided, the system will use the details stored in the payment record.

+ + :param id: The payment ID (required) + :type id: str + :param send_payment_receipt_request: + :type send_payment_receipt_request: SendPaymentReceiptRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._send_receipt_serialize( + id=id, + send_payment_receipt_request=send_payment_receipt_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Payment", + '400': "Error", + '401': "Error", + '404': "Error", + '422': "Error", + '500': "Error", + '503': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _send_receipt_serialize( self, id, - **kwargs - ): - """Send Payment Receipt # noqa: E501 - -

Sends a payment receipt to the customer through their preferred communication channel.

This API can only be used for payments with the following status:

  • Succeeded

Delivery channels are automatically selected based on available customer information:

  • If customer email is available: Receipt is sent via email
  • If customer phone is available: Receipt is sent via WhatsApp
  • If WhatsApp delivery fails: Receipt is sent via SMS as a fallback

The receipt includes payment details such as amount, date, transaction ID, and merchant information, providing customers with a record of their successful transaction. If no customer contact information is provided, the system will use the details stored in the payment record.

# noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.send_receipt(id, async_req=True) - >>> result = thread.get() - - Args: - id (str): The payment ID - - Keyword Args: - send_payment_receipt_request (SendPaymentReceiptRequest): [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 - will be returned without reading/decoding response data. - Default is True. - _request_timeout (int/float/tuple): timeout setting for this request. If - one number provided, it will be total request timeout. It can also - be a pair (tuple) of (connection, read) timeouts. - Default is None. - _check_input_type (bool): specifies if type checking - should be done one the data sent to the server. - Default is True. - _check_return_type (bool): specifies if type checking - should be done one the data received from the server. - Default is True. - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _content_type (str/None): force body content-type. - Default is None and content-type will be predicted by allowed - content-types and body. - _host_index (int/None): specifies the index of the server - that we want to use. - Default is read from the configuration. - _request_auths (list): set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - Default is None - async_req (bool): execute request asynchronously - - Returns: - Payment - If the method is called asynchronously, returns the request - thread. - """ - kwargs['async_req'] = kwargs.get( - 'async_req', False - ) - kwargs['_return_http_data_only'] = kwargs.get( - '_return_http_data_only', True - ) - kwargs['_preload_content'] = kwargs.get( - '_preload_content', True - ) - kwargs['_request_timeout'] = kwargs.get( - '_request_timeout', None - ) - kwargs['_check_input_type'] = kwargs.get( - '_check_input_type', True - ) - kwargs['_check_return_type'] = kwargs.get( - '_check_return_type', True - ) - kwargs['_spec_property_naming'] = kwargs.get( - '_spec_property_naming', False - ) - kwargs['_content_type'] = kwargs.get( - '_content_type') - kwargs['_host_index'] = kwargs.get('_host_index') - kwargs['_request_auths'] = kwargs.get('_request_auths', None) - kwargs['id'] = \ - id - return self.send_receipt_endpoint.call_with_http_info(**kwargs) - + send_payment_receipt_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if id is not None: + _path_params['id'] = id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if send_payment_receipt_request is not None: + _body_params = send_payment_receipt_request + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'APIKey' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/payments/{id}/receipt', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call def send_request( + self, + id: Annotated[StrictStr, Field(description="The payment ID")], + send_payment_request_request: SendPaymentRequestRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> Payment: + """Send Payment Request + +

Sends a direct payment request to the customer's phone with smart channel selection.

Smart delivery logic based on customer phone capabilities:

  • If the phone number is registered with Bizum and that payment method is available: The customer receives a push notification in their banking app to instantly approve the payment
  • If Bizum is not available or the phone is not registered with Bizum: The customer receives a payment link via WhatsApp to complete the payment

This endpoint provides a streamlined payment experience, especially for Spanish customers with Bizum integration, enabling quick and convenient mobile payments.

+ + :param id: The payment ID (required) + :type id: str + :param send_payment_request_request: (required) + :type send_payment_request_request: SendPaymentRequestRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._send_request_serialize( + id=id, + send_payment_request_request=send_payment_request_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Payment", + '400': "Error", + '401': "Error", + '404': "Error", + '422': "Error", + '500': "Error", + '503': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def send_request_with_http_info( + self, + id: Annotated[StrictStr, Field(description="The payment ID")], + send_payment_request_request: SendPaymentRequestRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[Payment]: + """Send Payment Request + +

Sends a direct payment request to the customer's phone with smart channel selection.

Smart delivery logic based on customer phone capabilities:

  • If the phone number is registered with Bizum and that payment method is available: The customer receives a push notification in their banking app to instantly approve the payment
  • If Bizum is not available or the phone is not registered with Bizum: The customer receives a payment link via WhatsApp to complete the payment

This endpoint provides a streamlined payment experience, especially for Spanish customers with Bizum integration, enabling quick and convenient mobile payments.

+ + :param id: The payment ID (required) + :type id: str + :param send_payment_request_request: (required) + :type send_payment_request_request: SendPaymentRequestRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._send_request_serialize( + id=id, + send_payment_request_request=send_payment_request_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Payment", + '400': "Error", + '401': "Error", + '404': "Error", + '422': "Error", + '500': "Error", + '503': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def send_request_without_preload_content( + self, + id: Annotated[StrictStr, Field(description="The payment ID")], + send_payment_request_request: SendPaymentRequestRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Send Payment Request + +

Sends a direct payment request to the customer's phone with smart channel selection.

Smart delivery logic based on customer phone capabilities:

  • If the phone number is registered with Bizum and that payment method is available: The customer receives a push notification in their banking app to instantly approve the payment
  • If Bizum is not available or the phone is not registered with Bizum: The customer receives a payment link via WhatsApp to complete the payment

This endpoint provides a streamlined payment experience, especially for Spanish customers with Bizum integration, enabling quick and convenient mobile payments.

+ + :param id: The payment ID (required) + :type id: str + :param send_payment_request_request: (required) + :type send_payment_request_request: SendPaymentRequestRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._send_request_serialize( + id=id, + send_payment_request_request=send_payment_request_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Payment", + '400': "Error", + '401': "Error", + '404': "Error", + '422': "Error", + '500': "Error", + '503': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _send_request_serialize( self, id, send_payment_request_request, - **kwargs - ): - """Send Payment Request # noqa: E501 - -

Sends a direct payment request to the customer's phone with smart channel selection.

Smart delivery logic based on customer phone capabilities:

  • If the phone number is registered with Bizum and that payment method is available: The customer receives a push notification in their banking app to instantly approve the payment
  • If Bizum is not available or the phone is not registered with Bizum: The customer receives a payment link via WhatsApp to complete the payment

This endpoint provides a streamlined payment experience, especially for Spanish customers with Bizum integration, enabling quick and convenient mobile payments.

# noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.send_request(id, send_payment_request_request, async_req=True) - >>> result = thread.get() - - Args: - id (str): The payment ID - send_payment_request_request (SendPaymentRequestRequest): - - Keyword Args: - _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 - will be returned without reading/decoding response data. - Default is True. - _request_timeout (int/float/tuple): timeout setting for this request. If - one number provided, it will be total request timeout. It can also - be a pair (tuple) of (connection, read) timeouts. - Default is None. - _check_input_type (bool): specifies if type checking - should be done one the data sent to the server. - Default is True. - _check_return_type (bool): specifies if type checking - should be done one the data received from the server. - Default is True. - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _content_type (str/None): force body content-type. - Default is None and content-type will be predicted by allowed - content-types and body. - _host_index (int/None): specifies the index of the server - that we want to use. - Default is read from the configuration. - _request_auths (list): set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - Default is None - async_req (bool): execute request asynchronously - - Returns: - Payment - If the method is called asynchronously, returns the request - thread. - """ - kwargs['async_req'] = kwargs.get( - 'async_req', False - ) - kwargs['_return_http_data_only'] = kwargs.get( - '_return_http_data_only', True - ) - kwargs['_preload_content'] = kwargs.get( - '_preload_content', True - ) - kwargs['_request_timeout'] = kwargs.get( - '_request_timeout', None - ) - kwargs['_check_input_type'] = kwargs.get( - '_check_input_type', True - ) - kwargs['_check_return_type'] = kwargs.get( - '_check_return_type', True - ) - kwargs['_spec_property_naming'] = kwargs.get( - '_spec_property_naming', False - ) - kwargs['_content_type'] = kwargs.get( - '_content_type') - kwargs['_host_index'] = kwargs.get('_host_index') - kwargs['_request_auths'] = kwargs.get('_request_auths', None) - kwargs['id'] = \ - id - kwargs['send_payment_request_request'] = \ - send_payment_request_request - return self.send_request_endpoint.call_with_http_info(**kwargs) + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if id is not None: + _path_params['id'] = id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if send_payment_request_request is not None: + _body_params = send_payment_request_request + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'APIKey' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/payments/{id}/rtp', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + diff --git a/Monei/api/subscriptions_api.py b/Monei/api/subscriptions_api.py index 17f1bf1..38d0e91 100644 --- a/Monei/api/subscriptions_api.py +++ b/Monei/api/subscriptions_api.py @@ -1,1304 +1,2738 @@ +# coding: utf-8 + """ MONEI API v1 -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - - The version of the OpenAPI document: 1.5.0 - Generated by: https://openapi-generator.tech -""" +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

+ The version of the OpenAPI document: 1.5.1 + Generated by OpenAPI Generator (https://openapi-generator.tech) -import re # noqa: F401 -import sys # noqa: F401 - -from Monei.api_client import ApiClient, Endpoint as _Endpoint -from Monei.model_utils import ( # noqa: F401 - check_allowed_values, - check_validations, - date, - datetime, - file_type, - none_type, - validate_and_convert_types -) -from Monei.model.activate_subscription_request import ActivateSubscriptionRequest -from Monei.model.apple_pay_domain_register400_response import ApplePayDomainRegister400Response -from Monei.model.apple_pay_domain_register401_response import ApplePayDomainRegister401Response -from Monei.model.apple_pay_domain_register404_response import ApplePayDomainRegister404Response -from Monei.model.apple_pay_domain_register422_response import ApplePayDomainRegister422Response -from Monei.model.apple_pay_domain_register500_response import ApplePayDomainRegister500Response -from Monei.model.apple_pay_domain_register503_response import ApplePayDomainRegister503Response -from Monei.model.cancel_subscription_request import CancelSubscriptionRequest -from Monei.model.create_subscription_request import CreateSubscriptionRequest -from Monei.model.pause_subscription_request import PauseSubscriptionRequest -from Monei.model.send_subscription_link_request import SendSubscriptionLinkRequest -from Monei.model.send_subscription_status_request import SendSubscriptionStatusRequest -from Monei.model.subscription import Subscription -from Monei.model.update_subscription_request import UpdateSubscriptionRequest - - -class SubscriptionsApi(object): + Do not edit the class manually. +""" # noqa: E501 + +import warnings +from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt +from typing import Any, Dict, List, Optional, Tuple, Union +from typing_extensions import Annotated + +from pydantic import Field, StrictStr +from typing import Optional +from typing_extensions import Annotated +from Monei.models.activate_subscription_request import ActivateSubscriptionRequest +from Monei.models.cancel_subscription_request import CancelSubscriptionRequest +from Monei.models.create_subscription_request import CreateSubscriptionRequest +from Monei.models.pause_subscription_request import PauseSubscriptionRequest +from Monei.models.send_subscription_link_request import SendSubscriptionLinkRequest +from Monei.models.send_subscription_status_request import SendSubscriptionStatusRequest +from Monei.models.subscription import Subscription +from Monei.models.update_subscription_request import UpdateSubscriptionRequest + +from Monei.api_client import ApiClient, RequestSerialized +from Monei.api_response import ApiResponse +from Monei.rest import RESTResponseType + + +class SubscriptionsApi: """NOTE: This class is auto generated by OpenAPI Generator Ref: https://openapi-generator.tech Do not edit the class manually. """ - def __init__(self, api_client=None): + def __init__(self, api_client=None) -> None: if api_client is None: - api_client = ApiClient() + api_client = ApiClient.get_default() self.api_client = api_client - self.activate_endpoint = _Endpoint( - settings={ - 'response_type': (Subscription,), - 'auth': [ - 'APIKey' - ], - 'endpoint_path': '/subscriptions/{id}/activate', - 'operation_id': 'activate', - 'http_method': 'POST', - 'servers': None, - }, - params_map={ - 'all': [ - 'id', - 'activate_subscription_request', - ], - 'required': [ - 'id', - ], - 'nullable': [ - ], - 'enum': [ - ], - 'validation': [ - ] - }, - root_map={ - 'validations': { - }, - 'allowed_values': { - }, - 'openapi_types': { - 'id': - (str,), - 'activate_subscription_request': - (ActivateSubscriptionRequest,), - }, - 'attribute_map': { - 'id': 'id', - }, - 'location_map': { - 'id': 'path', - 'activate_subscription_request': 'body', - }, - 'collection_format_map': { - } - }, - headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [ - 'application/json' - ] - }, - api_client=api_client - ) - self.cancel_endpoint = _Endpoint( - settings={ - 'response_type': (Subscription,), - 'auth': [ - 'APIKey' - ], - 'endpoint_path': '/subscriptions/{id}/cancel', - 'operation_id': 'cancel', - 'http_method': 'POST', - 'servers': None, - }, - params_map={ - 'all': [ - 'id', - 'cancel_subscription_request', - ], - 'required': [ - 'id', - ], - 'nullable': [ - ], - 'enum': [ - ], - 'validation': [ - ] - }, - root_map={ - 'validations': { - }, - 'allowed_values': { - }, - 'openapi_types': { - 'id': - (str,), - 'cancel_subscription_request': - (CancelSubscriptionRequest,), - }, - 'attribute_map': { - 'id': 'id', - }, - 'location_map': { - 'id': 'path', - 'cancel_subscription_request': 'body', - }, - 'collection_format_map': { - } - }, - headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [ - 'application/json' - ] - }, - api_client=api_client - ) - self.create_endpoint = _Endpoint( - settings={ - 'response_type': (Subscription,), - 'auth': [ - 'APIKey' - ], - 'endpoint_path': '/subscriptions', - 'operation_id': 'create', - 'http_method': 'POST', - 'servers': None, - }, - params_map={ - 'all': [ - 'create_subscription_request', - ], - 'required': [ - 'create_subscription_request', - ], - 'nullable': [ - ], - 'enum': [ - ], - 'validation': [ - ] - }, - root_map={ - 'validations': { - }, - 'allowed_values': { - }, - 'openapi_types': { - 'create_subscription_request': - (CreateSubscriptionRequest,), - }, - 'attribute_map': { - }, - 'location_map': { - 'create_subscription_request': 'body', - }, - 'collection_format_map': { - } - }, - headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [ - 'application/json' - ] - }, - api_client=api_client - ) - self.get_endpoint = _Endpoint( - settings={ - 'response_type': (Subscription,), - 'auth': [ - 'APIKey' - ], - 'endpoint_path': '/subscriptions/{id}', - 'operation_id': 'get', - 'http_method': 'GET', - 'servers': None, - }, - params_map={ - 'all': [ - 'id', - ], - 'required': [ - 'id', - ], - 'nullable': [ - ], - 'enum': [ - ], - 'validation': [ - ] - }, - root_map={ - 'validations': { - }, - 'allowed_values': { - }, - 'openapi_types': { - 'id': - (str,), - }, - 'attribute_map': { - 'id': 'id', - }, - 'location_map': { - 'id': 'path', - }, - 'collection_format_map': { - } - }, - headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [], - }, - api_client=api_client - ) - self.pause_endpoint = _Endpoint( - settings={ - 'response_type': (Subscription,), - 'auth': [ - 'APIKey' - ], - 'endpoint_path': '/subscriptions/{id}/pause', - 'operation_id': 'pause', - 'http_method': 'POST', - 'servers': None, - }, - params_map={ - 'all': [ - 'id', - 'pause_subscription_request', - ], - 'required': [ - 'id', - ], - 'nullable': [ - ], - 'enum': [ - ], - 'validation': [ - ] - }, - root_map={ - 'validations': { - }, - 'allowed_values': { - }, - 'openapi_types': { - 'id': - (str,), - 'pause_subscription_request': - (PauseSubscriptionRequest,), - }, - 'attribute_map': { - 'id': 'id', - }, - 'location_map': { - 'id': 'path', - 'pause_subscription_request': 'body', - }, - 'collection_format_map': { - } - }, - headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [ - 'application/json' - ] - }, - api_client=api_client - ) - self.resume_endpoint = _Endpoint( - settings={ - 'response_type': (Subscription,), - 'auth': [ - 'APIKey' - ], - 'endpoint_path': '/subscriptions/{id}/resume', - 'operation_id': 'resume', - 'http_method': 'POST', - 'servers': None, - }, - params_map={ - 'all': [ - 'id', - ], - 'required': [ - 'id', - ], - 'nullable': [ - ], - 'enum': [ - ], - 'validation': [ - ] - }, - root_map={ - 'validations': { - }, - 'allowed_values': { - }, - 'openapi_types': { - 'id': - (str,), - }, - 'attribute_map': { - 'id': 'id', - }, - 'location_map': { - 'id': 'path', - }, - 'collection_format_map': { - } - }, - headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [], - }, - api_client=api_client - ) - self.send_link_endpoint = _Endpoint( - settings={ - 'response_type': (Subscription,), - 'auth': [ - 'APIKey' - ], - 'endpoint_path': '/subscriptions/{id}/link', - 'operation_id': 'send_link', - 'http_method': 'POST', - 'servers': None, - }, - params_map={ - 'all': [ - 'id', - 'send_subscription_link_request', - ], - 'required': [ - 'id', - ], - 'nullable': [ - ], - 'enum': [ - ], - 'validation': [ - ] - }, - root_map={ - 'validations': { - }, - 'allowed_values': { - }, - 'openapi_types': { - 'id': - (str,), - 'send_subscription_link_request': - (SendSubscriptionLinkRequest,), - }, - 'attribute_map': { - 'id': 'id', - }, - 'location_map': { - 'id': 'path', - 'send_subscription_link_request': 'body', - }, - 'collection_format_map': { - } - }, - headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [ - 'application/json' - ] - }, - api_client=api_client - ) - self.send_status_endpoint = _Endpoint( - settings={ - 'response_type': (Subscription,), - 'auth': [ - 'APIKey' - ], - 'endpoint_path': '/subscriptions/{id}/status', - 'operation_id': 'send_status', - 'http_method': 'POST', - 'servers': None, - }, - params_map={ - 'all': [ - 'id', - 'send_subscription_status_request', - ], - 'required': [ - 'id', - ], - 'nullable': [ - ], - 'enum': [ - ], - 'validation': [ - ] - }, - root_map={ - 'validations': { - }, - 'allowed_values': { - }, - 'openapi_types': { - 'id': - (str,), - 'send_subscription_status_request': - (SendSubscriptionStatusRequest,), - }, - 'attribute_map': { - 'id': 'id', - }, - 'location_map': { - 'id': 'path', - 'send_subscription_status_request': 'body', - }, - 'collection_format_map': { - } - }, - headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [ - 'application/json' - ] - }, - api_client=api_client - ) - self.update_endpoint = _Endpoint( - settings={ - 'response_type': (Subscription,), - 'auth': [ - 'APIKey' - ], - 'endpoint_path': '/subscriptions/{id}', - 'operation_id': 'update', - 'http_method': 'PUT', - 'servers': None, - }, - params_map={ - 'all': [ - 'id', - 'update_subscription_request', - ], - 'required': [ - 'id', - 'update_subscription_request', - ], - 'nullable': [ - ], - 'enum': [ - ], - 'validation': [ - ] - }, - root_map={ - 'validations': { - }, - 'allowed_values': { - }, - 'openapi_types': { - 'id': - (str,), - 'update_subscription_request': - (UpdateSubscriptionRequest,), - }, - 'attribute_map': { - 'id': 'id', - }, - 'location_map': { - 'id': 'path', - 'update_subscription_request': 'body', - }, - 'collection_format_map': { - } - }, - headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [ - 'application/json' - ] - }, - api_client=api_client - ) + + @validate_call def activate( + self, + id: Annotated[StrictStr, Field(description="The subscription ID")], + activate_subscription_request: Optional[ActivateSubscriptionRequest] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> Subscription: + """Activate Subscription + +

Activates a subscription by attaching a payment method and initiating the billing cycle.

Activation Process:

  1. This endpoint transitions a PENDING subscription to ACTIVE status
  2. An initial payment is created to validate the payment method:
    • For regular subscriptions: First billing cycle payment is processed immediately
    • For trial subscriptions: A zero-amount payment is created to verify the payment method

Payment Method Updates: If the subscription is already active, this endpoint can be used to update the payment method. The update process creates a zero-amount payment to verify the new payment method works correctly.

Important Notes:

  • Subscription billing begins immediately upon successful activation (unless in trial period)
  • The payment method provided will be used for all future recurring charges
  • Activation failures (due to invalid payment method) will keep the subscription in PENDING status
+ + :param id: The subscription ID (required) + :type id: str + :param activate_subscription_request: + :type activate_subscription_request: ActivateSubscriptionRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._activate_serialize( + id=id, + activate_subscription_request=activate_subscription_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Subscription", + '400': "Error", + '401': "Error", + '404': "Error", + '422': "Error", + '500': "Error", + '503': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def activate_with_http_info( + self, + id: Annotated[StrictStr, Field(description="The subscription ID")], + activate_subscription_request: Optional[ActivateSubscriptionRequest] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[Subscription]: + """Activate Subscription + +

Activates a subscription by attaching a payment method and initiating the billing cycle.

Activation Process:

  1. This endpoint transitions a PENDING subscription to ACTIVE status
  2. An initial payment is created to validate the payment method:
    • For regular subscriptions: First billing cycle payment is processed immediately
    • For trial subscriptions: A zero-amount payment is created to verify the payment method

Payment Method Updates: If the subscription is already active, this endpoint can be used to update the payment method. The update process creates a zero-amount payment to verify the new payment method works correctly.

Important Notes:

  • Subscription billing begins immediately upon successful activation (unless in trial period)
  • The payment method provided will be used for all future recurring charges
  • Activation failures (due to invalid payment method) will keep the subscription in PENDING status
+ + :param id: The subscription ID (required) + :type id: str + :param activate_subscription_request: + :type activate_subscription_request: ActivateSubscriptionRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._activate_serialize( + id=id, + activate_subscription_request=activate_subscription_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Subscription", + '400': "Error", + '401': "Error", + '404': "Error", + '422': "Error", + '500': "Error", + '503': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def activate_without_preload_content( + self, + id: Annotated[StrictStr, Field(description="The subscription ID")], + activate_subscription_request: Optional[ActivateSubscriptionRequest] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Activate Subscription + +

Activates a subscription by attaching a payment method and initiating the billing cycle.

Activation Process:

  1. This endpoint transitions a PENDING subscription to ACTIVE status
  2. An initial payment is created to validate the payment method:
    • For regular subscriptions: First billing cycle payment is processed immediately
    • For trial subscriptions: A zero-amount payment is created to verify the payment method

Payment Method Updates: If the subscription is already active, this endpoint can be used to update the payment method. The update process creates a zero-amount payment to verify the new payment method works correctly.

Important Notes:

  • Subscription billing begins immediately upon successful activation (unless in trial period)
  • The payment method provided will be used for all future recurring charges
  • Activation failures (due to invalid payment method) will keep the subscription in PENDING status
+ + :param id: The subscription ID (required) + :type id: str + :param activate_subscription_request: + :type activate_subscription_request: ActivateSubscriptionRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._activate_serialize( + id=id, + activate_subscription_request=activate_subscription_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Subscription", + '400': "Error", + '401': "Error", + '404': "Error", + '422': "Error", + '500': "Error", + '503': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _activate_serialize( self, id, - **kwargs - ): - """Activate Subscription # noqa: E501 - -

Activates a subscription by attaching a payment method and initiating the billing cycle.

Activation Process:

  1. This endpoint transitions a PENDING subscription to ACTIVE status
  2. An initial payment is created to validate the payment method:
    • For regular subscriptions: First billing cycle payment is processed immediately
    • For trial subscriptions: A zero-amount payment is created to verify the payment method

Payment Method Updates: If the subscription is already active, this endpoint can be used to update the payment method. The update process creates a zero-amount payment to verify the new payment method works correctly.

Important Notes:

  • Subscription billing begins immediately upon successful activation (unless in trial period)
  • The payment method provided will be used for all future recurring charges
  • Activation failures (due to invalid payment method) will keep the subscription in PENDING status
# noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.activate(id, async_req=True) - >>> result = thread.get() - - Args: - id (str): The subscription ID - - Keyword Args: - activate_subscription_request (ActivateSubscriptionRequest): [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 - will be returned without reading/decoding response data. - Default is True. - _request_timeout (int/float/tuple): timeout setting for this request. If - one number provided, it will be total request timeout. It can also - be a pair (tuple) of (connection, read) timeouts. - Default is None. - _check_input_type (bool): specifies if type checking - should be done one the data sent to the server. - Default is True. - _check_return_type (bool): specifies if type checking - should be done one the data received from the server. - Default is True. - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _content_type (str/None): force body content-type. - Default is None and content-type will be predicted by allowed - content-types and body. - _host_index (int/None): specifies the index of the server - that we want to use. - Default is read from the configuration. - _request_auths (list): set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - Default is None - async_req (bool): execute request asynchronously - - Returns: - Subscription - If the method is called asynchronously, returns the request - thread. - """ - kwargs['async_req'] = kwargs.get( - 'async_req', False - ) - kwargs['_return_http_data_only'] = kwargs.get( - '_return_http_data_only', True - ) - kwargs['_preload_content'] = kwargs.get( - '_preload_content', True - ) - kwargs['_request_timeout'] = kwargs.get( - '_request_timeout', None - ) - kwargs['_check_input_type'] = kwargs.get( - '_check_input_type', True - ) - kwargs['_check_return_type'] = kwargs.get( - '_check_return_type', True - ) - kwargs['_spec_property_naming'] = kwargs.get( - '_spec_property_naming', False - ) - kwargs['_content_type'] = kwargs.get( - '_content_type') - kwargs['_host_index'] = kwargs.get('_host_index') - kwargs['_request_auths'] = kwargs.get('_request_auths', None) - kwargs['id'] = \ - id - return self.activate_endpoint.call_with_http_info(**kwargs) - + activate_subscription_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if id is not None: + _path_params['id'] = id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if activate_subscription_request is not None: + _body_params = activate_subscription_request + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'APIKey' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/subscriptions/{id}/activate', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call def cancel( + self, + id: Annotated[StrictStr, Field(description="The subscription ID")], + cancel_subscription_request: Optional[CancelSubscriptionRequest] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> Subscription: + """Cancel Subscription + +

Cancels an active subscription, permanently stopping the billing cycle.

Cancellation Effects:

  • The subscription status changes to CANCELED
  • No further charges will be processed
  • Access to subscription services typically ends immediately or at period end (depending on your business rules)

Important Notes:

  • Cancellation is permanent and cannot be undone
  • To restart service, a new subscription must be created
  • Consider using pauseAtPeriodEnd or cancelAtPeriodEnd for softer transitions

Use this endpoint when a customer wishes to completely terminate their subscription.

+ + :param id: The subscription ID (required) + :type id: str + :param cancel_subscription_request: + :type cancel_subscription_request: CancelSubscriptionRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._cancel_serialize( + id=id, + cancel_subscription_request=cancel_subscription_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Subscription", + '400': "Error", + '401': "Error", + '404': "Error", + '422': "Error", + '500': "Error", + '503': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def cancel_with_http_info( + self, + id: Annotated[StrictStr, Field(description="The subscription ID")], + cancel_subscription_request: Optional[CancelSubscriptionRequest] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[Subscription]: + """Cancel Subscription + +

Cancels an active subscription, permanently stopping the billing cycle.

Cancellation Effects:

  • The subscription status changes to CANCELED
  • No further charges will be processed
  • Access to subscription services typically ends immediately or at period end (depending on your business rules)

Important Notes:

  • Cancellation is permanent and cannot be undone
  • To restart service, a new subscription must be created
  • Consider using pauseAtPeriodEnd or cancelAtPeriodEnd for softer transitions

Use this endpoint when a customer wishes to completely terminate their subscription.

+ + :param id: The subscription ID (required) + :type id: str + :param cancel_subscription_request: + :type cancel_subscription_request: CancelSubscriptionRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._cancel_serialize( + id=id, + cancel_subscription_request=cancel_subscription_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Subscription", + '400': "Error", + '401': "Error", + '404': "Error", + '422': "Error", + '500': "Error", + '503': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def cancel_without_preload_content( + self, + id: Annotated[StrictStr, Field(description="The subscription ID")], + cancel_subscription_request: Optional[CancelSubscriptionRequest] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Cancel Subscription + +

Cancels an active subscription, permanently stopping the billing cycle.

Cancellation Effects:

  • The subscription status changes to CANCELED
  • No further charges will be processed
  • Access to subscription services typically ends immediately or at period end (depending on your business rules)

Important Notes:

  • Cancellation is permanent and cannot be undone
  • To restart service, a new subscription must be created
  • Consider using pauseAtPeriodEnd or cancelAtPeriodEnd for softer transitions

Use this endpoint when a customer wishes to completely terminate their subscription.

+ + :param id: The subscription ID (required) + :type id: str + :param cancel_subscription_request: + :type cancel_subscription_request: CancelSubscriptionRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._cancel_serialize( + id=id, + cancel_subscription_request=cancel_subscription_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Subscription", + '400': "Error", + '401': "Error", + '404': "Error", + '422': "Error", + '500': "Error", + '503': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _cancel_serialize( self, id, - **kwargs - ): - """Cancel Subscription # noqa: E501 - -

Cancels an active subscription, permanently stopping the billing cycle.

Cancellation Effects:

  • The subscription status changes to CANCELED
  • No further charges will be processed
  • Access to subscription services typically ends immediately or at period end (depending on your business rules)

Important Notes:

  • Cancellation is permanent and cannot be undone
  • To restart service, a new subscription must be created
  • Consider using pauseAtPeriodEnd or cancelAtPeriodEnd for softer transitions

Use this endpoint when a customer wishes to completely terminate their subscription.

# 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(id, async_req=True) - >>> result = thread.get() - - Args: - id (str): The subscription ID - - Keyword Args: - cancel_subscription_request (CancelSubscriptionRequest): [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 - will be returned without reading/decoding response data. - Default is True. - _request_timeout (int/float/tuple): timeout setting for this request. If - one number provided, it will be total request timeout. It can also - be a pair (tuple) of (connection, read) timeouts. - Default is None. - _check_input_type (bool): specifies if type checking - should be done one the data sent to the server. - Default is True. - _check_return_type (bool): specifies if type checking - should be done one the data received from the server. - Default is True. - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _content_type (str/None): force body content-type. - Default is None and content-type will be predicted by allowed - content-types and body. - _host_index (int/None): specifies the index of the server - that we want to use. - Default is read from the configuration. - _request_auths (list): set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - Default is None - async_req (bool): execute request asynchronously - - Returns: - Subscription - If the method is called asynchronously, returns the request - thread. - """ - kwargs['async_req'] = kwargs.get( - 'async_req', False - ) - kwargs['_return_http_data_only'] = kwargs.get( - '_return_http_data_only', True - ) - kwargs['_preload_content'] = kwargs.get( - '_preload_content', True - ) - kwargs['_request_timeout'] = kwargs.get( - '_request_timeout', None - ) - kwargs['_check_input_type'] = kwargs.get( - '_check_input_type', True - ) - kwargs['_check_return_type'] = kwargs.get( - '_check_return_type', True - ) - kwargs['_spec_property_naming'] = kwargs.get( - '_spec_property_naming', False - ) - kwargs['_content_type'] = kwargs.get( - '_content_type') - kwargs['_host_index'] = kwargs.get('_host_index') - kwargs['_request_auths'] = kwargs.get('_request_auths', None) - kwargs['id'] = \ - id - return self.cancel_endpoint.call_with_http_info(**kwargs) - + cancel_subscription_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if id is not None: + _path_params['id'] = id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if cancel_subscription_request is not None: + _body_params = cancel_subscription_request + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'APIKey' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/subscriptions/{id}/cancel', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call def create( + self, + create_subscription_request: CreateSubscriptionRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> Subscription: + """Create Subscription + +

Creates a new subscription with the specified parameters.

Subscription Lifecycle:

  1. When first created, the subscription has a PENDING status
  2. To initiate billing, you must call the activate endpoint with payment details
  3. Once activated, the subscription will automatically bill according to the configured interval

Key Configuration Parameters:

  • Billing settings: Amount, currency, interval (daily, weekly, monthly, yearly)
  • Schedule customization: Interval count, trial period duration
  • Customer information: Contact details, billing and shipping addresses
  • Communication: Callback URLs for webhook notifications about subscription events

Best Practices:

  • Set clear, descriptive names for subscriptions to help with identification
  • Configure appropriate webhook notifications to monitor subscription status changes
  • Consider offering trial periods to increase customer conversion rates
  • Use metadata to store additional information relevant to your business logic
+ + :param create_subscription_request: (required) + :type create_subscription_request: CreateSubscriptionRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_serialize( + create_subscription_request=create_subscription_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Subscription", + '400': "Error", + '401': "Error", + '404': "Error", + '422': "Error", + '500': "Error", + '503': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def create_with_http_info( + self, + create_subscription_request: CreateSubscriptionRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[Subscription]: + """Create Subscription + +

Creates a new subscription with the specified parameters.

Subscription Lifecycle:

  1. When first created, the subscription has a PENDING status
  2. To initiate billing, you must call the activate endpoint with payment details
  3. Once activated, the subscription will automatically bill according to the configured interval

Key Configuration Parameters:

  • Billing settings: Amount, currency, interval (daily, weekly, monthly, yearly)
  • Schedule customization: Interval count, trial period duration
  • Customer information: Contact details, billing and shipping addresses
  • Communication: Callback URLs for webhook notifications about subscription events

Best Practices:

  • Set clear, descriptive names for subscriptions to help with identification
  • Configure appropriate webhook notifications to monitor subscription status changes
  • Consider offering trial periods to increase customer conversion rates
  • Use metadata to store additional information relevant to your business logic
+ + :param create_subscription_request: (required) + :type create_subscription_request: CreateSubscriptionRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_serialize( + create_subscription_request=create_subscription_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Subscription", + '400': "Error", + '401': "Error", + '404': "Error", + '422': "Error", + '500': "Error", + '503': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def create_without_preload_content( + self, + create_subscription_request: CreateSubscriptionRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Create Subscription + +

Creates a new subscription with the specified parameters.

Subscription Lifecycle:

  1. When first created, the subscription has a PENDING status
  2. To initiate billing, you must call the activate endpoint with payment details
  3. Once activated, the subscription will automatically bill according to the configured interval

Key Configuration Parameters:

  • Billing settings: Amount, currency, interval (daily, weekly, monthly, yearly)
  • Schedule customization: Interval count, trial period duration
  • Customer information: Contact details, billing and shipping addresses
  • Communication: Callback URLs for webhook notifications about subscription events

Best Practices:

  • Set clear, descriptive names for subscriptions to help with identification
  • Configure appropriate webhook notifications to monitor subscription status changes
  • Consider offering trial periods to increase customer conversion rates
  • Use metadata to store additional information relevant to your business logic
+ + :param create_subscription_request: (required) + :type create_subscription_request: CreateSubscriptionRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_serialize( + create_subscription_request=create_subscription_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Subscription", + '400': "Error", + '401': "Error", + '404': "Error", + '422': "Error", + '500': "Error", + '503': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _create_serialize( self, create_subscription_request, - **kwargs - ): - """Create Subscription # noqa: E501 - -

Creates a new subscription with the specified parameters.

Subscription Lifecycle:

  1. When first created, the subscription has a PENDING status
  2. To initiate billing, you must call the activate endpoint with payment details
  3. Once activated, the subscription will automatically bill according to the configured interval

Key Configuration Parameters:

  • Billing settings: Amount, currency, interval (daily, weekly, monthly, yearly)
  • Schedule customization: Interval count, trial period duration
  • Customer information: Contact details, billing and shipping addresses
  • Communication: Callback URLs for webhook notifications about subscription events

Best Practices:

  • Set clear, descriptive names for subscriptions to help with identification
  • Configure appropriate webhook notifications to monitor subscription status changes
  • Consider offering trial periods to increase customer conversion rates
  • Use metadata to store additional information relevant to your business logic
# 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(create_subscription_request, async_req=True) - >>> result = thread.get() - - Args: - create_subscription_request (CreateSubscriptionRequest): - - Keyword Args: - _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 - will be returned without reading/decoding response data. - Default is True. - _request_timeout (int/float/tuple): timeout setting for this request. If - one number provided, it will be total request timeout. It can also - be a pair (tuple) of (connection, read) timeouts. - Default is None. - _check_input_type (bool): specifies if type checking - should be done one the data sent to the server. - Default is True. - _check_return_type (bool): specifies if type checking - should be done one the data received from the server. - Default is True. - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _content_type (str/None): force body content-type. - Default is None and content-type will be predicted by allowed - content-types and body. - _host_index (int/None): specifies the index of the server - that we want to use. - Default is read from the configuration. - _request_auths (list): set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - Default is None - async_req (bool): execute request asynchronously - - Returns: - Subscription - If the method is called asynchronously, returns the request - thread. - """ - kwargs['async_req'] = kwargs.get( - 'async_req', False - ) - kwargs['_return_http_data_only'] = kwargs.get( - '_return_http_data_only', True - ) - kwargs['_preload_content'] = kwargs.get( - '_preload_content', True - ) - kwargs['_request_timeout'] = kwargs.get( - '_request_timeout', None - ) - kwargs['_check_input_type'] = kwargs.get( - '_check_input_type', True - ) - kwargs['_check_return_type'] = kwargs.get( - '_check_return_type', True - ) - kwargs['_spec_property_naming'] = kwargs.get( - '_spec_property_naming', False - ) - kwargs['_content_type'] = kwargs.get( - '_content_type') - kwargs['_host_index'] = kwargs.get('_host_index') - kwargs['_request_auths'] = kwargs.get('_request_auths', None) - kwargs['create_subscription_request'] = \ - create_subscription_request - return self.create_endpoint.call_with_http_info(**kwargs) - + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if create_subscription_request is not None: + _body_params = create_subscription_request + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'APIKey' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/subscriptions', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call def get( + self, + id: Annotated[StrictStr, Field(description="The subscription ID")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> Subscription: + """Get Subscription + +

Retrieves the complete details of an existing subscription by its unique ID.

This endpoint returns comprehensive information about the subscription, including:

  • Current status and lifecycle details (active, paused, canceled)
  • Billing configuration (amount, currency, interval)
  • Schedule information (current period, next payment date)
  • Customer and payment method details
  • Payment history (including last payment status)
  • Trial period information (if applicable)

Use this endpoint to check subscription status, verify billing details, or retrieve information needed for customer support inquiries.

+ + :param id: The subscription ID (required) + :type id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_serialize( + id=id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Subscription", + '400': "Error", + '401': "Error", + '404': "Error", + '422': "Error", + '500': "Error", + '503': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def get_with_http_info( + self, + id: Annotated[StrictStr, Field(description="The subscription ID")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[Subscription]: + """Get Subscription + +

Retrieves the complete details of an existing subscription by its unique ID.

This endpoint returns comprehensive information about the subscription, including:

  • Current status and lifecycle details (active, paused, canceled)
  • Billing configuration (amount, currency, interval)
  • Schedule information (current period, next payment date)
  • Customer and payment method details
  • Payment history (including last payment status)
  • Trial period information (if applicable)

Use this endpoint to check subscription status, verify billing details, or retrieve information needed for customer support inquiries.

+ + :param id: The subscription ID (required) + :type id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_serialize( + id=id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Subscription", + '400': "Error", + '401': "Error", + '404': "Error", + '422': "Error", + '500': "Error", + '503': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def get_without_preload_content( + self, + id: Annotated[StrictStr, Field(description="The subscription ID")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get Subscription + +

Retrieves the complete details of an existing subscription by its unique ID.

This endpoint returns comprehensive information about the subscription, including:

  • Current status and lifecycle details (active, paused, canceled)
  • Billing configuration (amount, currency, interval)
  • Schedule information (current period, next payment date)
  • Customer and payment method details
  • Payment history (including last payment status)
  • Trial period information (if applicable)

Use this endpoint to check subscription status, verify billing details, or retrieve information needed for customer support inquiries.

+ + :param id: The subscription ID (required) + :type id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_serialize( + id=id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Subscription", + '400': "Error", + '401': "Error", + '404': "Error", + '422': "Error", + '500': "Error", + '503': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_serialize( self, id, - **kwargs - ): - """Get Subscription # noqa: E501 - -

Retrieves the complete details of an existing subscription by its unique ID.

This endpoint returns comprehensive information about the subscription, including:

  • Current status and lifecycle details (active, paused, canceled)
  • Billing configuration (amount, currency, interval)
  • Schedule information (current period, next payment date)
  • Customer and payment method details
  • Payment history (including last payment status)
  • Trial period information (if applicable)

Use this endpoint to check subscription status, verify billing details, or retrieve information needed for customer support inquiries.

# 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(id, async_req=True) - >>> result = thread.get() - - Args: - id (str): The subscription ID - - Keyword Args: - _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 - will be returned without reading/decoding response data. - Default is True. - _request_timeout (int/float/tuple): timeout setting for this request. If - one number provided, it will be total request timeout. It can also - be a pair (tuple) of (connection, read) timeouts. - Default is None. - _check_input_type (bool): specifies if type checking - should be done one the data sent to the server. - Default is True. - _check_return_type (bool): specifies if type checking - should be done one the data received from the server. - Default is True. - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _content_type (str/None): force body content-type. - Default is None and content-type will be predicted by allowed - content-types and body. - _host_index (int/None): specifies the index of the server - that we want to use. - Default is read from the configuration. - _request_auths (list): set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - Default is None - async_req (bool): execute request asynchronously - - Returns: - Subscription - If the method is called asynchronously, returns the request - thread. - """ - kwargs['async_req'] = kwargs.get( - 'async_req', False - ) - kwargs['_return_http_data_only'] = kwargs.get( - '_return_http_data_only', True - ) - kwargs['_preload_content'] = kwargs.get( - '_preload_content', True - ) - kwargs['_request_timeout'] = kwargs.get( - '_request_timeout', None - ) - kwargs['_check_input_type'] = kwargs.get( - '_check_input_type', True - ) - kwargs['_check_return_type'] = kwargs.get( - '_check_return_type', True - ) - kwargs['_spec_property_naming'] = kwargs.get( - '_spec_property_naming', False - ) - kwargs['_content_type'] = kwargs.get( - '_content_type') - kwargs['_host_index'] = kwargs.get('_host_index') - kwargs['_request_auths'] = kwargs.get('_request_auths', None) - kwargs['id'] = \ - id - return self.get_endpoint.call_with_http_info(**kwargs) + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if id is not None: + _path_params['id'] = id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'APIKey' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/subscriptions/{id}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + @validate_call def pause( + self, + id: Annotated[StrictStr, Field(description="The subscription ID")], + pause_subscription_request: Optional[PauseSubscriptionRequest] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> Subscription: + """Pause Subscription + +

Pauses an active subscription, temporarily halting the billing cycle.

Pause Effects:

  • Billing is immediately suspended
  • The subscription status changes to PAUSED
  • No charges will be processed while the subscription remains paused
  • The current billing period end date remains unchanged

Use Cases:

  • Temporary service interruptions
  • Customer vacation or absence periods
  • Account maintenance or dispute resolution

To resume billing, use the resume endpoint.

+ + :param id: The subscription ID (required) + :type id: str + :param pause_subscription_request: + :type pause_subscription_request: PauseSubscriptionRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._pause_serialize( + id=id, + pause_subscription_request=pause_subscription_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Subscription", + '400': "Error", + '401': "Error", + '404': "Error", + '422': "Error", + '500': "Error", + '503': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def pause_with_http_info( + self, + id: Annotated[StrictStr, Field(description="The subscription ID")], + pause_subscription_request: Optional[PauseSubscriptionRequest] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[Subscription]: + """Pause Subscription + +

Pauses an active subscription, temporarily halting the billing cycle.

Pause Effects:

  • Billing is immediately suspended
  • The subscription status changes to PAUSED
  • No charges will be processed while the subscription remains paused
  • The current billing period end date remains unchanged

Use Cases:

  • Temporary service interruptions
  • Customer vacation or absence periods
  • Account maintenance or dispute resolution

To resume billing, use the resume endpoint.

+ + :param id: The subscription ID (required) + :type id: str + :param pause_subscription_request: + :type pause_subscription_request: PauseSubscriptionRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._pause_serialize( + id=id, + pause_subscription_request=pause_subscription_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Subscription", + '400': "Error", + '401': "Error", + '404': "Error", + '422': "Error", + '500': "Error", + '503': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def pause_without_preload_content( + self, + id: Annotated[StrictStr, Field(description="The subscription ID")], + pause_subscription_request: Optional[PauseSubscriptionRequest] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Pause Subscription + +

Pauses an active subscription, temporarily halting the billing cycle.

Pause Effects:

  • Billing is immediately suspended
  • The subscription status changes to PAUSED
  • No charges will be processed while the subscription remains paused
  • The current billing period end date remains unchanged

Use Cases:

  • Temporary service interruptions
  • Customer vacation or absence periods
  • Account maintenance or dispute resolution

To resume billing, use the resume endpoint.

+ + :param id: The subscription ID (required) + :type id: str + :param pause_subscription_request: + :type pause_subscription_request: PauseSubscriptionRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._pause_serialize( + id=id, + pause_subscription_request=pause_subscription_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Subscription", + '400': "Error", + '401': "Error", + '404': "Error", + '422': "Error", + '500': "Error", + '503': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _pause_serialize( self, id, - **kwargs - ): - """Pause Subscription # noqa: E501 - -

Pauses an active subscription, temporarily halting the billing cycle.

Pause Effects:

  • Billing is immediately suspended
  • The subscription status changes to PAUSED
  • No charges will be processed while the subscription remains paused
  • The current billing period end date remains unchanged

Use Cases:

  • Temporary service interruptions
  • Customer vacation or absence periods
  • Account maintenance or dispute resolution

To resume billing, use the resume endpoint.

# noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.pause(id, async_req=True) - >>> result = thread.get() - - Args: - id (str): The subscription ID - - Keyword Args: - pause_subscription_request (PauseSubscriptionRequest): [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 - will be returned without reading/decoding response data. - Default is True. - _request_timeout (int/float/tuple): timeout setting for this request. If - one number provided, it will be total request timeout. It can also - be a pair (tuple) of (connection, read) timeouts. - Default is None. - _check_input_type (bool): specifies if type checking - should be done one the data sent to the server. - Default is True. - _check_return_type (bool): specifies if type checking - should be done one the data received from the server. - Default is True. - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _content_type (str/None): force body content-type. - Default is None and content-type will be predicted by allowed - content-types and body. - _host_index (int/None): specifies the index of the server - that we want to use. - Default is read from the configuration. - _request_auths (list): set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - Default is None - async_req (bool): execute request asynchronously - - Returns: - Subscription - If the method is called asynchronously, returns the request - thread. - """ - kwargs['async_req'] = kwargs.get( - 'async_req', False - ) - kwargs['_return_http_data_only'] = kwargs.get( - '_return_http_data_only', True - ) - kwargs['_preload_content'] = kwargs.get( - '_preload_content', True - ) - kwargs['_request_timeout'] = kwargs.get( - '_request_timeout', None - ) - kwargs['_check_input_type'] = kwargs.get( - '_check_input_type', True - ) - kwargs['_check_return_type'] = kwargs.get( - '_check_return_type', True - ) - kwargs['_spec_property_naming'] = kwargs.get( - '_spec_property_naming', False - ) - kwargs['_content_type'] = kwargs.get( - '_content_type') - kwargs['_host_index'] = kwargs.get('_host_index') - kwargs['_request_auths'] = kwargs.get('_request_auths', None) - kwargs['id'] = \ - id - return self.pause_endpoint.call_with_http_info(**kwargs) - + pause_subscription_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if id is not None: + _path_params['id'] = id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if pause_subscription_request is not None: + _body_params = pause_subscription_request + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'APIKey' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/subscriptions/{id}/pause', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call def resume( + self, + id: Annotated[StrictStr, Field(description="The subscription ID")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> Subscription: + """Resume Subscription + +

Resumes a previously paused subscription, reactivating the billing cycle.

Resume Effects:

  • Billing is immediately reactivated
  • The subscription status changes from PAUSED to ACTIVE
  • The next billing date is recalculated based on the current date
  • Regular charging schedule resumes according to the subscription interval

Important Notes:

  • No immediate charge is created when resuming (billing continues on next scheduled date)
  • Any pause duration is added to the current billing period, maintaining the expected number of billing cycles
  • If a significant time has passed, verify that the payment method is still valid
+ + :param id: The subscription ID (required) + :type id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._resume_serialize( + id=id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Subscription", + '400': "Error", + '401': "Error", + '404': "Error", + '422': "Error", + '500': "Error", + '503': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def resume_with_http_info( + self, + id: Annotated[StrictStr, Field(description="The subscription ID")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[Subscription]: + """Resume Subscription + +

Resumes a previously paused subscription, reactivating the billing cycle.

Resume Effects:

  • Billing is immediately reactivated
  • The subscription status changes from PAUSED to ACTIVE
  • The next billing date is recalculated based on the current date
  • Regular charging schedule resumes according to the subscription interval

Important Notes:

  • No immediate charge is created when resuming (billing continues on next scheduled date)
  • Any pause duration is added to the current billing period, maintaining the expected number of billing cycles
  • If a significant time has passed, verify that the payment method is still valid
+ + :param id: The subscription ID (required) + :type id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._resume_serialize( + id=id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Subscription", + '400': "Error", + '401': "Error", + '404': "Error", + '422': "Error", + '500': "Error", + '503': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def resume_without_preload_content( + self, + id: Annotated[StrictStr, Field(description="The subscription ID")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Resume Subscription + +

Resumes a previously paused subscription, reactivating the billing cycle.

Resume Effects:

  • Billing is immediately reactivated
  • The subscription status changes from PAUSED to ACTIVE
  • The next billing date is recalculated based on the current date
  • Regular charging schedule resumes according to the subscription interval

Important Notes:

  • No immediate charge is created when resuming (billing continues on next scheduled date)
  • Any pause duration is added to the current billing period, maintaining the expected number of billing cycles
  • If a significant time has passed, verify that the payment method is still valid
+ + :param id: The subscription ID (required) + :type id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._resume_serialize( + id=id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Subscription", + '400': "Error", + '401': "Error", + '404': "Error", + '422': "Error", + '500': "Error", + '503': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _resume_serialize( self, id, - **kwargs - ): - """Resume Subscription # noqa: E501 - -

Resumes a previously paused subscription, reactivating the billing cycle.

Resume Effects:

  • Billing is immediately reactivated
  • The subscription status changes from PAUSED to ACTIVE
  • The next billing date is recalculated based on the current date
  • Regular charging schedule resumes according to the subscription interval

Important Notes:

  • No immediate charge is created when resuming (billing continues on next scheduled date)
  • Any pause duration is added to the current billing period, maintaining the expected number of billing cycles
  • If a significant time has passed, verify that the payment method is still valid
# noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.resume(id, async_req=True) - >>> result = thread.get() - - Args: - id (str): The subscription ID - - Keyword Args: - _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 - will be returned without reading/decoding response data. - Default is True. - _request_timeout (int/float/tuple): timeout setting for this request. If - one number provided, it will be total request timeout. It can also - be a pair (tuple) of (connection, read) timeouts. - Default is None. - _check_input_type (bool): specifies if type checking - should be done one the data sent to the server. - Default is True. - _check_return_type (bool): specifies if type checking - should be done one the data received from the server. - Default is True. - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _content_type (str/None): force body content-type. - Default is None and content-type will be predicted by allowed - content-types and body. - _host_index (int/None): specifies the index of the server - that we want to use. - Default is read from the configuration. - _request_auths (list): set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - Default is None - async_req (bool): execute request asynchronously - - Returns: - Subscription - If the method is called asynchronously, returns the request - thread. - """ - kwargs['async_req'] = kwargs.get( - 'async_req', False - ) - kwargs['_return_http_data_only'] = kwargs.get( - '_return_http_data_only', True - ) - kwargs['_preload_content'] = kwargs.get( - '_preload_content', True - ) - kwargs['_request_timeout'] = kwargs.get( - '_request_timeout', None - ) - kwargs['_check_input_type'] = kwargs.get( - '_check_input_type', True - ) - kwargs['_check_return_type'] = kwargs.get( - '_check_return_type', True - ) - kwargs['_spec_property_naming'] = kwargs.get( - '_spec_property_naming', False - ) - kwargs['_content_type'] = kwargs.get( - '_content_type') - kwargs['_host_index'] = kwargs.get('_host_index') - kwargs['_request_auths'] = kwargs.get('_request_auths', None) - kwargs['id'] = \ - id - return self.resume_endpoint.call_with_http_info(**kwargs) + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if id is not None: + _path_params['id'] = id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # authentication setting + _auth_settings: List[str] = [ + 'APIKey' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/subscriptions/{id}/resume', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call def send_link( + self, + id: Annotated[StrictStr, Field(description="The subscription ID")], + send_subscription_link_request: Optional[SendSubscriptionLinkRequest] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> Subscription: + """Send Subscription Link + +

Sends a subscription activation link to the customer through their preferred communication channel.

This API can only be used for subscriptions with the following status:

  • Pending

Delivery channels are automatically selected based on available customer information:

  • If customer email is available: Link is sent via email
  • If customer phone is available: Link is sent via WhatsApp
  • If WhatsApp delivery fails: Link is sent via SMS as a fallback

The subscription activation link allows customers to complete their subscription setup by providing payment details on the secure MONEI payment page. If no customer contact information is provided, the system will use the details stored in the subscription record.

+ + :param id: The subscription ID (required) + :type id: str + :param send_subscription_link_request: + :type send_subscription_link_request: SendSubscriptionLinkRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._send_link_serialize( + id=id, + send_subscription_link_request=send_subscription_link_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Subscription", + '400': "Error", + '401': "Error", + '404': "Error", + '422': "Error", + '500': "Error", + '503': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def send_link_with_http_info( + self, + id: Annotated[StrictStr, Field(description="The subscription ID")], + send_subscription_link_request: Optional[SendSubscriptionLinkRequest] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[Subscription]: + """Send Subscription Link + +

Sends a subscription activation link to the customer through their preferred communication channel.

This API can only be used for subscriptions with the following status:

  • Pending

Delivery channels are automatically selected based on available customer information:

  • If customer email is available: Link is sent via email
  • If customer phone is available: Link is sent via WhatsApp
  • If WhatsApp delivery fails: Link is sent via SMS as a fallback

The subscription activation link allows customers to complete their subscription setup by providing payment details on the secure MONEI payment page. If no customer contact information is provided, the system will use the details stored in the subscription record.

+ + :param id: The subscription ID (required) + :type id: str + :param send_subscription_link_request: + :type send_subscription_link_request: SendSubscriptionLinkRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._send_link_serialize( + id=id, + send_subscription_link_request=send_subscription_link_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Subscription", + '400': "Error", + '401': "Error", + '404': "Error", + '422': "Error", + '500': "Error", + '503': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def send_link_without_preload_content( + self, + id: Annotated[StrictStr, Field(description="The subscription ID")], + send_subscription_link_request: Optional[SendSubscriptionLinkRequest] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Send Subscription Link + +

Sends a subscription activation link to the customer through their preferred communication channel.

This API can only be used for subscriptions with the following status:

  • Pending

Delivery channels are automatically selected based on available customer information:

  • If customer email is available: Link is sent via email
  • If customer phone is available: Link is sent via WhatsApp
  • If WhatsApp delivery fails: Link is sent via SMS as a fallback

The subscription activation link allows customers to complete their subscription setup by providing payment details on the secure MONEI payment page. If no customer contact information is provided, the system will use the details stored in the subscription record.

+ + :param id: The subscription ID (required) + :type id: str + :param send_subscription_link_request: + :type send_subscription_link_request: SendSubscriptionLinkRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._send_link_serialize( + id=id, + send_subscription_link_request=send_subscription_link_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Subscription", + '400': "Error", + '401': "Error", + '404': "Error", + '422': "Error", + '500': "Error", + '503': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _send_link_serialize( self, id, - **kwargs - ): - """Send Subscription Link # noqa: E501 - -

Sends a subscription activation link to the customer through their preferred communication channel.

This API can only be used for subscriptions with the following status:

  • Pending

Delivery channels are automatically selected based on available customer information:

  • If customer email is available: Link is sent via email
  • If customer phone is available: Link is sent via WhatsApp
  • If WhatsApp delivery fails: Link is sent via SMS as a fallback

The subscription activation link allows customers to complete their subscription setup by providing payment details on the secure MONEI payment page. If no customer contact information is provided, the system will use the details stored in the subscription record.

# noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.send_link(id, async_req=True) - >>> result = thread.get() - - Args: - id (str): The subscription ID - - Keyword Args: - send_subscription_link_request (SendSubscriptionLinkRequest): [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 - will be returned without reading/decoding response data. - Default is True. - _request_timeout (int/float/tuple): timeout setting for this request. If - one number provided, it will be total request timeout. It can also - be a pair (tuple) of (connection, read) timeouts. - Default is None. - _check_input_type (bool): specifies if type checking - should be done one the data sent to the server. - Default is True. - _check_return_type (bool): specifies if type checking - should be done one the data received from the server. - Default is True. - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _content_type (str/None): force body content-type. - Default is None and content-type will be predicted by allowed - content-types and body. - _host_index (int/None): specifies the index of the server - that we want to use. - Default is read from the configuration. - _request_auths (list): set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - Default is None - async_req (bool): execute request asynchronously - - Returns: - Subscription - If the method is called asynchronously, returns the request - thread. - """ - kwargs['async_req'] = kwargs.get( - 'async_req', False - ) - kwargs['_return_http_data_only'] = kwargs.get( - '_return_http_data_only', True - ) - kwargs['_preload_content'] = kwargs.get( - '_preload_content', True - ) - kwargs['_request_timeout'] = kwargs.get( - '_request_timeout', None - ) - kwargs['_check_input_type'] = kwargs.get( - '_check_input_type', True - ) - kwargs['_check_return_type'] = kwargs.get( - '_check_return_type', True - ) - kwargs['_spec_property_naming'] = kwargs.get( - '_spec_property_naming', False - ) - kwargs['_content_type'] = kwargs.get( - '_content_type') - kwargs['_host_index'] = kwargs.get('_host_index') - kwargs['_request_auths'] = kwargs.get('_request_auths', None) - kwargs['id'] = \ - id - return self.send_link_endpoint.call_with_http_info(**kwargs) - + send_subscription_link_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if id is not None: + _path_params['id'] = id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if send_subscription_link_request is not None: + _body_params = send_subscription_link_request + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'APIKey' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/subscriptions/{id}/link', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call def send_status( + self, + id: Annotated[StrictStr, Field(description="The subscription ID")], + send_subscription_status_request: Optional[SendSubscriptionStatusRequest] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> Subscription: + """Send Subscription Status + +

Sends subscription status information to the customer through their preferred communication channel.

This API can only be used for subscriptions with the following statuses:

  • Active
  • Trialing
  • Past due

Delivery channels are automatically selected based on available customer information:

  • If customer email is available: Status is sent via email
  • If customer phone is available: Status is sent via WhatsApp
  • If WhatsApp delivery fails: Status is sent via SMS as a fallback

The status notification includes subscription details such as current status, upcoming payments, and recent changes. If no customer contact information is provided, the system will use the details stored in the subscription record.

Email notifications include contextual action links based on subscription status:

  • For past due subscriptions: A link to reactivate the subscription
  • For active and trialing subscriptions: A link to update the payment method

You can specify the customer's email or phone number, the preferred communication channel (email or SMS), and the language for the message.

+ + :param id: The subscription ID (required) + :type id: str + :param send_subscription_status_request: + :type send_subscription_status_request: SendSubscriptionStatusRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._send_status_serialize( + id=id, + send_subscription_status_request=send_subscription_status_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Subscription", + '400': "Error", + '401': "Error", + '404': "Error", + '422': "Error", + '500': "Error", + '503': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def send_status_with_http_info( + self, + id: Annotated[StrictStr, Field(description="The subscription ID")], + send_subscription_status_request: Optional[SendSubscriptionStatusRequest] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[Subscription]: + """Send Subscription Status + +

Sends subscription status information to the customer through their preferred communication channel.

This API can only be used for subscriptions with the following statuses:

  • Active
  • Trialing
  • Past due

Delivery channels are automatically selected based on available customer information:

  • If customer email is available: Status is sent via email
  • If customer phone is available: Status is sent via WhatsApp
  • If WhatsApp delivery fails: Status is sent via SMS as a fallback

The status notification includes subscription details such as current status, upcoming payments, and recent changes. If no customer contact information is provided, the system will use the details stored in the subscription record.

Email notifications include contextual action links based on subscription status:

  • For past due subscriptions: A link to reactivate the subscription
  • For active and trialing subscriptions: A link to update the payment method

You can specify the customer's email or phone number, the preferred communication channel (email or SMS), and the language for the message.

+ + :param id: The subscription ID (required) + :type id: str + :param send_subscription_status_request: + :type send_subscription_status_request: SendSubscriptionStatusRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._send_status_serialize( + id=id, + send_subscription_status_request=send_subscription_status_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Subscription", + '400': "Error", + '401': "Error", + '404': "Error", + '422': "Error", + '500': "Error", + '503': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def send_status_without_preload_content( + self, + id: Annotated[StrictStr, Field(description="The subscription ID")], + send_subscription_status_request: Optional[SendSubscriptionStatusRequest] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Send Subscription Status + +

Sends subscription status information to the customer through their preferred communication channel.

This API can only be used for subscriptions with the following statuses:

  • Active
  • Trialing
  • Past due

Delivery channels are automatically selected based on available customer information:

  • If customer email is available: Status is sent via email
  • If customer phone is available: Status is sent via WhatsApp
  • If WhatsApp delivery fails: Status is sent via SMS as a fallback

The status notification includes subscription details such as current status, upcoming payments, and recent changes. If no customer contact information is provided, the system will use the details stored in the subscription record.

Email notifications include contextual action links based on subscription status:

  • For past due subscriptions: A link to reactivate the subscription
  • For active and trialing subscriptions: A link to update the payment method

You can specify the customer's email or phone number, the preferred communication channel (email or SMS), and the language for the message.

+ + :param id: The subscription ID (required) + :type id: str + :param send_subscription_status_request: + :type send_subscription_status_request: SendSubscriptionStatusRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._send_status_serialize( + id=id, + send_subscription_status_request=send_subscription_status_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Subscription", + '400': "Error", + '401': "Error", + '404': "Error", + '422': "Error", + '500': "Error", + '503': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _send_status_serialize( self, id, - **kwargs - ): - """Send Subscription Status # noqa: E501 - -

Sends subscription status information to the customer through their preferred communication channel.

This API can only be used for subscriptions with the following statuses:

  • Active
  • Trialing
  • Past due

Delivery channels are automatically selected based on available customer information:

  • If customer email is available: Status is sent via email
  • If customer phone is available: Status is sent via WhatsApp
  • If WhatsApp delivery fails: Status is sent via SMS as a fallback

The status notification includes subscription details such as current status, upcoming payments, and recent changes. If no customer contact information is provided, the system will use the details stored in the subscription record.

Email notifications include contextual action links based on subscription status:

  • For past due subscriptions: A link to reactivate the subscription
  • For active and trialing subscriptions: A link to update the payment method

You can specify the customer's email or phone number, the preferred communication channel (email or SMS), and the language for the message.

# noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.send_status(id, async_req=True) - >>> result = thread.get() - - Args: - id (str): The subscription ID - - Keyword Args: - send_subscription_status_request (SendSubscriptionStatusRequest): [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 - will be returned without reading/decoding response data. - Default is True. - _request_timeout (int/float/tuple): timeout setting for this request. If - one number provided, it will be total request timeout. It can also - be a pair (tuple) of (connection, read) timeouts. - Default is None. - _check_input_type (bool): specifies if type checking - should be done one the data sent to the server. - Default is True. - _check_return_type (bool): specifies if type checking - should be done one the data received from the server. - Default is True. - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _content_type (str/None): force body content-type. - Default is None and content-type will be predicted by allowed - content-types and body. - _host_index (int/None): specifies the index of the server - that we want to use. - Default is read from the configuration. - _request_auths (list): set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - Default is None - async_req (bool): execute request asynchronously - - Returns: - Subscription - If the method is called asynchronously, returns the request - thread. - """ - kwargs['async_req'] = kwargs.get( - 'async_req', False - ) - kwargs['_return_http_data_only'] = kwargs.get( - '_return_http_data_only', True - ) - kwargs['_preload_content'] = kwargs.get( - '_preload_content', True - ) - kwargs['_request_timeout'] = kwargs.get( - '_request_timeout', None - ) - kwargs['_check_input_type'] = kwargs.get( - '_check_input_type', True - ) - kwargs['_check_return_type'] = kwargs.get( - '_check_return_type', True - ) - kwargs['_spec_property_naming'] = kwargs.get( - '_spec_property_naming', False - ) - kwargs['_content_type'] = kwargs.get( - '_content_type') - kwargs['_host_index'] = kwargs.get('_host_index') - kwargs['_request_auths'] = kwargs.get('_request_auths', None) - kwargs['id'] = \ - id - return self.send_status_endpoint.call_with_http_info(**kwargs) - + send_subscription_status_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if id is not None: + _path_params['id'] = id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if send_subscription_status_request is not None: + _body_params = send_subscription_status_request + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'APIKey' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/subscriptions/{id}/status', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call def update( + self, + id: Annotated[StrictStr, Field(description="The subscription ID")], + update_subscription_request: UpdateSubscriptionRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> Subscription: + """Update Subscription + +

Updates the configuration of an existing subscription.

Modifiable Parameters:

  • Billing information (amount, description)
  • Customer details (contact information, billing/shipping addresses)
  • Subscription settings (cancelAtPeriodEnd, pauseAtPeriodEnd)
  • Metadata (for your internal tracking)

Update Effects:

  • Amount changes apply to the next billing cycle
  • Customer information updates take effect immediately
  • Setting cancelAtPeriodEnd to true will end the subscription after the current period
  • Setting pauseAtPeriodEnd to true will pause billing after the current period

Note: Some fundamental properties cannot be changed once a subscription is created, including currency and billing interval. To modify these, you would need to cancel the existing subscription and create a new one.

+ + :param id: The subscription ID (required) + :type id: str + :param update_subscription_request: (required) + :type update_subscription_request: UpdateSubscriptionRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._update_serialize( + id=id, + update_subscription_request=update_subscription_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Subscription", + '400': "Error", + '401': "Error", + '404': "Error", + '422': "Error", + '500': "Error", + '503': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def update_with_http_info( + self, + id: Annotated[StrictStr, Field(description="The subscription ID")], + update_subscription_request: UpdateSubscriptionRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[Subscription]: + """Update Subscription + +

Updates the configuration of an existing subscription.

Modifiable Parameters:

  • Billing information (amount, description)
  • Customer details (contact information, billing/shipping addresses)
  • Subscription settings (cancelAtPeriodEnd, pauseAtPeriodEnd)
  • Metadata (for your internal tracking)

Update Effects:

  • Amount changes apply to the next billing cycle
  • Customer information updates take effect immediately
  • Setting cancelAtPeriodEnd to true will end the subscription after the current period
  • Setting pauseAtPeriodEnd to true will pause billing after the current period

Note: Some fundamental properties cannot be changed once a subscription is created, including currency and billing interval. To modify these, you would need to cancel the existing subscription and create a new one.

+ + :param id: The subscription ID (required) + :type id: str + :param update_subscription_request: (required) + :type update_subscription_request: UpdateSubscriptionRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._update_serialize( + id=id, + update_subscription_request=update_subscription_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Subscription", + '400': "Error", + '401': "Error", + '404': "Error", + '422': "Error", + '500': "Error", + '503': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def update_without_preload_content( + self, + id: Annotated[StrictStr, Field(description="The subscription ID")], + update_subscription_request: UpdateSubscriptionRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Update Subscription + +

Updates the configuration of an existing subscription.

Modifiable Parameters:

  • Billing information (amount, description)
  • Customer details (contact information, billing/shipping addresses)
  • Subscription settings (cancelAtPeriodEnd, pauseAtPeriodEnd)
  • Metadata (for your internal tracking)

Update Effects:

  • Amount changes apply to the next billing cycle
  • Customer information updates take effect immediately
  • Setting cancelAtPeriodEnd to true will end the subscription after the current period
  • Setting pauseAtPeriodEnd to true will pause billing after the current period

Note: Some fundamental properties cannot be changed once a subscription is created, including currency and billing interval. To modify these, you would need to cancel the existing subscription and create a new one.

+ + :param id: The subscription ID (required) + :type id: str + :param update_subscription_request: (required) + :type update_subscription_request: UpdateSubscriptionRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._update_serialize( + id=id, + update_subscription_request=update_subscription_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Subscription", + '400': "Error", + '401': "Error", + '404': "Error", + '422': "Error", + '500': "Error", + '503': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _update_serialize( self, id, update_subscription_request, - **kwargs - ): - """Update Subscription # noqa: E501 - -

Updates the configuration of an existing subscription.

Modifiable Parameters:

  • Billing information (amount, description)
  • Customer details (contact information, billing/shipping addresses)
  • Subscription settings (cancelAtPeriodEnd, pauseAtPeriodEnd)
  • Metadata (for your internal tracking)

Update Effects:

  • Amount changes apply to the next billing cycle
  • Customer information updates take effect immediately
  • Setting cancelAtPeriodEnd to true will end the subscription after the current period
  • Setting pauseAtPeriodEnd to true will pause billing after the current period

Note: Some fundamental properties cannot be changed once a subscription is created, including currency and billing interval. To modify these, you would need to cancel the existing subscription and create a new one.

# noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.update(id, update_subscription_request, async_req=True) - >>> result = thread.get() - - Args: - id (str): The subscription ID - update_subscription_request (UpdateSubscriptionRequest): - - Keyword Args: - _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 - will be returned without reading/decoding response data. - Default is True. - _request_timeout (int/float/tuple): timeout setting for this request. If - one number provided, it will be total request timeout. It can also - be a pair (tuple) of (connection, read) timeouts. - Default is None. - _check_input_type (bool): specifies if type checking - should be done one the data sent to the server. - Default is True. - _check_return_type (bool): specifies if type checking - should be done one the data received from the server. - Default is True. - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _content_type (str/None): force body content-type. - Default is None and content-type will be predicted by allowed - content-types and body. - _host_index (int/None): specifies the index of the server - that we want to use. - Default is read from the configuration. - _request_auths (list): set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - Default is None - async_req (bool): execute request asynchronously - - Returns: - Subscription - If the method is called asynchronously, returns the request - thread. - """ - kwargs['async_req'] = kwargs.get( - 'async_req', False - ) - kwargs['_return_http_data_only'] = kwargs.get( - '_return_http_data_only', True - ) - kwargs['_preload_content'] = kwargs.get( - '_preload_content', True - ) - kwargs['_request_timeout'] = kwargs.get( - '_request_timeout', None - ) - kwargs['_check_input_type'] = kwargs.get( - '_check_input_type', True - ) - kwargs['_check_return_type'] = kwargs.get( - '_check_return_type', True - ) - kwargs['_spec_property_naming'] = kwargs.get( - '_spec_property_naming', False - ) - kwargs['_content_type'] = kwargs.get( - '_content_type') - kwargs['_host_index'] = kwargs.get('_host_index') - kwargs['_request_auths'] = kwargs.get('_request_auths', None) - kwargs['id'] = \ - id - kwargs['update_subscription_request'] = \ - update_subscription_request - return self.update_endpoint.call_with_http_info(**kwargs) + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if id is not None: + _path_params['id'] = id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if update_subscription_request is not None: + _body_params = update_subscription_request + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'APIKey' + ] + + return self.api_client.param_serialize( + method='PUT', + resource_path='/subscriptions/{id}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + diff --git a/Monei/api_client.py b/Monei/api_client.py index dbfed8b..cd00d07 100644 --- a/Monei/api_client.py +++ b/Monei/api_client.py @@ -1,45 +1,48 @@ +# coding: utf-8 + """ MONEI API v1 -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

- The version of the OpenAPI document: 1.5.0 - Generated by: https://openapi-generator.tech -""" + The version of the OpenAPI document: 1.5.1 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 +import datetime +from dateutil.parser import parse +from enum import Enum +import decimal import json -import atexit import mimetypes -from multiprocessing.pool import ThreadPool -import io import os import re -import typing -from urllib.parse import quote -from urllib3.fields import RequestField +import tempfile +from urllib.parse import quote +from typing import Tuple, Optional, List, Dict, Union +from pydantic import SecretStr -from Monei import rest from Monei.configuration import Configuration -from Monei.exceptions import ApiTypeError, ApiValueError, ApiException -from Monei.model_utils import ( - ModelNormal, - ModelSimple, - ModelComposed, - check_allowed_values, - check_validations, - date, - datetime, - deserialize_file, - file_type, - model_to_dict, - none_type, - validate_and_convert_types +from Monei.api_response import ApiResponse, T as ApiResponseT +import Monei.models +from Monei import rest +from Monei.exceptions import ( + ApiValueError, + ApiException, + BadRequestException, + UnauthorizedException, + ForbiddenException, + NotFoundException, + ServiceException ) +RequestSerialized = Tuple[str, str, Dict[str, str], Optional[str], List[str]] -class ApiClient(object): +class ApiClient: """Generic API client for OpenAPI client library builds. OpenAPI generic API client. This client handles the client- @@ -47,28 +50,39 @@ class ApiClient(object): the methods and models for each application are generated from the OpenAPI templates. - NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - Do not edit the class manually. - :param configuration: .Configuration object for this client :param header_name: a header to pass when making calls to the API. :param header_value: a header value to pass when making calls to the API. :param cookie: a cookie to include in the header when making calls to the API - :param pool_threads: The number of threads to use for async requests - to the API. More threads means more concurrent API requests. """ + PRIMITIVE_TYPES = (float, bool, bytes, str, int) + NATIVE_TYPES_MAPPING = { + 'int': int, + 'long': int, # TODO remove as only py3 is supported? + 'float': float, + 'str': str, + 'bool': bool, + 'date': datetime.date, + 'datetime': datetime.datetime, + 'decimal': decimal.Decimal, + 'object': object, + } _pool = None - def __init__(self, configuration=None, header_name=None, header_value=None, - cookie=None, pool_threads=1): + def __init__( + self, + configuration=None, + header_name=None, + header_value=None, + cookie=None + ) -> None: + # use default configuration if none is provided if configuration is None: - configuration = Configuration.get_default_copy() + configuration = Configuration.get_default() self.configuration = configuration - self.pool_threads = pool_threads self.rest_client = rest.RESTClientObject(configuration) self.default_headers = {} @@ -77,30 +91,13 @@ def __init__(self, configuration=None, header_name=None, header_value=None, self.cookie = cookie # Set default User-Agent. self.user_agent = 'OpenAPI-Generator/1.2.6/python' + self.client_side_validation = configuration.client_side_validation def __enter__(self): return self def __exit__(self, exc_type, exc_value, traceback): - self.close() - - def close(self): - if self._pool: - self._pool.close() - self._pool.join() - self._pool = None - if hasattr(atexit, 'unregister'): - atexit.unregister(self.close) - - @property - def pool(self): - """Create thread pool on first request - avoids instantiating unused threadpool for blocking clients. - """ - if self._pool is None: - atexit.register(self.close) - self._pool = ThreadPool(self.pool_threads) - return self._pool + pass @property def user_agent(self): @@ -114,27 +111,69 @@ def user_agent(self, value): def set_default_header(self, header_name, header_value): self.default_headers[header_name] = header_value - def __call_api( + + _default = None + + @classmethod + def get_default(cls): + """Return new instance of ApiClient. + + This method returns newly created, based on default constructor, + object of ApiClient class or returns a copy of default + ApiClient. + + :return: The ApiClient object. + """ + if cls._default is None: + cls._default = ApiClient() + return cls._default + + @classmethod + def set_default(cls, default): + """Set default instance of ApiClient. + + It stores default ApiClient. + + :param default: object of ApiClient. + """ + cls._default = default + + def param_serialize( self, - resource_path: str, - method: str, - path_params: typing.Optional[typing.Dict[str, typing.Any]] = None, - query_params: typing.Optional[typing.List[typing.Tuple[str, typing.Any]]] = None, - header_params: typing.Optional[typing.Dict[str, typing.Any]] = None, - body: typing.Optional[typing.Any] = None, - post_params: typing.Optional[typing.List[typing.Tuple[str, typing.Any]]] = None, - files: typing.Optional[typing.Dict[str, typing.List[io.IOBase]]] = None, - response_type: typing.Optional[typing.Tuple[typing.Any]] = None, - auth_settings: typing.Optional[typing.List[str]] = None, - _return_http_data_only: typing.Optional[bool] = None, - collection_formats: typing.Optional[typing.Dict[str, str]] = None, - _preload_content: bool = True, - _request_timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - _host: typing.Optional[str] = None, - _check_type: typing.Optional[bool] = None, - _content_type: typing.Optional[str] = None, - _request_auths: typing.Optional[typing.List[typing.Dict[str, typing.Any]]] = None - ): + method, + resource_path, + path_params=None, + query_params=None, + header_params=None, + body=None, + post_params=None, + files=None, auth_settings=None, + collection_formats=None, + _host=None, + _request_auth=None + ) -> RequestSerialized: + + """Builds the HTTP request params needed by the request. + :param method: Method to call. + :param resource_path: Path to method endpoint. + :param path_params: Path parameters in the url. + :param query_params: Query parameters in the url. + :param header_params: Header parameters to be + placed in the request header. + :param body: Request body. + :param post_params dict: Request post form parameters, + for `application/x-www-form-urlencoded`, `multipart/form-data`. + :param auth_settings list: Auth Settings names for the request. + :param files dict: key -> filename, value -> filepath, + for `multipart/form-data`. + :param collection_formats: dict of collection formats for path, query, + header, and post parameters. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :return: tuple of form (path, http_method, query_params, header_params, + body, post_params, files) + """ config = self.configuration @@ -145,14 +184,17 @@ def __call_api( header_params['Cookie'] = self.cookie if header_params: header_params = self.sanitize_for_serialization(header_params) - header_params = dict(self.parameters_to_tuples(header_params, - collection_formats)) + header_params = dict( + self.parameters_to_tuples(header_params,collection_formats) + ) # path parameters if path_params: path_params = self.sanitize_for_serialization(path_params) - path_params = self.parameters_to_tuples(path_params, - collection_formats) + path_params = self.parameters_to_tuples( + path_params, + collection_formats + ) for k, v in path_params: # specified safe chars, encode everything resource_path = resource_path.replace( @@ -160,345 +202,269 @@ def __call_api( quote(str(v), safe=config.safe_chars_for_path_param) ) - # query parameters - if query_params: - query_params = self.sanitize_for_serialization(query_params) - query_params = self.parameters_to_tuples(query_params, - collection_formats) - # post parameters if post_params or files: post_params = post_params if post_params else [] post_params = self.sanitize_for_serialization(post_params) - post_params = self.parameters_to_tuples(post_params, - collection_formats) - post_params.extend(self.files_parameters(files)) - if header_params['Content-Type'].startswith("multipart"): - post_params = self.parameters_to_multipart(post_params, - (dict)) + post_params = self.parameters_to_tuples( + post_params, + collection_formats + ) + if files: + post_params.extend(self.files_parameters(files)) + + # auth setting + self.update_params_for_auth( + header_params, + query_params, + auth_settings, + resource_path, + method, + body, + request_auth=_request_auth + ) # body if body: body = self.sanitize_for_serialization(body) - # auth setting - self.update_params_for_auth(header_params, query_params, - auth_settings, resource_path, method, body, - request_auths=_request_auths) - # request url - if _host is None: + if _host is None or self.configuration.ignore_operation_servers: url = self.configuration.host + resource_path else: # use server/host defined in path or operation instead url = _host + resource_path + # query parameters + if query_params: + query_params = self.sanitize_for_serialization(query_params) + url_query = self.parameters_to_url_query( + query_params, + collection_formats + ) + url += "?" + url_query + + return method, url, header_params, body, post_params + + + def call_api( + self, + method, + url, + header_params=None, + body=None, + post_params=None, + _request_timeout=None + ) -> rest.RESTResponse: + """Makes the HTTP request (synchronous) + :param method: Method to call. + :param url: Path to method endpoint. + :param header_params: Header parameters to be + placed in the request header. + :param body: Request body. + :param post_params dict: Request post form parameters, + for `application/x-www-form-urlencoded`, `multipart/form-data`. + :param _request_timeout: timeout setting for this request. + :return: RESTResponse + """ + try: # perform request and return response - response_data = self.request( - method, url, query_params=query_params, headers=header_params, - post_params=post_params, body=body, - _preload_content=_preload_content, - _request_timeout=_request_timeout) + response_data = self.rest_client.request( + method, url, + headers=header_params, + body=body, post_params=post_params, + _request_timeout=_request_timeout + ) + except ApiException as e: - e.body = e.body.decode('utf-8') raise e - self.last_response = response_data + return response_data + + def response_deserialize( + self, + response_data: rest.RESTResponse, + response_types_map: Optional[Dict[str, ApiResponseT]]=None + ) -> ApiResponse[ApiResponseT]: + """Deserializes response into an object. + :param response_data: RESTResponse object to be deserialized. + :param response_types_map: dict of response types. + :return: ApiResponse + """ - return_data = response_data + msg = "RESTResponse.read() must be called before passing it to response_deserialize()" + assert response_data.data is not None, msg - if not _preload_content: - return (return_data) - return return_data + response_type = response_types_map.get(str(response_data.status), None) + if not response_type and isinstance(response_data.status, int) and 100 <= response_data.status <= 599: + # if not found, look for '1XX', '2XX', etc. + response_type = response_types_map.get(str(response_data.status)[0] + "XX", None) # deserialize response data - if response_type: - if response_type != (file_type,): - encoding = "utf-8" + response_text = None + return_data = None + try: + if response_type == "bytearray": + return_data = response_data.data + elif response_type == "file": + return_data = self.__deserialize_file(response_data) + elif response_type is not None: + match = None content_type = response_data.getheader('content-type') if content_type is not None: - match = re.search(r"charset=([a-zA-Z\-\d]+)[\s\;]?", content_type) - if match: - encoding = match.group(1) - response_data.data = response_data.data.decode(encoding) - - return_data = self.deserialize( - response_data, - response_type, - _check_type - ) - else: - return_data = None + match = re.search(r"charset=([a-zA-Z\-\d]+)[\s;]?", content_type) + encoding = match.group(1) if match else "utf-8" + response_text = response_data.data.decode(encoding) + return_data = self.deserialize(response_text, response_type, content_type) + finally: + if not 200 <= response_data.status <= 299: + raise ApiException.from_response( + http_resp=response_data, + body=response_text, + data=return_data, + ) - if _return_http_data_only: - return (return_data) - else: - return (return_data, response_data.status, - response_data.getheaders()) + return ApiResponse( + status_code = response_data.status, + data = return_data, + headers = response_data.getheaders(), + raw_data = response_data.data + ) - def parameters_to_multipart(self, params, collection_types): - """Get parameters as list of tuples, formatting as json if value is collection_types + def sanitize_for_serialization(self, obj): + """Builds a JSON POST object. - :param params: Parameters as list of two-tuples - :param dict collection_types: Parameter collection types - :return: Parameters as list of tuple or urllib3.fields.RequestField - """ - new_params = [] - if collection_types is None: - collection_types = (dict) - for k, v in params.items() if isinstance(params, dict) else params: # noqa: E501 - if isinstance( - v, collection_types): # v is instance of collection_type, formatting as application/json - v = json.dumps(v, ensure_ascii=False).encode("utf-8") - field = RequestField(k, v) - field.make_multipart(content_type="application/json; charset=utf-8") - new_params.append(field) - else: - new_params.append((k, v)) - return new_params - - @classmethod - def sanitize_for_serialization(cls, obj): - """Prepares data for transmission before it is sent with the rest client If obj is None, return None. + If obj is SecretStr, return obj.get_secret_value() If obj is str, int, long, float, bool, return directly. If obj is datetime.datetime, datetime.date convert to string in iso8601 format. + If obj is decimal.Decimal return string representation. If obj is list, sanitize each element in the list. If obj is dict, return the dict. If obj is OpenAPI model, return the properties dict. - If obj is io.IOBase, return the bytes + :param obj: The data to serialize. :return: The serialized form of data. """ - if isinstance(obj, (ModelNormal, ModelComposed)): - return { - key: cls.sanitize_for_serialization(val) for key, - val in model_to_dict( - obj, - serialize=True).items()} - elif isinstance(obj, io.IOBase): - return cls.get_file_data_and_close_file(obj) - elif isinstance(obj, (str, int, float, none_type, bool)): + if obj is None: + return None + elif isinstance(obj, Enum): + return obj.value + elif isinstance(obj, SecretStr): + return obj.get_secret_value() + elif isinstance(obj, self.PRIMITIVE_TYPES): return obj - elif isinstance(obj, (datetime, date)): + elif isinstance(obj, list): + return [ + self.sanitize_for_serialization(sub_obj) for sub_obj in obj + ] + elif isinstance(obj, tuple): + return tuple( + self.sanitize_for_serialization(sub_obj) for sub_obj in obj + ) + elif isinstance(obj, (datetime.datetime, datetime.date)): return obj.isoformat() - elif isinstance(obj, ModelSimple): - return cls.sanitize_for_serialization(obj.value) - elif isinstance(obj, (list, tuple)): - return [cls.sanitize_for_serialization(item) for item in obj] - if isinstance(obj, dict): - return {key: cls.sanitize_for_serialization(val) for key, val in obj.items()} - raise ApiValueError( - 'Unable to prepare type {} for serialization'.format( - obj.__class__.__name__)) - - def deserialize(self, response, response_type, _check_type): + elif isinstance(obj, decimal.Decimal): + return str(obj) + + elif isinstance(obj, dict): + obj_dict = obj + else: + # Convert model obj to dict except + # attributes `openapi_types`, `attribute_map` + # and attributes which value is not None. + # Convert attribute name to json key in + # model definition for request. + if hasattr(obj, 'to_dict') and callable(getattr(obj, 'to_dict')): + obj_dict = obj.to_dict() + else: + obj_dict = obj.__dict__ + + return { + key: self.sanitize_for_serialization(val) + for key, val in obj_dict.items() + } + + def deserialize(self, response_text: str, response_type: str, content_type: Optional[str]): """Deserializes response into an object. :param response: RESTResponse object to be deserialized. - :param response_type: For the response, a tuple containing: - valid classes - a list containing valid classes (for list schemas) - a dict containing a tuple of valid classes as the value - Example values: - (str,) - (Pet,) - (float, none_type) - ([int, none_type],) - ({str: (bool, str, int, float, date, datetime, str, none_type)},) - :param _check_type: boolean, whether to check the types of the data - received from the server - :type _check_type: bool + :param response_type: class literal for + deserialized object, or string of class name. + :param content_type: content type of response. :return: deserialized object. """ - # handle file downloading - # save response body into a tmp file and return the instance - if response_type == (file_type,): - content_disposition = response.getheader("Content-Disposition") - return deserialize_file(response.data, self.configuration, - content_disposition=content_disposition) # fetch data from response object - try: - received_data = json.loads(response.data) - except ValueError: - received_data = response.data - - # store our data under the key of 'received_data' so users have some - # context if they are deserializing a string and the data type is wrong - deserialized_data = validate_and_convert_types( - received_data, - response_type, - ['received_data'], - True, - _check_type, - configuration=self.configuration - ) - return deserialized_data + if content_type is None: + try: + data = json.loads(response_text) + except ValueError: + data = response_text + elif re.match(r'^application/(json|[\w!#$&.+-^_]+\+json)\s*(;|$)', content_type, re.IGNORECASE): + if response_text == "": + data = "" + else: + data = json.loads(response_text) + elif re.match(r'^text\/[a-z.+-]+\s*(;|$)', content_type, re.IGNORECASE): + data = response_text + else: + raise ApiException( + status=0, + reason="Unsupported content type: {0}".format(content_type) + ) - def call_api( - self, - resource_path: str, - method: str, - path_params: typing.Optional[typing.Dict[str, typing.Any]] = None, - query_params: typing.Optional[typing.List[typing.Tuple[str, typing.Any]]] = None, - header_params: typing.Optional[typing.Dict[str, typing.Any]] = None, - body: typing.Optional[typing.Any] = None, - post_params: typing.Optional[typing.List[typing.Tuple[str, typing.Any]]] = None, - files: typing.Optional[typing.Dict[str, typing.List[io.IOBase]]] = None, - response_type: typing.Optional[typing.Tuple[typing.Any]] = None, - auth_settings: typing.Optional[typing.List[str]] = None, - async_req: typing.Optional[bool] = None, - _return_http_data_only: typing.Optional[bool] = None, - collection_formats: typing.Optional[typing.Dict[str, str]] = None, - _preload_content: bool = True, - _request_timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - _host: typing.Optional[str] = None, - _check_type: typing.Optional[bool] = None, - _request_auths: typing.Optional[typing.List[typing.Dict[str, typing.Any]]] = None - ): - """Makes the HTTP request (synchronous) and returns deserialized data. + return self.__deserialize(data, response_type) - To make an async_req request, set the async_req parameter. + def __deserialize(self, data, klass): + """Deserializes dict, list, str into an object. - :param resource_path: Path to method endpoint. - :param method: Method to call. - :param path_params: Path parameters in the url. - :param query_params: Query parameters in the url. - :param header_params: Header parameters to be - placed in the request header. - :param body: Request body. - :param post_params dict: Request post form parameters, - for `application/x-www-form-urlencoded`, `multipart/form-data`. - :param auth_settings list: Auth Settings names for the request. - :param response_type: For the response, a tuple containing: - valid classes - a list containing valid classes (for list schemas) - a dict containing a tuple of valid classes as the value - Example values: - (str,) - (Pet,) - (float, none_type) - ([int, none_type],) - ({str: (bool, str, int, float, date, datetime, str, none_type)},) - :param files: key -> field name, value -> a list of open file - objects for `multipart/form-data`. - :type files: dict - :param async_req bool: execute request asynchronously - :type async_req: bool, optional - :param _return_http_data_only: response data without head status code - and headers - :type _return_http_data_only: bool, optional - :param collection_formats: dict of collection formats for path, query, - header, and post parameters. - :type collection_formats: dict, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :param _check_type: boolean describing if the data back from the server - should have its type checked. - :type _check_type: bool, optional - :param _request_auths: set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - :type _request_auths: list, optional - :return: - If async_req parameter is True, - the request will be called asynchronously. - The method will return the request thread. - If parameter async_req is False or missing, - then the method will return the response directly. + :param data: dict, list or str. + :param klass: class literal, or string of class name. + + :return: object. """ - if not async_req: - return self.__call_api(resource_path, method, - path_params, query_params, header_params, - body, post_params, files, - response_type, auth_settings, - _return_http_data_only, collection_formats, - _preload_content, _request_timeout, _host, - _check_type, _request_auths=_request_auths) - - return self.pool.apply_async(self.__call_api, (resource_path, - method, path_params, - query_params, - header_params, body, - post_params, files, - response_type, - auth_settings, - _return_http_data_only, - collection_formats, - _preload_content, - _request_timeout, - _host, _check_type, None, _request_auths)) - - def request(self, method, url, query_params=None, headers=None, - post_params=None, body=None, _preload_content=True, - _request_timeout=None): - """Makes the HTTP request using RESTClient.""" - if method == "GET": - return self.rest_client.GET(url, - query_params=query_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - headers=headers) - elif method == "HEAD": - return self.rest_client.HEAD(url, - query_params=query_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - headers=headers) - elif method == "OPTIONS": - return self.rest_client.OPTIONS(url, - query_params=query_params, - headers=headers, - post_params=post_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - body=body) - elif method == "POST": - return self.rest_client.POST(url, - query_params=query_params, - headers=headers, - post_params=post_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - body=body) - elif method == "PUT": - return self.rest_client.PUT(url, - query_params=query_params, - headers=headers, - post_params=post_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - body=body) - elif method == "PATCH": - return self.rest_client.PATCH(url, - query_params=query_params, - headers=headers, - post_params=post_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - body=body) - elif method == "DELETE": - return self.rest_client.DELETE(url, - query_params=query_params, - headers=headers, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - body=body) + if data is None: + return None + + if isinstance(klass, str): + if klass.startswith('List['): + m = re.match(r'List\[(.*)]', klass) + assert m is not None, "Malformed List type definition" + sub_kls = m.group(1) + return [self.__deserialize(sub_data, sub_kls) + for sub_data in data] + + if klass.startswith('Dict['): + m = re.match(r'Dict\[([^,]*), (.*)]', klass) + assert m is not None, "Malformed Dict type definition" + sub_kls = m.group(2) + return {k: self.__deserialize(v, sub_kls) + for k, v in data.items()} + + # convert str to class + if klass in self.NATIVE_TYPES_MAPPING: + klass = self.NATIVE_TYPES_MAPPING[klass] + else: + klass = getattr(Monei.models, klass) + + if klass in self.PRIMITIVE_TYPES: + return self.__deserialize_primitive(data, klass) + elif klass == object: + return self.__deserialize_object(data) + elif klass == datetime.date: + return self.__deserialize_date(data) + elif klass == datetime.datetime: + return self.__deserialize_datetime(data) + elif klass == decimal.Decimal: + return decimal.Decimal(data) + elif issubclass(klass, Enum): + return self.__deserialize_enum(data, klass) else: - raise ApiValueError( - "http method must be `GET`, `HEAD`, `OPTIONS`," - " `POST`, `PATCH`, `PUT` or `DELETE`." - ) + return self.__deserialize_model(data, klass) def parameters_to_tuples(self, params, collection_formats): """Get parameters as list of tuples, formatting collections. @@ -507,10 +473,10 @@ def parameters_to_tuples(self, params, collection_formats): :param dict collection_formats: Parameter collection formats :return: Parameters as list of tuples, collections formatted """ - new_params = [] + new_params: List[Tuple[str, str]] = [] if collection_formats is None: collection_formats = {} - for k, v in params.items() if isinstance(params, dict) else params: # noqa: E501 + for k, v in params.items() if isinstance(params, dict) else params: if k in collection_formats: collection_format = collection_formats[k] if collection_format == 'multi': @@ -530,118 +496,178 @@ def parameters_to_tuples(self, params, collection_formats): new_params.append((k, v)) return new_params - @staticmethod - def get_file_data_and_close_file(file_instance: io.IOBase) -> bytes: - file_data = file_instance.read() - file_instance.close() - return file_data + def parameters_to_url_query(self, params, collection_formats): + """Get parameters as list of tuples, formatting collections. + + :param params: Parameters as dict or list of two-tuples + :param dict collection_formats: Parameter collection formats + :return: URL query string (e.g. a=Hello%20World&b=123) + """ + new_params: List[Tuple[str, str]] = [] + if collection_formats is None: + collection_formats = {} + for k, v in params.items() if isinstance(params, dict) else params: + if isinstance(v, bool): + v = str(v).lower() + if isinstance(v, (int, float)): + v = str(v) + if isinstance(v, dict): + v = json.dumps(v) + + if k in collection_formats: + collection_format = collection_formats[k] + if collection_format == 'multi': + new_params.extend((k, quote(str(value))) for value in v) + else: + if collection_format == 'ssv': + delimiter = ' ' + elif collection_format == 'tsv': + delimiter = '\t' + elif collection_format == 'pipes': + delimiter = '|' + else: # csv is the default + delimiter = ',' + new_params.append( + (k, delimiter.join(quote(str(value)) for value in v)) + ) + else: + new_params.append((k, quote(str(v)))) + + return "&".join(["=".join(map(str, item)) for item in new_params]) - def files_parameters(self, - files: typing.Optional[typing.Dict[str, - typing.List[io.IOBase]]] = None): + def files_parameters( + self, + files: Dict[str, Union[str, bytes, List[str], List[bytes], Tuple[str, bytes]]], + ): """Builds form parameters. - :param files: None or a dict with key=param_name and - value is a list of open file objects - :return: List of tuples of form parameters with file data + :param files: File parameters. + :return: Form parameters with files. """ - if files is None: - return [] - params = [] - for param_name, file_instances in files.items(): - if file_instances is None: - # if the file field is nullable, skip None values + for k, v in files.items(): + if isinstance(v, str): + with open(v, 'rb') as f: + filename = os.path.basename(f.name) + filedata = f.read() + elif isinstance(v, bytes): + filename = k + filedata = v + elif isinstance(v, tuple): + filename, filedata = v + elif isinstance(v, list): + for file_param in v: + params.extend(self.files_parameters({k: file_param})) continue - for file_instance in file_instances: - if file_instance is None: - # if the file field is nullable, skip None values - continue - if file_instance.closed is True: - raise ApiValueError( - "Cannot read a closed file. The passed in file_type " - "for %s must be open." % param_name - ) - filename = os.path.basename(file_instance.name) - filedata = self.get_file_data_and_close_file(file_instance) - mimetype = (mimetypes.guess_type(filename)[0] or - 'application/octet-stream') - params.append( - tuple([param_name, tuple([filename, filedata, mimetype])])) - + else: + raise ValueError("Unsupported file value") + mimetype = ( + mimetypes.guess_type(filename)[0] + or 'application/octet-stream' + ) + params.append( + tuple([k, tuple([filename, filedata, mimetype])]) + ) return params - def select_header_accept(self, accepts): + def select_header_accept(self, accepts: List[str]) -> Optional[str]: """Returns `Accept` based on an array of accepts provided. :param accepts: List of headers. :return: Accept (e.g. application/json). """ if not accepts: - return + return None - accepts = [x.lower() for x in accepts] + for accept in accepts: + if re.search('json', accept, re.IGNORECASE): + return accept - if 'application/json' in accepts: - return 'application/json' - else: - return ', '.join(accepts) + return accepts[0] - def select_header_content_type(self, content_types, method=None, body=None): + def select_header_content_type(self, content_types): """Returns `Content-Type` based on an array of content_types provided. :param content_types: List of content-types. - :param method: http method (e.g. POST, PATCH). - :param body: http body to send. :return: Content-Type (e.g. application/json). """ if not content_types: return None - content_types = [x.lower() for x in content_types] + for content_type in content_types: + if re.search('json', content_type, re.IGNORECASE): + return content_type - if (method == 'PATCH' and - 'application/json-patch+json' in content_types and - isinstance(body, list)): - return 'application/json-patch+json' + return content_types[0] - if 'application/json' in content_types or '*/*' in content_types: - return 'application/json' - else: - return content_types[0] - - def update_params_for_auth(self, headers, queries, auth_settings, - resource_path, method, body, request_auths=None): + def update_params_for_auth( + self, + headers, + queries, + auth_settings, + resource_path, + method, + body, + request_auth=None + ) -> None: """Updates header and query params based on authentication setting. :param headers: Header parameters dict to be updated. :param queries: Query parameters tuple list to be updated. :param auth_settings: Authentication setting identifiers list. - :param resource_path: A string representation of the HTTP request resource path. - :param method: A string representation of the HTTP request method. - :param body: A object representing the body of the HTTP request. - The object type is the return value of _encoder.default(). - :param request_auths: if set, the provided settings will - override the token in the configuration. + :resource_path: A string representation of the HTTP request resource path. + :method: A string representation of the HTTP request method. + :body: A object representing the body of the HTTP request. + The object type is the return value of sanitize_for_serialization(). + :param request_auth: if set, the provided settings will + override the token in the configuration. """ if not auth_settings: return - if request_auths: - for auth_setting in request_auths: - self._apply_auth_params( - headers, queries, resource_path, method, body, auth_setting) - return + if request_auth: + self._apply_auth_params( + headers, + queries, + resource_path, + method, + body, + request_auth + ) + else: + for auth in auth_settings: + auth_setting = self.configuration.auth_settings().get(auth) + if auth_setting: + self._apply_auth_params( + headers, + queries, + resource_path, + method, + body, + auth_setting + ) - for auth in auth_settings: - auth_setting = self.configuration.auth_settings().get(auth) - if auth_setting: - self._apply_auth_params( - headers, queries, resource_path, method, body, auth_setting) + def _apply_auth_params( + self, + headers, + queries, + resource_path, + method, + body, + auth_setting + ) -> None: + """Updates the request parameters based on a single auth_setting - def _apply_auth_params(self, headers, queries, resource_path, method, body, auth_setting): + :param headers: Header parameters dict to be updated. + :param queries: Query parameters tuple list to be updated. + :resource_path: A string representation of the HTTP request resource path. + :method: A string representation of the HTTP request method. + :body: A object representing the body of the HTTP request. + The object type is the return value of sanitize_for_serialization(). + :param auth_setting: auth settings for the endpoint + """ if auth_setting['in'] == 'cookie': - headers['Cookie'] = auth_setting['key'] + "=" + auth_setting['value'] + headers['Cookie'] = auth_setting['value'] elif auth_setting['in'] == 'header': if auth_setting['type'] != 'http-signature': headers[auth_setting['key']] = auth_setting['value'] @@ -652,245 +678,120 @@ def _apply_auth_params(self, headers, queries, resource_path, method, body, auth 'Authentication token must be in `query` or `header`' ) + def __deserialize_file(self, response): + """Deserializes body to file -class Endpoint(object): - def __init__(self, settings=None, params_map=None, root_map=None, - headers_map=None, api_client=None, callable=None): - """Creates an endpoint - - Args: - settings (dict): see below key value pairs - 'response_type' (tuple/None): response type - 'auth' (list): a list of auth type keys - 'endpoint_path' (str): the endpoint path - 'operation_id' (str): endpoint string identifier - 'http_method' (str): POST/PUT/PATCH/GET etc - 'servers' (list): list of str servers that this endpoint is at - params_map (dict): see below key value pairs - 'all' (list): list of str endpoint parameter names - 'required' (list): list of required parameter names - 'nullable' (list): list of nullable parameter names - 'enum' (list): list of parameters with enum values - 'validation' (list): list of parameters with validations - root_map - 'validations' (dict): the dict mapping endpoint parameter tuple - paths to their validation dictionaries - 'allowed_values' (dict): the dict mapping endpoint parameter - tuple paths to their allowed_values (enum) dictionaries - 'openapi_types' (dict): param_name to openapi type - 'attribute_map' (dict): param_name to camelCase name - 'location_map' (dict): param_name to 'body', 'file', 'form', - 'header', 'path', 'query' - collection_format_map (dict): param_name to `csv` etc. - headers_map (dict): see below key value pairs - 'accept' (list): list of Accept header strings - 'content_type' (list): list of Content-Type header strings - api_client (ApiClient) api client instance - callable (function): the function which is invoked when the - Endpoint is called - """ - self.settings = settings - self.params_map = params_map - self.params_map['all'].extend([ - 'async_req', - '_host_index', - '_preload_content', - '_request_timeout', - '_return_http_data_only', - '_check_input_type', - '_check_return_type', - '_content_type', - '_spec_property_naming', - '_request_auths' - ]) - self.params_map['nullable'].extend(['_request_timeout']) - self.validations = root_map['validations'] - self.allowed_values = root_map['allowed_values'] - self.openapi_types = root_map['openapi_types'] - extra_types = { - 'async_req': (bool,), - '_host_index': (none_type, int), - '_preload_content': (bool,), - '_request_timeout': (none_type, float, (float,), [float], int, (int,), [int]), - '_return_http_data_only': (bool,), - '_check_input_type': (bool,), - '_check_return_type': (bool,), - '_spec_property_naming': (bool,), - '_content_type': (none_type, str), - '_request_auths': (none_type, list) - } - self.openapi_types.update(extra_types) - self.attribute_map = root_map['attribute_map'] - self.location_map = root_map['location_map'] - self.collection_format_map = root_map['collection_format_map'] - self.headers_map = headers_map - self.api_client = api_client - self.callable = callable - - def __validate_inputs(self, kwargs): - for param in self.params_map['enum']: - if param in kwargs: - check_allowed_values( - self.allowed_values, - (param,), - kwargs[param] - ) - - for param in self.params_map['validation']: - if param in kwargs: - check_validations( - self.validations, - (param,), - kwargs[param], - configuration=self.api_client.configuration - ) + Saves response body into a file in a temporary folder, + using the filename from the `Content-Disposition` header if provided. - if kwargs['_check_input_type'] is False: - return + handle file downloading + save response body into a tmp file and return the instance - for key, value in kwargs.items(): - fixed_val = validate_and_convert_types( - value, - self.openapi_types[key], - [key], - kwargs['_spec_property_naming'], - kwargs['_check_input_type'], - configuration=self.api_client.configuration + :param response: RESTResponse. + :return: file path. + """ + fd, path = tempfile.mkstemp(dir=self.configuration.temp_folder_path) + os.close(fd) + os.remove(path) + + content_disposition = response.getheader("Content-Disposition") + if content_disposition: + m = re.search( + r'filename=[\'"]?([^\'"\s]+)[\'"]?', + content_disposition ) - kwargs[key] = fixed_val - - def __gather_params(self, kwargs): - params = { - 'body': None, - 'collection_format': {}, - 'file': {}, - 'form': [], - 'header': {}, - 'path': {}, - 'query': [] - } + assert m is not None, "Unexpected 'content-disposition' header value" + filename = m.group(1) + path = os.path.join(os.path.dirname(path), filename) - for param_name, param_value in kwargs.items(): - param_location = self.location_map.get(param_name) - if param_location is None: - continue - if param_location: - if param_location == 'body': - params['body'] = param_value - continue - base_name = self.attribute_map[param_name] - if (param_location == 'form' and - self.openapi_types[param_name] == (file_type,)): - params['file'][base_name] = [param_value] - elif (param_location == 'form' and - self.openapi_types[param_name] == ([file_type],)): - # param_value is already a list - params['file'][base_name] = param_value - elif param_location in {'form', 'query'}: - param_value_full = (base_name, param_value) - params[param_location].append(param_value_full) - if param_location not in {'form', 'query'}: - params[param_location][base_name] = param_value - collection_format = self.collection_format_map.get(param_name) - if collection_format: - params['collection_format'][base_name] = collection_format + with open(path, "wb") as f: + f.write(response.data) - return params + return path - def __call__(self, *args, **kwargs): - """ This method is invoked when endpoints are called - Example: + def __deserialize_primitive(self, data, klass): + """Deserializes string to primitive type. - api_instance = ApplePayDomainApi() - api_instance.register # this is an instance of the class Endpoint - api_instance.register() # this invokes api_instance.register.__call__() - which then invokes the callable functions stored in that endpoint at - api_instance.register.callable or self.callable in this class + :param data: str. + :param klass: class literal. + :return: int, long, float, str, bool. """ - return self.callable(self, *args, **kwargs) + try: + return klass(data) + except UnicodeEncodeError: + return str(data) + except TypeError: + return data - def call_with_http_info(self, **kwargs): + def __deserialize_object(self, value): + """Return an original value. + :return: object. + """ + return value + + def __deserialize_date(self, string): + """Deserializes string to date. + + :param string: str. + :return: date. + """ try: - index = self.api_client.configuration.server_operation_index.get( - self.settings['operation_id'], self.api_client.configuration.server_index - ) if kwargs['_host_index'] is None else kwargs['_host_index'] - server_variables = self.api_client.configuration.server_operation_variables.get( - self.settings['operation_id'], self.api_client.configuration.server_variables - ) - _host = self.api_client.configuration.get_host_from_settings( - index, variables=server_variables, servers=self.settings['servers'] + return parse(string).date() + except ImportError: + return string + except ValueError: + raise rest.ApiException( + status=0, + reason="Failed to parse `{0}` as date object".format(string) ) - except IndexError: - if self.settings['servers']: - raise ApiValueError( - "Invalid host index. Must be 0 <= index < %s" % - len(self.settings['servers']) - ) - _host = None - - for key, value in kwargs.items(): - if key not in self.params_map['all']: - raise ApiTypeError( - "Got an unexpected parameter '%s'" - " to method `%s`" % - (key, self.settings['operation_id']) - ) - # only throw this nullable ApiValueError if _check_input_type - # is False, if _check_input_type==True we catch this case - # in self.__validate_inputs - if (key not in self.params_map['nullable'] and value is None - and kwargs['_check_input_type'] is False): - raise ApiValueError( - "Value may not be None for non-nullable parameter `%s`" - " when calling `%s`" % - (key, self.settings['operation_id']) - ) - for key in self.params_map['required']: - if key not in kwargs.keys(): - raise ApiValueError( - "Missing the required parameter `%s` when calling " - "`%s`" % (key, self.settings['operation_id']) + def __deserialize_datetime(self, string): + """Deserializes string to datetime. + + The string should be in iso8601 datetime format. + + :param string: str. + :return: datetime. + """ + try: + return parse(string) + except ImportError: + return string + except ValueError: + raise rest.ApiException( + status=0, + reason=( + "Failed to parse `{0}` as datetime object" + .format(string) ) + ) - self.__validate_inputs(kwargs) + def __deserialize_enum(self, data, klass): + """Deserializes primitive type to enum. - params = self.__gather_params(kwargs) + :param data: primitive type. + :param klass: class literal. + :return: enum value. + """ + try: + return klass(data) + except ValueError: + raise rest.ApiException( + status=0, + reason=( + "Failed to parse `{0}` as `{1}`" + .format(data, klass) + ) + ) - accept_headers_list = self.headers_map['accept'] - if accept_headers_list: - params['header']['Accept'] = self.api_client.select_header_accept( - accept_headers_list) + def __deserialize_model(self, data, klass): + """Deserializes list or dict to model. - if kwargs.get('_content_type'): - params['header']['Content-Type'] = kwargs['_content_type'] - else: - content_type_headers_list = self.headers_map['content_type'] - if content_type_headers_list: - if params['body'] != "": - content_types_list = self.api_client.select_header_content_type( - content_type_headers_list, self.settings['http_method'], - params['body']) - if content_types_list: - params['header']['Content-Type'] = content_types_list - - return self.api_client.call_api( - self.settings['endpoint_path'], self.settings['http_method'], - params['path'], - params['query'], - params['header'], - body=params['body'], - post_params=params['form'], - files=params['file'], - response_type=self.settings['response_type'], - auth_settings=self.settings['auth'], - async_req=kwargs['async_req'], - _check_type=kwargs['_check_return_type'], - _return_http_data_only=kwargs['_return_http_data_only'], - _preload_content=kwargs['_preload_content'], - _request_timeout=kwargs['_request_timeout'], - _host=_host, - _request_auths=kwargs['_request_auths'], - collection_formats=params['collection_format']) + :param data: dict, list. + :param klass: class literal. + :return: model object. + """ + + return klass.from_dict(data) diff --git a/Monei/api_response.py b/Monei/api_response.py new file mode 100644 index 0000000..9bc7c11 --- /dev/null +++ b/Monei/api_response.py @@ -0,0 +1,21 @@ +"""API response object.""" + +from __future__ import annotations +from typing import Optional, Generic, Mapping, TypeVar +from pydantic import Field, StrictInt, StrictBytes, BaseModel + +T = TypeVar("T") + +class ApiResponse(BaseModel, Generic[T]): + """ + API response object + """ + + status_code: StrictInt = Field(description="HTTP status code") + headers: Optional[Mapping[str, str]] = Field(None, description="HTTP headers") + data: T = Field(description="Deserialized data given the data type") + raw_data: StrictBytes = Field(description="Raw data (HTTP response body)") + + model_config = { + "arbitrary_types_allowed": True + } diff --git a/Monei/apis/__init__.py b/Monei/apis/__init__.py deleted file mode 100644 index 1011fd6..0000000 --- a/Monei/apis/__init__.py +++ /dev/null @@ -1,21 +0,0 @@ - -# flake8: noqa - -# Import all APIs into this package. -# If you have many APIs here with many many models used in each API this may -# raise a `RecursionError`. -# In order to avoid this, import only the API that you directly need like: -# -# from Monei.api.apple_pay_domain_api import ApplePayDomainApi -# -# or import this package, but before doing it, use: -# -# import sys -# sys.setrecursionlimit(n) - -# Import APIs into API package: -from Monei.api.apple_pay_domain_api import ApplePayDomainApi -from Monei.api.bizum_api import BizumApi -from Monei.api.payment_methods_api import PaymentMethodsApi -from Monei.api.payments_api import PaymentsApi -from Monei.api.subscriptions_api import SubscriptionsApi diff --git a/Monei/configuration.py b/Monei/configuration.py index 1cf1e13..53d2830 100644 --- a/Monei/configuration.py +++ b/Monei/configuration.py @@ -1,21 +1,27 @@ +# coding: utf-8 + """ MONEI API v1 -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

- The version of the OpenAPI document: 1.5.0 - Generated by: https://openapi-generator.tech -""" + The version of the OpenAPI document: 1.5.1 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 import copy +import http.client as httplib import logging +from logging import FileHandler import multiprocessing import sys -import urllib3 +from typing import Any, ClassVar, Dict, List, Literal, Optional, TypedDict, Union +from typing_extensions import NotRequired, Self -from http import client as http_client -from Monei.exceptions import ApiValueError +import urllib3 JSON_SCHEMA_VALIDATION_KEYWORDS = { @@ -24,46 +30,125 @@ 'minLength', 'pattern', 'maxItems', 'minItems' } -class Configuration(object): - """NOTE: This class is auto generated by OpenAPI Generator +ServerVariablesT = Dict[str, str] - Ref: https://openapi-generator.tech - Do not edit the class manually. +GenericAuthSetting = TypedDict( + "GenericAuthSetting", + { + "type": str, + "in": str, + "key": str, + "value": str, + }, +) + + +OAuth2AuthSetting = TypedDict( + "OAuth2AuthSetting", + { + "type": Literal["oauth2"], + "in": Literal["header"], + "key": Literal["Authorization"], + "value": str, + }, +) + + +APIKeyAuthSetting = TypedDict( + "APIKeyAuthSetting", + { + "type": Literal["api_key"], + "in": str, + "key": str, + "value": Optional[str], + }, +) - :param host: Base url + +BasicAuthSetting = TypedDict( + "BasicAuthSetting", + { + "type": Literal["basic"], + "in": Literal["header"], + "key": Literal["Authorization"], + "value": Optional[str], + }, +) + + +BearerFormatAuthSetting = TypedDict( + "BearerFormatAuthSetting", + { + "type": Literal["bearer"], + "in": Literal["header"], + "format": Literal["JWT"], + "key": Literal["Authorization"], + "value": str, + }, +) + + +BearerAuthSetting = TypedDict( + "BearerAuthSetting", + { + "type": Literal["bearer"], + "in": Literal["header"], + "key": Literal["Authorization"], + "value": str, + }, +) + + +HTTPSignatureAuthSetting = TypedDict( + "HTTPSignatureAuthSetting", + { + "type": Literal["http-signature"], + "in": Literal["header"], + "key": Literal["Authorization"], + "value": None, + }, +) + + +AuthSettings = TypedDict( + "AuthSettings", + { + "APIKey": APIKeyAuthSetting, + "AccountId": APIKeyAuthSetting, + }, + total=False, +) + + +class HostSettingVariable(TypedDict): + description: str + default_value: str + enum_values: List[str] + + +class HostSetting(TypedDict): + url: str + description: str + variables: NotRequired[Dict[str, HostSettingVariable]] + + +class Configuration: + """This class contains various settings of the API client. + + :param host: Base url. + :param ignore_operation_servers + Boolean to ignore operation servers for the API client. + Config will use `host` as the base url regardless of the operation servers. :param api_key: Dict to store API key(s). Each entry in the dict specifies an API key. The dict key is the name of the security scheme in the OAS specification. The dict value is the API key secret. - :param api_key_prefix: Dict to store API prefix (e.g. Bearer) + :param api_key_prefix: Dict to store API prefix (e.g. Bearer). The dict key is the name of the security scheme in the OAS specification. The dict value is an API key prefix when generating the auth data. - :param username: Username for HTTP basic authentication - :param password: Password for HTTP basic authentication - :param discard_unknown_keys: Boolean value indicating whether to discard - unknown properties. A server may send a response that includes additional - properties that are not known by the client in the following scenarios: - 1. The OpenAPI document is incomplete, i.e. it does not match the server - implementation. - 2. The client was generated using an older version of the OpenAPI document - and the server has been upgraded since then. - If a schema in the OpenAPI document defines the additionalProperties attribute, - then all undeclared properties received by the server are injected into the - additional properties map. In that case, there are undeclared properties, and - nothing to discard. - :param disabled_client_side_validations (string): Comma-separated list of - JSON schema validation keywords to disable JSON schema structural validation - rules. The following keywords may be specified: multipleOf, maximum, - exclusiveMaximum, minimum, exclusiveMinimum, maxLength, minLength, pattern, - maxItems, minItems. - By default, the validation is performed for data generated locally by the client - and data received from the server, independent of any validation performed by - the server side. If the input data does not satisfy the JSON schema validation - rules specified in the OpenAPI document, an exception is raised. - If disabled_client_side_validations is set, structural validation is - disabled. This can be useful to troubleshoot data validation problem, such as - when the OpenAPI document validation rules do not match the actual API data - received by the server. + :param username: Username for HTTP basic authentication. + :param password: Password for HTTP basic authentication. + :param access_token: Access token. :param server_index: Index to servers configuration. :param server_variables: Mapping with string values to replace variables in templated server configuration. The validation of enums is performed for @@ -72,9 +157,13 @@ class Configuration(object): configuration. :param server_operation_variables: Mapping from operation ID to a mapping with string values to replace variables in templated server configuration. - The validation of enums is performed for variables with defined enum values before. + The validation of enums is performed for variables with defined enum + values before. :param ssl_ca_cert: str - the path to a file of concatenated CA certificates - in PEM format + in PEM format. + :param retries: Number of retries for API requests. + :param ca_cert_data: verify the peer using concatenated CA certificate data + in PEM (str) or DER (bytes) format. :Example: @@ -98,18 +187,27 @@ class Configuration(object): Cookie: JSESSIONID abc123 """ - _default = None - - def __init__(self, host=None, - api_key=None, api_key_prefix=None, - access_token=None, - username=None, password=None, - discard_unknown_keys=False, - disabled_client_side_validations="", - server_index=None, server_variables=None, - server_operation_index=None, server_operation_variables=None, - ssl_ca_cert=None, - ): + _default: ClassVar[Optional[Self]] = None + + def __init__( + self, + host: Optional[str]=None, + api_key: Optional[Dict[str, str]]=None, + api_key_prefix: Optional[Dict[str, str]]=None, + username: Optional[str]=None, + password: Optional[str]=None, + access_token: Optional[str]=None, + server_index: Optional[int]=None, + server_variables: Optional[ServerVariablesT]=None, + server_operation_index: Optional[Dict[int, int]]=None, + server_operation_variables: Optional[Dict[int, ServerVariablesT]]=None, + ignore_operation_servers: bool=False, + ssl_ca_cert: Optional[str]=None, + retries: Optional[int] = None, + ca_cert_data: Optional[Union[str, bytes]] = None, + *, + debug: Optional[bool] = None, + ) -> None: """Constructor """ self._base_path = "https://api.monei.com/v1" if host is None else host @@ -123,11 +221,13 @@ def __init__(self, host=None, self.server_operation_variables = server_operation_variables or {} """Default server variables """ + self.ignore_operation_servers = ignore_operation_servers + """Ignore operation servers + """ self.temp_folder_path = None """Temp file folder for downloading files """ # Authentication Settings - self.access_token = access_token self.api_key = {} if api_key: self.api_key = api_key @@ -147,8 +247,9 @@ def __init__(self, host=None, self.password = password """Password for HTTP basic authentication """ - self.discard_unknown_keys = discard_unknown_keys - self.disabled_client_side_validations = disabled_client_side_validations + self.access_token = access_token + """Access token + """ self.logger = {} """Logging Settings """ @@ -160,13 +261,16 @@ def __init__(self, host=None, self.logger_stream_handler = None """Log stream handler """ - self.logger_file_handler = None + self.logger_file_handler: Optional[FileHandler] = None """Log file handler """ self.logger_file = None """Debug file location """ - self.debug = False + if debug is not None: + self.debug = debug + else: + self.__debug = False """Debug switch """ @@ -178,6 +282,10 @@ def __init__(self, host=None, self.ssl_ca_cert = ssl_ca_cert """Set this to customize the certificate file to verify the peer. """ + self.ca_cert_data = ca_cert_data + """Set this to verify the peer using PEM (str) or DER (bytes) + certificate data. + """ self.cert_file = None """client certificate file """ @@ -187,6 +295,10 @@ def __init__(self, host=None, self.assert_hostname = None """Set this to True/False to enable/disable SSL hostname verification. """ + self.tls_server_name = None + """SSL/TLS Server Name Indication (SNI) + Set this to the SNI value expected by the server. + """ self.connection_pool_maxsize = multiprocessing.cpu_count() * 5 """urllib3 connection pool's maximum number of connections saved @@ -196,28 +308,34 @@ def __init__(self, host=None, cpu_count * 5 is used as default value to increase performance. """ - self.proxy = None + self.proxy: Optional[str] = None """Proxy URL """ - self.no_proxy = None - """bypass proxy for host in the no_proxy list. - """ self.proxy_headers = None """Proxy headers """ self.safe_chars_for_path_param = '' """Safe chars for path_param """ - self.retries = None + self.retries = retries """Adding retries to override urllib3 default value 3 """ # Enable client side validation self.client_side_validation = True - # Options to pass down to the underlying urllib3 socket self.socket_options = None + """Options to pass down to the underlying urllib3 socket + """ + + self.datetime_format = "%Y-%m-%dT%H:%M:%S.%f%z" + """datetime format + """ - def __deepcopy__(self, memo): + self.date_format = "%Y-%m-%d" + """date format + """ + + def __deepcopy__(self, memo: Dict[int, Any]) -> Self: cls = self.__class__ result = cls.__new__(cls) memo[id(self)] = result @@ -231,18 +349,11 @@ def __deepcopy__(self, memo): result.debug = self.debug return result - def __setattr__(self, name, value): + def __setattr__(self, name: str, value: Any) -> None: object.__setattr__(self, name, value) - if name == 'disabled_client_side_validations': - s = set(filter(None, value.split(','))) - for v in s: - if v not in JSON_SCHEMA_VALIDATION_KEYWORDS: - raise ApiValueError( - "Invalid keyword: '{0}''".format(v)) - self._disabled_client_side_validations = s @classmethod - def set_default(cls, default): + def set_default(cls, default: Optional[Self]) -> None: """Set default instance of configuration. It stores default configuration, which can be @@ -250,24 +361,34 @@ def set_default(cls, default): :param default: object of Configuration """ - cls._default = copy.deepcopy(default) + cls._default = default @classmethod - def get_default_copy(cls): - """Return new instance of configuration. + def get_default_copy(cls) -> Self: + """Deprecated. Please use `get_default` instead. + + Deprecated. Please use `get_default` instead. + + :return: The configuration object. + """ + return cls.get_default() + + @classmethod + def get_default(cls) -> Self: + """Return the default configuration. This method returns newly created, based on default constructor, object of Configuration class or returns a copy of default - configuration passed by the set_default method. + configuration. :return: The configuration object. """ - if cls._default is not None: - return copy.deepcopy(cls._default) - return Configuration() + if cls._default is None: + cls._default = cls() + return cls._default @property - def logger_file(self): + def logger_file(self) -> Optional[str]: """The logger file. If the logger_file is None, then add stream handler and remove file @@ -279,7 +400,7 @@ def logger_file(self): return self.__logger_file @logger_file.setter - def logger_file(self, value): + def logger_file(self, value: Optional[str]) -> None: """The logger file. If the logger_file is None, then add stream handler and remove file @@ -298,7 +419,7 @@ def logger_file(self, value): logger.addHandler(self.logger_file_handler) @property - def debug(self): + def debug(self) -> bool: """Debug status :param value: The debug status, True or False. @@ -307,7 +428,7 @@ def debug(self): return self.__debug @debug.setter - def debug(self, value): + def debug(self, value: bool) -> None: """Debug status :param value: The debug status, True or False. @@ -318,18 +439,18 @@ def debug(self, value): # if debug status is True, turn on debug logging for _, logger in self.logger.items(): logger.setLevel(logging.DEBUG) - # turn on http_client debug - http_client.HTTPConnection.debuglevel = 1 + # turn on httplib debug + httplib.HTTPConnection.debuglevel = 1 else: # if debug status is False, turn off debug logging, # setting log level to default `logging.WARNING` for _, logger in self.logger.items(): logger.setLevel(logging.WARNING) - # turn off http_client debug - http_client.HTTPConnection.debuglevel = 0 + # turn off httplib debug + httplib.HTTPConnection.debuglevel = 0 @property - def logger_format(self): + def logger_format(self) -> str: """The logger format. The logger_formatter will be updated when sets logger_format. @@ -340,7 +461,7 @@ def logger_format(self): return self.__logger_format @logger_format.setter - def logger_format(self, value): + def logger_format(self, value: str) -> None: """The logger format. The logger_formatter will be updated when sets logger_format. @@ -351,7 +472,7 @@ def logger_format(self, value): self.__logger_format = value self.logger_formatter = logging.Formatter(self.__logger_format) - def get_api_key_with_prefix(self, identifier, alias=None): + def get_api_key_with_prefix(self, identifier: str, alias: Optional[str]=None) -> Optional[str]: """Gets API key (with prefix if set). :param identifier: The identifier of apiKey. @@ -368,7 +489,9 @@ def get_api_key_with_prefix(self, identifier, alias=None): else: return key - def get_basic_auth_token(self): + return None + + def get_basic_auth_token(self) -> Optional[str]: """Gets HTTP basic authentication header (string). :return: The token for basic HTTP authentication. @@ -383,12 +506,12 @@ def get_basic_auth_token(self): basic_auth=username + ':' + password ).get('authorization') - def auth_settings(self): + def auth_settings(self)-> AuthSettings: """Gets Auth Settings dict for api client. :return: The Auth Settings information dict. """ - auth = {} + auth: AuthSettings = {} if 'APIKey' in self.api_key: auth['APIKey'] = { 'type': 'api_key', @@ -409,7 +532,7 @@ def auth_settings(self): } return auth - def to_debug_report(self): + def to_debug_report(self) -> str: """Gets the essential information for debugging. :return: The report for debugging. @@ -417,11 +540,11 @@ def to_debug_report(self): return "Python SDK Debug Report:\n"\ "OS: {env}\n"\ "Python Version: {pyversion}\n"\ - "Version of the API: 1.5.0\n"\ + "Version of the API: 1.5.1\n"\ "SDK Package Version: 1.2.6".\ format(env=sys.platform, pyversion=sys.version) - def get_host_settings(self): + def get_host_settings(self) -> List[HostSetting]: """Gets an array of host settings :return: An array of host settings @@ -433,7 +556,12 @@ def get_host_settings(self): } ] - def get_host_from_settings(self, index, variables=None, servers=None): + def get_host_from_settings( + self, + index: Optional[int], + variables: Optional[ServerVariablesT]=None, + servers: Optional[List[HostSetting]]=None, + ) -> str: """Gets host URL based on the index and variables :param index: array index of the host settings :param variables: hash of variable and the corresponding value @@ -473,12 +601,12 @@ def get_host_from_settings(self, index, variables=None, servers=None): return url @property - def host(self): + def host(self) -> str: """Return generated host.""" return self.get_host_from_settings(self.server_index, variables=self.server_variables) @host.setter - def host(self, value): + def host(self, value: str) -> None: """Fix base path.""" self._base_path = value self.server_index = None diff --git a/Monei/exceptions.py b/Monei/exceptions.py index 3d9af41..4ca1124 100644 --- a/Monei/exceptions.py +++ b/Monei/exceptions.py @@ -1,12 +1,18 @@ +# coding: utf-8 + """ MONEI API v1 -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

- The version of the OpenAPI document: 1.5.0 - Generated by: https://openapi-generator.tech -""" + The version of the OpenAPI document: 1.5.1 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 +from typing import Any, Optional +from typing_extensions import Self class OpenApiException(Exception): """The base exception class for all OpenAPIExceptions""" @@ -14,7 +20,7 @@ class OpenApiException(Exception): class ApiTypeError(OpenApiException, TypeError): def __init__(self, msg, path_to_item=None, valid_classes=None, - key_type=None): + key_type=None) -> None: """ Raises an exception for TypeErrors Args: @@ -42,7 +48,7 @@ def __init__(self, msg, path_to_item=None, valid_classes=None, class ApiValueError(OpenApiException, ValueError): - def __init__(self, msg, path_to_item=None): + def __init__(self, msg, path_to_item=None) -> None: """ Args: msg (str): the exception message @@ -60,7 +66,7 @@ def __init__(self, msg, path_to_item=None): class ApiAttributeError(OpenApiException, AttributeError): - def __init__(self, msg, path_to_item=None): + def __init__(self, msg, path_to_item=None) -> None: """ Raised when an attribute reference or assignment fails. @@ -79,7 +85,7 @@ def __init__(self, msg, path_to_item=None): class ApiKeyError(OpenApiException, KeyError): - def __init__(self, msg, path_to_item=None): + def __init__(self, msg, path_to_item=None) -> None: """ Args: msg (str): the exception message @@ -97,54 +103,106 @@ def __init__(self, msg, path_to_item=None): class ApiException(OpenApiException): - def __init__(self, status=None, reason=None, http_resp=None): + def __init__( + self, + status=None, + reason=None, + http_resp=None, + *, + body: Optional[str] = None, + data: Optional[Any] = None, + ) -> None: + self.status = status + self.reason = reason + self.body = body + self.data = data + self.headers = None + if http_resp: - self.status = http_resp.status - self.reason = http_resp.reason - self.body = http_resp.data + if self.status is None: + self.status = http_resp.status + if self.reason is None: + self.reason = http_resp.reason + if self.body is None: + try: + self.body = http_resp.data.decode('utf-8') + except Exception: + pass self.headers = http_resp.getheaders() - else: - self.status = status - self.reason = reason - self.body = None - self.headers = None + + @classmethod + def from_response( + cls, + *, + http_resp, + body: Optional[str], + data: Optional[Any], + ) -> Self: + if http_resp.status == 400: + raise BadRequestException(http_resp=http_resp, body=body, data=data) + + if http_resp.status == 401: + raise UnauthorizedException(http_resp=http_resp, body=body, data=data) + + if http_resp.status == 403: + raise ForbiddenException(http_resp=http_resp, body=body, data=data) + + if http_resp.status == 404: + raise NotFoundException(http_resp=http_resp, body=body, data=data) + + # Added new conditions for 409 and 422 + if http_resp.status == 409: + raise ConflictException(http_resp=http_resp, body=body, data=data) + + if http_resp.status == 422: + raise UnprocessableEntityException(http_resp=http_resp, body=body, data=data) + + if 500 <= http_resp.status <= 599: + raise ServiceException(http_resp=http_resp, body=body, data=data) + raise ApiException(http_resp=http_resp, body=body, data=data) def __str__(self): """Custom error messages for exception""" - error_message = "Status Code: {0}\n"\ + error_message = "({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) + if self.data or self.body: + error_message += "HTTP response body: {0}\n".format(self.data or self.body) return error_message -class NotFoundException(ApiException): +class BadRequestException(ApiException): + pass - def __init__(self, status=None, reason=None, http_resp=None): - super(NotFoundException, self).__init__(status, reason, http_resp) +class NotFoundException(ApiException): + pass -class UnauthorizedException(ApiException): - def __init__(self, status=None, reason=None, http_resp=None): - super(UnauthorizedException, self).__init__(status, reason, http_resp) +class UnauthorizedException(ApiException): + pass class ForbiddenException(ApiException): - - def __init__(self, status=None, reason=None, http_resp=None): - super(ForbiddenException, self).__init__(status, reason, http_resp) + pass class ServiceException(ApiException): + pass + + +class ConflictException(ApiException): + """Exception for HTTP 409 Conflict.""" + pass + - def __init__(self, status=None, reason=None, http_resp=None): - super(ServiceException, self).__init__(status, reason, http_resp) +class UnprocessableEntityException(ApiException): + """Exception for HTTP 422 Unprocessable Entity.""" + pass def render_path(path_to_item): diff --git a/Monei/model/__init__.py b/Monei/model/__init__.py deleted file mode 100644 index 9e13e35..0000000 --- a/Monei/model/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# we can not import model classes here because that would create a circular -# reference which would not work in python2 -# do not import all models into this module because that uses a lot of memory and stack frames -# if you need the ability to import all models from one package, import them with -# from Monei.models import ModelA, ModelB diff --git a/Monei/model/activate_subscription_request.py b/Monei/model/activate_subscription_request.py deleted file mode 100644 index ce72e6c..0000000 --- a/Monei/model/activate_subscription_request.py +++ /dev/null @@ -1,291 +0,0 @@ -""" - MONEI API v1 - -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - - The version of the OpenAPI document: 1.5.0 - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from Monei.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from Monei.exceptions import ApiAttributeError - - - -class ActivateSubscriptionRequest(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - return { - 'payment_token': (bool, date, datetime, dict, float, int, list, str, none_type,), # noqa: E501 - 'session_id': (str,), # noqa: E501 - 'add_amount': (bool, date, datetime, dict, float, int, list, str, none_type,), # noqa: E501 - 'sequence_id': (str,), # noqa: E501 - 'complete_url': (str,), # noqa: E501 - 'fail_url': (str,), # noqa: E501 - 'cancel_url': (str,), # noqa: E501 - 'metadata': ({str: (bool, date, datetime, dict, float, int, list, str, none_type)},), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'payment_token': 'paymentToken', # noqa: E501 - 'session_id': 'sessionId', # noqa: E501 - 'add_amount': 'addAmount', # noqa: E501 - 'sequence_id': 'sequenceId', # noqa: E501 - 'complete_url': 'completeUrl', # noqa: E501 - 'fail_url': 'failUrl', # noqa: E501 - 'cancel_url': 'cancelUrl', # noqa: E501 - 'metadata': 'metadata', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """ActivateSubscriptionRequest - 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 - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - payment_token (bool, date, datetime, dict, float, int, list, str, none_type): A payment token generated by monei.js [Components](https://docs.monei.com/docs/monei-js-overview) or a paymentToken [saved after a previous successful payment](https://docs.monei.com/docs/save-payment-method). In case of the first one, you will also need to send the `sessionId` used to generate the token in the first place. . [optional] # noqa: E501 - session_id (str): A unique identifier within your system that adds security to the payment process. You need to pass the same session ID as the one used on the frontend to initialize MONEI Component (if you needed to). This is required if a payment token (not permanent) was already generated in the frontend. . [optional] # noqa: E501 - add_amount (bool, date, datetime, dict, float, int, list, str, none_type): The amount to be added to the subscription's initial payment. A positive integer representing how much to charge in the smallest currency unit (e.g., 100 cents to charge 1.00 USD). . [optional] # noqa: E501 - sequence_id (str): A permanent identifier that refers to the initial payment of a sequence of payments. This value needs to be sent in the path for `RECURRING` payments. . [optional] # noqa: E501 - complete_url (str): The URL the customer will be directed to after transaction completed (successful or failed - except if `failUrl` is provided). . [optional] # noqa: E501 - fail_url (str): The URL the customer will be directed to after transaction has failed, instead of `completeUrl` (used in hosted payment page). This allows to provide two different URLs for successful and failed payments. . [optional] # noqa: E501 - cancel_url (str): The URL the customer will be directed to if they decide to cancel payment and return to your website (used in hosted payment page). . [optional] # noqa: E501 - metadata ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}): A set of key-value pairs that you can attach to a resource. This can be useful for storing additional information about the resource in a structured format.. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', True) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """ActivateSubscriptionRequest - 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 - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - payment_token (bool, date, datetime, dict, float, int, list, str, none_type): A payment token generated by monei.js [Components](https://docs.monei.com/docs/monei-js-overview) or a paymentToken [saved after a previous successful payment](https://docs.monei.com/docs/save-payment-method). In case of the first one, you will also need to send the `sessionId` used to generate the token in the first place. . [optional] # noqa: E501 - session_id (str): A unique identifier within your system that adds security to the payment process. You need to pass the same session ID as the one used on the frontend to initialize MONEI Component (if you needed to). This is required if a payment token (not permanent) was already generated in the frontend. . [optional] # noqa: E501 - add_amount (bool, date, datetime, dict, float, int, list, str, none_type): The amount to be added to the subscription's initial payment. A positive integer representing how much to charge in the smallest currency unit (e.g., 100 cents to charge 1.00 USD). . [optional] # noqa: E501 - sequence_id (str): A permanent identifier that refers to the initial payment of a sequence of payments. This value needs to be sent in the path for `RECURRING` payments. . [optional] # noqa: E501 - complete_url (str): The URL the customer will be directed to after transaction completed (successful or failed - except if `failUrl` is provided). . [optional] # noqa: E501 - fail_url (str): The URL the customer will be directed to after transaction has failed, instead of `completeUrl` (used in hosted payment page). This allows to provide two different URLs for successful and failed payments. . [optional] # noqa: E501 - cancel_url (str): The URL the customer will be directed to if they decide to cancel payment and return to your website (used in hosted payment page). . [optional] # noqa: E501 - metadata ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}): A set of key-value pairs that you can attach to a resource. This can be useful for storing additional information about the resource in a structured format.. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/Monei/model/address.py b/Monei/model/address.py deleted file mode 100644 index 0319358..0000000 --- a/Monei/model/address.py +++ /dev/null @@ -1,283 +0,0 @@ -""" - MONEI API v1 - -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - - The version of the OpenAPI document: 1.5.0 - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from Monei.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from Monei.exceptions import ApiAttributeError - - - -class Address(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - return { - 'country': (str,), # noqa: E501 - 'city': (str,), # noqa: E501 - 'line1': (str,), # noqa: E501 - 'line2': (str,), # noqa: E501 - 'zip': (str,), # noqa: E501 - 'state': (str,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'country': 'country', # noqa: E501 - 'city': 'city', # noqa: E501 - 'line1': 'line1', # noqa: E501 - 'line2': 'line2', # noqa: E501 - 'zip': 'zip', # noqa: E501 - 'state': 'state', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """Address - 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 - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - country (str): Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).. [optional] # noqa: E501 - city (str): City, district, suburb, town, or village.. [optional] # noqa: E501 - line1 (str): Address line 1 (e.g., street, PO Box, or company name).. [optional] # noqa: E501 - line2 (str): Address line 2 (e.g., apartment, suite, unit, or building).. [optional] # noqa: E501 - zip (str): ZIP or postal code.. [optional] # noqa: E501 - state (str): State, county, province, or region.. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', True) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """Address - 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 - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - country (str): Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).. [optional] # noqa: E501 - city (str): City, district, suburb, town, or village.. [optional] # noqa: E501 - line1 (str): Address line 1 (e.g., street, PO Box, or company name).. [optional] # noqa: E501 - line2 (str): Address line 2 (e.g., apartment, suite, unit, or building).. [optional] # noqa: E501 - zip (str): ZIP or postal code.. [optional] # noqa: E501 - state (str): State, county, province, or region.. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/Monei/model/apple_pay_domain_register200_response.py b/Monei/model/apple_pay_domain_register200_response.py deleted file mode 100644 index 974c1d5..0000000 --- a/Monei/model/apple_pay_domain_register200_response.py +++ /dev/null @@ -1,263 +0,0 @@ -""" - MONEI API v1 - -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - - The version of the OpenAPI document: 1.5.0 - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from Monei.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from Monei.exceptions import ApiAttributeError - - - -class ApplePayDomainRegister200Response(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - return { - 'success': (bool,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'success': 'success', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """ApplePayDomainRegister200Response - 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 - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - success (bool): [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', True) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """ApplePayDomainRegister200Response - 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 - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - success (bool): [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/Monei/model/apple_pay_domain_register400_response.py b/Monei/model/apple_pay_domain_register400_response.py deleted file mode 100644 index 0f0a423..0000000 --- a/Monei/model/apple_pay_domain_register400_response.py +++ /dev/null @@ -1,335 +0,0 @@ -""" - MONEI API v1 - -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - - The version of the OpenAPI document: 1.5.0 - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from Monei.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from Monei.exceptions import ApiAttributeError - - -def lazy_import(): - from Monei.model.error import Error - globals()['Error'] = Error - - -class ApplePayDomainRegister400Response(ModelComposed): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - lazy_import() - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - lazy_import() - return { - 'status': (str,), # noqa: E501 - 'status_code': (int,), # noqa: E501 - 'message': (str,), # noqa: E501 - 'request_id': (str,), # noqa: E501 - 'request_time': (datetime,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'status': 'status', # noqa: E501 - 'status_code': 'statusCode', # noqa: E501 - 'message': 'message', # noqa: E501 - 'request_id': 'requestId', # noqa: E501 - 'request_time': 'requestTime', # noqa: E501 - } - - read_only_vars = { - } - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """ApplePayDomainRegister400Response - a model defined in OpenAPI - - Keyword Args: - status (str): Error type identifier - status_code (int): HTTP status code - message (str): Human-readable error message - request_id (str): Unique identifier for the request - request_time (datetime): Timestamp when the request was processed - _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. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - constant_args = { - '_check_type': _check_type, - '_path_to_item': _path_to_item, - '_spec_property_naming': _spec_property_naming, - '_configuration': _configuration, - '_visited_composed_classes': self._visited_composed_classes, - } - composed_info = validate_get_composed_info( - constant_args, kwargs, self) - self._composed_instances = composed_info[0] - self._var_name_to_model_instances = composed_info[1] - self._additional_properties_model_instances = composed_info[2] - discarded_args = composed_info[3] - - for var_name, var_value in kwargs.items(): - if var_name in discarded_args and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self._additional_properties_model_instances: - # discard variable. - continue - setattr(self, var_name, var_value) - - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - '_composed_instances', - '_var_name_to_model_instances', - '_additional_properties_model_instances', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """ApplePayDomainRegister400Response - a model defined in OpenAPI - - Keyword Args: - status (str): Error type identifier - status_code (int): HTTP status code - message (str): Human-readable error message - request_id (str): Unique identifier for the request - request_time (datetime): Timestamp when the request was processed - _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. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - constant_args = { - '_check_type': _check_type, - '_path_to_item': _path_to_item, - '_spec_property_naming': _spec_property_naming, - '_configuration': _configuration, - '_visited_composed_classes': self._visited_composed_classes, - } - composed_info = validate_get_composed_info( - constant_args, kwargs, self) - self._composed_instances = composed_info[0] - self._var_name_to_model_instances = composed_info[1] - self._additional_properties_model_instances = composed_info[2] - discarded_args = composed_info[3] - - for var_name, var_value in kwargs.items(): - if var_name in discarded_args and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self._additional_properties_model_instances: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") - - @cached_property - def _composed_schemas(): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error because the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - lazy_import() - return { - 'anyOf': [ - ], - 'allOf': [ - Error, - ], - 'oneOf': [ - ], - } diff --git a/Monei/model/apple_pay_domain_register401_response.py b/Monei/model/apple_pay_domain_register401_response.py deleted file mode 100644 index 8ddaf06..0000000 --- a/Monei/model/apple_pay_domain_register401_response.py +++ /dev/null @@ -1,335 +0,0 @@ -""" - MONEI API v1 - -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - - The version of the OpenAPI document: 1.5.0 - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from Monei.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from Monei.exceptions import ApiAttributeError - - -def lazy_import(): - from Monei.model.error import Error - globals()['Error'] = Error - - -class ApplePayDomainRegister401Response(ModelComposed): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - lazy_import() - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - lazy_import() - return { - 'status': (str,), # noqa: E501 - 'status_code': (int,), # noqa: E501 - 'message': (str,), # noqa: E501 - 'request_id': (str,), # noqa: E501 - 'request_time': (datetime,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'status': 'status', # noqa: E501 - 'status_code': 'statusCode', # noqa: E501 - 'message': 'message', # noqa: E501 - 'request_id': 'requestId', # noqa: E501 - 'request_time': 'requestTime', # noqa: E501 - } - - read_only_vars = { - } - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """ApplePayDomainRegister401Response - a model defined in OpenAPI - - Keyword Args: - status (str): Error type identifier - status_code (int): HTTP status code - message (str): Human-readable error message - request_id (str): Unique identifier for the request - request_time (datetime): Timestamp when the request was processed - _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. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - constant_args = { - '_check_type': _check_type, - '_path_to_item': _path_to_item, - '_spec_property_naming': _spec_property_naming, - '_configuration': _configuration, - '_visited_composed_classes': self._visited_composed_classes, - } - composed_info = validate_get_composed_info( - constant_args, kwargs, self) - self._composed_instances = composed_info[0] - self._var_name_to_model_instances = composed_info[1] - self._additional_properties_model_instances = composed_info[2] - discarded_args = composed_info[3] - - for var_name, var_value in kwargs.items(): - if var_name in discarded_args and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self._additional_properties_model_instances: - # discard variable. - continue - setattr(self, var_name, var_value) - - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - '_composed_instances', - '_var_name_to_model_instances', - '_additional_properties_model_instances', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """ApplePayDomainRegister401Response - a model defined in OpenAPI - - Keyword Args: - status (str): Error type identifier - status_code (int): HTTP status code - message (str): Human-readable error message - request_id (str): Unique identifier for the request - request_time (datetime): Timestamp when the request was processed - _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. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - constant_args = { - '_check_type': _check_type, - '_path_to_item': _path_to_item, - '_spec_property_naming': _spec_property_naming, - '_configuration': _configuration, - '_visited_composed_classes': self._visited_composed_classes, - } - composed_info = validate_get_composed_info( - constant_args, kwargs, self) - self._composed_instances = composed_info[0] - self._var_name_to_model_instances = composed_info[1] - self._additional_properties_model_instances = composed_info[2] - discarded_args = composed_info[3] - - for var_name, var_value in kwargs.items(): - if var_name in discarded_args and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self._additional_properties_model_instances: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") - - @cached_property - def _composed_schemas(): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error because the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - lazy_import() - return { - 'anyOf': [ - ], - 'allOf': [ - Error, - ], - 'oneOf': [ - ], - } diff --git a/Monei/model/apple_pay_domain_register404_response.py b/Monei/model/apple_pay_domain_register404_response.py deleted file mode 100644 index e7c8d08..0000000 --- a/Monei/model/apple_pay_domain_register404_response.py +++ /dev/null @@ -1,335 +0,0 @@ -""" - MONEI API v1 - -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - - The version of the OpenAPI document: 1.5.0 - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from Monei.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from Monei.exceptions import ApiAttributeError - - -def lazy_import(): - from Monei.model.error import Error - globals()['Error'] = Error - - -class ApplePayDomainRegister404Response(ModelComposed): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - lazy_import() - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - lazy_import() - return { - 'status': (str,), # noqa: E501 - 'status_code': (int,), # noqa: E501 - 'message': (str,), # noqa: E501 - 'request_id': (str,), # noqa: E501 - 'request_time': (datetime,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'status': 'status', # noqa: E501 - 'status_code': 'statusCode', # noqa: E501 - 'message': 'message', # noqa: E501 - 'request_id': 'requestId', # noqa: E501 - 'request_time': 'requestTime', # noqa: E501 - } - - read_only_vars = { - } - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """ApplePayDomainRegister404Response - a model defined in OpenAPI - - Keyword Args: - status (str): Error type identifier - status_code (int): HTTP status code - message (str): Human-readable error message - request_id (str): Unique identifier for the request - request_time (datetime): Timestamp when the request was processed - _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. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - constant_args = { - '_check_type': _check_type, - '_path_to_item': _path_to_item, - '_spec_property_naming': _spec_property_naming, - '_configuration': _configuration, - '_visited_composed_classes': self._visited_composed_classes, - } - composed_info = validate_get_composed_info( - constant_args, kwargs, self) - self._composed_instances = composed_info[0] - self._var_name_to_model_instances = composed_info[1] - self._additional_properties_model_instances = composed_info[2] - discarded_args = composed_info[3] - - for var_name, var_value in kwargs.items(): - if var_name in discarded_args and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self._additional_properties_model_instances: - # discard variable. - continue - setattr(self, var_name, var_value) - - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - '_composed_instances', - '_var_name_to_model_instances', - '_additional_properties_model_instances', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """ApplePayDomainRegister404Response - a model defined in OpenAPI - - Keyword Args: - status (str): Error type identifier - status_code (int): HTTP status code - message (str): Human-readable error message - request_id (str): Unique identifier for the request - request_time (datetime): Timestamp when the request was processed - _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. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - constant_args = { - '_check_type': _check_type, - '_path_to_item': _path_to_item, - '_spec_property_naming': _spec_property_naming, - '_configuration': _configuration, - '_visited_composed_classes': self._visited_composed_classes, - } - composed_info = validate_get_composed_info( - constant_args, kwargs, self) - self._composed_instances = composed_info[0] - self._var_name_to_model_instances = composed_info[1] - self._additional_properties_model_instances = composed_info[2] - discarded_args = composed_info[3] - - for var_name, var_value in kwargs.items(): - if var_name in discarded_args and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self._additional_properties_model_instances: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") - - @cached_property - def _composed_schemas(): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error because the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - lazy_import() - return { - 'anyOf': [ - ], - 'allOf': [ - Error, - ], - 'oneOf': [ - ], - } diff --git a/Monei/model/apple_pay_domain_register422_response.py b/Monei/model/apple_pay_domain_register422_response.py deleted file mode 100644 index bd0a2ed..0000000 --- a/Monei/model/apple_pay_domain_register422_response.py +++ /dev/null @@ -1,335 +0,0 @@ -""" - MONEI API v1 - -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - - The version of the OpenAPI document: 1.5.0 - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from Monei.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from Monei.exceptions import ApiAttributeError - - -def lazy_import(): - from Monei.model.error import Error - globals()['Error'] = Error - - -class ApplePayDomainRegister422Response(ModelComposed): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - lazy_import() - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - lazy_import() - return { - 'status': (str,), # noqa: E501 - 'status_code': (int,), # noqa: E501 - 'message': (str,), # noqa: E501 - 'request_id': (str,), # noqa: E501 - 'request_time': (datetime,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'status': 'status', # noqa: E501 - 'status_code': 'statusCode', # noqa: E501 - 'message': 'message', # noqa: E501 - 'request_id': 'requestId', # noqa: E501 - 'request_time': 'requestTime', # noqa: E501 - } - - read_only_vars = { - } - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """ApplePayDomainRegister422Response - a model defined in OpenAPI - - Keyword Args: - status (str): Error type identifier - status_code (int): HTTP status code - message (str): Human-readable error message - request_id (str): Unique identifier for the request - request_time (datetime): Timestamp when the request was processed - _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. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - constant_args = { - '_check_type': _check_type, - '_path_to_item': _path_to_item, - '_spec_property_naming': _spec_property_naming, - '_configuration': _configuration, - '_visited_composed_classes': self._visited_composed_classes, - } - composed_info = validate_get_composed_info( - constant_args, kwargs, self) - self._composed_instances = composed_info[0] - self._var_name_to_model_instances = composed_info[1] - self._additional_properties_model_instances = composed_info[2] - discarded_args = composed_info[3] - - for var_name, var_value in kwargs.items(): - if var_name in discarded_args and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self._additional_properties_model_instances: - # discard variable. - continue - setattr(self, var_name, var_value) - - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - '_composed_instances', - '_var_name_to_model_instances', - '_additional_properties_model_instances', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """ApplePayDomainRegister422Response - a model defined in OpenAPI - - Keyword Args: - status (str): Error type identifier - status_code (int): HTTP status code - message (str): Human-readable error message - request_id (str): Unique identifier for the request - request_time (datetime): Timestamp when the request was processed - _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. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - constant_args = { - '_check_type': _check_type, - '_path_to_item': _path_to_item, - '_spec_property_naming': _spec_property_naming, - '_configuration': _configuration, - '_visited_composed_classes': self._visited_composed_classes, - } - composed_info = validate_get_composed_info( - constant_args, kwargs, self) - self._composed_instances = composed_info[0] - self._var_name_to_model_instances = composed_info[1] - self._additional_properties_model_instances = composed_info[2] - discarded_args = composed_info[3] - - for var_name, var_value in kwargs.items(): - if var_name in discarded_args and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self._additional_properties_model_instances: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") - - @cached_property - def _composed_schemas(): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error because the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - lazy_import() - return { - 'anyOf': [ - ], - 'allOf': [ - Error, - ], - 'oneOf': [ - ], - } diff --git a/Monei/model/apple_pay_domain_register500_response.py b/Monei/model/apple_pay_domain_register500_response.py deleted file mode 100644 index 327227b..0000000 --- a/Monei/model/apple_pay_domain_register500_response.py +++ /dev/null @@ -1,335 +0,0 @@ -""" - MONEI API v1 - -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - - The version of the OpenAPI document: 1.5.0 - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from Monei.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from Monei.exceptions import ApiAttributeError - - -def lazy_import(): - from Monei.model.error import Error - globals()['Error'] = Error - - -class ApplePayDomainRegister500Response(ModelComposed): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - lazy_import() - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - lazy_import() - return { - 'status': (str,), # noqa: E501 - 'status_code': (int,), # noqa: E501 - 'message': (str,), # noqa: E501 - 'request_id': (str,), # noqa: E501 - 'request_time': (datetime,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'status': 'status', # noqa: E501 - 'status_code': 'statusCode', # noqa: E501 - 'message': 'message', # noqa: E501 - 'request_id': 'requestId', # noqa: E501 - 'request_time': 'requestTime', # noqa: E501 - } - - read_only_vars = { - } - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """ApplePayDomainRegister500Response - a model defined in OpenAPI - - Keyword Args: - status (str): Error type identifier - status_code (int): HTTP status code - message (str): Human-readable error message - request_id (str): Unique identifier for the request - request_time (datetime): Timestamp when the request was processed - _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. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - constant_args = { - '_check_type': _check_type, - '_path_to_item': _path_to_item, - '_spec_property_naming': _spec_property_naming, - '_configuration': _configuration, - '_visited_composed_classes': self._visited_composed_classes, - } - composed_info = validate_get_composed_info( - constant_args, kwargs, self) - self._composed_instances = composed_info[0] - self._var_name_to_model_instances = composed_info[1] - self._additional_properties_model_instances = composed_info[2] - discarded_args = composed_info[3] - - for var_name, var_value in kwargs.items(): - if var_name in discarded_args and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self._additional_properties_model_instances: - # discard variable. - continue - setattr(self, var_name, var_value) - - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - '_composed_instances', - '_var_name_to_model_instances', - '_additional_properties_model_instances', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """ApplePayDomainRegister500Response - a model defined in OpenAPI - - Keyword Args: - status (str): Error type identifier - status_code (int): HTTP status code - message (str): Human-readable error message - request_id (str): Unique identifier for the request - request_time (datetime): Timestamp when the request was processed - _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. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - constant_args = { - '_check_type': _check_type, - '_path_to_item': _path_to_item, - '_spec_property_naming': _spec_property_naming, - '_configuration': _configuration, - '_visited_composed_classes': self._visited_composed_classes, - } - composed_info = validate_get_composed_info( - constant_args, kwargs, self) - self._composed_instances = composed_info[0] - self._var_name_to_model_instances = composed_info[1] - self._additional_properties_model_instances = composed_info[2] - discarded_args = composed_info[3] - - for var_name, var_value in kwargs.items(): - if var_name in discarded_args and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self._additional_properties_model_instances: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") - - @cached_property - def _composed_schemas(): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error because the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - lazy_import() - return { - 'anyOf': [ - ], - 'allOf': [ - Error, - ], - 'oneOf': [ - ], - } diff --git a/Monei/model/apple_pay_domain_register503_response.py b/Monei/model/apple_pay_domain_register503_response.py deleted file mode 100644 index 544952e..0000000 --- a/Monei/model/apple_pay_domain_register503_response.py +++ /dev/null @@ -1,335 +0,0 @@ -""" - MONEI API v1 - -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - - The version of the OpenAPI document: 1.5.0 - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from Monei.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from Monei.exceptions import ApiAttributeError - - -def lazy_import(): - from Monei.model.error import Error - globals()['Error'] = Error - - -class ApplePayDomainRegister503Response(ModelComposed): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - lazy_import() - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - lazy_import() - return { - 'status': (str,), # noqa: E501 - 'status_code': (int,), # noqa: E501 - 'message': (str,), # noqa: E501 - 'request_id': (str,), # noqa: E501 - 'request_time': (datetime,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'status': 'status', # noqa: E501 - 'status_code': 'statusCode', # noqa: E501 - 'message': 'message', # noqa: E501 - 'request_id': 'requestId', # noqa: E501 - 'request_time': 'requestTime', # noqa: E501 - } - - read_only_vars = { - } - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """ApplePayDomainRegister503Response - a model defined in OpenAPI - - Keyword Args: - status (str): Error type identifier - status_code (int): HTTP status code - message (str): Human-readable error message - request_id (str): Unique identifier for the request - request_time (datetime): Timestamp when the request was processed - _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. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - constant_args = { - '_check_type': _check_type, - '_path_to_item': _path_to_item, - '_spec_property_naming': _spec_property_naming, - '_configuration': _configuration, - '_visited_composed_classes': self._visited_composed_classes, - } - composed_info = validate_get_composed_info( - constant_args, kwargs, self) - self._composed_instances = composed_info[0] - self._var_name_to_model_instances = composed_info[1] - self._additional_properties_model_instances = composed_info[2] - discarded_args = composed_info[3] - - for var_name, var_value in kwargs.items(): - if var_name in discarded_args and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self._additional_properties_model_instances: - # discard variable. - continue - setattr(self, var_name, var_value) - - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - '_composed_instances', - '_var_name_to_model_instances', - '_additional_properties_model_instances', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """ApplePayDomainRegister503Response - a model defined in OpenAPI - - Keyword Args: - status (str): Error type identifier - status_code (int): HTTP status code - message (str): Human-readable error message - request_id (str): Unique identifier for the request - request_time (datetime): Timestamp when the request was processed - _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. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - constant_args = { - '_check_type': _check_type, - '_path_to_item': _path_to_item, - '_spec_property_naming': _spec_property_naming, - '_configuration': _configuration, - '_visited_composed_classes': self._visited_composed_classes, - } - composed_info = validate_get_composed_info( - constant_args, kwargs, self) - self._composed_instances = composed_info[0] - self._var_name_to_model_instances = composed_info[1] - self._additional_properties_model_instances = composed_info[2] - discarded_args = composed_info[3] - - for var_name, var_value in kwargs.items(): - if var_name in discarded_args and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self._additional_properties_model_instances: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") - - @cached_property - def _composed_schemas(): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error because the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - lazy_import() - return { - 'anyOf': [ - ], - 'allOf': [ - Error, - ], - 'oneOf': [ - ], - } diff --git a/Monei/model/bizum_validate_phone200_response.py b/Monei/model/bizum_validate_phone200_response.py deleted file mode 100644 index c6f62ea..0000000 --- a/Monei/model/bizum_validate_phone200_response.py +++ /dev/null @@ -1,263 +0,0 @@ -""" - MONEI API v1 - -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - - The version of the OpenAPI document: 1.5.0 - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from Monei.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from Monei.exceptions import ApiAttributeError - - - -class BizumValidatePhone200Response(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - return { - 'is_valid': (bool,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'is_valid': 'isValid', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """BizumValidatePhone200Response - 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 - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - is_valid (bool): [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', True) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """BizumValidatePhone200Response - 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 - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - is_valid (bool): [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/Monei/model/cancel_payment_request.py b/Monei/model/cancel_payment_request.py deleted file mode 100644 index ff54bb7..0000000 --- a/Monei/model/cancel_payment_request.py +++ /dev/null @@ -1,269 +0,0 @@ -""" - MONEI API v1 - -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - - The version of the OpenAPI document: 1.5.0 - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from Monei.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from Monei.exceptions import ApiAttributeError - - -def lazy_import(): - from Monei.model.payment_cancellation_reason import PaymentCancellationReason - globals()['PaymentCancellationReason'] = PaymentCancellationReason - - -class CancelPaymentRequest(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - lazy_import() - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - lazy_import() - return { - 'cancellation_reason': (PaymentCancellationReason,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'cancellation_reason': 'cancellationReason', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """CancelPaymentRequest - 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 - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - cancellation_reason (PaymentCancellationReason): [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', True) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """CancelPaymentRequest - 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 - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - cancellation_reason (PaymentCancellationReason): [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/Monei/model/cancel_subscription_request.py b/Monei/model/cancel_subscription_request.py deleted file mode 100644 index 5f5f5fc..0000000 --- a/Monei/model/cancel_subscription_request.py +++ /dev/null @@ -1,263 +0,0 @@ -""" - MONEI API v1 - -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - - The version of the OpenAPI document: 1.5.0 - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from Monei.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from Monei.exceptions import ApiAttributeError - - - -class CancelSubscriptionRequest(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - return { - 'cancel_at_period_end': (bool,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'cancel_at_period_end': 'cancelAtPeriodEnd', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """CancelSubscriptionRequest - 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 - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - cancel_at_period_end (bool): If true, the subscription will be canceled at the end of the current period. . [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', True) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """CancelSubscriptionRequest - 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 - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - cancel_at_period_end (bool): If true, the subscription will be canceled at the end of the current period. . [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/Monei/model/capture_payment_request.py b/Monei/model/capture_payment_request.py deleted file mode 100644 index 4ee8517..0000000 --- a/Monei/model/capture_payment_request.py +++ /dev/null @@ -1,263 +0,0 @@ -""" - MONEI API v1 - -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - - The version of the OpenAPI document: 1.5.0 - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from Monei.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from Monei.exceptions import ApiAttributeError - - - -class CapturePaymentRequest(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - return { - 'amount': (bool, date, datetime, dict, float, int, list, str, none_type,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'amount': 'amount', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """CapturePaymentRequest - 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 - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - amount (bool, date, datetime, dict, float, int, list, str, none_type): The amount to capture, which must be less than or equal to the original amount. Any additional amount will be automatically refunded. . [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', True) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """CapturePaymentRequest - 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 - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - amount (bool, date, datetime, dict, float, int, list, str, none_type): The amount to capture, which must be less than or equal to the original amount. Any additional amount will be automatically refunded. . [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/Monei/model/card.py b/Monei/model/card.py deleted file mode 100644 index b8c9adc..0000000 --- a/Monei/model/card.py +++ /dev/null @@ -1,283 +0,0 @@ -""" - MONEI API v1 - -

The MONEI API is organized around REST. Our API has predictable resource-oriented URLs, accepts JSON-encoded request bodies, returns JSON-encoded responses, and uses standard HTTP response codes, authentication, and verbs.

Base URL:

https://api.monei.com/v1

Client libraries:

Important:

If you are not using our official SDKs, you need to provide a valid User-Agent header in each request, otherwise your requests will be rejected.

# noqa: E501 - - The version of the OpenAPI document: 1.2.2 - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from Monei.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from Monei.exceptions import ApiAttributeError - - - -class Card(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - return { - 'number': (str,), # noqa: E501 - 'cvc': (str,), # noqa: E501 - 'exp_month': (str,), # noqa: E501 - 'exp_year': (str,), # noqa: E501 - 'cardholder_name': (str,), # noqa: E501 - 'cardholder_email': (str,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'number': 'number', # noqa: E501 - 'cvc': 'cvc', # noqa: E501 - 'exp_month': 'expMonth', # noqa: E501 - 'exp_year': 'expYear', # noqa: E501 - 'cardholder_name': 'cardholderName', # noqa: E501 - 'cardholder_email': 'cardholderEmail', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """Card - 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 - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - number (str): The card number, as a string without any separators.. [optional] # noqa: E501 - cvc (str): Card security code.. [optional] # noqa: E501 - exp_month (str): Two-digit number representing the card’s expiration month.. [optional] # noqa: E501 - exp_year (str): Two-digit number representing the card’s expiration year.. [optional] # noqa: E501 - cardholder_name (str): The cardholder's name, as stated in the credit card.. [optional] # noqa: E501 - cardholder_email (str): The cardholder's email address.. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', True) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """Card - 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 - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - number (str): The card number, as a string without any separators.. [optional] # noqa: E501 - cvc (str): Card security code.. [optional] # noqa: E501 - exp_month (str): Two-digit number representing the card’s expiration month.. [optional] # noqa: E501 - exp_year (str): Two-digit number representing the card’s expiration year.. [optional] # noqa: E501 - cardholder_name (str): The cardholder's name, as stated in the credit card.. [optional] # noqa: E501 - cardholder_email (str): The cardholder's email address.. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/Monei/model/confirm_payment_request.py b/Monei/model/confirm_payment_request.py deleted file mode 100644 index 8ceb9ac..0000000 --- a/Monei/model/confirm_payment_request.py +++ /dev/null @@ -1,305 +0,0 @@ -""" - MONEI API v1 - -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - - The version of the OpenAPI document: 1.5.0 - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from Monei.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from Monei.exceptions import ApiAttributeError - - -def lazy_import(): - from Monei.model.confirm_payment_request_payment_method import ConfirmPaymentRequestPaymentMethod - from Monei.model.payment_billing_details import PaymentBillingDetails - from Monei.model.payment_customer import PaymentCustomer - from Monei.model.payment_shipping_details import PaymentShippingDetails - globals()['ConfirmPaymentRequestPaymentMethod'] = ConfirmPaymentRequestPaymentMethod - globals()['PaymentBillingDetails'] = PaymentBillingDetails - globals()['PaymentCustomer'] = PaymentCustomer - globals()['PaymentShippingDetails'] = PaymentShippingDetails - - -class ConfirmPaymentRequest(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - lazy_import() - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - lazy_import() - return { - 'payment_token': (bool, date, datetime, dict, float, int, list, str, none_type,), # noqa: E501 - 'payment_method': (ConfirmPaymentRequestPaymentMethod,), # noqa: E501 - 'generate_payment_token': (bool,), # noqa: E501 - 'customer': (PaymentCustomer,), # noqa: E501 - 'billing_details': (PaymentBillingDetails,), # noqa: E501 - 'shipping_details': (PaymentShippingDetails,), # noqa: E501 - 'metadata': ({str: (bool, date, datetime, dict, float, int, list, str, none_type)},), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'payment_token': 'paymentToken', # noqa: E501 - 'payment_method': 'paymentMethod', # noqa: E501 - 'generate_payment_token': 'generatePaymentToken', # noqa: E501 - 'customer': 'customer', # noqa: E501 - 'billing_details': 'billingDetails', # noqa: E501 - 'shipping_details': 'shippingDetails', # noqa: E501 - 'metadata': 'metadata', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, payment_token, *args, **kwargs): # noqa: E501 - """ConfirmPaymentRequest - a model defined in OpenAPI - - Args: - payment_token (bool, date, datetime, dict, float, int, list, str, none_type): A payment token generated by monei.js [Components](https://docs.monei.com/docs/monei-js-overview) or a paymentToken [saved after a previous successful payment](https://docs.monei.com/docs/save-payment-method). - - Keyword Args: - _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. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - payment_method (ConfirmPaymentRequestPaymentMethod): [optional] # noqa: E501 - generate_payment_token (bool): If set to true a permanent token that represents a payment method used in the payment will be generated. . [optional] if omitted the server will use the default value of False # noqa: E501 - customer (PaymentCustomer): [optional] # noqa: E501 - billing_details (PaymentBillingDetails): [optional] # noqa: E501 - shipping_details (PaymentShippingDetails): [optional] # noqa: E501 - metadata ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}): A set of key-value pairs that you can attach to a resource. This can be useful for storing additional information about the resource in a structured format.. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', True) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - self.payment_token = payment_token - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, payment_token, *args, **kwargs): # noqa: E501 - """ConfirmPaymentRequest - a model defined in OpenAPI - - Args: - payment_token (bool, date, datetime, dict, float, int, list, str, none_type): A payment token generated by monei.js [Components](https://docs.monei.com/docs/monei-js-overview) or a paymentToken [saved after a previous successful payment](https://docs.monei.com/docs/save-payment-method). - - Keyword Args: - _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. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - payment_method (ConfirmPaymentRequestPaymentMethod): [optional] # noqa: E501 - generate_payment_token (bool): If set to true a permanent token that represents a payment method used in the payment will be generated. . [optional] if omitted the server will use the default value of False # noqa: E501 - customer (PaymentCustomer): [optional] # noqa: E501 - billing_details (PaymentBillingDetails): [optional] # noqa: E501 - shipping_details (PaymentShippingDetails): [optional] # noqa: E501 - metadata ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}): A set of key-value pairs that you can attach to a resource. This can be useful for storing additional information about the resource in a structured format.. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - self.payment_token = payment_token - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/Monei/model/confirm_payment_request_payment_method.py b/Monei/model/confirm_payment_request_payment_method.py deleted file mode 100644 index 0a35481..0000000 --- a/Monei/model/confirm_payment_request_payment_method.py +++ /dev/null @@ -1,269 +0,0 @@ -""" - MONEI API v1 - -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - - The version of the OpenAPI document: 1.5.0 - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from Monei.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from Monei.exceptions import ApiAttributeError - - -def lazy_import(): - from Monei.model.confirm_payment_request_payment_method_card import ConfirmPaymentRequestPaymentMethodCard - globals()['ConfirmPaymentRequestPaymentMethodCard'] = ConfirmPaymentRequestPaymentMethodCard - - -class ConfirmPaymentRequestPaymentMethod(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - lazy_import() - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - lazy_import() - return { - 'card': (ConfirmPaymentRequestPaymentMethodCard,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'card': 'card', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """ConfirmPaymentRequestPaymentMethod - 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 - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - card (ConfirmPaymentRequestPaymentMethodCard): [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', True) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """ConfirmPaymentRequestPaymentMethod - 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 - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - card (ConfirmPaymentRequestPaymentMethodCard): [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/Monei/model/confirm_payment_request_payment_method_card.py b/Monei/model/confirm_payment_request_payment_method_card.py deleted file mode 100644 index 92432b9..0000000 --- a/Monei/model/confirm_payment_request_payment_method_card.py +++ /dev/null @@ -1,267 +0,0 @@ -""" - MONEI API v1 - -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - - The version of the OpenAPI document: 1.5.0 - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from Monei.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from Monei.exceptions import ApiAttributeError - - - -class ConfirmPaymentRequestPaymentMethodCard(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - return { - 'cardholder_name': (str,), # noqa: E501 - 'cardholder_email': (str,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'cardholder_name': 'cardholderName', # noqa: E501 - 'cardholder_email': 'cardholderEmail', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """ConfirmPaymentRequestPaymentMethodCard - 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 - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - cardholder_name (str): The cardholder's name, as stated in the credit card.. [optional] # noqa: E501 - cardholder_email (str): The cardholder's email address.. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', True) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """ConfirmPaymentRequestPaymentMethodCard - 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 - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - cardholder_name (str): The cardholder's name, as stated in the credit card.. [optional] # noqa: E501 - cardholder_email (str): The cardholder's email address.. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/Monei/model/create_payment_request.py b/Monei/model/create_payment_request.py deleted file mode 100644 index 1d2ebba..0000000 --- a/Monei/model/create_payment_request.py +++ /dev/null @@ -1,389 +0,0 @@ -""" - MONEI API v1 - -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - - The version of the OpenAPI document: 1.5.0 - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from Monei.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from Monei.exceptions import ApiAttributeError - - -def lazy_import(): - from Monei.model.payment_billing_details import PaymentBillingDetails - from Monei.model.payment_customer import PaymentCustomer - from Monei.model.payment_payment_method_input import PaymentPaymentMethodInput - from Monei.model.payment_payment_methods import PaymentPaymentMethods - from Monei.model.payment_sequence import PaymentSequence - from Monei.model.payment_session_details import PaymentSessionDetails - from Monei.model.payment_shipping_details import PaymentShippingDetails - from Monei.model.payment_transaction_type import PaymentTransactionType - globals()['PaymentBillingDetails'] = PaymentBillingDetails - globals()['PaymentCustomer'] = PaymentCustomer - globals()['PaymentPaymentMethodInput'] = PaymentPaymentMethodInput - globals()['PaymentPaymentMethods'] = PaymentPaymentMethods - globals()['PaymentSequence'] = PaymentSequence - globals()['PaymentSessionDetails'] = PaymentSessionDetails - globals()['PaymentShippingDetails'] = PaymentShippingDetails - globals()['PaymentTransactionType'] = PaymentTransactionType - - -class CreatePaymentRequest(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - lazy_import() - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - lazy_import() - return { - 'amount': (int,), # noqa: E501 - 'currency': (str,), # noqa: E501 - 'order_id': (str,), # noqa: E501 - 'callback_url': (str,), # noqa: E501 - 'complete_url': (str,), # noqa: E501 - 'fail_url': (str,), # noqa: E501 - 'cancel_url': (str,), # noqa: E501 - 'payment_token': (bool, date, datetime, dict, float, int, list, str, none_type,), # noqa: E501 - 'session_id': (str,), # noqa: E501 - 'generate_payment_token': (bool,), # noqa: E501 - 'payment_method': (PaymentPaymentMethodInput,), # noqa: E501 - 'allowed_payment_methods': (PaymentPaymentMethods,), # noqa: E501 - 'transaction_type': (PaymentTransactionType,), # noqa: E501 - 'sequence': (PaymentSequence,), # noqa: E501 - 'store_id': (str,), # noqa: E501 - 'point_of_sale_id': (str,), # noqa: E501 - 'subscription_id': (str,), # noqa: E501 - 'auto_recover': (bool,), # noqa: E501 - 'description': (str,), # noqa: E501 - 'customer': (PaymentCustomer,), # noqa: E501 - 'billing_details': (PaymentBillingDetails,), # noqa: E501 - 'shipping_details': (PaymentShippingDetails,), # noqa: E501 - 'session_details': (PaymentSessionDetails,), # noqa: E501 - 'expire_at': (float,), # noqa: E501 - 'metadata': ({str: (bool, date, datetime, dict, float, int, list, str, none_type)},), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'amount': 'amount', # noqa: E501 - 'currency': 'currency', # noqa: E501 - 'order_id': 'orderId', # noqa: E501 - 'callback_url': 'callbackUrl', # noqa: E501 - 'complete_url': 'completeUrl', # noqa: E501 - 'fail_url': 'failUrl', # noqa: E501 - 'cancel_url': 'cancelUrl', # noqa: E501 - 'payment_token': 'paymentToken', # noqa: E501 - 'session_id': 'sessionId', # noqa: E501 - 'generate_payment_token': 'generatePaymentToken', # noqa: E501 - 'payment_method': 'paymentMethod', # noqa: E501 - 'allowed_payment_methods': 'allowedPaymentMethods', # noqa: E501 - 'transaction_type': 'transactionType', # noqa: E501 - 'sequence': 'sequence', # noqa: E501 - 'store_id': 'storeId', # noqa: E501 - 'point_of_sale_id': 'pointOfSaleId', # noqa: E501 - 'subscription_id': 'subscriptionId', # noqa: E501 - 'auto_recover': 'autoRecover', # noqa: E501 - 'description': 'description', # noqa: E501 - 'customer': 'customer', # noqa: E501 - 'billing_details': 'billingDetails', # noqa: E501 - 'shipping_details': 'shippingDetails', # noqa: E501 - 'session_details': 'sessionDetails', # noqa: E501 - 'expire_at': 'expireAt', # noqa: E501 - 'metadata': 'metadata', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, amount, currency, order_id, *args, **kwargs): # noqa: E501 - """CreatePaymentRequest - a model defined in OpenAPI - - Args: - amount (int): Amount intended to be collected by this payment. A positive integer representing how much to charge in the smallest currency unit (e.g., 100 cents to charge 1.00 USD). - currency (str): Three-letter [ISO currency code](https://en.wikipedia.org/wiki/ISO_4217), in uppercase. Must be a supported currency. - order_id (str): An order ID from your system. A unique identifier that can be used to reconcile the payment with your internal system. - - Keyword Args: - _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. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - callback_url (str): The URL to which a payment result should be sent asynchronously. . [optional] # noqa: E501 - complete_url (str): The URL the customer will be directed to after transaction completed (successful or failed - except if `failUrl` is provided). . [optional] # noqa: E501 - fail_url (str): The URL the customer will be directed to after transaction has failed, instead of `completeUrl` (used in hosted payment page). This allows to provide two different URLs for successful and failed payments. . [optional] # noqa: E501 - cancel_url (str): The URL the customer will be directed to if they decide to cancel payment and return to your website (used in hosted payment page). . [optional] # noqa: E501 - payment_token (bool, date, datetime, dict, float, int, list, str, none_type): A payment token generated by monei.js [Components](https://docs.monei.com/docs/monei-js-overview) or a paymentToken [saved after a previous successful payment](https://docs.monei.com/docs/save-payment-method). In case of the first one, you will also need to send the `sessionId` used to generate the token in the first place. . [optional] # noqa: E501 - session_id (str): A unique identifier within your system that adds security to the payment process. You need to pass the same session ID as the one used on the frontend to initialize MONEI Component (if you needed to). This is required if a payment token (not permanent) was already generated in the frontend. . [optional] # noqa: E501 - generate_payment_token (bool): If set to true a permanent token that represents a payment method used in the payment will be generated. . [optional] if omitted the server will use the default value of False # noqa: E501 - payment_method (PaymentPaymentMethodInput): [optional] # noqa: E501 - allowed_payment_methods (PaymentPaymentMethods): [optional] # noqa: E501 - transaction_type (PaymentTransactionType): [optional] # noqa: E501 - sequence (PaymentSequence): [optional] # noqa: E501 - store_id (str): A unique identifier of the Store. If specified the payment is attached to this Store. . [optional] # noqa: E501 - point_of_sale_id (str): A unique identifier of the Point of Sale. If specified the payment is attached to this Point of Sale. If there is a QR code attached to the same Point of Sale, this payment will be available by scanning the QR code. . [optional] # noqa: E501 - subscription_id (str): A unique identifier of the Subscription. If specified the payment is attached to this Subscription. . [optional] # noqa: E501 - auto_recover (bool): If set to `true`, the new payment will be automatically created when customer visits the payment link of the previously failed payment. Is automatically set to `true` if `completeUrl` is not provided.(set this value to `true` to create \"Pay By Link\" payments).. [optional] # noqa: E501 - description (str): An arbitrary string attached to the payment. Often useful for displaying to users. . [optional] # noqa: E501 - customer (PaymentCustomer): [optional] # noqa: E501 - billing_details (PaymentBillingDetails): [optional] # noqa: E501 - shipping_details (PaymentShippingDetails): [optional] # noqa: E501 - session_details (PaymentSessionDetails): [optional] # noqa: E501 - expire_at (float): Payment expiration time.. [optional] # noqa: E501 - metadata ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}): A set of key-value pairs that you can attach to a resource. This can be useful for storing additional information about the resource in a structured format.. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', True) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - self.amount = amount - self.currency = currency - self.order_id = order_id - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, amount, currency, order_id, *args, **kwargs): # noqa: E501 - """CreatePaymentRequest - a model defined in OpenAPI - - Args: - amount (int): Amount intended to be collected by this payment. A positive integer representing how much to charge in the smallest currency unit (e.g., 100 cents to charge 1.00 USD). - currency (str): Three-letter [ISO currency code](https://en.wikipedia.org/wiki/ISO_4217), in uppercase. Must be a supported currency. - order_id (str): An order ID from your system. A unique identifier that can be used to reconcile the payment with your internal system. - - Keyword Args: - _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. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - callback_url (str): The URL to which a payment result should be sent asynchronously. . [optional] # noqa: E501 - complete_url (str): The URL the customer will be directed to after transaction completed (successful or failed - except if `failUrl` is provided). . [optional] # noqa: E501 - fail_url (str): The URL the customer will be directed to after transaction has failed, instead of `completeUrl` (used in hosted payment page). This allows to provide two different URLs for successful and failed payments. . [optional] # noqa: E501 - cancel_url (str): The URL the customer will be directed to if they decide to cancel payment and return to your website (used in hosted payment page). . [optional] # noqa: E501 - payment_token (bool, date, datetime, dict, float, int, list, str, none_type): A payment token generated by monei.js [Components](https://docs.monei.com/docs/monei-js-overview) or a paymentToken [saved after a previous successful payment](https://docs.monei.com/docs/save-payment-method). In case of the first one, you will also need to send the `sessionId` used to generate the token in the first place. . [optional] # noqa: E501 - session_id (str): A unique identifier within your system that adds security to the payment process. You need to pass the same session ID as the one used on the frontend to initialize MONEI Component (if you needed to). This is required if a payment token (not permanent) was already generated in the frontend. . [optional] # noqa: E501 - generate_payment_token (bool): If set to true a permanent token that represents a payment method used in the payment will be generated. . [optional] if omitted the server will use the default value of False # noqa: E501 - payment_method (PaymentPaymentMethodInput): [optional] # noqa: E501 - allowed_payment_methods (PaymentPaymentMethods): [optional] # noqa: E501 - transaction_type (PaymentTransactionType): [optional] # noqa: E501 - sequence (PaymentSequence): [optional] # noqa: E501 - store_id (str): A unique identifier of the Store. If specified the payment is attached to this Store. . [optional] # noqa: E501 - point_of_sale_id (str): A unique identifier of the Point of Sale. If specified the payment is attached to this Point of Sale. If there is a QR code attached to the same Point of Sale, this payment will be available by scanning the QR code. . [optional] # noqa: E501 - subscription_id (str): A unique identifier of the Subscription. If specified the payment is attached to this Subscription. . [optional] # noqa: E501 - auto_recover (bool): If set to `true`, the new payment will be automatically created when customer visits the payment link of the previously failed payment. Is automatically set to `true` if `completeUrl` is not provided.(set this value to `true` to create \"Pay By Link\" payments).. [optional] # noqa: E501 - description (str): An arbitrary string attached to the payment. Often useful for displaying to users. . [optional] # noqa: E501 - customer (PaymentCustomer): [optional] # noqa: E501 - billing_details (PaymentBillingDetails): [optional] # noqa: E501 - shipping_details (PaymentShippingDetails): [optional] # noqa: E501 - session_details (PaymentSessionDetails): [optional] # noqa: E501 - expire_at (float): Payment expiration time.. [optional] # noqa: E501 - metadata ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}): A set of key-value pairs that you can attach to a resource. This can be useful for storing additional information about the resource in a structured format.. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - self.amount = amount - self.currency = currency - self.order_id = order_id - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/Monei/model/create_subscription_request.py b/Monei/model/create_subscription_request.py deleted file mode 100644 index d2c3e20..0000000 --- a/Monei/model/create_subscription_request.py +++ /dev/null @@ -1,339 +0,0 @@ -""" - MONEI API v1 - -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - - The version of the OpenAPI document: 1.5.0 - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from Monei.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from Monei.exceptions import ApiAttributeError - - -def lazy_import(): - from Monei.model.payment_billing_details import PaymentBillingDetails - from Monei.model.payment_customer import PaymentCustomer - from Monei.model.payment_shipping_details import PaymentShippingDetails - from Monei.model.subscription_interval import SubscriptionInterval - from Monei.model.subscription_retry_schedule import SubscriptionRetrySchedule - globals()['PaymentBillingDetails'] = PaymentBillingDetails - globals()['PaymentCustomer'] = PaymentCustomer - globals()['PaymentShippingDetails'] = PaymentShippingDetails - globals()['SubscriptionInterval'] = SubscriptionInterval - globals()['SubscriptionRetrySchedule'] = SubscriptionRetrySchedule - - -class CreateSubscriptionRequest(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - lazy_import() - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - lazy_import() - return { - 'amount': (int,), # noqa: E501 - 'currency': (str,), # noqa: E501 - 'interval': (SubscriptionInterval,), # noqa: E501 - 'interval_count': (int,), # noqa: E501 - 'description': (str,), # noqa: E501 - 'customer': (PaymentCustomer,), # noqa: E501 - 'billing_details': (PaymentBillingDetails,), # noqa: E501 - 'shipping_details': (PaymentShippingDetails,), # noqa: E501 - 'trial_period_end': (float,), # noqa: E501 - 'trial_period_days': (int,), # noqa: E501 - 'retry_schedule': (SubscriptionRetrySchedule,), # noqa: E501 - 'callback_url': (str,), # noqa: E501 - 'payment_callback_url': (str,), # noqa: E501 - 'metadata': ({str: (bool, date, datetime, dict, float, int, list, str, none_type)},), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'amount': 'amount', # noqa: E501 - 'currency': 'currency', # noqa: E501 - 'interval': 'interval', # noqa: E501 - 'interval_count': 'intervalCount', # noqa: E501 - 'description': 'description', # noqa: E501 - 'customer': 'customer', # noqa: E501 - 'billing_details': 'billingDetails', # noqa: E501 - 'shipping_details': 'shippingDetails', # noqa: E501 - 'trial_period_end': 'trialPeriodEnd', # noqa: E501 - 'trial_period_days': 'trialPeriodDays', # noqa: E501 - 'retry_schedule': 'retrySchedule', # noqa: E501 - 'callback_url': 'callbackUrl', # noqa: E501 - 'payment_callback_url': 'paymentCallbackUrl', # noqa: E501 - 'metadata': 'metadata', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, amount, currency, interval, *args, **kwargs): # noqa: E501 - """CreateSubscriptionRequest - a model defined in OpenAPI - - Args: - amount (int): Amount intended to be collected by this payment. A positive integer representing how much to charge in the smallest currency unit (e.g., 100 cents to charge 1.00 USD). - currency (str): Three-letter [ISO currency code](https://en.wikipedia.org/wiki/ISO_4217), in uppercase. Must be a supported currency. - interval (SubscriptionInterval): - - Keyword Args: - _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. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - interval_count (int): Number of intervals between subscription payments.. [optional] # noqa: E501 - description (str): An arbitrary string attached to the subscription. Often useful for displaying to users. . [optional] # noqa: E501 - customer (PaymentCustomer): [optional] # noqa: E501 - billing_details (PaymentBillingDetails): [optional] # noqa: E501 - shipping_details (PaymentShippingDetails): [optional] # noqa: E501 - trial_period_end (float): The end date of the trial period. Measured in seconds since the Unix epoch.. [optional] # noqa: E501 - trial_period_days (int): Number of days the trial period lasts.. [optional] # noqa: E501 - retry_schedule (SubscriptionRetrySchedule): [optional] # noqa: E501 - callback_url (str): The URL will be called each time subscription status changes. You will receive a subscription object in the body of the request. . [optional] # noqa: E501 - payment_callback_url (str): The URL will be called each time subscription creates a new payments. You will receive the payment object in the body of the request. . [optional] # noqa: E501 - metadata ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}): A set of key-value pairs that you can attach to a resource. This can be useful for storing additional information about the resource in a structured format.. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', True) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - self.amount = amount - self.currency = currency - self.interval = interval - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, amount, currency, interval, *args, **kwargs): # noqa: E501 - """CreateSubscriptionRequest - a model defined in OpenAPI - - Args: - amount (int): Amount intended to be collected by this payment. A positive integer representing how much to charge in the smallest currency unit (e.g., 100 cents to charge 1.00 USD). - currency (str): Three-letter [ISO currency code](https://en.wikipedia.org/wiki/ISO_4217), in uppercase. Must be a supported currency. - interval (SubscriptionInterval): - - Keyword Args: - _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. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - interval_count (int): Number of intervals between subscription payments.. [optional] # noqa: E501 - description (str): An arbitrary string attached to the subscription. Often useful for displaying to users. . [optional] # noqa: E501 - customer (PaymentCustomer): [optional] # noqa: E501 - billing_details (PaymentBillingDetails): [optional] # noqa: E501 - shipping_details (PaymentShippingDetails): [optional] # noqa: E501 - trial_period_end (float): The end date of the trial period. Measured in seconds since the Unix epoch.. [optional] # noqa: E501 - trial_period_days (int): Number of days the trial period lasts.. [optional] # noqa: E501 - retry_schedule (SubscriptionRetrySchedule): [optional] # noqa: E501 - callback_url (str): The URL will be called each time subscription status changes. You will receive a subscription object in the body of the request. . [optional] # noqa: E501 - payment_callback_url (str): The URL will be called each time subscription creates a new payments. You will receive the payment object in the body of the request. . [optional] # noqa: E501 - metadata ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}): A set of key-value pairs that you can attach to a resource. This can be useful for storing additional information about the resource in a structured format.. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - self.amount = amount - self.currency = currency - self.interval = interval - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/Monei/model/domain_register200_response.py b/Monei/model/domain_register200_response.py deleted file mode 100644 index 14b3a03..0000000 --- a/Monei/model/domain_register200_response.py +++ /dev/null @@ -1,263 +0,0 @@ -""" - MONEI API v1 - -

The MONEI API is organized around REST. Our API has predictable resource-oriented URLs, accepts JSON-encoded request bodies, returns JSON-encoded responses, and uses standard HTTP response codes, authentication, and verbs.

Base URL:

https://api.monei.com/v1

Client libraries:

Important:

If you are not using our official SDKs, you need to provide a valid User-Agent header in each request, otherwise your requests will be rejected.

# noqa: E501 - - The version of the OpenAPI document: 1.2.2 - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from Monei.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from Monei.exceptions import ApiAttributeError - - - -class DomainRegister200Response(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - return { - 'success': (bool,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'success': 'success', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """DomainRegister200Response - 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 - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - success (bool): [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', True) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """DomainRegister200Response - 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 - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - success (bool): [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/Monei/model/error.py b/Monei/model/error.py deleted file mode 100644 index d2d363d..0000000 --- a/Monei/model/error.py +++ /dev/null @@ -1,293 +0,0 @@ -""" - MONEI API v1 - -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - - The version of the OpenAPI document: 1.5.0 - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from Monei.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from Monei.exceptions import ApiAttributeError - - - -class Error(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - return { - 'status': (str,), # noqa: E501 - 'status_code': (int,), # noqa: E501 - 'message': (str,), # noqa: E501 - 'request_id': (str,), # noqa: E501 - 'request_time': (datetime,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'status': 'status', # noqa: E501 - 'status_code': 'statusCode', # noqa: E501 - 'message': 'message', # noqa: E501 - 'request_id': 'requestId', # noqa: E501 - 'request_time': 'requestTime', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, status, status_code, message, request_id, request_time, *args, **kwargs): # noqa: E501 - """Error - a model defined in OpenAPI - - Args: - status (str): Error type identifier - status_code (int): HTTP status code - message (str): Human-readable error message - request_id (str): Unique identifier for the request - request_time (datetime): Timestamp when the request was processed - - Keyword Args: - _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. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', True) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - self.status = status - self.status_code = status_code - self.message = message - self.request_id = request_id - self.request_time = request_time - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, status, status_code, message, request_id, request_time, *args, **kwargs): # noqa: E501 - """Error - a model defined in OpenAPI - - Args: - status (str): Error type identifier - status_code (int): HTTP status code - message (str): Human-readable error message - request_id (str): Unique identifier for the request - request_time (datetime): Timestamp when the request was processed - - Keyword Args: - _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. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - self.status = status - self.status_code = status_code - self.message = message - self.request_id = request_id - self.request_time = request_time - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/Monei/model/pause_subscription_request.py b/Monei/model/pause_subscription_request.py deleted file mode 100644 index 657a497..0000000 --- a/Monei/model/pause_subscription_request.py +++ /dev/null @@ -1,267 +0,0 @@ -""" - MONEI API v1 - -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - - The version of the OpenAPI document: 1.5.0 - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from Monei.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from Monei.exceptions import ApiAttributeError - - - -class PauseSubscriptionRequest(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - return { - 'pause_at_period_end': (bool,), # noqa: E501 - 'pause_interval_count': (int,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'pause_at_period_end': 'pauseAtPeriodEnd', # noqa: E501 - 'pause_interval_count': 'pauseIntervalCount', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """PauseSubscriptionRequest - 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 - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - pause_at_period_end (bool): If true, the subscription will be paused at the end of the current period. . [optional] # noqa: E501 - pause_interval_count (int): Number of intervals when subscription will be paused before it activates again.. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', True) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """PauseSubscriptionRequest - 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 - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - pause_at_period_end (bool): If true, the subscription will be paused at the end of the current period. . [optional] # noqa: E501 - pause_interval_count (int): Number of intervals when subscription will be paused before it activates again.. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/Monei/model/payment.py b/Monei/model/payment.py deleted file mode 100644 index ce43276..0000000 --- a/Monei/model/payment.py +++ /dev/null @@ -1,411 +0,0 @@ -""" - MONEI API v1 - -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - - The version of the OpenAPI document: 1.5.0 - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from Monei.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from Monei.exceptions import ApiAttributeError - - -def lazy_import(): - from Monei.model.payment_billing_details import PaymentBillingDetails - from Monei.model.payment_cancellation_reason import PaymentCancellationReason - from Monei.model.payment_customer import PaymentCustomer - from Monei.model.payment_last_refund_reason import PaymentLastRefundReason - from Monei.model.payment_next_action import PaymentNextAction - from Monei.model.payment_payment_method import PaymentPaymentMethod - from Monei.model.payment_sequence import PaymentSequence - from Monei.model.payment_session_details import PaymentSessionDetails - from Monei.model.payment_shipping_details import PaymentShippingDetails - from Monei.model.payment_shop import PaymentShop - from Monei.model.payment_status import PaymentStatus - from Monei.model.payment_trace_details import PaymentTraceDetails - globals()['PaymentBillingDetails'] = PaymentBillingDetails - globals()['PaymentCancellationReason'] = PaymentCancellationReason - globals()['PaymentCustomer'] = PaymentCustomer - globals()['PaymentLastRefundReason'] = PaymentLastRefundReason - globals()['PaymentNextAction'] = PaymentNextAction - globals()['PaymentPaymentMethod'] = PaymentPaymentMethod - globals()['PaymentSequence'] = PaymentSequence - globals()['PaymentSessionDetails'] = PaymentSessionDetails - globals()['PaymentShippingDetails'] = PaymentShippingDetails - globals()['PaymentShop'] = PaymentShop - globals()['PaymentStatus'] = PaymentStatus - globals()['PaymentTraceDetails'] = PaymentTraceDetails - - -class Payment(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - lazy_import() - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - lazy_import() - return { - 'id': (str,), # noqa: E501 - 'amount': (int,), # noqa: E501 - 'currency': (str,), # noqa: E501 - 'order_id': (str,), # noqa: E501 - 'description': (str,), # noqa: E501 - 'account_id': (str,), # noqa: E501 - 'authorization_code': (str,), # noqa: E501 - 'livemode': (bool,), # noqa: E501 - 'status': (PaymentStatus,), # noqa: E501 - 'status_code': (str,), # noqa: E501 - 'status_message': (str,), # noqa: E501 - 'customer': (PaymentCustomer,), # noqa: E501 - 'shop': (PaymentShop,), # noqa: E501 - 'billing_details': (PaymentBillingDetails,), # noqa: E501 - 'shipping_details': (PaymentShippingDetails,), # noqa: E501 - 'refunded_amount': (int,), # noqa: E501 - 'last_refund_amount': (int,), # noqa: E501 - 'last_refund_reason': (PaymentLastRefundReason,), # noqa: E501 - 'cancellation_reason': (PaymentCancellationReason,), # noqa: E501 - 'session_details': (PaymentSessionDetails,), # noqa: E501 - 'trace_details': (PaymentTraceDetails,), # noqa: E501 - 'payment_token': (str,), # noqa: E501 - 'payment_method': (PaymentPaymentMethod,), # noqa: E501 - 'sequence': (PaymentSequence,), # noqa: E501 - 'sequence_id': (str,), # noqa: E501 - 'store_id': (str,), # noqa: E501 - 'point_of_sale_id': (str,), # noqa: E501 - 'metadata': ({str: (bool, date, datetime, dict, float, int, list, str, none_type)},), # noqa: E501 - 'next_action': (PaymentNextAction,), # noqa: E501 - 'created_at': (int,), # noqa: E501 - 'updated_at': (int,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'id': 'id', # noqa: E501 - 'amount': 'amount', # noqa: E501 - 'currency': 'currency', # noqa: E501 - 'order_id': 'orderId', # noqa: E501 - 'description': 'description', # noqa: E501 - 'account_id': 'accountId', # noqa: E501 - 'authorization_code': 'authorizationCode', # noqa: E501 - 'livemode': 'livemode', # noqa: E501 - 'status': 'status', # noqa: E501 - 'status_code': 'statusCode', # noqa: E501 - 'status_message': 'statusMessage', # noqa: E501 - 'customer': 'customer', # noqa: E501 - 'shop': 'shop', # noqa: E501 - 'billing_details': 'billingDetails', # noqa: E501 - 'shipping_details': 'shippingDetails', # noqa: E501 - 'refunded_amount': 'refundedAmount', # noqa: E501 - 'last_refund_amount': 'lastRefundAmount', # noqa: E501 - 'last_refund_reason': 'lastRefundReason', # noqa: E501 - 'cancellation_reason': 'cancellationReason', # noqa: E501 - 'session_details': 'sessionDetails', # noqa: E501 - 'trace_details': 'traceDetails', # noqa: E501 - 'payment_token': 'paymentToken', # noqa: E501 - 'payment_method': 'paymentMethod', # noqa: E501 - 'sequence': 'sequence', # noqa: E501 - 'sequence_id': 'sequenceId', # noqa: E501 - 'store_id': 'storeId', # noqa: E501 - 'point_of_sale_id': 'pointOfSaleId', # noqa: E501 - 'metadata': 'metadata', # noqa: E501 - 'next_action': 'nextAction', # noqa: E501 - 'created_at': 'createdAt', # noqa: E501 - 'updated_at': 'updatedAt', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """Payment - 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 - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - id (str): Unique identifier for the payment.. [optional] # noqa: E501 - amount (int): Amount intended to be collected by this payment. A positive integer representing how much to charge in the smallest currency unit (e.g., 100 cents to charge 1.00 USD). . [optional] # noqa: E501 - currency (str): Three-letter [ISO currency code](https://en.wikipedia.org/wiki/ISO_4217), in uppercase. Must be a supported currency. . [optional] # noqa: E501 - order_id (str): An order ID from your system. A unique identifier that can be used to reconcile the payment with your internal system. . [optional] # noqa: E501 - description (str): An arbitrary string attached to the payment. Often useful for displaying to users. . [optional] # noqa: E501 - account_id (str): MONEI Account identifier.. [optional] # noqa: E501 - authorization_code (str): Unique identifier provided by the bank performing transaction. . [optional] # noqa: E501 - livemode (bool): Has the value `true` if the resource exists in live mode or the value `false` if the resource exists in test mode.. [optional] # noqa: E501 - status (PaymentStatus): [optional] # noqa: E501 - status_code (str): Payment status code. . [optional] # noqa: E501 - status_message (str): Human readable status message, can be displayed to a user. . [optional] # noqa: E501 - customer (PaymentCustomer): [optional] # noqa: E501 - shop (PaymentShop): [optional] # noqa: E501 - billing_details (PaymentBillingDetails): [optional] # noqa: E501 - shipping_details (PaymentShippingDetails): [optional] # noqa: E501 - refunded_amount (int): Amount in cents refunded (can be less than the amount attribute on the payment if a partial refund was issued). . [optional] # noqa: E501 - last_refund_amount (int): Amount in cents refunded in the last transaction.. [optional] # noqa: E501 - last_refund_reason (PaymentLastRefundReason): [optional] # noqa: E501 - cancellation_reason (PaymentCancellationReason): [optional] # noqa: E501 - session_details (PaymentSessionDetails): [optional] # noqa: E501 - trace_details (PaymentTraceDetails): [optional] # noqa: E501 - payment_token (str): A permanent token represents a payment method used in the payment. Pass `generatePaymentToken: true` when you creating a payment to generate it. You can pass it as `paymentToken` parameter to create other payments with the same payment method. This token does not expire, and should only be used server-side. . [optional] # noqa: E501 - payment_method (PaymentPaymentMethod): [optional] # noqa: E501 - sequence (PaymentSequence): [optional] # noqa: E501 - sequence_id (str): A permanent identifier that refers to the initial payment of a sequence of payments. This value needs to be sent in the path for `RECURRING` payments. . [optional] # noqa: E501 - store_id (str): A unique identifier of the Store. If specified the payment is attached to this Store. . [optional] # noqa: E501 - point_of_sale_id (str): A unique identifier of the Point of Sale. If specified the payment is attached to this Point of Sale. If there is a QR code attached to the same Point of Sale, this payment will be available by scanning the QR code. . [optional] # noqa: E501 - metadata ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}): A set of key-value pairs that you can attach to a resource. This can be useful for storing additional information about the resource in a structured format.. [optional] # noqa: E501 - next_action (PaymentNextAction): [optional] # noqa: E501 - created_at (int): Time at which the resource was created. Measured in seconds since the Unix epoch.. [optional] # noqa: E501 - updated_at (int): Time at which the resource updated last time. Measured in seconds since the Unix epoch.. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', True) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """Payment - 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 - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - id (str): Unique identifier for the payment.. [optional] # noqa: E501 - amount (int): Amount intended to be collected by this payment. A positive integer representing how much to charge in the smallest currency unit (e.g., 100 cents to charge 1.00 USD). . [optional] # noqa: E501 - currency (str): Three-letter [ISO currency code](https://en.wikipedia.org/wiki/ISO_4217), in uppercase. Must be a supported currency. . [optional] # noqa: E501 - order_id (str): An order ID from your system. A unique identifier that can be used to reconcile the payment with your internal system. . [optional] # noqa: E501 - description (str): An arbitrary string attached to the payment. Often useful for displaying to users. . [optional] # noqa: E501 - account_id (str): MONEI Account identifier.. [optional] # noqa: E501 - authorization_code (str): Unique identifier provided by the bank performing transaction. . [optional] # noqa: E501 - livemode (bool): Has the value `true` if the resource exists in live mode or the value `false` if the resource exists in test mode.. [optional] # noqa: E501 - status (PaymentStatus): [optional] # noqa: E501 - status_code (str): Payment status code. . [optional] # noqa: E501 - status_message (str): Human readable status message, can be displayed to a user. . [optional] # noqa: E501 - customer (PaymentCustomer): [optional] # noqa: E501 - shop (PaymentShop): [optional] # noqa: E501 - billing_details (PaymentBillingDetails): [optional] # noqa: E501 - shipping_details (PaymentShippingDetails): [optional] # noqa: E501 - refunded_amount (int): Amount in cents refunded (can be less than the amount attribute on the payment if a partial refund was issued). . [optional] # noqa: E501 - last_refund_amount (int): Amount in cents refunded in the last transaction.. [optional] # noqa: E501 - last_refund_reason (PaymentLastRefundReason): [optional] # noqa: E501 - cancellation_reason (PaymentCancellationReason): [optional] # noqa: E501 - session_details (PaymentSessionDetails): [optional] # noqa: E501 - trace_details (PaymentTraceDetails): [optional] # noqa: E501 - payment_token (str): A permanent token represents a payment method used in the payment. Pass `generatePaymentToken: true` when you creating a payment to generate it. You can pass it as `paymentToken` parameter to create other payments with the same payment method. This token does not expire, and should only be used server-side. . [optional] # noqa: E501 - payment_method (PaymentPaymentMethod): [optional] # noqa: E501 - sequence (PaymentSequence): [optional] # noqa: E501 - sequence_id (str): A permanent identifier that refers to the initial payment of a sequence of payments. This value needs to be sent in the path for `RECURRING` payments. . [optional] # noqa: E501 - store_id (str): A unique identifier of the Store. If specified the payment is attached to this Store. . [optional] # noqa: E501 - point_of_sale_id (str): A unique identifier of the Point of Sale. If specified the payment is attached to this Point of Sale. If there is a QR code attached to the same Point of Sale, this payment will be available by scanning the QR code. . [optional] # noqa: E501 - metadata ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}): A set of key-value pairs that you can attach to a resource. This can be useful for storing additional information about the resource in a structured format.. [optional] # noqa: E501 - next_action (PaymentNextAction): [optional] # noqa: E501 - created_at (int): Time at which the resource was created. Measured in seconds since the Unix epoch.. [optional] # noqa: E501 - updated_at (int): Time at which the resource updated last time. Measured in seconds since the Unix epoch.. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/Monei/model/payment_billing_details.py b/Monei/model/payment_billing_details.py deleted file mode 100644 index 225c209..0000000 --- a/Monei/model/payment_billing_details.py +++ /dev/null @@ -1,289 +0,0 @@ -""" - MONEI API v1 - -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - - The version of the OpenAPI document: 1.5.0 - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from Monei.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from Monei.exceptions import ApiAttributeError - - -def lazy_import(): - from Monei.model.address import Address - globals()['Address'] = Address - - -class PaymentBillingDetails(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - lazy_import() - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - lazy_import() - return { - 'name': (str,), # noqa: E501 - 'email': (str,), # noqa: E501 - 'phone': (str,), # noqa: E501 - 'company': (str,), # noqa: E501 - 'tax_id': (str,), # noqa: E501 - 'address': (Address,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'name': 'name', # noqa: E501 - 'email': 'email', # noqa: E501 - 'phone': 'phone', # noqa: E501 - 'company': 'company', # noqa: E501 - 'tax_id': 'taxId', # noqa: E501 - 'address': 'address', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """PaymentBillingDetails - 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 - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - name (str): The customer's billing full name.. [optional] # noqa: E501 - email (str): The customer's billing email address.. [optional] # noqa: E501 - phone (str): The customer's billing phone number in E.164 format.. [optional] # noqa: E501 - company (str): Billing company name.. [optional] # noqa: E501 - tax_id (str): Company tax ID.. [optional] # noqa: E501 - address (Address): [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', True) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """PaymentBillingDetails - 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 - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - name (str): The customer's billing full name.. [optional] # noqa: E501 - email (str): The customer's billing email address.. [optional] # noqa: E501 - phone (str): The customer's billing phone number in E.164 format.. [optional] # noqa: E501 - company (str): Billing company name.. [optional] # noqa: E501 - tax_id (str): Company tax ID.. [optional] # noqa: E501 - address (Address): [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/Monei/model/payment_cancellation_reason.py b/Monei/model/payment_cancellation_reason.py deleted file mode 100644 index c7d9952..0000000 --- a/Monei/model/payment_cancellation_reason.py +++ /dev/null @@ -1,291 +0,0 @@ -""" - MONEI API v1 - -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - - The version of the OpenAPI document: 1.5.0 - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from Monei.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from Monei.exceptions import ApiAttributeError - - - -class PaymentCancellationReason(ModelSimple): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - ('value',): { - 'DUPLICATED': "duplicated", - 'FRAUDULENT': "fraudulent", - 'REQUESTED_BY_CUSTOMER': "requested_by_customer", - }, - } - - validations = { - } - - additional_properties_type = None - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - return { - 'value': (str,), - } - - @cached_property - def discriminator(): - return None - - - attribute_map = {} - - read_only_vars = set() - - _composed_schemas = None - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): - """PaymentCancellationReason - a model defined in OpenAPI - - Note that value can be passed either in args or in kwargs, but not in both. - - Args: - args[0] (str): The reason for canceling the Payment.., must be one of ["duplicated", "fraudulent", "requested_by_customer", ] # noqa: E501 - - Keyword Args: - value (str): The reason for canceling the Payment.., must be one of ["duplicated", "fraudulent", "requested_by_customer", ] # 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. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - """ - # required up here when default value is not given - _path_to_item = kwargs.pop('_path_to_item', ()) - - if 'value' in kwargs: - value = kwargs.pop('value') - elif args: - args = list(args) - value = args.pop(0) - else: - raise ApiTypeError( - "value is required, but not passed in args or kwargs and doesn't have default", - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - self.value = value - if kwargs: - raise ApiTypeError( - "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( - kwargs, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): - """PaymentCancellationReason - a model defined in OpenAPI - - Note that value can be passed either in args or in kwargs, but not in both. - - Args: - args[0] (str): The reason for canceling the Payment.., must be one of ["duplicated", "fraudulent", "requested_by_customer", ] # noqa: E501 - - Keyword Args: - value (str): The reason for canceling the Payment.., must be one of ["duplicated", "fraudulent", "requested_by_customer", ] # 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. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - """ - # required up here when default value is not given - _path_to_item = kwargs.pop('_path_to_item', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if 'value' in kwargs: - value = kwargs.pop('value') - elif args: - args = list(args) - value = args.pop(0) - else: - raise ApiTypeError( - "value is required, but not passed in args or kwargs and doesn't have default", - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - self.value = value - if kwargs: - raise ApiTypeError( - "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( - kwargs, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - return self diff --git a/Monei/model/payment_customer.py b/Monei/model/payment_customer.py deleted file mode 100644 index c741f82..0000000 --- a/Monei/model/payment_customer.py +++ /dev/null @@ -1,271 +0,0 @@ -""" - MONEI API v1 - -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - - The version of the OpenAPI document: 1.5.0 - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from Monei.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from Monei.exceptions import ApiAttributeError - - - -class PaymentCustomer(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - return { - 'email': (str,), # noqa: E501 - 'name': (str,), # noqa: E501 - 'phone': (str,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'email': 'email', # noqa: E501 - 'name': 'name', # noqa: E501 - 'phone': 'phone', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """PaymentCustomer - 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 - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - email (str): The customer's email address.. [optional] # noqa: E501 - name (str): The customer's full name or business name.. [optional] # noqa: E501 - phone (str): The customer's phone number in E.164 format.. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', True) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """PaymentCustomer - 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 - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - email (str): The customer's email address.. [optional] # noqa: E501 - name (str): The customer's full name or business name.. [optional] # noqa: E501 - phone (str): The customer's phone number in E.164 format.. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/Monei/model/payment_last_refund_reason.py b/Monei/model/payment_last_refund_reason.py deleted file mode 100644 index efad0cd..0000000 --- a/Monei/model/payment_last_refund_reason.py +++ /dev/null @@ -1,291 +0,0 @@ -""" - MONEI API v1 - -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - - The version of the OpenAPI document: 1.5.0 - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from Monei.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from Monei.exceptions import ApiAttributeError - - - -class PaymentLastRefundReason(ModelSimple): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - ('value',): { - 'DUPLICATED': "duplicated", - 'FRAUDULENT': "fraudulent", - 'REQUESTED_BY_CUSTOMER': "requested_by_customer", - }, - } - - validations = { - } - - additional_properties_type = None - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - return { - 'value': (str,), - } - - @cached_property - def discriminator(): - return None - - - attribute_map = {} - - read_only_vars = set() - - _composed_schemas = None - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): - """PaymentLastRefundReason - a model defined in OpenAPI - - Note that value can be passed either in args or in kwargs, but not in both. - - Args: - args[0] (str): The reason of the last refund transaction.., must be one of ["duplicated", "fraudulent", "requested_by_customer", ] # noqa: E501 - - Keyword Args: - value (str): The reason of the last refund transaction.., must be one of ["duplicated", "fraudulent", "requested_by_customer", ] # 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. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - """ - # required up here when default value is not given - _path_to_item = kwargs.pop('_path_to_item', ()) - - if 'value' in kwargs: - value = kwargs.pop('value') - elif args: - args = list(args) - value = args.pop(0) - else: - raise ApiTypeError( - "value is required, but not passed in args or kwargs and doesn't have default", - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - self.value = value - if kwargs: - raise ApiTypeError( - "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( - kwargs, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): - """PaymentLastRefundReason - a model defined in OpenAPI - - Note that value can be passed either in args or in kwargs, but not in both. - - Args: - args[0] (str): The reason of the last refund transaction.., must be one of ["duplicated", "fraudulent", "requested_by_customer", ] # noqa: E501 - - Keyword Args: - value (str): The reason of the last refund transaction.., must be one of ["duplicated", "fraudulent", "requested_by_customer", ] # 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. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - """ - # required up here when default value is not given - _path_to_item = kwargs.pop('_path_to_item', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if 'value' in kwargs: - value = kwargs.pop('value') - elif args: - args = list(args) - value = args.pop(0) - else: - raise ApiTypeError( - "value is required, but not passed in args or kwargs and doesn't have default", - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - self.value = value - if kwargs: - raise ApiTypeError( - "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( - kwargs, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - return self diff --git a/Monei/model/payment_message_channel.py b/Monei/model/payment_message_channel.py deleted file mode 100644 index 673c065..0000000 --- a/Monei/model/payment_message_channel.py +++ /dev/null @@ -1,291 +0,0 @@ -""" - MONEI API v1 - -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - - The version of the OpenAPI document: 1.5.0 - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from Monei.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from Monei.exceptions import ApiAttributeError - - - -class PaymentMessageChannel(ModelSimple): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - ('value',): { - 'EMAIL': "EMAIL", - 'WHATSAPP': "WHATSAPP", - 'SMS': "SMS", - }, - } - - validations = { - } - - additional_properties_type = None - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - return { - 'value': (str,), - } - - @cached_property - def discriminator(): - return None - - - attribute_map = {} - - read_only_vars = set() - - _composed_schemas = None - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): - """PaymentMessageChannel - a model defined in OpenAPI - - Note that value can be passed either in args or in kwargs, but not in both. - - Args: - args[0] (str): The channel used to send the payment message. ., must be one of ["EMAIL", "WHATSAPP", "SMS", ] # noqa: E501 - - Keyword Args: - value (str): The channel used to send the payment message. ., must be one of ["EMAIL", "WHATSAPP", "SMS", ] # 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. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - """ - # required up here when default value is not given - _path_to_item = kwargs.pop('_path_to_item', ()) - - if 'value' in kwargs: - value = kwargs.pop('value') - elif args: - args = list(args) - value = args.pop(0) - else: - raise ApiTypeError( - "value is required, but not passed in args or kwargs and doesn't have default", - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - self.value = value - if kwargs: - raise ApiTypeError( - "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( - kwargs, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): - """PaymentMessageChannel - a model defined in OpenAPI - - Note that value can be passed either in args or in kwargs, but not in both. - - Args: - args[0] (str): The channel used to send the payment message. ., must be one of ["EMAIL", "WHATSAPP", "SMS", ] # noqa: E501 - - Keyword Args: - value (str): The channel used to send the payment message. ., must be one of ["EMAIL", "WHATSAPP", "SMS", ] # 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. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - """ - # required up here when default value is not given - _path_to_item = kwargs.pop('_path_to_item', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if 'value' in kwargs: - value = kwargs.pop('value') - elif args: - args = list(args) - value = args.pop(0) - else: - raise ApiTypeError( - "value is required, but not passed in args or kwargs and doesn't have default", - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - self.value = value - if kwargs: - raise ApiTypeError( - "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( - kwargs, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - return self diff --git a/Monei/model/payment_message_language.py b/Monei/model/payment_message_language.py deleted file mode 100644 index fd29d86..0000000 --- a/Monei/model/payment_message_language.py +++ /dev/null @@ -1,295 +0,0 @@ -""" - MONEI API v1 - -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - - The version of the OpenAPI document: 1.5.0 - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from Monei.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from Monei.exceptions import ApiAttributeError - - - -class PaymentMessageLanguage(ModelSimple): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - ('value',): { - 'EN': "en", - 'ES': "es", - 'CA': "ca", - 'PT': "pt", - 'DE': "de", - 'IT': "it", - 'FR': "fr", - }, - } - - validations = { - } - - additional_properties_type = None - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - return { - 'value': (str,), - } - - @cached_property - def discriminator(): - return None - - - attribute_map = {} - - read_only_vars = set() - - _composed_schemas = None - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): - """PaymentMessageLanguage - a model defined in OpenAPI - - Note that value can be passed either in args or in kwargs, but not in both. - - Args: - args[0] (str): The language of message sent to the customer. If not provided the default customer language is used if available.., must be one of ["en", "es", "ca", "pt", "de", "it", "fr", ] # noqa: E501 - - Keyword Args: - value (str): The language of message sent to the customer. If not provided the default customer language is used if available.., must be one of ["en", "es", "ca", "pt", "de", "it", "fr", ] # 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. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - """ - # required up here when default value is not given - _path_to_item = kwargs.pop('_path_to_item', ()) - - if 'value' in kwargs: - value = kwargs.pop('value') - elif args: - args = list(args) - value = args.pop(0) - else: - raise ApiTypeError( - "value is required, but not passed in args or kwargs and doesn't have default", - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - self.value = value - if kwargs: - raise ApiTypeError( - "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( - kwargs, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): - """PaymentMessageLanguage - a model defined in OpenAPI - - Note that value can be passed either in args or in kwargs, but not in both. - - Args: - args[0] (str): The language of message sent to the customer. If not provided the default customer language is used if available.., must be one of ["en", "es", "ca", "pt", "de", "it", "fr", ] # noqa: E501 - - Keyword Args: - value (str): The language of message sent to the customer. If not provided the default customer language is used if available.., must be one of ["en", "es", "ca", "pt", "de", "it", "fr", ] # 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. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - """ - # required up here when default value is not given - _path_to_item = kwargs.pop('_path_to_item', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if 'value' in kwargs: - value = kwargs.pop('value') - elif args: - args = list(args) - value = args.pop(0) - else: - raise ApiTypeError( - "value is required, but not passed in args or kwargs and doesn't have default", - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - self.value = value - if kwargs: - raise ApiTypeError( - "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( - kwargs, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - return self diff --git a/Monei/model/payment_methods.py b/Monei/model/payment_methods.py deleted file mode 100644 index 7d93d84..0000000 --- a/Monei/model/payment_methods.py +++ /dev/null @@ -1,303 +0,0 @@ -""" - MONEI API v1 - -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - - The version of the OpenAPI document: 1.5.0 - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from Monei.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from Monei.exceptions import ApiAttributeError - - -def lazy_import(): - from Monei.model.payment_methods_metadata import PaymentMethodsMetadata - from Monei.model.payment_methods_methods import PaymentMethodsMethods - globals()['PaymentMethodsMetadata'] = PaymentMethodsMetadata - globals()['PaymentMethodsMethods'] = PaymentMethodsMethods - - -class PaymentMethods(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - lazy_import() - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - lazy_import() - return { - 'livemode': (bool,), # noqa: E501 - 'payment_methods': (PaymentMethodsMethods,), # noqa: E501 - 'metadata': (PaymentMethodsMetadata,), # noqa: E501 - 'merchant_name': (str,), # noqa: E501 - 'merchant_url': (str,), # noqa: E501 - 'country_code': (str,), # noqa: E501 - 'account_id': (str,), # noqa: E501 - 'amount': (int,), # noqa: E501 - 'currency': (str,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'livemode': 'livemode', # noqa: E501 - 'payment_methods': 'paymentMethods', # noqa: E501 - 'metadata': 'metadata', # noqa: E501 - 'merchant_name': 'merchantName', # noqa: E501 - 'merchant_url': 'merchantUrl', # noqa: E501 - 'country_code': 'countryCode', # noqa: E501 - 'account_id': 'accountId', # noqa: E501 - 'amount': 'amount', # noqa: E501 - 'currency': 'currency', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """PaymentMethods - 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 - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - livemode (bool): Has the value `true` if the resource exists in live mode or the value `false` if the resource exists in test mode.. [optional] # noqa: E501 - payment_methods (PaymentMethodsMethods): [optional] # noqa: E501 - metadata (PaymentMethodsMetadata): [optional] # noqa: E501 - merchant_name (str): The name of the merchant. [optional] # noqa: E501 - merchant_url (str): The URL of the merchant's website. [optional] # noqa: E501 - country_code (str): Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).. [optional] # noqa: E501 - account_id (str): MONEI Account identifier.. [optional] # noqa: E501 - amount (int): The amount of the payment in the smallest currency unit. For example, 10 EUR = 1000 cents. Only present when querying by paymentId. . [optional] # noqa: E501 - currency (str): Three-letter ISO currency code, in uppercase. Only present when querying by paymentId. . [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', True) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """PaymentMethods - 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 - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - livemode (bool): Has the value `true` if the resource exists in live mode or the value `false` if the resource exists in test mode.. [optional] # noqa: E501 - payment_methods (PaymentMethodsMethods): [optional] # noqa: E501 - metadata (PaymentMethodsMetadata): [optional] # noqa: E501 - merchant_name (str): The name of the merchant. [optional] # noqa: E501 - merchant_url (str): The URL of the merchant's website. [optional] # noqa: E501 - country_code (str): Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).. [optional] # noqa: E501 - account_id (str): MONEI Account identifier.. [optional] # noqa: E501 - amount (int): The amount of the payment in the smallest currency unit. For example, 10 EUR = 1000 cents. Only present when querying by paymentId. . [optional] # noqa: E501 - currency (str): Three-letter ISO currency code, in uppercase. Only present when querying by paymentId. . [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/Monei/model/payment_methods_metadata.py b/Monei/model/payment_methods_metadata.py deleted file mode 100644 index 4ef0a34..0000000 --- a/Monei/model/payment_methods_metadata.py +++ /dev/null @@ -1,363 +0,0 @@ -""" - MONEI API v1 - -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - - The version of the OpenAPI document: 1.5.0 - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from Monei.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from Monei.exceptions import ApiAttributeError - - -def lazy_import(): - from Monei.model.payment_methods_metadata_alipay import PaymentMethodsMetadataAlipay - from Monei.model.payment_methods_metadata_apple_pay import PaymentMethodsMetadataApplePay - from Monei.model.payment_methods_metadata_bancontact import PaymentMethodsMetadataBancontact - from Monei.model.payment_methods_metadata_bizum import PaymentMethodsMetadataBizum - from Monei.model.payment_methods_metadata_blik import PaymentMethodsMetadataBlik - from Monei.model.payment_methods_metadata_card import PaymentMethodsMetadataCard - from Monei.model.payment_methods_metadata_click_to_pay import PaymentMethodsMetadataClickToPay - from Monei.model.payment_methods_metadata_eps import PaymentMethodsMetadataEps - from Monei.model.payment_methods_metadata_giropay import PaymentMethodsMetadataGiropay - from Monei.model.payment_methods_metadata_google_pay import PaymentMethodsMetadataGooglePay - from Monei.model.payment_methods_metadata_i_deal import PaymentMethodsMetadataIDeal - from Monei.model.payment_methods_metadata_klarna import PaymentMethodsMetadataKlarna - from Monei.model.payment_methods_metadata_mbway import PaymentMethodsMetadataMbway - from Monei.model.payment_methods_metadata_sepa import PaymentMethodsMetadataSepa - from Monei.model.payment_methods_metadata_sofort import PaymentMethodsMetadataSofort - from Monei.model.payment_methods_metadata_trustly import PaymentMethodsMetadataTrustly - globals()['PaymentMethodsMetadataAlipay'] = PaymentMethodsMetadataAlipay - globals()['PaymentMethodsMetadataApplePay'] = PaymentMethodsMetadataApplePay - globals()['PaymentMethodsMetadataBancontact'] = PaymentMethodsMetadataBancontact - globals()['PaymentMethodsMetadataBizum'] = PaymentMethodsMetadataBizum - globals()['PaymentMethodsMetadataBlik'] = PaymentMethodsMetadataBlik - globals()['PaymentMethodsMetadataCard'] = PaymentMethodsMetadataCard - globals()['PaymentMethodsMetadataClickToPay'] = PaymentMethodsMetadataClickToPay - globals()['PaymentMethodsMetadataEps'] = PaymentMethodsMetadataEps - globals()['PaymentMethodsMetadataGiropay'] = PaymentMethodsMetadataGiropay - globals()['PaymentMethodsMetadataGooglePay'] = PaymentMethodsMetadataGooglePay - globals()['PaymentMethodsMetadataIDeal'] = PaymentMethodsMetadataIDeal - globals()['PaymentMethodsMetadataKlarna'] = PaymentMethodsMetadataKlarna - globals()['PaymentMethodsMetadataMbway'] = PaymentMethodsMetadataMbway - globals()['PaymentMethodsMetadataSepa'] = PaymentMethodsMetadataSepa - globals()['PaymentMethodsMetadataSofort'] = PaymentMethodsMetadataSofort - globals()['PaymentMethodsMetadataTrustly'] = PaymentMethodsMetadataTrustly - - -class PaymentMethodsMetadata(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - lazy_import() - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - lazy_import() - return { - 'alipay': (PaymentMethodsMetadataAlipay,), # noqa: E501 - 'bancontact': (PaymentMethodsMetadataBancontact,), # noqa: E501 - 'bizum': (PaymentMethodsMetadataBizum,), # noqa: E501 - 'blik': (PaymentMethodsMetadataBlik,), # noqa: E501 - 'card': (PaymentMethodsMetadataCard,), # noqa: E501 - 'eps': (PaymentMethodsMetadataEps,), # noqa: E501 - 'i_deal': (PaymentMethodsMetadataIDeal,), # noqa: E501 - 'mbway': (PaymentMethodsMetadataMbway,), # noqa: E501 - 'multibanco': (PaymentMethodsMetadataMbway,), # noqa: E501 - 'sofort': (PaymentMethodsMetadataSofort,), # noqa: E501 - 'trustly': (PaymentMethodsMetadataTrustly,), # noqa: E501 - 'sepa': (PaymentMethodsMetadataSepa,), # noqa: E501 - 'klarna': (PaymentMethodsMetadataKlarna,), # noqa: E501 - 'giropay': (PaymentMethodsMetadataGiropay,), # noqa: E501 - 'google_pay': (PaymentMethodsMetadataGooglePay,), # noqa: E501 - 'apple_pay': (PaymentMethodsMetadataApplePay,), # noqa: E501 - 'click_to_pay': (PaymentMethodsMetadataClickToPay,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'alipay': 'alipay', # noqa: E501 - 'bancontact': 'bancontact', # noqa: E501 - 'bizum': 'bizum', # noqa: E501 - 'blik': 'blik', # noqa: E501 - 'card': 'card', # noqa: E501 - 'eps': 'eps', # noqa: E501 - 'i_deal': 'iDeal', # noqa: E501 - 'mbway': 'mbway', # noqa: E501 - 'multibanco': 'multibanco', # noqa: E501 - 'sofort': 'sofort', # noqa: E501 - 'trustly': 'trustly', # noqa: E501 - 'sepa': 'sepa', # noqa: E501 - 'klarna': 'klarna', # noqa: E501 - 'giropay': 'giropay', # noqa: E501 - 'google_pay': 'googlePay', # noqa: E501 - 'apple_pay': 'applePay', # noqa: E501 - 'click_to_pay': 'clickToPay', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """PaymentMethodsMetadata - 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 - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - alipay (PaymentMethodsMetadataAlipay): [optional] # noqa: E501 - bancontact (PaymentMethodsMetadataBancontact): [optional] # noqa: E501 - bizum (PaymentMethodsMetadataBizum): [optional] # noqa: E501 - blik (PaymentMethodsMetadataBlik): [optional] # noqa: E501 - card (PaymentMethodsMetadataCard): [optional] # noqa: E501 - eps (PaymentMethodsMetadataEps): [optional] # noqa: E501 - i_deal (PaymentMethodsMetadataIDeal): [optional] # noqa: E501 - mbway (PaymentMethodsMetadataMbway): [optional] # noqa: E501 - multibanco (PaymentMethodsMetadataMbway): [optional] # noqa: E501 - sofort (PaymentMethodsMetadataSofort): [optional] # noqa: E501 - trustly (PaymentMethodsMetadataTrustly): [optional] # noqa: E501 - sepa (PaymentMethodsMetadataSepa): [optional] # noqa: E501 - klarna (PaymentMethodsMetadataKlarna): [optional] # noqa: E501 - giropay (PaymentMethodsMetadataGiropay): [optional] # noqa: E501 - google_pay (PaymentMethodsMetadataGooglePay): [optional] # noqa: E501 - apple_pay (PaymentMethodsMetadataApplePay): [optional] # noqa: E501 - click_to_pay (PaymentMethodsMetadataClickToPay): [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', True) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """PaymentMethodsMetadata - 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 - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - alipay (PaymentMethodsMetadataAlipay): [optional] # noqa: E501 - bancontact (PaymentMethodsMetadataBancontact): [optional] # noqa: E501 - bizum (PaymentMethodsMetadataBizum): [optional] # noqa: E501 - blik (PaymentMethodsMetadataBlik): [optional] # noqa: E501 - card (PaymentMethodsMetadataCard): [optional] # noqa: E501 - eps (PaymentMethodsMetadataEps): [optional] # noqa: E501 - i_deal (PaymentMethodsMetadataIDeal): [optional] # noqa: E501 - mbway (PaymentMethodsMetadataMbway): [optional] # noqa: E501 - multibanco (PaymentMethodsMetadataMbway): [optional] # noqa: E501 - sofort (PaymentMethodsMetadataSofort): [optional] # noqa: E501 - trustly (PaymentMethodsMetadataTrustly): [optional] # noqa: E501 - sepa (PaymentMethodsMetadataSepa): [optional] # noqa: E501 - klarna (PaymentMethodsMetadataKlarna): [optional] # noqa: E501 - giropay (PaymentMethodsMetadataGiropay): [optional] # noqa: E501 - google_pay (PaymentMethodsMetadataGooglePay): [optional] # noqa: E501 - apple_pay (PaymentMethodsMetadataApplePay): [optional] # noqa: E501 - click_to_pay (PaymentMethodsMetadataClickToPay): [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/Monei/model/payment_methods_metadata_alipay.py b/Monei/model/payment_methods_metadata_alipay.py deleted file mode 100644 index ae6fd17..0000000 --- a/Monei/model/payment_methods_metadata_alipay.py +++ /dev/null @@ -1,263 +0,0 @@ -""" - MONEI API v1 - -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - - The version of the OpenAPI document: 1.5.0 - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from Monei.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from Monei.exceptions import ApiAttributeError - - - -class PaymentMethodsMetadataAlipay(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - return { - 'countries': ([str],), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'countries': 'countries', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """PaymentMethodsMetadataAlipay - 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 - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - countries ([str]): List of countries where the payment method is available. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', True) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """PaymentMethodsMetadataAlipay - 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 - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - countries ([str]): List of countries where the payment method is available. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/Monei/model/payment_methods_metadata_apple_pay.py b/Monei/model/payment_methods_metadata_apple_pay.py deleted file mode 100644 index ec06508..0000000 --- a/Monei/model/payment_methods_metadata_apple_pay.py +++ /dev/null @@ -1,263 +0,0 @@ -""" - MONEI API v1 - -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - - The version of the OpenAPI document: 1.5.0 - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from Monei.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from Monei.exceptions import ApiAttributeError - - - -class PaymentMethodsMetadataApplePay(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - return { - 'merchant_id': (str,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'merchant_id': 'merchantId', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """PaymentMethodsMetadataApplePay - 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 - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - merchant_id (str): Apple Pay merchant ID. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', True) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """PaymentMethodsMetadataApplePay - 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 - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - merchant_id (str): Apple Pay merchant ID. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/Monei/model/payment_methods_metadata_bancontact.py b/Monei/model/payment_methods_metadata_bancontact.py deleted file mode 100644 index e925b8a..0000000 --- a/Monei/model/payment_methods_metadata_bancontact.py +++ /dev/null @@ -1,263 +0,0 @@ -""" - MONEI API v1 - -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - - The version of the OpenAPI document: 1.5.0 - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from Monei.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from Monei.exceptions import ApiAttributeError - - - -class PaymentMethodsMetadataBancontact(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - return { - 'countries': ([str],), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'countries': 'countries', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """PaymentMethodsMetadataBancontact - 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 - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - countries ([str]): List of countries where the payment method is available. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', True) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """PaymentMethodsMetadataBancontact - 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 - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - countries ([str]): List of countries where the payment method is available. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/Monei/model/payment_methods_metadata_bizum.py b/Monei/model/payment_methods_metadata_bizum.py deleted file mode 100644 index d1a522e..0000000 --- a/Monei/model/payment_methods_metadata_bizum.py +++ /dev/null @@ -1,263 +0,0 @@ -""" - MONEI API v1 - -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - - The version of the OpenAPI document: 1.5.0 - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from Monei.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from Monei.exceptions import ApiAttributeError - - - -class PaymentMethodsMetadataBizum(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - return { - 'countries': ([str],), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'countries': 'countries', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """PaymentMethodsMetadataBizum - 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 - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - countries ([str]): List of countries where the payment method is available. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', True) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """PaymentMethodsMetadataBizum - 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 - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - countries ([str]): List of countries where the payment method is available. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/Monei/model/payment_methods_metadata_blik.py b/Monei/model/payment_methods_metadata_blik.py deleted file mode 100644 index 9f620ba..0000000 --- a/Monei/model/payment_methods_metadata_blik.py +++ /dev/null @@ -1,263 +0,0 @@ -""" - MONEI API v1 - -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - - The version of the OpenAPI document: 1.5.0 - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from Monei.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from Monei.exceptions import ApiAttributeError - - - -class PaymentMethodsMetadataBlik(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - return { - 'countries': ([str],), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'countries': 'countries', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """PaymentMethodsMetadataBlik - 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 - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - countries ([str]): List of countries where the payment method is available. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', True) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """PaymentMethodsMetadataBlik - 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 - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - countries ([str]): List of countries where the payment method is available. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/Monei/model/payment_methods_metadata_card.py b/Monei/model/payment_methods_metadata_card.py deleted file mode 100644 index b2c14df..0000000 --- a/Monei/model/payment_methods_metadata_card.py +++ /dev/null @@ -1,263 +0,0 @@ -""" - MONEI API v1 - -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - - The version of the OpenAPI document: 1.5.0 - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from Monei.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from Monei.exceptions import ApiAttributeError - - - -class PaymentMethodsMetadataCard(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - return { - 'brands': ([str],), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'brands': 'brands', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """PaymentMethodsMetadataCard - 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 - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - brands ([str]): List of card brands supported. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', True) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """PaymentMethodsMetadataCard - 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 - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - brands ([str]): List of card brands supported. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/Monei/model/payment_methods_metadata_click_to_pay.py b/Monei/model/payment_methods_metadata_click_to_pay.py deleted file mode 100644 index ccb6a87..0000000 --- a/Monei/model/payment_methods_metadata_click_to_pay.py +++ /dev/null @@ -1,289 +0,0 @@ -""" - MONEI API v1 - -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - - The version of the OpenAPI document: 1.5.0 - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from Monei.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from Monei.exceptions import ApiAttributeError - - -def lazy_import(): - from Monei.model.payment_methods_metadata_click_to_pay_discover import PaymentMethodsMetadataClickToPayDiscover - from Monei.model.payment_methods_metadata_click_to_pay_mastercard import PaymentMethodsMetadataClickToPayMastercard - from Monei.model.payment_methods_metadata_click_to_pay_visa import PaymentMethodsMetadataClickToPayVisa - globals()['PaymentMethodsMetadataClickToPayDiscover'] = PaymentMethodsMetadataClickToPayDiscover - globals()['PaymentMethodsMetadataClickToPayMastercard'] = PaymentMethodsMetadataClickToPayMastercard - globals()['PaymentMethodsMetadataClickToPayVisa'] = PaymentMethodsMetadataClickToPayVisa - - -class PaymentMethodsMetadataClickToPay(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - lazy_import() - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - lazy_import() - return { - 'token_support': (bool,), # noqa: E501 - 'preselected': (bool,), # noqa: E501 - 'visa': (PaymentMethodsMetadataClickToPayVisa,), # noqa: E501 - 'mastercard': (PaymentMethodsMetadataClickToPayMastercard,), # noqa: E501 - 'discover': (PaymentMethodsMetadataClickToPayDiscover,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'token_support': 'tokenSupport', # noqa: E501 - 'preselected': 'preselected', # noqa: E501 - 'visa': 'visa', # noqa: E501 - 'mastercard': 'mastercard', # noqa: E501 - 'discover': 'discover', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """PaymentMethodsMetadataClickToPay - 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 - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - token_support (bool): Whether token support is enabled. [optional] # noqa: E501 - preselected (bool): Whether the method is preselected. [optional] # noqa: E501 - visa (PaymentMethodsMetadataClickToPayVisa): [optional] # noqa: E501 - mastercard (PaymentMethodsMetadataClickToPayMastercard): [optional] # noqa: E501 - discover (PaymentMethodsMetadataClickToPayDiscover): [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', True) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """PaymentMethodsMetadataClickToPay - 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 - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - token_support (bool): Whether token support is enabled. [optional] # noqa: E501 - preselected (bool): Whether the method is preselected. [optional] # noqa: E501 - visa (PaymentMethodsMetadataClickToPayVisa): [optional] # noqa: E501 - mastercard (PaymentMethodsMetadataClickToPayMastercard): [optional] # noqa: E501 - discover (PaymentMethodsMetadataClickToPayDiscover): [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/Monei/model/payment_methods_metadata_click_to_pay_discover.py b/Monei/model/payment_methods_metadata_click_to_pay_discover.py deleted file mode 100644 index abaa7ee..0000000 --- a/Monei/model/payment_methods_metadata_click_to_pay_discover.py +++ /dev/null @@ -1,267 +0,0 @@ -""" - MONEI API v1 - -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - - The version of the OpenAPI document: 1.5.0 - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from Monei.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from Monei.exceptions import ApiAttributeError - - - -class PaymentMethodsMetadataClickToPayDiscover(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - return { - 'srci_dpa_id': (str,), # noqa: E501 - 'src_initiator_id': (str,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'srci_dpa_id': 'srciDpaId', # noqa: E501 - 'src_initiator_id': 'srcInitiatorId', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """PaymentMethodsMetadataClickToPayDiscover - 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 - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - srci_dpa_id (str): [optional] # noqa: E501 - src_initiator_id (str): [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', True) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """PaymentMethodsMetadataClickToPayDiscover - 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 - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - srci_dpa_id (str): [optional] # noqa: E501 - src_initiator_id (str): [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/Monei/model/payment_methods_metadata_click_to_pay_mastercard.py b/Monei/model/payment_methods_metadata_click_to_pay_mastercard.py deleted file mode 100644 index f7e1f26..0000000 --- a/Monei/model/payment_methods_metadata_click_to_pay_mastercard.py +++ /dev/null @@ -1,267 +0,0 @@ -""" - MONEI API v1 - -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - - The version of the OpenAPI document: 1.5.0 - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from Monei.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from Monei.exceptions import ApiAttributeError - - - -class PaymentMethodsMetadataClickToPayMastercard(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - return { - 'srci_dpa_id': (str,), # noqa: E501 - 'src_initiator_id': (str,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'srci_dpa_id': 'srciDpaId', # noqa: E501 - 'src_initiator_id': 'srcInitiatorId', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """PaymentMethodsMetadataClickToPayMastercard - 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 - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - srci_dpa_id (str): [optional] # noqa: E501 - src_initiator_id (str): [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', True) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """PaymentMethodsMetadataClickToPayMastercard - 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 - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - srci_dpa_id (str): [optional] # noqa: E501 - src_initiator_id (str): [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/Monei/model/payment_methods_metadata_click_to_pay_visa.py b/Monei/model/payment_methods_metadata_click_to_pay_visa.py deleted file mode 100644 index 659c504..0000000 --- a/Monei/model/payment_methods_metadata_click_to_pay_visa.py +++ /dev/null @@ -1,267 +0,0 @@ -""" - MONEI API v1 - -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - - The version of the OpenAPI document: 1.5.0 - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from Monei.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from Monei.exceptions import ApiAttributeError - - - -class PaymentMethodsMetadataClickToPayVisa(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - return { - 'srci_dpa_id': (str,), # noqa: E501 - 'src_initiator_id': (str,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'srci_dpa_id': 'srciDpaId', # noqa: E501 - 'src_initiator_id': 'srcInitiatorId', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """PaymentMethodsMetadataClickToPayVisa - 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 - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - srci_dpa_id (str): [optional] # noqa: E501 - src_initiator_id (str): [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', True) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """PaymentMethodsMetadataClickToPayVisa - 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 - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - srci_dpa_id (str): [optional] # noqa: E501 - src_initiator_id (str): [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/Monei/model/payment_methods_metadata_eps.py b/Monei/model/payment_methods_metadata_eps.py deleted file mode 100644 index 535500e..0000000 --- a/Monei/model/payment_methods_metadata_eps.py +++ /dev/null @@ -1,263 +0,0 @@ -""" - MONEI API v1 - -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - - The version of the OpenAPI document: 1.5.0 - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from Monei.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from Monei.exceptions import ApiAttributeError - - - -class PaymentMethodsMetadataEps(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - return { - 'countries': ([str],), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'countries': 'countries', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """PaymentMethodsMetadataEps - 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 - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - countries ([str]): List of countries where the payment method is available. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', True) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """PaymentMethodsMetadataEps - 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 - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - countries ([str]): List of countries where the payment method is available. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/Monei/model/payment_methods_metadata_giropay.py b/Monei/model/payment_methods_metadata_giropay.py deleted file mode 100644 index 1a2b7a9..0000000 --- a/Monei/model/payment_methods_metadata_giropay.py +++ /dev/null @@ -1,263 +0,0 @@ -""" - MONEI API v1 - -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - - The version of the OpenAPI document: 1.5.0 - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from Monei.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from Monei.exceptions import ApiAttributeError - - - -class PaymentMethodsMetadataGiropay(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - return { - 'countries': ([str],), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'countries': 'countries', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """PaymentMethodsMetadataGiropay - 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 - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - countries ([str]): List of countries where the payment method is available. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', True) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """PaymentMethodsMetadataGiropay - 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 - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - countries ([str]): List of countries where the payment method is available. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/Monei/model/payment_methods_metadata_google_pay.py b/Monei/model/payment_methods_metadata_google_pay.py deleted file mode 100644 index 5c7d15a..0000000 --- a/Monei/model/payment_methods_metadata_google_pay.py +++ /dev/null @@ -1,267 +0,0 @@ -""" - MONEI API v1 - -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - - The version of the OpenAPI document: 1.5.0 - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from Monei.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from Monei.exceptions import ApiAttributeError - - - -class PaymentMethodsMetadataGooglePay(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - return { - 'merchant_id': (str,), # noqa: E501 - 'cvc_required': (bool,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'merchant_id': 'merchantId', # noqa: E501 - 'cvc_required': 'cvcRequired', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """PaymentMethodsMetadataGooglePay - 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 - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - merchant_id (str): Google Pay merchant ID. [optional] # noqa: E501 - cvc_required (bool): Whether CVC is required for Google Pay transactions. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', True) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """PaymentMethodsMetadataGooglePay - 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 - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - merchant_id (str): Google Pay merchant ID. [optional] # noqa: E501 - cvc_required (bool): Whether CVC is required for Google Pay transactions. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/Monei/model/payment_methods_metadata_i_deal.py b/Monei/model/payment_methods_metadata_i_deal.py deleted file mode 100644 index cb46889..0000000 --- a/Monei/model/payment_methods_metadata_i_deal.py +++ /dev/null @@ -1,263 +0,0 @@ -""" - MONEI API v1 - -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - - The version of the OpenAPI document: 1.5.0 - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from Monei.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from Monei.exceptions import ApiAttributeError - - - -class PaymentMethodsMetadataIDeal(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - return { - 'countries': ([str],), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'countries': 'countries', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """PaymentMethodsMetadataIDeal - 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 - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - countries ([str]): List of countries where the payment method is available. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', True) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """PaymentMethodsMetadataIDeal - 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 - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - countries ([str]): List of countries where the payment method is available. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/Monei/model/payment_methods_metadata_klarna.py b/Monei/model/payment_methods_metadata_klarna.py deleted file mode 100644 index 735c01f..0000000 --- a/Monei/model/payment_methods_metadata_klarna.py +++ /dev/null @@ -1,263 +0,0 @@ -""" - MONEI API v1 - -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - - The version of the OpenAPI document: 1.5.0 - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from Monei.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from Monei.exceptions import ApiAttributeError - - - -class PaymentMethodsMetadataKlarna(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - return { - 'countries': ([str],), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'countries': 'countries', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """PaymentMethodsMetadataKlarna - 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 - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - countries ([str]): List of countries where the payment method is available. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', True) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """PaymentMethodsMetadataKlarna - 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 - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - countries ([str]): List of countries where the payment method is available. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/Monei/model/payment_methods_metadata_mbway.py b/Monei/model/payment_methods_metadata_mbway.py deleted file mode 100644 index 71b6bb4..0000000 --- a/Monei/model/payment_methods_metadata_mbway.py +++ /dev/null @@ -1,263 +0,0 @@ -""" - MONEI API v1 - -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - - The version of the OpenAPI document: 1.5.0 - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from Monei.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from Monei.exceptions import ApiAttributeError - - - -class PaymentMethodsMetadataMbway(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - return { - 'countries': ([str],), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'countries': 'countries', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """PaymentMethodsMetadataMbway - 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 - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - countries ([str]): List of countries where the payment method is available. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', True) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """PaymentMethodsMetadataMbway - 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 - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - countries ([str]): List of countries where the payment method is available. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/Monei/model/payment_methods_metadata_sepa.py b/Monei/model/payment_methods_metadata_sepa.py deleted file mode 100644 index 3159652..0000000 --- a/Monei/model/payment_methods_metadata_sepa.py +++ /dev/null @@ -1,263 +0,0 @@ -""" - MONEI API v1 - -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - - The version of the OpenAPI document: 1.5.0 - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from Monei.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from Monei.exceptions import ApiAttributeError - - - -class PaymentMethodsMetadataSepa(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - return { - 'countries': ([str],), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'countries': 'countries', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """PaymentMethodsMetadataSepa - 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 - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - countries ([str]): List of countries where the payment method is available. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', True) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """PaymentMethodsMetadataSepa - 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 - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - countries ([str]): List of countries where the payment method is available. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/Monei/model/payment_methods_metadata_sofort.py b/Monei/model/payment_methods_metadata_sofort.py deleted file mode 100644 index cb5939e..0000000 --- a/Monei/model/payment_methods_metadata_sofort.py +++ /dev/null @@ -1,263 +0,0 @@ -""" - MONEI API v1 - -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - - The version of the OpenAPI document: 1.5.0 - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from Monei.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from Monei.exceptions import ApiAttributeError - - - -class PaymentMethodsMetadataSofort(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - return { - 'countries': ([str],), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'countries': 'countries', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """PaymentMethodsMetadataSofort - 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 - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - countries ([str]): List of countries where the payment method is available. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', True) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """PaymentMethodsMetadataSofort - 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 - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - countries ([str]): List of countries where the payment method is available. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/Monei/model/payment_methods_metadata_trustly.py b/Monei/model/payment_methods_metadata_trustly.py deleted file mode 100644 index 413eb27..0000000 --- a/Monei/model/payment_methods_metadata_trustly.py +++ /dev/null @@ -1,263 +0,0 @@ -""" - MONEI API v1 - -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - - The version of the OpenAPI document: 1.5.0 - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from Monei.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from Monei.exceptions import ApiAttributeError - - - -class PaymentMethodsMetadataTrustly(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - return { - 'countries': ([str],), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'countries': 'countries', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """PaymentMethodsMetadataTrustly - 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 - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - countries ([str]): List of countries where the payment method is available. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', True) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """PaymentMethodsMetadataTrustly - 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 - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - countries ([str]): List of countries where the payment method is available. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/Monei/model/payment_methods_methods.py b/Monei/model/payment_methods_methods.py deleted file mode 100644 index d715b2c..0000000 --- a/Monei/model/payment_methods_methods.py +++ /dev/null @@ -1,286 +0,0 @@ -""" - MONEI API v1 - -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - - The version of the OpenAPI document: 1.5.0 - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from Monei.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from Monei.exceptions import ApiAttributeError - - - -class PaymentMethodsMethods(ModelSimple): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - additional_properties_type = None - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - return { - 'value': ([str],), - } - - @cached_property - def discriminator(): - return None - - - attribute_map = {} - - read_only_vars = set() - - _composed_schemas = None - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): - """PaymentMethodsMethods - a model defined in OpenAPI - - Note that value can be passed either in args or in kwargs, but not in both. - - Args: - args[0] ([str]): An array of available payment methods for the account or payment. Possible values include: - `alipay` - Alipay - `applePay` - Apple Pay - `bancontact` - Bancontact - `bizum` - Bizum - `blik` - BLIK - `card` - Credit or debit card - `cardPresent` - Card present (physical POS) - `clickToPay` - Click to Pay - `cofidis` - Cofidis - `cofidisLoan` - Cofidis Loan - `eps` - EPS - `giropay` - Giropay - `googlePay` - Google Pay - `iDeal` - iDEAL - `klarna` - Klarna - `mbway` - MB WAY - `multibanco` - Multibanco - `paypal` - PayPal - `sepa` - SEPA Direct Debit - `sofort` - Sofort - `trustly` - Trustly . # noqa: E501 - - Keyword Args: - value ([str]): An array of available payment methods for the account or payment. Possible values include: - `alipay` - Alipay - `applePay` - Apple Pay - `bancontact` - Bancontact - `bizum` - Bizum - `blik` - BLIK - `card` - Credit or debit card - `cardPresent` - Card present (physical POS) - `clickToPay` - Click to Pay - `cofidis` - Cofidis - `cofidisLoan` - Cofidis Loan - `eps` - EPS - `giropay` - Giropay - `googlePay` - Google Pay - `iDeal` - iDEAL - `klarna` - Klarna - `mbway` - MB WAY - `multibanco` - Multibanco - `paypal` - PayPal - `sepa` - SEPA Direct Debit - `sofort` - Sofort - `trustly` - Trustly . # 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. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - """ - # required up here when default value is not given - _path_to_item = kwargs.pop('_path_to_item', ()) - - if 'value' in kwargs: - value = kwargs.pop('value') - elif args: - args = list(args) - value = args.pop(0) - else: - raise ApiTypeError( - "value is required, but not passed in args or kwargs and doesn't have default", - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - self.value = value - if kwargs: - raise ApiTypeError( - "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( - kwargs, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): - """PaymentMethodsMethods - a model defined in OpenAPI - - Note that value can be passed either in args or in kwargs, but not in both. - - Args: - args[0] ([str]): An array of available payment methods for the account or payment. Possible values include: - `alipay` - Alipay - `applePay` - Apple Pay - `bancontact` - Bancontact - `bizum` - Bizum - `blik` - BLIK - `card` - Credit or debit card - `cardPresent` - Card present (physical POS) - `clickToPay` - Click to Pay - `cofidis` - Cofidis - `cofidisLoan` - Cofidis Loan - `eps` - EPS - `giropay` - Giropay - `googlePay` - Google Pay - `iDeal` - iDEAL - `klarna` - Klarna - `mbway` - MB WAY - `multibanco` - Multibanco - `paypal` - PayPal - `sepa` - SEPA Direct Debit - `sofort` - Sofort - `trustly` - Trustly . # noqa: E501 - - Keyword Args: - value ([str]): An array of available payment methods for the account or payment. Possible values include: - `alipay` - Alipay - `applePay` - Apple Pay - `bancontact` - Bancontact - `bizum` - Bizum - `blik` - BLIK - `card` - Credit or debit card - `cardPresent` - Card present (physical POS) - `clickToPay` - Click to Pay - `cofidis` - Cofidis - `cofidisLoan` - Cofidis Loan - `eps` - EPS - `giropay` - Giropay - `googlePay` - Google Pay - `iDeal` - iDEAL - `klarna` - Klarna - `mbway` - MB WAY - `multibanco` - Multibanco - `paypal` - PayPal - `sepa` - SEPA Direct Debit - `sofort` - Sofort - `trustly` - Trustly . # 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. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - """ - # required up here when default value is not given - _path_to_item = kwargs.pop('_path_to_item', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if 'value' in kwargs: - value = kwargs.pop('value') - elif args: - args = list(args) - value = args.pop(0) - else: - raise ApiTypeError( - "value is required, but not passed in args or kwargs and doesn't have default", - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - self.value = value - if kwargs: - raise ApiTypeError( - "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( - kwargs, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - return self diff --git a/Monei/model/payment_next_action.py b/Monei/model/payment_next_action.py deleted file mode 100644 index 2225003..0000000 --- a/Monei/model/payment_next_action.py +++ /dev/null @@ -1,278 +0,0 @@ -""" - MONEI API v1 - -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - - The version of the OpenAPI document: 1.5.0 - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from Monei.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from Monei.exceptions import ApiAttributeError - - - -class PaymentNextAction(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - ('type',): { - 'CONFIRM': "CONFIRM", - 'CHALLENGE': "CHALLENGE", - 'FRICTIONLESS_CHALLENGE': "FRICTIONLESS_CHALLENGE", - 'BIZUM_CHALLENGE': "BIZUM_CHALLENGE", - 'COMPLETE': "COMPLETE", - }, - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - return { - 'type': (str,), # noqa: E501 - 'must_redirect': (bool,), # noqa: E501 - 'redirect_url': (str,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'type': 'type', # noqa: E501 - 'must_redirect': 'mustRedirect', # noqa: E501 - 'redirect_url': 'redirectUrl', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """PaymentNextAction - 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 - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - type (str): - `CONFIRM` - Your customer needs to be redirected to a [hosted payment page](https://docs.monei.com/docs/use-prebuilt-payment-page) or confirm payment using [payment token](https://docs.monei.com/docs/accept-card-payment#3-submitting-the-payment-to-monei-client-side). The **redirectUrl** will point to the hosted payment page. - `FRICTIONLESS_CHALLENGE` - Your customer needs to be redirected to the frictionless 3d secure challenge page provided by the bank. The **redirectUrl** will point to the frictionless 3d secure challenge page provided by the bank. - `CHALLENGE` - Your customer needs to be redirected to the 3d secure challenge page provided by the bank. The **redirectUrl** will point to the 3d secure challenge page provided by the bank. - `COMPLETE` - The payment is completed. The **redirectUrl** will be the **completeUrl** if it was provided when the payment was created. - `BIZUM_CHALLENGE` - Your customer will be redirected to the Bizum hosted payment page. . [optional] # noqa: E501 - must_redirect (bool): If `true` you have to redirect your customer to the **redirectUrl** to continue payment process. . [optional] # noqa: E501 - redirect_url (str): Redirect your customer to this url to continue payment process. . [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', True) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """PaymentNextAction - 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 - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - type (str): - `CONFIRM` - Your customer needs to be redirected to a [hosted payment page](https://docs.monei.com/docs/use-prebuilt-payment-page) or confirm payment using [payment token](https://docs.monei.com/docs/accept-card-payment#3-submitting-the-payment-to-monei-client-side). The **redirectUrl** will point to the hosted payment page. - `FRICTIONLESS_CHALLENGE` - Your customer needs to be redirected to the frictionless 3d secure challenge page provided by the bank. The **redirectUrl** will point to the frictionless 3d secure challenge page provided by the bank. - `CHALLENGE` - Your customer needs to be redirected to the 3d secure challenge page provided by the bank. The **redirectUrl** will point to the 3d secure challenge page provided by the bank. - `COMPLETE` - The payment is completed. The **redirectUrl** will be the **completeUrl** if it was provided when the payment was created. - `BIZUM_CHALLENGE` - Your customer will be redirected to the Bizum hosted payment page. . [optional] # noqa: E501 - must_redirect (bool): If `true` you have to redirect your customer to the **redirectUrl** to continue payment process. . [optional] # noqa: E501 - redirect_url (str): Redirect your customer to this url to continue payment process. . [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/Monei/model/payment_payment_method.py b/Monei/model/payment_payment_method.py deleted file mode 100644 index 21d8fcd..0000000 --- a/Monei/model/payment_payment_method.py +++ /dev/null @@ -1,338 +0,0 @@ -""" - MONEI API v1 - -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - - The version of the OpenAPI document: 1.5.0 - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from Monei.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from Monei.exceptions import ApiAttributeError - - -def lazy_import(): - from Monei.model.payment_payment_method_bizum import PaymentPaymentMethodBizum - from Monei.model.payment_payment_method_card import PaymentPaymentMethodCard - from Monei.model.payment_payment_method_cofidis import PaymentPaymentMethodCofidis - from Monei.model.payment_payment_method_klarna import PaymentPaymentMethodKlarna - from Monei.model.payment_payment_method_mbway import PaymentPaymentMethodMbway - from Monei.model.payment_payment_method_paypal import PaymentPaymentMethodPaypal - from Monei.model.payment_payment_method_sepa import PaymentPaymentMethodSepa - from Monei.model.payment_payment_method_trustly import PaymentPaymentMethodTrustly - globals()['PaymentPaymentMethodBizum'] = PaymentPaymentMethodBizum - globals()['PaymentPaymentMethodCard'] = PaymentPaymentMethodCard - globals()['PaymentPaymentMethodCofidis'] = PaymentPaymentMethodCofidis - globals()['PaymentPaymentMethodKlarna'] = PaymentPaymentMethodKlarna - globals()['PaymentPaymentMethodMbway'] = PaymentPaymentMethodMbway - globals()['PaymentPaymentMethodPaypal'] = PaymentPaymentMethodPaypal - globals()['PaymentPaymentMethodSepa'] = PaymentPaymentMethodSepa - globals()['PaymentPaymentMethodTrustly'] = PaymentPaymentMethodTrustly - - -class PaymentPaymentMethod(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - ('method',): { - 'ALIPAY': "alipay", - 'CARD': "card", - 'BIZUM': "bizum", - 'PAYPAL': "paypal", - 'COFIDIS': "cofidis", - 'COFIDISLOAN': "cofidisLoan", - 'MBWAY': "mbway", - 'MULTIBANCO': "multibanco", - 'IDEAL': "iDeal", - 'BANCONTACT': "bancontact", - 'SOFORT': "sofort", - 'TRUSTLY': "trustly", - 'SEPA': "sepa", - 'KLARNA': "klarna", - 'GIROPAY': "giropay", - 'EPS': "eps", - 'BLIK': "blik", - }, - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - lazy_import() - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - lazy_import() - return { - 'method': (str,), # noqa: E501 - 'card': (PaymentPaymentMethodCard,), # noqa: E501 - 'bizum': (PaymentPaymentMethodBizum,), # noqa: E501 - 'paypal': (PaymentPaymentMethodPaypal,), # noqa: E501 - 'cofidis': (PaymentPaymentMethodCofidis,), # noqa: E501 - 'cofidis_loan': (PaymentPaymentMethodCofidis,), # noqa: E501 - 'mbway': (PaymentPaymentMethodMbway,), # noqa: E501 - 'trustly': (PaymentPaymentMethodTrustly,), # noqa: E501 - 'sepa': (PaymentPaymentMethodSepa,), # noqa: E501 - 'klarna': (PaymentPaymentMethodKlarna,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'method': 'method', # noqa: E501 - 'card': 'card', # noqa: E501 - 'bizum': 'bizum', # noqa: E501 - 'paypal': 'paypal', # noqa: E501 - 'cofidis': 'cofidis', # noqa: E501 - 'cofidis_loan': 'cofidisLoan', # noqa: E501 - 'mbway': 'mbway', # noqa: E501 - 'trustly': 'trustly', # noqa: E501 - 'sepa': 'sepa', # noqa: E501 - 'klarna': 'klarna', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """PaymentPaymentMethod - 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 - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - method (str): Payment method type.. [optional] # noqa: E501 - card (PaymentPaymentMethodCard): [optional] # noqa: E501 - bizum (PaymentPaymentMethodBizum): [optional] # noqa: E501 - paypal (PaymentPaymentMethodPaypal): [optional] # noqa: E501 - cofidis (PaymentPaymentMethodCofidis): [optional] # noqa: E501 - cofidis_loan (PaymentPaymentMethodCofidis): [optional] # noqa: E501 - mbway (PaymentPaymentMethodMbway): [optional] # noqa: E501 - trustly (PaymentPaymentMethodTrustly): [optional] # noqa: E501 - sepa (PaymentPaymentMethodSepa): [optional] # noqa: E501 - klarna (PaymentPaymentMethodKlarna): [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', True) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """PaymentPaymentMethod - 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 - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - method (str): Payment method type.. [optional] # noqa: E501 - card (PaymentPaymentMethodCard): [optional] # noqa: E501 - bizum (PaymentPaymentMethodBizum): [optional] # noqa: E501 - paypal (PaymentPaymentMethodPaypal): [optional] # noqa: E501 - cofidis (PaymentPaymentMethodCofidis): [optional] # noqa: E501 - cofidis_loan (PaymentPaymentMethodCofidis): [optional] # noqa: E501 - mbway (PaymentPaymentMethodMbway): [optional] # noqa: E501 - trustly (PaymentPaymentMethodTrustly): [optional] # noqa: E501 - sepa (PaymentPaymentMethodSepa): [optional] # noqa: E501 - klarna (PaymentPaymentMethodKlarna): [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/Monei/model/payment_payment_method_bizum.py b/Monei/model/payment_payment_method_bizum.py deleted file mode 100644 index 60e3bc6..0000000 --- a/Monei/model/payment_payment_method_bizum.py +++ /dev/null @@ -1,263 +0,0 @@ -""" - MONEI API v1 - -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - - The version of the OpenAPI document: 1.5.0 - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from Monei.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from Monei.exceptions import ApiAttributeError - - - -class PaymentPaymentMethodBizum(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - return { - 'phone_number': (str,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'phone_number': 'phoneNumber', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """PaymentPaymentMethodBizum - 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 - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - phone_number (str): Phone number in E.164 format used to pay with `bizum`.. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', True) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """PaymentPaymentMethodBizum - 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 - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - phone_number (str): Phone number in E.164 format used to pay with `bizum`.. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/Monei/model/payment_payment_method_bizum_input.py b/Monei/model/payment_payment_method_bizum_input.py deleted file mode 100644 index 2289252..0000000 --- a/Monei/model/payment_payment_method_bizum_input.py +++ /dev/null @@ -1,263 +0,0 @@ -""" - MONEI API v1 - -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - - The version of the OpenAPI document: 1.5.0 - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from Monei.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from Monei.exceptions import ApiAttributeError - - - -class PaymentPaymentMethodBizumInput(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - return { - 'phone_number': (str,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'phone_number': 'phoneNumber', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """PaymentPaymentMethodBizumInput - 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 - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - phone_number (str): Phone number in E.164 format used to pay with `bizum`.. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', True) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """PaymentPaymentMethodBizumInput - 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 - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - phone_number (str): Phone number in E.164 format used to pay with `bizum`.. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/Monei/model/payment_payment_method_card.py b/Monei/model/payment_payment_method_card.py deleted file mode 100644 index 8c85af9..0000000 --- a/Monei/model/payment_payment_method_card.py +++ /dev/null @@ -1,327 +0,0 @@ -""" - MONEI API v1 - -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - - The version of the OpenAPI document: 1.5.0 - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from Monei.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from Monei.exceptions import ApiAttributeError - - - -class PaymentPaymentMethodCard(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - ('brand',): { - 'VISA': "visa", - 'MASTERCARD': "mastercard", - 'DINERS': "diners", - 'AMEX': "amex", - 'JCB': "jcb", - 'UNIONPAY': "unionpay", - 'UNKNOWN': "unknown", - }, - ('type',): { - 'DEBIT': "debit", - 'CREDIT': "credit", - }, - ('three_d_secure_flow',): { - 'CHALLENGE': "CHALLENGE", - 'FRICTIONLESS': "FRICTIONLESS", - 'FRICTIONLESS_CHALLENGE': "FRICTIONLESS_CHALLENGE", - 'DIRECT': "DIRECT", - }, - ('tokenization_method',): { - 'APPLEPAY': "applePay", - 'GOOGLEPAY': "googlePay", - 'CLICKTOPAY': "clickToPay", - }, - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - return { - 'country': (str,), # noqa: E501 - 'brand': (str,), # noqa: E501 - 'type': (str,), # noqa: E501 - 'three_d_secure': (bool,), # noqa: E501 - 'three_d_secure_version': (str,), # noqa: E501 - 'three_d_secure_flow': (str,), # noqa: E501 - 'expiration': (int,), # noqa: E501 - 'last4': (str,), # noqa: E501 - 'tokenization_method': (str,), # noqa: E501 - 'cardholder_name': (str,), # noqa: E501 - 'cardholder_email': (str,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'country': 'country', # noqa: E501 - 'brand': 'brand', # noqa: E501 - 'type': 'type', # noqa: E501 - 'three_d_secure': 'threeDSecure', # noqa: E501 - 'three_d_secure_version': 'threeDSecureVersion', # noqa: E501 - 'three_d_secure_flow': 'threeDSecureFlow', # noqa: E501 - 'expiration': 'expiration', # noqa: E501 - 'last4': 'last4', # noqa: E501 - 'tokenization_method': 'tokenizationMethod', # noqa: E501 - 'cardholder_name': 'cardholderName', # noqa: E501 - 'cardholder_email': 'cardholderEmail', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """PaymentPaymentMethodCard - 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 - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - country (str): Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).. [optional] # noqa: E501 - brand (str): Card brand.. [optional] # noqa: E501 - type (str): Card type `debit` or `credit`.. [optional] # noqa: E501 - three_d_secure (bool): Whether this transaction used 3D Secure authentication.. [optional] # noqa: E501 - three_d_secure_version (str): The protocol version of the 3DS challenge.. [optional] # noqa: E501 - three_d_secure_flow (str): The flow used for 3DS authentication. - `CHALLENGE` - In a challenge flow, the issuer requires additional shopper interaction, either through biometrics, two-factor authentication, or similar methods based on [Strong Customer Authentication (SCA)](https://en.wikipedia.org/wiki/Strong_customer_authentication) factors. - `FRICTIONLESS` - In a frictionless flow, the acquirer, issuer, and card scheme exchange all necessary information in the background through passive authentication using the shopper's device fingerprint. The transaction is completed without further shopper interaction. - `FRICTIONLESS_CHALLENGE` - This flow is the complete 3DS flow. It is similar to the 3DS frictionless flow but includes an additional authentication step (challenge) that will be invoked if the information provided in the data collection step does not suffice to determine the risk-level of the transaction. - `DIRECT` - This transaction did not require [Strong Customer Authentication (SCA)](https://en.wikipedia.org/wiki/Strong_customer_authentication) due to the low risk . [optional] # noqa: E501 - expiration (int): Time at which the card will expire. Measured in seconds since the Unix epoch. . [optional] # noqa: E501 - last4 (str): The last four digits of the card.. [optional] # noqa: E501 - tokenization_method (str): The digital wallet used to tokenize the card.. [optional] # noqa: E501 - cardholder_name (str): The name of the cardholder.. [optional] # noqa: E501 - cardholder_email (str): The email of the cardholder.. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', True) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """PaymentPaymentMethodCard - 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 - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - country (str): Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).. [optional] # noqa: E501 - brand (str): Card brand.. [optional] # noqa: E501 - type (str): Card type `debit` or `credit`.. [optional] # noqa: E501 - three_d_secure (bool): Whether this transaction used 3D Secure authentication.. [optional] # noqa: E501 - three_d_secure_version (str): The protocol version of the 3DS challenge.. [optional] # noqa: E501 - three_d_secure_flow (str): The flow used for 3DS authentication. - `CHALLENGE` - In a challenge flow, the issuer requires additional shopper interaction, either through biometrics, two-factor authentication, or similar methods based on [Strong Customer Authentication (SCA)](https://en.wikipedia.org/wiki/Strong_customer_authentication) factors. - `FRICTIONLESS` - In a frictionless flow, the acquirer, issuer, and card scheme exchange all necessary information in the background through passive authentication using the shopper's device fingerprint. The transaction is completed without further shopper interaction. - `FRICTIONLESS_CHALLENGE` - This flow is the complete 3DS flow. It is similar to the 3DS frictionless flow but includes an additional authentication step (challenge) that will be invoked if the information provided in the data collection step does not suffice to determine the risk-level of the transaction. - `DIRECT` - This transaction did not require [Strong Customer Authentication (SCA)](https://en.wikipedia.org/wiki/Strong_customer_authentication) due to the low risk . [optional] # noqa: E501 - expiration (int): Time at which the card will expire. Measured in seconds since the Unix epoch. . [optional] # noqa: E501 - last4 (str): The last four digits of the card.. [optional] # noqa: E501 - tokenization_method (str): The digital wallet used to tokenize the card.. [optional] # noqa: E501 - cardholder_name (str): The name of the cardholder.. [optional] # noqa: E501 - cardholder_email (str): The email of the cardholder.. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/Monei/model/payment_payment_method_card_input.py b/Monei/model/payment_payment_method_card_input.py deleted file mode 100644 index f5cb031..0000000 --- a/Monei/model/payment_payment_method_card_input.py +++ /dev/null @@ -1,283 +0,0 @@ -""" - MONEI API v1 - -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - - The version of the OpenAPI document: 1.5.0 - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from Monei.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from Monei.exceptions import ApiAttributeError - - - -class PaymentPaymentMethodCardInput(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - return { - 'number': (str,), # noqa: E501 - 'cvc': (str,), # noqa: E501 - 'exp_month': (str,), # noqa: E501 - 'exp_year': (str,), # noqa: E501 - 'cardholder_name': (str,), # noqa: E501 - 'cardholder_email': (str,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'number': 'number', # noqa: E501 - 'cvc': 'cvc', # noqa: E501 - 'exp_month': 'expMonth', # noqa: E501 - 'exp_year': 'expYear', # noqa: E501 - 'cardholder_name': 'cardholderName', # noqa: E501 - 'cardholder_email': 'cardholderEmail', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """PaymentPaymentMethodCardInput - 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 - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - number (str): The card number, as a string without any separators.. [optional] # noqa: E501 - cvc (str): Card security code.. [optional] # noqa: E501 - exp_month (str): Two-digit number representing the card's expiration month.. [optional] # noqa: E501 - exp_year (str): Two-digit number representing the card's expiration year.. [optional] # noqa: E501 - cardholder_name (str): The cardholder's name, as stated in the credit card.. [optional] # noqa: E501 - cardholder_email (str): The cardholder's email address.. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', True) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """PaymentPaymentMethodCardInput - 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 - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - number (str): The card number, as a string without any separators.. [optional] # noqa: E501 - cvc (str): Card security code.. [optional] # noqa: E501 - exp_month (str): Two-digit number representing the card's expiration month.. [optional] # noqa: E501 - exp_year (str): Two-digit number representing the card's expiration year.. [optional] # noqa: E501 - cardholder_name (str): The cardholder's name, as stated in the credit card.. [optional] # noqa: E501 - cardholder_email (str): The cardholder's email address.. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/Monei/model/payment_payment_method_cofidis.py b/Monei/model/payment_payment_method_cofidis.py deleted file mode 100644 index f26b5ca..0000000 --- a/Monei/model/payment_payment_method_cofidis.py +++ /dev/null @@ -1,263 +0,0 @@ -""" - MONEI API v1 - -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - - The version of the OpenAPI document: 1.5.0 - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from Monei.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from Monei.exceptions import ApiAttributeError - - - -class PaymentPaymentMethodCofidis(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - return { - 'order_id': (str,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'order_id': 'orderId', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """PaymentPaymentMethodCofidis - 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 - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - order_id (str): The Cofidis' order ID.. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', True) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """PaymentPaymentMethodCofidis - 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 - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - order_id (str): The Cofidis' order ID.. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/Monei/model/payment_payment_method_input.py b/Monei/model/payment_payment_method_input.py deleted file mode 100644 index 41aff59..0000000 --- a/Monei/model/payment_payment_method_input.py +++ /dev/null @@ -1,275 +0,0 @@ -""" - MONEI API v1 - -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - - The version of the OpenAPI document: 1.5.0 - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from Monei.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from Monei.exceptions import ApiAttributeError - - -def lazy_import(): - from Monei.model.payment_payment_method_bizum_input import PaymentPaymentMethodBizumInput - from Monei.model.payment_payment_method_card_input import PaymentPaymentMethodCardInput - globals()['PaymentPaymentMethodBizumInput'] = PaymentPaymentMethodBizumInput - globals()['PaymentPaymentMethodCardInput'] = PaymentPaymentMethodCardInput - - -class PaymentPaymentMethodInput(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - lazy_import() - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - lazy_import() - return { - 'card': (PaymentPaymentMethodCardInput,), # noqa: E501 - 'bizum': (PaymentPaymentMethodBizumInput,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'card': 'card', # noqa: E501 - 'bizum': 'bizum', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """PaymentPaymentMethodInput - 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 - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - card (PaymentPaymentMethodCardInput): [optional] # noqa: E501 - bizum (PaymentPaymentMethodBizumInput): [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', True) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """PaymentPaymentMethodInput - 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 - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - card (PaymentPaymentMethodCardInput): [optional] # noqa: E501 - bizum (PaymentPaymentMethodBizumInput): [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/Monei/model/payment_payment_method_klarna.py b/Monei/model/payment_payment_method_klarna.py deleted file mode 100644 index f8def5e..0000000 --- a/Monei/model/payment_payment_method_klarna.py +++ /dev/null @@ -1,285 +0,0 @@ -""" - MONEI API v1 - -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - - The version of the OpenAPI document: 1.5.0 - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from Monei.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from Monei.exceptions import ApiAttributeError - - - -class PaymentPaymentMethodKlarna(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - ('billing_category',): { - 'PAY_LATER': "PAY_LATER", - 'PAY_NOW': "PAY_NOW", - 'SLICE_IT': "SLICE_IT", - 'SLICE_IT_BY_CARD': "SLICE_IT_BY_CARD", - }, - ('auth_payment_method',): { - 'INVOICE': "invoice", - 'FIXED_AMOUNT': "fixed_amount", - 'PIX': "pix", - 'BASE_ACCOUNT': "base_account", - 'DEFERRED_INTEREST': "deferred_interest", - 'DIRECT_DEBIT': "direct_debit", - 'DIRECT_BANK_TRANSFER': "direct_bank_transfer", - 'B2B_INVOICE': "b2b_invoice", - 'CARD': "card", - 'SLICE_IT_BY_CARD': "slice_it_by_card", - }, - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - return { - 'billing_category': (str,), # noqa: E501 - 'auth_payment_method': (str,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'billing_category': 'billingCategory', # noqa: E501 - 'auth_payment_method': 'authPaymentMethod', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """PaymentPaymentMethodKlarna - 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 - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - billing_category (str): [optional] # noqa: E501 - auth_payment_method (str): [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', True) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """PaymentPaymentMethodKlarna - 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 - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - billing_category (str): [optional] # noqa: E501 - auth_payment_method (str): [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/Monei/model/payment_payment_method_mbway.py b/Monei/model/payment_payment_method_mbway.py deleted file mode 100644 index b534cc5..0000000 --- a/Monei/model/payment_payment_method_mbway.py +++ /dev/null @@ -1,263 +0,0 @@ -""" - MONEI API v1 - -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - - The version of the OpenAPI document: 1.5.0 - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from Monei.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from Monei.exceptions import ApiAttributeError - - - -class PaymentPaymentMethodMbway(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - return { - 'phone_number': (str,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'phone_number': 'phoneNumber', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """PaymentPaymentMethodMbway - 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 - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - phone_number (str): Phone number in E.164 format used to pay with `mbway`.. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', True) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """PaymentPaymentMethodMbway - 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 - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - phone_number (str): Phone number in E.164 format used to pay with `mbway`.. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/Monei/model/payment_payment_method_paypal.py b/Monei/model/payment_payment_method_paypal.py deleted file mode 100644 index 7ed4dab..0000000 --- a/Monei/model/payment_payment_method_paypal.py +++ /dev/null @@ -1,263 +0,0 @@ -""" - MONEI API v1 - -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - - The version of the OpenAPI document: 1.5.0 - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from Monei.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from Monei.exceptions import ApiAttributeError - - - -class PaymentPaymentMethodPaypal(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - return { - 'order_id': (str,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'order_id': 'orderId', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """PaymentPaymentMethodPaypal - 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 - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - order_id (str): The Paypal's order ID.. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', True) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """PaymentPaymentMethodPaypal - 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 - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - order_id (str): The Paypal's order ID.. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/Monei/model/payment_payment_method_sepa.py b/Monei/model/payment_payment_method_sepa.py deleted file mode 100644 index c2a730c..0000000 --- a/Monei/model/payment_payment_method_sepa.py +++ /dev/null @@ -1,295 +0,0 @@ -""" - MONEI API v1 - -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - - The version of the OpenAPI document: 1.5.0 - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from Monei.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from Monei.exceptions import ApiAttributeError - - - -class PaymentPaymentMethodSepa(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - return { - 'accountholder_address': (str,), # noqa: E501 - 'accountholder_email': (str,), # noqa: E501 - 'accountholder_name': (str,), # noqa: E501 - 'country_code': (str,), # noqa: E501 - 'bank_address': (str,), # noqa: E501 - 'bank_code': (str,), # noqa: E501 - 'bank_name': (str,), # noqa: E501 - 'bic': (str,), # noqa: E501 - 'last4': (str,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'accountholder_address': 'accountholderAddress', # noqa: E501 - 'accountholder_email': 'accountholderEmail', # noqa: E501 - 'accountholder_name': 'accountholderName', # noqa: E501 - 'country_code': 'countryCode', # noqa: E501 - 'bank_address': 'bankAddress', # noqa: E501 - 'bank_code': 'bankCode', # noqa: E501 - 'bank_name': 'bankName', # noqa: E501 - 'bic': 'bic', # noqa: E501 - 'last4': 'last4', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """PaymentPaymentMethodSepa - 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 - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - accountholder_address (str): The address of the account holder.. [optional] # noqa: E501 - accountholder_email (str): The email of the account holder.. [optional] # noqa: E501 - accountholder_name (str): The name of the account holder.. [optional] # noqa: E501 - country_code (str): The country code of the account holder.. [optional] # noqa: E501 - bank_address (str): The address of the bank.. [optional] # noqa: E501 - bank_code (str): The code of the bank.. [optional] # noqa: E501 - bank_name (str): The name of the bank.. [optional] # noqa: E501 - bic (str): The BIC of the bank.. [optional] # noqa: E501 - last4 (str): The last 4 digits of the IBAN.. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', True) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """PaymentPaymentMethodSepa - 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 - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - accountholder_address (str): The address of the account holder.. [optional] # noqa: E501 - accountholder_email (str): The email of the account holder.. [optional] # noqa: E501 - accountholder_name (str): The name of the account holder.. [optional] # noqa: E501 - country_code (str): The country code of the account holder.. [optional] # noqa: E501 - bank_address (str): The address of the bank.. [optional] # noqa: E501 - bank_code (str): The code of the bank.. [optional] # noqa: E501 - bank_name (str): The name of the bank.. [optional] # noqa: E501 - bic (str): The BIC of the bank.. [optional] # noqa: E501 - last4 (str): The last 4 digits of the IBAN.. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/Monei/model/payment_payment_method_trustly.py b/Monei/model/payment_payment_method_trustly.py deleted file mode 100644 index fb78ff5..0000000 --- a/Monei/model/payment_payment_method_trustly.py +++ /dev/null @@ -1,263 +0,0 @@ -""" - MONEI API v1 - -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - - The version of the OpenAPI document: 1.5.0 - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from Monei.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from Monei.exceptions import ApiAttributeError - - - -class PaymentPaymentMethodTrustly(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - return { - 'customer_id': (str,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'customer_id': 'customerId', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """PaymentPaymentMethodTrustly - 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 - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - customer_id (str): The Trustly's customer ID.. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', True) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """PaymentPaymentMethodTrustly - 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 - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - customer_id (str): The Trustly's customer ID.. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/Monei/model/payment_payment_methods.py b/Monei/model/payment_payment_methods.py deleted file mode 100644 index d126669..0000000 --- a/Monei/model/payment_payment_methods.py +++ /dev/null @@ -1,286 +0,0 @@ -""" - MONEI API v1 - -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - - The version of the OpenAPI document: 1.5.0 - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from Monei.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from Monei.exceptions import ApiAttributeError - - - -class PaymentPaymentMethods(ModelSimple): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - additional_properties_type = None - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - return { - 'value': ([str],), - } - - @cached_property - def discriminator(): - return None - - - attribute_map = {} - - read_only_vars = set() - - _composed_schemas = None - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): - """PaymentPaymentMethods - a model defined in OpenAPI - - Note that value can be passed either in args or in kwargs, but not in both. - - Args: - args[0] ([str]): An array of allowed payment methods (used in hosted payment page). Must be enabled payment methods. Possible values: - `alipay` - `card` - `bizum` - `paypal` - `cofidis` - `cofidisLoan` - `mbway` - `multibanco` - `iDeal` - `bancontact` - `sofort` - `trustly` - `sepa` - `klarna` - `giropay` - `eps` - `blik` . # noqa: E501 - - Keyword Args: - value ([str]): An array of allowed payment methods (used in hosted payment page). Must be enabled payment methods. Possible values: - `alipay` - `card` - `bizum` - `paypal` - `cofidis` - `cofidisLoan` - `mbway` - `multibanco` - `iDeal` - `bancontact` - `sofort` - `trustly` - `sepa` - `klarna` - `giropay` - `eps` - `blik` . # 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. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - """ - # required up here when default value is not given - _path_to_item = kwargs.pop('_path_to_item', ()) - - if 'value' in kwargs: - value = kwargs.pop('value') - elif args: - args = list(args) - value = args.pop(0) - else: - raise ApiTypeError( - "value is required, but not passed in args or kwargs and doesn't have default", - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - self.value = value - if kwargs: - raise ApiTypeError( - "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( - kwargs, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): - """PaymentPaymentMethods - a model defined in OpenAPI - - Note that value can be passed either in args or in kwargs, but not in both. - - Args: - args[0] ([str]): An array of allowed payment methods (used in hosted payment page). Must be enabled payment methods. Possible values: - `alipay` - `card` - `bizum` - `paypal` - `cofidis` - `cofidisLoan` - `mbway` - `multibanco` - `iDeal` - `bancontact` - `sofort` - `trustly` - `sepa` - `klarna` - `giropay` - `eps` - `blik` . # noqa: E501 - - Keyword Args: - value ([str]): An array of allowed payment methods (used in hosted payment page). Must be enabled payment methods. Possible values: - `alipay` - `card` - `bizum` - `paypal` - `cofidis` - `cofidisLoan` - `mbway` - `multibanco` - `iDeal` - `bancontact` - `sofort` - `trustly` - `sepa` - `klarna` - `giropay` - `eps` - `blik` . # 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. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - """ - # required up here when default value is not given - _path_to_item = kwargs.pop('_path_to_item', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if 'value' in kwargs: - value = kwargs.pop('value') - elif args: - args = list(args) - value = args.pop(0) - else: - raise ApiTypeError( - "value is required, but not passed in args or kwargs and doesn't have default", - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - self.value = value - if kwargs: - raise ApiTypeError( - "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( - kwargs, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - return self diff --git a/Monei/model/payment_refund_reason.py b/Monei/model/payment_refund_reason.py deleted file mode 100644 index 53cce7e..0000000 --- a/Monei/model/payment_refund_reason.py +++ /dev/null @@ -1,291 +0,0 @@ -""" - MONEI API v1 - -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - - The version of the OpenAPI document: 1.5.0 - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from Monei.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from Monei.exceptions import ApiAttributeError - - - -class PaymentRefundReason(ModelSimple): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - ('value',): { - 'DUPLICATED': "duplicated", - 'FRAUDULENT': "fraudulent", - 'REQUESTED_BY_CUSTOMER': "requested_by_customer", - }, - } - - validations = { - } - - additional_properties_type = None - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - return { - 'value': (str,), - } - - @cached_property - def discriminator(): - return None - - - attribute_map = {} - - read_only_vars = set() - - _composed_schemas = None - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): - """PaymentRefundReason - a model defined in OpenAPI - - Note that value can be passed either in args or in kwargs, but not in both. - - Args: - args[0] (str): The reason for refunding the Payment.., must be one of ["duplicated", "fraudulent", "requested_by_customer", ] # noqa: E501 - - Keyword Args: - value (str): The reason for refunding the Payment.., must be one of ["duplicated", "fraudulent", "requested_by_customer", ] # 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. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - """ - # required up here when default value is not given - _path_to_item = kwargs.pop('_path_to_item', ()) - - if 'value' in kwargs: - value = kwargs.pop('value') - elif args: - args = list(args) - value = args.pop(0) - else: - raise ApiTypeError( - "value is required, but not passed in args or kwargs and doesn't have default", - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - self.value = value - if kwargs: - raise ApiTypeError( - "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( - kwargs, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): - """PaymentRefundReason - a model defined in OpenAPI - - Note that value can be passed either in args or in kwargs, but not in both. - - Args: - args[0] (str): The reason for refunding the Payment.., must be one of ["duplicated", "fraudulent", "requested_by_customer", ] # noqa: E501 - - Keyword Args: - value (str): The reason for refunding the Payment.., must be one of ["duplicated", "fraudulent", "requested_by_customer", ] # 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. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - """ - # required up here when default value is not given - _path_to_item = kwargs.pop('_path_to_item', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if 'value' in kwargs: - value = kwargs.pop('value') - elif args: - args = list(args) - value = args.pop(0) - else: - raise ApiTypeError( - "value is required, but not passed in args or kwargs and doesn't have default", - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - self.value = value - if kwargs: - raise ApiTypeError( - "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( - kwargs, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - return self diff --git a/Monei/model/payment_sequence.py b/Monei/model/payment_sequence.py deleted file mode 100644 index 69cec0a..0000000 --- a/Monei/model/payment_sequence.py +++ /dev/null @@ -1,284 +0,0 @@ -""" - MONEI API v1 - -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - - The version of the OpenAPI document: 1.5.0 - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from Monei.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from Monei.exceptions import ApiAttributeError - - -def lazy_import(): - from Monei.model.payment_sequence_recurring import PaymentSequenceRecurring - globals()['PaymentSequenceRecurring'] = PaymentSequenceRecurring - - -class PaymentSequence(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - ('type',): { - 'RECURRING': "recurring", - }, - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - lazy_import() - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - lazy_import() - return { - 'type': (str,), # noqa: E501 - 'recurring': (PaymentSequenceRecurring,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'type': 'type', # noqa: E501 - 'recurring': 'recurring', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """PaymentSequence - a model defined in OpenAPI - - Args: - - Keyword Args: - type (str): defaults to "recurring", must be one of ["recurring", ] # 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. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - recurring (PaymentSequenceRecurring): [optional] # noqa: E501 - """ - - type = kwargs.get('type', "recurring") - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', True) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - 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 \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """PaymentSequence - a model defined in OpenAPI - - Args: - - Keyword Args: - type (str): defaults to "recurring", must be one of ["recurring", ] # 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. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - recurring (PaymentSequenceRecurring): [optional] # noqa: E501 - """ - - type = kwargs.get('type', "recurring") - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - 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 \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/Monei/model/payment_sequence_recurring.py b/Monei/model/payment_sequence_recurring.py deleted file mode 100644 index 8aaa6ad..0000000 --- a/Monei/model/payment_sequence_recurring.py +++ /dev/null @@ -1,267 +0,0 @@ -""" - MONEI API v1 - -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - - The version of the OpenAPI document: 1.5.0 - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from Monei.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from Monei.exceptions import ApiAttributeError - - - -class PaymentSequenceRecurring(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - return { - 'expiry': (str,), # noqa: E501 - 'frequency': (int,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'expiry': 'expiry', # noqa: E501 - 'frequency': 'frequency', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """PaymentSequenceRecurring - 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 - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - expiry (str): Date after which no further recurring payments will be performed. Must be formatted as `YYYYMMDD`. . [optional] if omitted the server will use the default value of "*(The payment method or card expiration)*" # noqa: E501 - frequency (int): The minimum number of **days** between the different recurring payments. . [optional] if omitted the server will use the default value of 25 # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', True) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """PaymentSequenceRecurring - 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 - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - expiry (str): Date after which no further recurring payments will be performed. Must be formatted as `YYYYMMDD`. . [optional] if omitted the server will use the default value of "*(The payment method or card expiration)*" # noqa: E501 - frequency (int): The minimum number of **days** between the different recurring payments. . [optional] if omitted the server will use the default value of 25 # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/Monei/model/payment_session_details.py b/Monei/model/payment_session_details.py deleted file mode 100644 index 8927444..0000000 --- a/Monei/model/payment_session_details.py +++ /dev/null @@ -1,327 +0,0 @@ -""" - MONEI API v1 - -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - - The version of the OpenAPI document: 1.5.0 - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from Monei.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from Monei.exceptions import ApiAttributeError - - - -class PaymentSessionDetails(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - return { - 'ip': (str,), # noqa: E501 - 'country_code': (str,), # noqa: E501 - 'lang': (str,), # noqa: E501 - 'device_type': (str,), # noqa: E501 - 'device_model': (str,), # noqa: E501 - 'browser': (str,), # noqa: E501 - 'browser_version': (str,), # noqa: E501 - 'os': (str,), # noqa: E501 - 'os_version': (str,), # noqa: E501 - 'source': (str,), # noqa: E501 - 'source_version': (str,), # noqa: E501 - 'user_agent': (str,), # noqa: E501 - 'browser_accept': (str,), # noqa: E501 - 'browser_color_depth': (int,), # noqa: E501 - 'browser_screen_height': (int,), # noqa: E501 - 'browser_screen_width': (int,), # noqa: E501 - 'browser_timezone_offset': (str,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'ip': 'ip', # noqa: E501 - 'country_code': 'countryCode', # noqa: E501 - 'lang': 'lang', # noqa: E501 - 'device_type': 'deviceType', # noqa: E501 - 'device_model': 'deviceModel', # noqa: E501 - 'browser': 'browser', # noqa: E501 - 'browser_version': 'browserVersion', # noqa: E501 - 'os': 'os', # noqa: E501 - 'os_version': 'osVersion', # noqa: E501 - 'source': 'source', # noqa: E501 - 'source_version': 'sourceVersion', # noqa: E501 - 'user_agent': 'userAgent', # noqa: E501 - 'browser_accept': 'browserAccept', # noqa: E501 - 'browser_color_depth': 'browserColorDepth', # noqa: E501 - 'browser_screen_height': 'browserScreenHeight', # noqa: E501 - 'browser_screen_width': 'browserScreenWidth', # noqa: E501 - 'browser_timezone_offset': 'browserTimezoneOffset', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """PaymentSessionDetails - 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 - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - ip (str): The IP address where the operation originated.. [optional] # noqa: E501 - country_code (str): Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).. [optional] # noqa: E501 - lang (str): Two-letter language code ([ISO 639-1](https://en.wikipedia.org/wiki/ISO_639-1)).. [optional] # noqa: E501 - device_type (str): Device type, could be `desktop`, `mobile`, `smartTV`, `tablet`.. [optional] # noqa: E501 - device_model (str): Information about the device used for the browser session (e.g., `iPhone`).. [optional] # noqa: E501 - browser (str): The browser used in this browser session (e.g., `Mobile Safari`).. [optional] # noqa: E501 - browser_version (str): The version for the browser session (e.g., `13.1.1`).. [optional] # noqa: E501 - os (str): Operation system (e.g., `iOS`).. [optional] # noqa: E501 - os_version (str): Operation system version (e.g., `13.5.1`).. [optional] # noqa: E501 - source (str): The source component from where the operation was generated (mostly for our SDK's).. [optional] # noqa: E501 - source_version (str): The source component version from where the operation was generated (mostly for our SDK's).. [optional] # noqa: E501 - user_agent (str): Full user agent string of the browser session.. [optional] # noqa: E501 - browser_accept (str): Browser accept header.. [optional] # noqa: E501 - browser_color_depth (int): The color depth of the browser session (e.g., `24`).. [optional] # noqa: E501 - browser_screen_height (int): The screen height of the browser session (e.g., `1152`).. [optional] # noqa: E501 - browser_screen_width (int): The screen width of the browser session (e.g., `2048`).. [optional] # noqa: E501 - browser_timezone_offset (str): The timezone offset of the browser session (e.g., `-120`).. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', True) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """PaymentSessionDetails - 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 - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - ip (str): The IP address where the operation originated.. [optional] # noqa: E501 - country_code (str): Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).. [optional] # noqa: E501 - lang (str): Two-letter language code ([ISO 639-1](https://en.wikipedia.org/wiki/ISO_639-1)).. [optional] # noqa: E501 - device_type (str): Device type, could be `desktop`, `mobile`, `smartTV`, `tablet`.. [optional] # noqa: E501 - device_model (str): Information about the device used for the browser session (e.g., `iPhone`).. [optional] # noqa: E501 - browser (str): The browser used in this browser session (e.g., `Mobile Safari`).. [optional] # noqa: E501 - browser_version (str): The version for the browser session (e.g., `13.1.1`).. [optional] # noqa: E501 - os (str): Operation system (e.g., `iOS`).. [optional] # noqa: E501 - os_version (str): Operation system version (e.g., `13.5.1`).. [optional] # noqa: E501 - source (str): The source component from where the operation was generated (mostly for our SDK's).. [optional] # noqa: E501 - source_version (str): The source component version from where the operation was generated (mostly for our SDK's).. [optional] # noqa: E501 - user_agent (str): Full user agent string of the browser session.. [optional] # noqa: E501 - browser_accept (str): Browser accept header.. [optional] # noqa: E501 - browser_color_depth (int): The color depth of the browser session (e.g., `24`).. [optional] # noqa: E501 - browser_screen_height (int): The screen height of the browser session (e.g., `1152`).. [optional] # noqa: E501 - browser_screen_width (int): The screen width of the browser session (e.g., `2048`).. [optional] # noqa: E501 - browser_timezone_offset (str): The timezone offset of the browser session (e.g., `-120`).. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/Monei/model/payment_shipping_details.py b/Monei/model/payment_shipping_details.py deleted file mode 100644 index b2839ce..0000000 --- a/Monei/model/payment_shipping_details.py +++ /dev/null @@ -1,289 +0,0 @@ -""" - MONEI API v1 - -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - - The version of the OpenAPI document: 1.5.0 - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from Monei.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from Monei.exceptions import ApiAttributeError - - -def lazy_import(): - from Monei.model.address import Address - globals()['Address'] = Address - - -class PaymentShippingDetails(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - lazy_import() - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - lazy_import() - return { - 'name': (str,), # noqa: E501 - 'email': (str,), # noqa: E501 - 'phone': (str,), # noqa: E501 - 'company': (str,), # noqa: E501 - 'tax_id': (str,), # noqa: E501 - 'address': (Address,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'name': 'name', # noqa: E501 - 'email': 'email', # noqa: E501 - 'phone': 'phone', # noqa: E501 - 'company': 'company', # noqa: E501 - 'tax_id': 'taxId', # noqa: E501 - 'address': 'address', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """PaymentShippingDetails - 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 - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - name (str): The shipping customer's full name.. [optional] # noqa: E501 - email (str): The shipping customer's email address.. [optional] # noqa: E501 - phone (str): The shipping customer's phone number in E.164 format.. [optional] # noqa: E501 - company (str): Name of the company where the shipment is going.. [optional] # noqa: E501 - tax_id (str): Company tax ID.. [optional] # noqa: E501 - address (Address): [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', True) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """PaymentShippingDetails - 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 - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - name (str): The shipping customer's full name.. [optional] # noqa: E501 - email (str): The shipping customer's email address.. [optional] # noqa: E501 - phone (str): The shipping customer's phone number in E.164 format.. [optional] # noqa: E501 - company (str): Name of the company where the shipment is going.. [optional] # noqa: E501 - tax_id (str): Company tax ID.. [optional] # noqa: E501 - address (Address): [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/Monei/model/payment_shop.py b/Monei/model/payment_shop.py deleted file mode 100644 index b30477c..0000000 --- a/Monei/model/payment_shop.py +++ /dev/null @@ -1,267 +0,0 @@ -""" - MONEI API v1 - -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - - The version of the OpenAPI document: 1.5.0 - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from Monei.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from Monei.exceptions import ApiAttributeError - - - -class PaymentShop(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - return { - 'name': (str,), # noqa: E501 - 'country': (str,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'name': 'name', # noqa: E501 - 'country': 'country', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """PaymentShop - 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 - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - name (str): The shop name.. [optional] # noqa: E501 - country (str): Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', True) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """PaymentShop - 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 - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - name (str): The shop name.. [optional] # noqa: E501 - country (str): Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/Monei/model/payment_status.py b/Monei/model/payment_status.py deleted file mode 100644 index a26caea..0000000 --- a/Monei/model/payment_status.py +++ /dev/null @@ -1,296 +0,0 @@ -""" - MONEI API v1 - -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - - The version of the OpenAPI document: 1.5.0 - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from Monei.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from Monei.exceptions import ApiAttributeError - - - -class PaymentStatus(ModelSimple): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - ('value',): { - 'SUCCEEDED': "SUCCEEDED", - 'PENDING': "PENDING", - 'FAILED': "FAILED", - 'CANCELED': "CANCELED", - 'REFUNDED': "REFUNDED", - 'PARTIALLY_REFUNDED': "PARTIALLY_REFUNDED", - 'AUTHORIZED': "AUTHORIZED", - 'EXPIRED': "EXPIRED", - }, - } - - validations = { - } - - additional_properties_type = None - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - return { - 'value': (str,), - } - - @cached_property - def discriminator(): - return None - - - attribute_map = {} - - read_only_vars = set() - - _composed_schemas = None - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): - """PaymentStatus - a model defined in OpenAPI - - Note that value can be passed either in args or in kwargs, but not in both. - - Args: - args[0] (str): The status of the payment.., must be one of ["SUCCEEDED", "PENDING", "FAILED", "CANCELED", "REFUNDED", "PARTIALLY_REFUNDED", "AUTHORIZED", "EXPIRED", ] # noqa: E501 - - Keyword Args: - value (str): The status of the payment.., must be one of ["SUCCEEDED", "PENDING", "FAILED", "CANCELED", "REFUNDED", "PARTIALLY_REFUNDED", "AUTHORIZED", "EXPIRED", ] # 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. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - """ - # required up here when default value is not given - _path_to_item = kwargs.pop('_path_to_item', ()) - - if 'value' in kwargs: - value = kwargs.pop('value') - elif args: - args = list(args) - value = args.pop(0) - else: - raise ApiTypeError( - "value is required, but not passed in args or kwargs and doesn't have default", - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - self.value = value - if kwargs: - raise ApiTypeError( - "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( - kwargs, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): - """PaymentStatus - a model defined in OpenAPI - - Note that value can be passed either in args or in kwargs, but not in both. - - Args: - args[0] (str): The status of the payment.., must be one of ["SUCCEEDED", "PENDING", "FAILED", "CANCELED", "REFUNDED", "PARTIALLY_REFUNDED", "AUTHORIZED", "EXPIRED", ] # noqa: E501 - - Keyword Args: - value (str): The status of the payment.., must be one of ["SUCCEEDED", "PENDING", "FAILED", "CANCELED", "REFUNDED", "PARTIALLY_REFUNDED", "AUTHORIZED", "EXPIRED", ] # 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. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - """ - # required up here when default value is not given - _path_to_item = kwargs.pop('_path_to_item', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if 'value' in kwargs: - value = kwargs.pop('value') - elif args: - args = list(args) - value = args.pop(0) - else: - raise ApiTypeError( - "value is required, but not passed in args or kwargs and doesn't have default", - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - self.value = value - if kwargs: - raise ApiTypeError( - "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( - kwargs, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - return self diff --git a/Monei/model/payment_trace_details.py b/Monei/model/payment_trace_details.py deleted file mode 100644 index 9cf24c7..0000000 --- a/Monei/model/payment_trace_details.py +++ /dev/null @@ -1,335 +0,0 @@ -""" - MONEI API v1 - -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - - The version of the OpenAPI document: 1.5.0 - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from Monei.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from Monei.exceptions import ApiAttributeError - - - -class PaymentTraceDetails(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - return { - 'ip': (str,), # noqa: E501 - 'country_code': (str,), # noqa: E501 - 'lang': (str,), # noqa: E501 - 'device_type': (str,), # noqa: E501 - 'device_model': (str,), # noqa: E501 - 'browser': (str,), # noqa: E501 - 'browser_version': (str,), # noqa: E501 - 'os': (str,), # noqa: E501 - 'os_version': (str,), # noqa: E501 - 'source': (str,), # noqa: E501 - 'source_version': (str,), # noqa: E501 - 'user_agent': (str,), # noqa: E501 - 'browser_accept': (str,), # noqa: E501 - 'browser_color_depth': (int,), # noqa: E501 - 'browser_screen_height': (int,), # noqa: E501 - 'browser_screen_width': (int,), # noqa: E501 - 'browser_timezone_offset': (str,), # noqa: E501 - 'user_id': (str,), # noqa: E501 - 'user_email': (str,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'ip': 'ip', # noqa: E501 - 'country_code': 'countryCode', # noqa: E501 - 'lang': 'lang', # noqa: E501 - 'device_type': 'deviceType', # noqa: E501 - 'device_model': 'deviceModel', # noqa: E501 - 'browser': 'browser', # noqa: E501 - 'browser_version': 'browserVersion', # noqa: E501 - 'os': 'os', # noqa: E501 - 'os_version': 'osVersion', # noqa: E501 - 'source': 'source', # noqa: E501 - 'source_version': 'sourceVersion', # noqa: E501 - 'user_agent': 'userAgent', # noqa: E501 - 'browser_accept': 'browserAccept', # noqa: E501 - 'browser_color_depth': 'browserColorDepth', # noqa: E501 - 'browser_screen_height': 'browserScreenHeight', # noqa: E501 - 'browser_screen_width': 'browserScreenWidth', # noqa: E501 - 'browser_timezone_offset': 'browserTimezoneOffset', # noqa: E501 - 'user_id': 'userId', # noqa: E501 - 'user_email': 'userEmail', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """PaymentTraceDetails - 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 - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - ip (str): The IP address where the operation originated.. [optional] # noqa: E501 - country_code (str): Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).. [optional] # noqa: E501 - lang (str): Two-letter language code ([ISO 639-1](https://en.wikipedia.org/wiki/ISO_639-1)).. [optional] # noqa: E501 - device_type (str): Device type, could be `desktop`, `mobile`, `smartTV`, `tablet`.. [optional] # noqa: E501 - device_model (str): Information about the device used for the browser session (e.g., `iPhone`).. [optional] # noqa: E501 - browser (str): The browser used in this browser session (e.g., `Mobile Safari`).. [optional] # noqa: E501 - browser_version (str): The version for the browser session (e.g., `13.1.1`).. [optional] # noqa: E501 - os (str): Operation system (e.g., `iOS`).. [optional] # noqa: E501 - os_version (str): Operation system version (e.g., `13.5.1`).. [optional] # noqa: E501 - source (str): The source component from where the operation was generated (mostly for our SDK's).. [optional] # noqa: E501 - source_version (str): The source component version from where the operation was generated (mostly for our SDK's).. [optional] # noqa: E501 - user_agent (str): Full user agent string of the browser session.. [optional] # noqa: E501 - browser_accept (str): Browser accept header.. [optional] # noqa: E501 - browser_color_depth (int): The color depth of the browser session (e.g., `24`).. [optional] # noqa: E501 - browser_screen_height (int): The screen height of the browser session (e.g., `1152`).. [optional] # noqa: E501 - browser_screen_width (int): The screen width of the browser session (e.g., `2048`).. [optional] # noqa: E501 - browser_timezone_offset (str): The timezone offset of the browser session (e.g., `-120`).. [optional] # noqa: E501 - user_id (str): The ID of the user that started the operation.. [optional] # noqa: E501 - user_email (str): The email of the user that started the operation.. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', True) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """PaymentTraceDetails - 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 - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - ip (str): The IP address where the operation originated.. [optional] # noqa: E501 - country_code (str): Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).. [optional] # noqa: E501 - lang (str): Two-letter language code ([ISO 639-1](https://en.wikipedia.org/wiki/ISO_639-1)).. [optional] # noqa: E501 - device_type (str): Device type, could be `desktop`, `mobile`, `smartTV`, `tablet`.. [optional] # noqa: E501 - device_model (str): Information about the device used for the browser session (e.g., `iPhone`).. [optional] # noqa: E501 - browser (str): The browser used in this browser session (e.g., `Mobile Safari`).. [optional] # noqa: E501 - browser_version (str): The version for the browser session (e.g., `13.1.1`).. [optional] # noqa: E501 - os (str): Operation system (e.g., `iOS`).. [optional] # noqa: E501 - os_version (str): Operation system version (e.g., `13.5.1`).. [optional] # noqa: E501 - source (str): The source component from where the operation was generated (mostly for our SDK's).. [optional] # noqa: E501 - source_version (str): The source component version from where the operation was generated (mostly for our SDK's).. [optional] # noqa: E501 - user_agent (str): Full user agent string of the browser session.. [optional] # noqa: E501 - browser_accept (str): Browser accept header.. [optional] # noqa: E501 - browser_color_depth (int): The color depth of the browser session (e.g., `24`).. [optional] # noqa: E501 - browser_screen_height (int): The screen height of the browser session (e.g., `1152`).. [optional] # noqa: E501 - browser_screen_width (int): The screen width of the browser session (e.g., `2048`).. [optional] # noqa: E501 - browser_timezone_offset (str): The timezone offset of the browser session (e.g., `-120`).. [optional] # noqa: E501 - user_id (str): The ID of the user that started the operation.. [optional] # noqa: E501 - user_email (str): The email of the user that started the operation.. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/Monei/model/payment_transaction_type.py b/Monei/model/payment_transaction_type.py deleted file mode 100644 index 4283806..0000000 --- a/Monei/model/payment_transaction_type.py +++ /dev/null @@ -1,284 +0,0 @@ -""" - MONEI API v1 - -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - - The version of the OpenAPI document: 1.5.0 - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from Monei.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from Monei.exceptions import ApiAttributeError - - - -class PaymentTransactionType(ModelSimple): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - ('value',): { - 'SALE': "SALE", - 'AUTH': "AUTH", - 'PAYOUT': "PAYOUT", - 'VERIF': "VERIF", - }, - } - - validations = { - } - - additional_properties_type = None - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - return { - 'value': (str,), - } - - @cached_property - def discriminator(): - return None - - - attribute_map = {} - - read_only_vars = set() - - _composed_schemas = None - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): - """PaymentTransactionType - a model defined in OpenAPI - - Note that value can be passed either in args or in kwargs, but not in both. - - Args: - args[0] (str): Controls when the funds will be captured. - `SALE` - **Default**. MONEI automatically captures funds when the customer authorizes the payment. - `AUTH` - Place a hold on the funds when the customer authorizes the payment, but don't capture the funds until later. - `PAYOUT` - Send funds to the customer - `VERIF` - Verify the card without placing a hold or capturing funds. . if omitted defaults to "SALE", must be one of ["SALE", "AUTH", "PAYOUT", "VERIF", ] # noqa: E501 - - Keyword Args: - value (str): Controls when the funds will be captured. - `SALE` - **Default**. MONEI automatically captures funds when the customer authorizes the payment. - `AUTH` - Place a hold on the funds when the customer authorizes the payment, but don't capture the funds until later. - `PAYOUT` - Send funds to the customer - `VERIF` - Verify the card without placing a hold or capturing funds. . if omitted defaults to "SALE", must be one of ["SALE", "AUTH", "PAYOUT", "VERIF", ] # 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. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - """ - # required up here when default value is not given - _path_to_item = kwargs.pop('_path_to_item', ()) - - if 'value' in kwargs: - value = kwargs.pop('value') - elif args: - args = list(args) - value = args.pop(0) - else: - value = "SALE" - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - self.value = value - if kwargs: - raise ApiTypeError( - "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( - kwargs, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): - """PaymentTransactionType - a model defined in OpenAPI - - Note that value can be passed either in args or in kwargs, but not in both. - - Args: - args[0] (str): Controls when the funds will be captured. - `SALE` - **Default**. MONEI automatically captures funds when the customer authorizes the payment. - `AUTH` - Place a hold on the funds when the customer authorizes the payment, but don't capture the funds until later. - `PAYOUT` - Send funds to the customer - `VERIF` - Verify the card without placing a hold or capturing funds. . if omitted defaults to "SALE", must be one of ["SALE", "AUTH", "PAYOUT", "VERIF", ] # noqa: E501 - - Keyword Args: - value (str): Controls when the funds will be captured. - `SALE` - **Default**. MONEI automatically captures funds when the customer authorizes the payment. - `AUTH` - Place a hold on the funds when the customer authorizes the payment, but don't capture the funds until later. - `PAYOUT` - Send funds to the customer - `VERIF` - Verify the card without placing a hold or capturing funds. . if omitted defaults to "SALE", must be one of ["SALE", "AUTH", "PAYOUT", "VERIF", ] # 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. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - """ - # required up here when default value is not given - _path_to_item = kwargs.pop('_path_to_item', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if 'value' in kwargs: - value = kwargs.pop('value') - elif args: - args = list(args) - value = args.pop(0) - else: - value = "SALE" - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - self.value = value - if kwargs: - raise ApiTypeError( - "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( - kwargs, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - return self diff --git a/Monei/model/recurring_payment_request.py b/Monei/model/recurring_payment_request.py deleted file mode 100644 index 622792a..0000000 --- a/Monei/model/recurring_payment_request.py +++ /dev/null @@ -1,313 +0,0 @@ -""" - MONEI API v1 - -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - - The version of the OpenAPI document: 1.5.0 - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from Monei.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from Monei.exceptions import ApiAttributeError - - -def lazy_import(): - from Monei.model.payment_billing_details import PaymentBillingDetails - from Monei.model.payment_customer import PaymentCustomer - from Monei.model.payment_shipping_details import PaymentShippingDetails - from Monei.model.payment_transaction_type import PaymentTransactionType - globals()['PaymentBillingDetails'] = PaymentBillingDetails - globals()['PaymentCustomer'] = PaymentCustomer - globals()['PaymentShippingDetails'] = PaymentShippingDetails - globals()['PaymentTransactionType'] = PaymentTransactionType - - -class RecurringPaymentRequest(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - lazy_import() - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - lazy_import() - return { - 'order_id': (str,), # noqa: E501 - 'amount': (bool, date, datetime, dict, float, int, list, str, none_type,), # noqa: E501 - 'transaction_type': (bool, date, datetime, dict, float, int, list, str, none_type,), # noqa: E501 - 'description': (str,), # noqa: E501 - 'customer': (PaymentCustomer,), # noqa: E501 - 'billing_details': (PaymentBillingDetails,), # noqa: E501 - 'shipping_details': (PaymentShippingDetails,), # noqa: E501 - 'callback_url': (str,), # noqa: E501 - 'metadata': ({str: (bool, date, datetime, dict, float, int, list, str, none_type)},), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'order_id': 'orderId', # noqa: E501 - 'amount': 'amount', # noqa: E501 - 'transaction_type': 'transactionType', # noqa: E501 - 'description': 'description', # noqa: E501 - 'customer': 'customer', # noqa: E501 - 'billing_details': 'billingDetails', # noqa: E501 - 'shipping_details': 'shippingDetails', # noqa: E501 - 'callback_url': 'callbackUrl', # noqa: E501 - 'metadata': 'metadata', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, order_id, *args, **kwargs): # noqa: E501 - """RecurringPaymentRequest - a model defined in OpenAPI - - Args: - order_id (str): An order ID from your system. A unique identifier that can be used to reconcile the payment with your internal system. - - Keyword Args: - _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. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - amount (bool, date, datetime, dict, float, int, list, str, none_type): The amount to collected by this subsequent payment. A positive integer representing how much to charge in the smallest currency unit (e.g., 100 cents to charge 1.00 USD). . [optional] # noqa: E501 - transaction_type (bool, date, datetime, dict, float, int, list, str, none_type): Same as the `transactionType` parameter from [create payment](https://docs.monei.com/api/#operation/payments_create). If not sent, it will default in the same transaction type used in the initial payment. . [optional] # noqa: E501 - description (str): An arbitrary string attached to the payment. Often useful for displaying to users. . [optional] # noqa: E501 - customer (PaymentCustomer): [optional] # noqa: E501 - billing_details (PaymentBillingDetails): [optional] # noqa: E501 - shipping_details (PaymentShippingDetails): [optional] # noqa: E501 - callback_url (str): The URL to which a payment result should be sent asynchronously. . [optional] # noqa: E501 - metadata ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}): A set of key-value pairs that you can attach to a resource. This can be useful for storing additional information about the resource in a structured format.. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', True) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - self.order_id = order_id - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, order_id, *args, **kwargs): # noqa: E501 - """RecurringPaymentRequest - a model defined in OpenAPI - - Args: - order_id (str): An order ID from your system. A unique identifier that can be used to reconcile the payment with your internal system. - - Keyword Args: - _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. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - amount (bool, date, datetime, dict, float, int, list, str, none_type): The amount to collected by this subsequent payment. A positive integer representing how much to charge in the smallest currency unit (e.g., 100 cents to charge 1.00 USD). . [optional] # noqa: E501 - transaction_type (bool, date, datetime, dict, float, int, list, str, none_type): Same as the `transactionType` parameter from [create payment](https://docs.monei.com/api/#operation/payments_create). If not sent, it will default in the same transaction type used in the initial payment. . [optional] # noqa: E501 - description (str): An arbitrary string attached to the payment. Often useful for displaying to users. . [optional] # noqa: E501 - customer (PaymentCustomer): [optional] # noqa: E501 - billing_details (PaymentBillingDetails): [optional] # noqa: E501 - shipping_details (PaymentShippingDetails): [optional] # noqa: E501 - callback_url (str): The URL to which a payment result should be sent asynchronously. . [optional] # noqa: E501 - metadata ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}): A set of key-value pairs that you can attach to a resource. This can be useful for storing additional information about the resource in a structured format.. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - self.order_id = order_id - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/Monei/model/refund_payment_request.py b/Monei/model/refund_payment_request.py deleted file mode 100644 index ff8d834..0000000 --- a/Monei/model/refund_payment_request.py +++ /dev/null @@ -1,273 +0,0 @@ -""" - MONEI API v1 - -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - - The version of the OpenAPI document: 1.5.0 - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from Monei.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from Monei.exceptions import ApiAttributeError - - -def lazy_import(): - from Monei.model.payment_refund_reason import PaymentRefundReason - globals()['PaymentRefundReason'] = PaymentRefundReason - - -class RefundPaymentRequest(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - lazy_import() - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - lazy_import() - return { - 'amount': (bool, date, datetime, dict, float, int, list, str, none_type,), # noqa: E501 - 'refund_reason': (PaymentRefundReason,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'amount': 'amount', # noqa: E501 - 'refund_reason': 'refundReason', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """RefundPaymentRequest - 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 - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - amount (bool, date, datetime, dict, float, int, list, str, none_type): The amount to refund, which must be less than or equal to the original amount. . [optional] # noqa: E501 - refund_reason (PaymentRefundReason): [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', True) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """RefundPaymentRequest - 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 - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - amount (bool, date, datetime, dict, float, int, list, str, none_type): The amount to refund, which must be less than or equal to the original amount. . [optional] # noqa: E501 - refund_reason (PaymentRefundReason): [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/Monei/model/register_apple_pay_domain_request.py b/Monei/model/register_apple_pay_domain_request.py deleted file mode 100644 index 2a71170..0000000 --- a/Monei/model/register_apple_pay_domain_request.py +++ /dev/null @@ -1,269 +0,0 @@ -""" - MONEI API v1 - -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - - The version of the OpenAPI document: 1.5.0 - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from Monei.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from Monei.exceptions import ApiAttributeError - - - -class RegisterApplePayDomainRequest(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - return { - 'domain_name': (str,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'domain_name': 'domainName', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, domain_name, *args, **kwargs): # noqa: E501 - """RegisterApplePayDomainRequest - a model defined in OpenAPI - - Args: - domain_name (str): The domain name to register for Apple Pay. - - Keyword Args: - _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. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', True) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - self.domain_name = domain_name - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, domain_name, *args, **kwargs): # noqa: E501 - """RegisterApplePayDomainRequest - a model defined in OpenAPI - - Args: - domain_name (str): The domain name to register for Apple Pay. - - Keyword Args: - _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. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - self.domain_name = domain_name - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/Monei/model/register_domain_request.py b/Monei/model/register_domain_request.py deleted file mode 100644 index 1d1a9f2..0000000 --- a/Monei/model/register_domain_request.py +++ /dev/null @@ -1,269 +0,0 @@ -""" - MONEI API v1 - -

The MONEI API is organized around REST. Our API has predictable resource-oriented URLs, accepts JSON-encoded request bodies, returns JSON-encoded responses, and uses standard HTTP response codes, authentication, and verbs.

Base URL:

https://api.monei.com/v1

Client libraries:

Important:

If you are not using our official SDKs, you need to provide a valid User-Agent header in each request, otherwise your requests will be rejected.

# noqa: E501 - - The version of the OpenAPI document: 1.2.2 - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from Monei.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from Monei.exceptions import ApiAttributeError - - - -class RegisterDomainRequest(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - return { - 'domain_name': (str,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'domain_name': 'domainName', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, domain_name, *args, **kwargs): # noqa: E501 - """RegisterDomainRequest - a model defined in OpenAPI - - Args: - domain_name (str): The domain name to register for Apple Pay. - - Keyword Args: - _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. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', True) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - self.domain_name = domain_name - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, domain_name, *args, **kwargs): # noqa: E501 - """RegisterDomainRequest - a model defined in OpenAPI - - Args: - domain_name (str): The domain name to register for Apple Pay. - - Keyword Args: - _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. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - self.domain_name = domain_name - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/Monei/model/send_payment_link_request.py b/Monei/model/send_payment_link_request.py deleted file mode 100644 index a4ef8dc..0000000 --- a/Monei/model/send_payment_link_request.py +++ /dev/null @@ -1,283 +0,0 @@ -""" - MONEI API v1 - -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - - The version of the OpenAPI document: 1.5.0 - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from Monei.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from Monei.exceptions import ApiAttributeError - - -def lazy_import(): - from Monei.model.payment_message_channel import PaymentMessageChannel - from Monei.model.payment_message_language import PaymentMessageLanguage - globals()['PaymentMessageChannel'] = PaymentMessageChannel - globals()['PaymentMessageLanguage'] = PaymentMessageLanguage - - -class SendPaymentLinkRequest(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - lazy_import() - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - lazy_import() - return { - 'customer_email': (str,), # noqa: E501 - 'customer_phone': (str,), # noqa: E501 - 'channel': (PaymentMessageChannel,), # noqa: E501 - 'language': (PaymentMessageLanguage,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'customer_email': 'customerEmail', # noqa: E501 - 'customer_phone': 'customerPhone', # noqa: E501 - 'channel': 'channel', # noqa: E501 - 'language': 'language', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """SendPaymentLinkRequest - 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 - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - customer_email (str): The customer will receive payment link on this email address.. [optional] # noqa: E501 - customer_phone (str): Phone number in E.164 format. The customer will receive payment link on this phone number.. [optional] # noqa: E501 - channel (PaymentMessageChannel): [optional] # noqa: E501 - language (PaymentMessageLanguage): [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', True) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """SendPaymentLinkRequest - 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 - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - customer_email (str): The customer will receive payment link on this email address.. [optional] # noqa: E501 - customer_phone (str): Phone number in E.164 format. The customer will receive payment link on this phone number.. [optional] # noqa: E501 - channel (PaymentMessageChannel): [optional] # noqa: E501 - language (PaymentMessageLanguage): [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/Monei/model/send_payment_receipt_request.py b/Monei/model/send_payment_receipt_request.py deleted file mode 100644 index cd8d6b7..0000000 --- a/Monei/model/send_payment_receipt_request.py +++ /dev/null @@ -1,283 +0,0 @@ -""" - MONEI API v1 - -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - - The version of the OpenAPI document: 1.5.0 - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from Monei.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from Monei.exceptions import ApiAttributeError - - -def lazy_import(): - from Monei.model.payment_message_channel import PaymentMessageChannel - from Monei.model.payment_message_language import PaymentMessageLanguage - globals()['PaymentMessageChannel'] = PaymentMessageChannel - globals()['PaymentMessageLanguage'] = PaymentMessageLanguage - - -class SendPaymentReceiptRequest(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - lazy_import() - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - lazy_import() - return { - 'customer_email': (str,), # noqa: E501 - 'customer_phone': (str,), # noqa: E501 - 'channel': (PaymentMessageChannel,), # noqa: E501 - 'language': (PaymentMessageLanguage,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'customer_email': 'customerEmail', # noqa: E501 - 'customer_phone': 'customerPhone', # noqa: E501 - 'channel': 'channel', # noqa: E501 - 'language': 'language', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """SendPaymentReceiptRequest - 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 - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - customer_email (str): The customer will receive payment receipt on this email address.. [optional] # noqa: E501 - customer_phone (str): Phone number in E.164 format. The customer will receive payment receipt link on this phone number.. [optional] # noqa: E501 - channel (PaymentMessageChannel): [optional] # noqa: E501 - language (PaymentMessageLanguage): [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', True) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """SendPaymentReceiptRequest - 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 - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - customer_email (str): The customer will receive payment receipt on this email address.. [optional] # noqa: E501 - customer_phone (str): Phone number in E.164 format. The customer will receive payment receipt link on this phone number.. [optional] # noqa: E501 - channel (PaymentMessageChannel): [optional] # noqa: E501 - language (PaymentMessageLanguage): [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/Monei/model/send_payment_request_request.py b/Monei/model/send_payment_request_request.py deleted file mode 100644 index 3776237..0000000 --- a/Monei/model/send_payment_request_request.py +++ /dev/null @@ -1,279 +0,0 @@ -""" - MONEI API v1 - -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - - The version of the OpenAPI document: 1.5.0 - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from Monei.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from Monei.exceptions import ApiAttributeError - - -def lazy_import(): - from Monei.model.payment_message_language import PaymentMessageLanguage - globals()['PaymentMessageLanguage'] = PaymentMessageLanguage - - -class SendPaymentRequestRequest(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - lazy_import() - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - lazy_import() - return { - 'phone_number': (str,), # noqa: E501 - 'language': (PaymentMessageLanguage,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'phone_number': 'phoneNumber', # noqa: E501 - 'language': 'language', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, phone_number, *args, **kwargs): # noqa: E501 - """SendPaymentRequestRequest - a model defined in OpenAPI - - Args: - phone_number (str): Phone number in E.164 format. The customer will receive payment link on this phone number. - - Keyword Args: - _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. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - language (PaymentMessageLanguage): [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', True) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - self.phone_number = phone_number - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, phone_number, *args, **kwargs): # noqa: E501 - """SendPaymentRequestRequest - a model defined in OpenAPI - - Args: - phone_number (str): Phone number in E.164 format. The customer will receive payment link on this phone number. - - Keyword Args: - _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. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - language (PaymentMessageLanguage): [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - self.phone_number = phone_number - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/Monei/model/send_subscription_link_request.py b/Monei/model/send_subscription_link_request.py deleted file mode 100644 index 21f2b52..0000000 --- a/Monei/model/send_subscription_link_request.py +++ /dev/null @@ -1,279 +0,0 @@ -""" - MONEI API v1 - -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - - The version of the OpenAPI document: 1.5.0 - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from Monei.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from Monei.exceptions import ApiAttributeError - - - -class SendSubscriptionLinkRequest(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - ('channel',): { - 'EMAIL': "email", - 'SMS': "sms", - }, - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - return { - 'customer_email': (str,), # noqa: E501 - 'customer_phone': (str,), # noqa: E501 - 'channel': (str,), # noqa: E501 - 'language': (str,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'customer_email': 'customerEmail', # noqa: E501 - 'customer_phone': 'customerPhone', # noqa: E501 - 'channel': 'channel', # noqa: E501 - 'language': 'language', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """SendSubscriptionLinkRequest - 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 - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - customer_email (str): Customer email to send the subscription link to. [optional] # noqa: E501 - customer_phone (str): Customer phone number to send the subscription link to. [optional] # noqa: E501 - channel (str): Channel to use for sending the subscription link. [optional] # noqa: E501 - language (str): Language to use for the subscription link message. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', True) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """SendSubscriptionLinkRequest - 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 - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - customer_email (str): Customer email to send the subscription link to. [optional] # noqa: E501 - customer_phone (str): Customer phone number to send the subscription link to. [optional] # noqa: E501 - channel (str): Channel to use for sending the subscription link. [optional] # noqa: E501 - language (str): Language to use for the subscription link message. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/Monei/model/send_subscription_status_request.py b/Monei/model/send_subscription_status_request.py deleted file mode 100644 index cde966d..0000000 --- a/Monei/model/send_subscription_status_request.py +++ /dev/null @@ -1,279 +0,0 @@ -""" - MONEI API v1 - -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - - The version of the OpenAPI document: 1.5.0 - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from Monei.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from Monei.exceptions import ApiAttributeError - - - -class SendSubscriptionStatusRequest(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - ('channel',): { - 'EMAIL': "email", - 'SMS': "sms", - }, - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - return { - 'customer_email': (str,), # noqa: E501 - 'customer_phone': (str,), # noqa: E501 - 'channel': (str,), # noqa: E501 - 'language': (str,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'customer_email': 'customerEmail', # noqa: E501 - 'customer_phone': 'customerPhone', # noqa: E501 - 'channel': 'channel', # noqa: E501 - 'language': 'language', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """SendSubscriptionStatusRequest - 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 - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - customer_email (str): Customer email to send the subscription status to. [optional] # noqa: E501 - customer_phone (str): Customer phone number to send the subscription status to. [optional] # noqa: E501 - channel (str): Channel to use for sending the subscription status. [optional] # noqa: E501 - language (str): Language to use for the subscription status message. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', True) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """SendSubscriptionStatusRequest - 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 - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - customer_email (str): Customer email to send the subscription status to. [optional] # noqa: E501 - customer_phone (str): Customer phone number to send the subscription status to. [optional] # noqa: E501 - channel (str): Channel to use for sending the subscription status. [optional] # noqa: E501 - language (str): Language to use for the subscription status message. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/Monei/model/subscription.py b/Monei/model/subscription.py deleted file mode 100644 index ebf7595..0000000 --- a/Monei/model/subscription.py +++ /dev/null @@ -1,405 +0,0 @@ -""" - MONEI API v1 - -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - - The version of the OpenAPI document: 1.5.0 - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from Monei.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from Monei.exceptions import ApiAttributeError - - -def lazy_import(): - from Monei.model.payment_billing_details import PaymentBillingDetails - from Monei.model.payment_customer import PaymentCustomer - from Monei.model.payment_shipping_details import PaymentShippingDetails - from Monei.model.payment_trace_details import PaymentTraceDetails - from Monei.model.subscription_interval import SubscriptionInterval - from Monei.model.subscription_last_payment import SubscriptionLastPayment - from Monei.model.subscription_payment_method import SubscriptionPaymentMethod - from Monei.model.subscription_retry_schedule import SubscriptionRetrySchedule - from Monei.model.subscription_status import SubscriptionStatus - globals()['PaymentBillingDetails'] = PaymentBillingDetails - globals()['PaymentCustomer'] = PaymentCustomer - globals()['PaymentShippingDetails'] = PaymentShippingDetails - globals()['PaymentTraceDetails'] = PaymentTraceDetails - globals()['SubscriptionInterval'] = SubscriptionInterval - globals()['SubscriptionLastPayment'] = SubscriptionLastPayment - globals()['SubscriptionPaymentMethod'] = SubscriptionPaymentMethod - globals()['SubscriptionRetrySchedule'] = SubscriptionRetrySchedule - globals()['SubscriptionStatus'] = SubscriptionStatus - - -class Subscription(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - lazy_import() - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - lazy_import() - return { - 'id': (str,), # noqa: E501 - 'amount': (int,), # noqa: E501 - 'currency': (str,), # noqa: E501 - 'description': (str,), # noqa: E501 - 'account_id': (str,), # noqa: E501 - 'livemode': (bool,), # noqa: E501 - 'status': (SubscriptionStatus,), # noqa: E501 - 'customer': (PaymentCustomer,), # noqa: E501 - 'billing_details': (PaymentBillingDetails,), # noqa: E501 - 'shipping_details': (PaymentShippingDetails,), # noqa: E501 - 'interval': (SubscriptionInterval,), # noqa: E501 - 'interval_count': (int,), # noqa: E501 - 'pause_interval_count': (int,), # noqa: E501 - 'last_order_id': (str,), # noqa: E501 - 'last_payment': (SubscriptionLastPayment,), # noqa: E501 - 'payment_method': (SubscriptionPaymentMethod,), # noqa: E501 - 'current_period_start': (float,), # noqa: E501 - 'current_period_end': (float,), # noqa: E501 - 'trial_period_end': (float,), # noqa: E501 - 'next_payment_at': (int,), # noqa: E501 - 'retry_count': (int,), # noqa: E501 - 'retry_schedule': (SubscriptionRetrySchedule,), # noqa: E501 - 'cancel_at_period_end': (bool,), # noqa: E501 - 'pause_at_period_end': (bool,), # noqa: E501 - 'trace_details': (PaymentTraceDetails,), # noqa: E501 - 'sequence_id': (str,), # noqa: E501 - 'callback_url': (str,), # noqa: E501 - 'payment_callback_url': (str,), # noqa: E501 - 'metadata': ({str: (bool, date, datetime, dict, float, int, list, str, none_type)},), # noqa: E501 - 'created_at': (int,), # noqa: E501 - 'updated_at': (int,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'id': 'id', # noqa: E501 - 'amount': 'amount', # noqa: E501 - 'currency': 'currency', # noqa: E501 - 'description': 'description', # noqa: E501 - 'account_id': 'accountId', # noqa: E501 - 'livemode': 'livemode', # noqa: E501 - 'status': 'status', # noqa: E501 - 'customer': 'customer', # noqa: E501 - 'billing_details': 'billingDetails', # noqa: E501 - 'shipping_details': 'shippingDetails', # noqa: E501 - 'interval': 'interval', # noqa: E501 - 'interval_count': 'intervalCount', # noqa: E501 - 'pause_interval_count': 'pauseIntervalCount', # noqa: E501 - 'last_order_id': 'lastOrderId', # noqa: E501 - 'last_payment': 'lastPayment', # noqa: E501 - 'payment_method': 'paymentMethod', # noqa: E501 - 'current_period_start': 'currentPeriodStart', # noqa: E501 - 'current_period_end': 'currentPeriodEnd', # noqa: E501 - 'trial_period_end': 'trialPeriodEnd', # noqa: E501 - 'next_payment_at': 'nextPaymentAt', # noqa: E501 - 'retry_count': 'retryCount', # noqa: E501 - 'retry_schedule': 'retrySchedule', # noqa: E501 - 'cancel_at_period_end': 'cancelAtPeriodEnd', # noqa: E501 - 'pause_at_period_end': 'pauseAtPeriodEnd', # noqa: E501 - 'trace_details': 'traceDetails', # noqa: E501 - 'sequence_id': 'sequenceId', # noqa: E501 - 'callback_url': 'callbackUrl', # noqa: E501 - 'payment_callback_url': 'paymentCallbackUrl', # noqa: E501 - 'metadata': 'metadata', # noqa: E501 - 'created_at': 'createdAt', # noqa: E501 - 'updated_at': 'updatedAt', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """Subscription - 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 - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - id (str): Unique identifier for the subscription.. [optional] # noqa: E501 - amount (int): Amount intended to be collected by this payment. A positive integer representing how much to charge in the smallest currency unit (e.g., 100 cents to charge 1.00 USD). . [optional] # noqa: E501 - currency (str): Three-letter [ISO currency code](https://en.wikipedia.org/wiki/ISO_4217), in uppercase. Must be a supported currency. . [optional] # noqa: E501 - description (str): An arbitrary string attached to the subscription. Often useful for displaying to users. . [optional] # noqa: E501 - account_id (str): MONEI Account identifier.. [optional] # noqa: E501 - livemode (bool): Has the value `true` if the resource exists in live mode or the value `false` if the resource exists in test mode.. [optional] # noqa: E501 - status (SubscriptionStatus): [optional] # noqa: E501 - customer (PaymentCustomer): [optional] # noqa: E501 - billing_details (PaymentBillingDetails): [optional] # noqa: E501 - shipping_details (PaymentShippingDetails): [optional] # noqa: E501 - interval (SubscriptionInterval): [optional] # noqa: E501 - interval_count (int): Number of intervals between subscription payments.. [optional] # noqa: E501 - pause_interval_count (int): Number of intervals when subscription will be paused before it activates again.. [optional] # noqa: E501 - last_order_id (str): An order ID from your system. A unique identifier that can be used to reconcile the payment with your internal system. . [optional] # noqa: E501 - last_payment (SubscriptionLastPayment): [optional] # noqa: E501 - payment_method (SubscriptionPaymentMethod): [optional] # noqa: E501 - current_period_start (float): The start date of the current subscription period. Measured in seconds since the Unix epoch.. [optional] # noqa: E501 - current_period_end (float): The end date of the current subscription period. Measured in seconds since the Unix epoch.. [optional] # noqa: E501 - trial_period_end (float): The end date of the trial period. Measured in seconds since the Unix epoch.. [optional] # noqa: E501 - next_payment_at (int): The date when the next payment will be made.. [optional] # noqa: E501 - retry_count (int): Number of retries left for the subscription.. [optional] # noqa: E501 - retry_schedule (SubscriptionRetrySchedule): [optional] # noqa: E501 - cancel_at_period_end (bool): If true, the subscription will be canceled at the end of the current period. . [optional] # noqa: E501 - pause_at_period_end (bool): If true, the subscription will be paused at the end of the current period. . [optional] # noqa: E501 - trace_details (PaymentTraceDetails): [optional] # noqa: E501 - sequence_id (str): A permanent identifier that refers to the initial payment of a sequence of payments. This value needs to be sent in the path for `RECURRING` payments. . [optional] # noqa: E501 - callback_url (str): The URL will be called each time subscription status changes. You will receive a subscription object in the body of the request. . [optional] # noqa: E501 - payment_callback_url (str): The URL will be called each time subscription creates a new payments. You will receive the payment object in the body of the request. . [optional] # noqa: E501 - metadata ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}): A set of key-value pairs that you can attach to a resource. This can be useful for storing additional information about the resource in a structured format.. [optional] # noqa: E501 - created_at (int): Time at which the resource was created. Measured in seconds since the Unix epoch.. [optional] # noqa: E501 - updated_at (int): Time at which the resource updated last time. Measured in seconds since the Unix epoch.. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', True) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """Subscription - 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 - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - id (str): Unique identifier for the subscription.. [optional] # noqa: E501 - amount (int): Amount intended to be collected by this payment. A positive integer representing how much to charge in the smallest currency unit (e.g., 100 cents to charge 1.00 USD). . [optional] # noqa: E501 - currency (str): Three-letter [ISO currency code](https://en.wikipedia.org/wiki/ISO_4217), in uppercase. Must be a supported currency. . [optional] # noqa: E501 - description (str): An arbitrary string attached to the subscription. Often useful for displaying to users. . [optional] # noqa: E501 - account_id (str): MONEI Account identifier.. [optional] # noqa: E501 - livemode (bool): Has the value `true` if the resource exists in live mode or the value `false` if the resource exists in test mode.. [optional] # noqa: E501 - status (SubscriptionStatus): [optional] # noqa: E501 - customer (PaymentCustomer): [optional] # noqa: E501 - billing_details (PaymentBillingDetails): [optional] # noqa: E501 - shipping_details (PaymentShippingDetails): [optional] # noqa: E501 - interval (SubscriptionInterval): [optional] # noqa: E501 - interval_count (int): Number of intervals between subscription payments.. [optional] # noqa: E501 - pause_interval_count (int): Number of intervals when subscription will be paused before it activates again.. [optional] # noqa: E501 - last_order_id (str): An order ID from your system. A unique identifier that can be used to reconcile the payment with your internal system. . [optional] # noqa: E501 - last_payment (SubscriptionLastPayment): [optional] # noqa: E501 - payment_method (SubscriptionPaymentMethod): [optional] # noqa: E501 - current_period_start (float): The start date of the current subscription period. Measured in seconds since the Unix epoch.. [optional] # noqa: E501 - current_period_end (float): The end date of the current subscription period. Measured in seconds since the Unix epoch.. [optional] # noqa: E501 - trial_period_end (float): The end date of the trial period. Measured in seconds since the Unix epoch.. [optional] # noqa: E501 - next_payment_at (int): The date when the next payment will be made.. [optional] # noqa: E501 - retry_count (int): Number of retries left for the subscription.. [optional] # noqa: E501 - retry_schedule (SubscriptionRetrySchedule): [optional] # noqa: E501 - cancel_at_period_end (bool): If true, the subscription will be canceled at the end of the current period. . [optional] # noqa: E501 - pause_at_period_end (bool): If true, the subscription will be paused at the end of the current period. . [optional] # noqa: E501 - trace_details (PaymentTraceDetails): [optional] # noqa: E501 - sequence_id (str): A permanent identifier that refers to the initial payment of a sequence of payments. This value needs to be sent in the path for `RECURRING` payments. . [optional] # noqa: E501 - callback_url (str): The URL will be called each time subscription status changes. You will receive a subscription object in the body of the request. . [optional] # noqa: E501 - payment_callback_url (str): The URL will be called each time subscription creates a new payments. You will receive the payment object in the body of the request. . [optional] # noqa: E501 - metadata ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}): A set of key-value pairs that you can attach to a resource. This can be useful for storing additional information about the resource in a structured format.. [optional] # noqa: E501 - created_at (int): Time at which the resource was created. Measured in seconds since the Unix epoch.. [optional] # noqa: E501 - updated_at (int): Time at which the resource updated last time. Measured in seconds since the Unix epoch.. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/Monei/model/subscription_interval.py b/Monei/model/subscription_interval.py deleted file mode 100644 index c1448d5..0000000 --- a/Monei/model/subscription_interval.py +++ /dev/null @@ -1,292 +0,0 @@ -""" - MONEI API v1 - -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - - The version of the OpenAPI document: 1.5.0 - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from Monei.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from Monei.exceptions import ApiAttributeError - - - -class SubscriptionInterval(ModelSimple): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - ('value',): { - 'DAY': "day", - 'WEEK': "week", - 'MONTH': "month", - 'YEAR': "year", - }, - } - - validations = { - } - - additional_properties_type = None - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - return { - 'value': (str,), - } - - @cached_property - def discriminator(): - return None - - - attribute_map = {} - - read_only_vars = set() - - _composed_schemas = None - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): - """SubscriptionInterval - a model defined in OpenAPI - - Note that value can be passed either in args or in kwargs, but not in both. - - Args: - args[0] (str): Subscription interval.., must be one of ["day", "week", "month", "year", ] # noqa: E501 - - Keyword Args: - value (str): Subscription interval.., must be one of ["day", "week", "month", "year", ] # 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. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - """ - # required up here when default value is not given - _path_to_item = kwargs.pop('_path_to_item', ()) - - if 'value' in kwargs: - value = kwargs.pop('value') - elif args: - args = list(args) - value = args.pop(0) - else: - raise ApiTypeError( - "value is required, but not passed in args or kwargs and doesn't have default", - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - self.value = value - if kwargs: - raise ApiTypeError( - "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( - kwargs, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): - """SubscriptionInterval - a model defined in OpenAPI - - Note that value can be passed either in args or in kwargs, but not in both. - - Args: - args[0] (str): Subscription interval.., must be one of ["day", "week", "month", "year", ] # noqa: E501 - - Keyword Args: - value (str): Subscription interval.., must be one of ["day", "week", "month", "year", ] # 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. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - """ - # required up here when default value is not given - _path_to_item = kwargs.pop('_path_to_item', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if 'value' in kwargs: - value = kwargs.pop('value') - elif args: - args = list(args) - value = args.pop(0) - else: - raise ApiTypeError( - "value is required, but not passed in args or kwargs and doesn't have default", - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - self.value = value - if kwargs: - raise ApiTypeError( - "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( - kwargs, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - return self diff --git a/Monei/model/subscription_last_payment.py b/Monei/model/subscription_last_payment.py deleted file mode 100644 index bba56ca..0000000 --- a/Monei/model/subscription_last_payment.py +++ /dev/null @@ -1,281 +0,0 @@ -""" - MONEI API v1 - -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - - The version of the OpenAPI document: 1.5.0 - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from Monei.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from Monei.exceptions import ApiAttributeError - - -def lazy_import(): - from Monei.model.payment_status import PaymentStatus - globals()['PaymentStatus'] = PaymentStatus - - -class SubscriptionLastPayment(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - lazy_import() - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - lazy_import() - return { - 'id': (str,), # noqa: E501 - 'status': (PaymentStatus,), # noqa: E501 - 'status_code': (str,), # noqa: E501 - 'status_message': (str,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'id': 'id', # noqa: E501 - 'status': 'status', # noqa: E501 - 'status_code': 'statusCode', # noqa: E501 - 'status_message': 'statusMessage', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """SubscriptionLastPayment - 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 - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - id (str): Unique identifier for the payment.. [optional] # noqa: E501 - status (PaymentStatus): [optional] # noqa: E501 - status_code (str): Payment status code. . [optional] # noqa: E501 - status_message (str): Human readable status message, can be displayed to a user. . [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', True) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """SubscriptionLastPayment - 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 - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - id (str): Unique identifier for the payment.. [optional] # noqa: E501 - status (PaymentStatus): [optional] # noqa: E501 - status_code (str): Payment status code. . [optional] # noqa: E501 - status_message (str): Human readable status message, can be displayed to a user. . [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/Monei/model/subscription_payment_method.py b/Monei/model/subscription_payment_method.py deleted file mode 100644 index 28739b6..0000000 --- a/Monei/model/subscription_payment_method.py +++ /dev/null @@ -1,276 +0,0 @@ -""" - MONEI API v1 - -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - - The version of the OpenAPI document: 1.5.0 - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from Monei.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from Monei.exceptions import ApiAttributeError - - -def lazy_import(): - from Monei.model.payment_payment_method_card import PaymentPaymentMethodCard - globals()['PaymentPaymentMethodCard'] = PaymentPaymentMethodCard - - -class SubscriptionPaymentMethod(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - ('method',): { - 'CARD': "card", - }, - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - lazy_import() - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - lazy_import() - return { - 'method': (str,), # noqa: E501 - 'card': (PaymentPaymentMethodCard,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'method': 'method', # noqa: E501 - 'card': 'card', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """SubscriptionPaymentMethod - 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 - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - method (str): Subscription method type.. [optional] if omitted the server will use the default value of "card" # noqa: E501 - card (PaymentPaymentMethodCard): [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', True) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """SubscriptionPaymentMethod - 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 - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - method (str): Subscription method type.. [optional] if omitted the server will use the default value of "card" # noqa: E501 - card (PaymentPaymentMethodCard): [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/Monei/model/subscription_payment_method_card.py b/Monei/model/subscription_payment_method_card.py deleted file mode 100644 index 1ab685e..0000000 --- a/Monei/model/subscription_payment_method_card.py +++ /dev/null @@ -1,300 +0,0 @@ -""" - MONEI API v1 - -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - - The version of the OpenAPI document: 1.5.0 - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from Monei.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from Monei.exceptions import ApiAttributeError - - - -class SubscriptionPaymentMethodCard(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - ('brand',): { - 'VISA': "visa", - 'MASTERCARD': "mastercard", - 'DINERS': "diners", - 'AMEX': "amex", - 'JCB': "jcb", - 'UNIONPAY': "unionpay", - 'UNKNOWN': "unknown", - }, - ('type',): { - 'DEBIT': "debit", - 'CREDIT': "credit", - }, - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - return { - 'country': (str,), # noqa: E501 - 'brand': (str,), # noqa: E501 - 'type': (str,), # noqa: E501 - 'three_d_secure': (bool,), # noqa: E501 - 'three_d_secure_version': (str,), # noqa: E501 - 'expiration': (int,), # noqa: E501 - 'last4': (str,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'country': 'country', # noqa: E501 - 'brand': 'brand', # noqa: E501 - 'type': 'type', # noqa: E501 - 'three_d_secure': 'threeDSecure', # noqa: E501 - 'three_d_secure_version': 'threeDSecureVersion', # noqa: E501 - 'expiration': 'expiration', # noqa: E501 - 'last4': 'last4', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """SubscriptionPaymentMethodCard - 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 - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - country (str): Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).. [optional] # noqa: E501 - brand (str): Card brand.. [optional] # noqa: E501 - type (str): Card type `debit` or `credit`.. [optional] # noqa: E501 - three_d_secure (bool): Wether this transaction used 3D Secure authentication.. [optional] # noqa: E501 - three_d_secure_version (str): The protocol version of the 3DS challenge.. [optional] # noqa: E501 - expiration (int): Time at which the card will expire. Measured in seconds since the Unix epoch. . [optional] # noqa: E501 - last4 (str): The last four digits of the card.. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', True) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """SubscriptionPaymentMethodCard - 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 - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - country (str): Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).. [optional] # noqa: E501 - brand (str): Card brand.. [optional] # noqa: E501 - type (str): Card type `debit` or `credit`.. [optional] # noqa: E501 - three_d_secure (bool): Wether this transaction used 3D Secure authentication.. [optional] # noqa: E501 - three_d_secure_version (str): The protocol version of the 3DS challenge.. [optional] # noqa: E501 - expiration (int): Time at which the card will expire. Measured in seconds since the Unix epoch. . [optional] # noqa: E501 - last4 (str): The last four digits of the card.. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/Monei/model/subscription_retry_schedule.py b/Monei/model/subscription_retry_schedule.py deleted file mode 100644 index a9972e6..0000000 --- a/Monei/model/subscription_retry_schedule.py +++ /dev/null @@ -1,291 +0,0 @@ -""" - MONEI API v1 - -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - - The version of the OpenAPI document: 1.5.0 - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from Monei.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from Monei.exceptions import ApiAttributeError - - -def lazy_import(): - from Monei.model.subscription_retry_schedule_inner import SubscriptionRetryScheduleInner - globals()['SubscriptionRetryScheduleInner'] = SubscriptionRetryScheduleInner - - -class SubscriptionRetrySchedule(ModelSimple): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - additional_properties_type = None - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - lazy_import() - return { - 'value': ([SubscriptionRetryScheduleInner],), - } - - @cached_property - def discriminator(): - return None - - - attribute_map = {} - - read_only_vars = set() - - _composed_schemas = None - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): - """SubscriptionRetrySchedule - a model defined in OpenAPI - - Note that value can be passed either in args or in kwargs, but not in both. - - Args: - args[0] ([SubscriptionRetryScheduleInner]): Defines a custom schedule for retrying failed subscription payments. Each entry in the array specifies how long to wait before attempting the next payment retry. If not specified, the system's default retry schedule will be used. . # noqa: E501 - - Keyword Args: - value ([SubscriptionRetryScheduleInner]): Defines a custom schedule for retrying failed subscription payments. Each entry in the array specifies how long to wait before attempting the next payment retry. If not specified, the system's default retry schedule will be used. . # 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. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - """ - # required up here when default value is not given - _path_to_item = kwargs.pop('_path_to_item', ()) - - if 'value' in kwargs: - value = kwargs.pop('value') - elif args: - args = list(args) - value = args.pop(0) - else: - raise ApiTypeError( - "value is required, but not passed in args or kwargs and doesn't have default", - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - self.value = value - if kwargs: - raise ApiTypeError( - "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( - kwargs, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): - """SubscriptionRetrySchedule - a model defined in OpenAPI - - Note that value can be passed either in args or in kwargs, but not in both. - - Args: - args[0] ([SubscriptionRetryScheduleInner]): Defines a custom schedule for retrying failed subscription payments. Each entry in the array specifies how long to wait before attempting the next payment retry. If not specified, the system's default retry schedule will be used. . # noqa: E501 - - Keyword Args: - value ([SubscriptionRetryScheduleInner]): Defines a custom schedule for retrying failed subscription payments. Each entry in the array specifies how long to wait before attempting the next payment retry. If not specified, the system's default retry schedule will be used. . # 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. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - """ - # required up here when default value is not given - _path_to_item = kwargs.pop('_path_to_item', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if 'value' in kwargs: - value = kwargs.pop('value') - elif args: - args = list(args) - value = args.pop(0) - else: - raise ApiTypeError( - "value is required, but not passed in args or kwargs and doesn't have default", - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - self.value = value - if kwargs: - raise ApiTypeError( - "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( - kwargs, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - return self diff --git a/Monei/model/subscription_retry_schedule_inner.py b/Monei/model/subscription_retry_schedule_inner.py deleted file mode 100644 index aec4473..0000000 --- a/Monei/model/subscription_retry_schedule_inner.py +++ /dev/null @@ -1,285 +0,0 @@ -""" - MONEI API v1 - -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - - The version of the OpenAPI document: 1.5.0 - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from Monei.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from Monei.exceptions import ApiAttributeError - - - -class SubscriptionRetryScheduleInner(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - ('interval',): { - 'DAY': "day", - 'WEEK': "week", - 'MONTH': "month", - 'YEAR': "year", - }, - } - - validations = { - ('interval_count',): { - 'inclusive_maximum': 31, - 'inclusive_minimum': 1, - }, - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - return { - 'interval': (str,), # noqa: E501 - 'interval_count': (int,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'interval': 'interval', # noqa: E501 - 'interval_count': 'intervalCount', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, interval, interval_count, *args, **kwargs): # noqa: E501 - """SubscriptionRetryScheduleInner - a model defined in OpenAPI - - Args: - interval (str): The unit of time to wait before the retry attempt. - interval_count (int): The number of intervals to wait before the retry attempt. - - Keyword Args: - _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. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', True) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - self.interval = interval - self.interval_count = interval_count - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, interval, interval_count, *args, **kwargs): # noqa: E501 - """SubscriptionRetryScheduleInner - a model defined in OpenAPI - - Args: - interval (str): The unit of time to wait before the retry attempt. - interval_count (int): The number of intervals to wait before the retry attempt. - - Keyword Args: - _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. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - self.interval = interval - self.interval_count = interval_count - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/Monei/model/subscription_status.py b/Monei/model/subscription_status.py deleted file mode 100644 index aceb93b..0000000 --- a/Monei/model/subscription_status.py +++ /dev/null @@ -1,295 +0,0 @@ -""" - MONEI API v1 - -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - - The version of the OpenAPI document: 1.5.0 - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from Monei.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from Monei.exceptions import ApiAttributeError - - - -class SubscriptionStatus(ModelSimple): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - ('value',): { - 'PENDING': "PENDING", - 'EXPIRED': "EXPIRED", - 'TRIALING': "TRIALING", - 'ACTIVE': "ACTIVE", - 'PAST_DUE': "PAST_DUE", - 'PAUSED': "PAUSED", - 'CANCELED': "CANCELED", - }, - } - - validations = { - } - - additional_properties_type = None - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - return { - 'value': (str,), - } - - @cached_property - def discriminator(): - return None - - - attribute_map = {} - - read_only_vars = set() - - _composed_schemas = None - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): - """SubscriptionStatus - a model defined in OpenAPI - - Note that value can be passed either in args or in kwargs, but not in both. - - Args: - args[0] (str): The status of the subscription.., must be one of ["PENDING", "EXPIRED", "TRIALING", "ACTIVE", "PAST_DUE", "PAUSED", "CANCELED", ] # noqa: E501 - - Keyword Args: - value (str): The status of the subscription.., must be one of ["PENDING", "EXPIRED", "TRIALING", "ACTIVE", "PAST_DUE", "PAUSED", "CANCELED", ] # 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. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - """ - # required up here when default value is not given - _path_to_item = kwargs.pop('_path_to_item', ()) - - if 'value' in kwargs: - value = kwargs.pop('value') - elif args: - args = list(args) - value = args.pop(0) - else: - raise ApiTypeError( - "value is required, but not passed in args or kwargs and doesn't have default", - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - self.value = value - if kwargs: - raise ApiTypeError( - "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( - kwargs, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): - """SubscriptionStatus - a model defined in OpenAPI - - Note that value can be passed either in args or in kwargs, but not in both. - - Args: - args[0] (str): The status of the subscription.., must be one of ["PENDING", "EXPIRED", "TRIALING", "ACTIVE", "PAST_DUE", "PAUSED", "CANCELED", ] # noqa: E501 - - Keyword Args: - value (str): The status of the subscription.., must be one of ["PENDING", "EXPIRED", "TRIALING", "ACTIVE", "PAST_DUE", "PAUSED", "CANCELED", ] # 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. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - """ - # required up here when default value is not given - _path_to_item = kwargs.pop('_path_to_item', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if 'value' in kwargs: - value = kwargs.pop('value') - elif args: - args = list(args) - value = args.pop(0) - else: - raise ApiTypeError( - "value is required, but not passed in args or kwargs and doesn't have default", - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - self.value = value - if kwargs: - raise ApiTypeError( - "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( - kwargs, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - return self diff --git a/Monei/model/update_subscription_request.py b/Monei/model/update_subscription_request.py deleted file mode 100644 index 77821fc..0000000 --- a/Monei/model/update_subscription_request.py +++ /dev/null @@ -1,333 +0,0 @@ -""" - MONEI API v1 - -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - - The version of the OpenAPI document: 1.5.0 - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from Monei.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from Monei.exceptions import ApiAttributeError - - -def lazy_import(): - from Monei.model.payment_billing_details import PaymentBillingDetails - from Monei.model.payment_customer import PaymentCustomer - from Monei.model.payment_shipping_details import PaymentShippingDetails - from Monei.model.subscription_interval import SubscriptionInterval - from Monei.model.subscription_retry_schedule import SubscriptionRetrySchedule - globals()['PaymentBillingDetails'] = PaymentBillingDetails - globals()['PaymentCustomer'] = PaymentCustomer - globals()['PaymentShippingDetails'] = PaymentShippingDetails - globals()['SubscriptionInterval'] = SubscriptionInterval - globals()['SubscriptionRetrySchedule'] = SubscriptionRetrySchedule - - -class UpdateSubscriptionRequest(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - lazy_import() - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - lazy_import() - return { - 'amount': (int,), # noqa: E501 - 'interval': (SubscriptionInterval,), # noqa: E501 - 'interval_count': (int,), # noqa: E501 - 'description': (str,), # noqa: E501 - 'customer': (PaymentCustomer,), # noqa: E501 - 'billing_details': (PaymentBillingDetails,), # noqa: E501 - 'shipping_details': (PaymentShippingDetails,), # noqa: E501 - 'trial_period_end': (float,), # noqa: E501 - 'callback_url': (str,), # noqa: E501 - 'payment_callback_url': (str,), # noqa: E501 - 'pause_at_period_end': (bool,), # noqa: E501 - 'cancel_at_period_end': (bool,), # noqa: E501 - 'pause_interval_count': (int,), # noqa: E501 - 'retry_schedule': (SubscriptionRetrySchedule,), # noqa: E501 - 'metadata': ({str: (bool, date, datetime, dict, float, int, list, str, none_type)},), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'amount': 'amount', # noqa: E501 - 'interval': 'interval', # noqa: E501 - 'interval_count': 'intervalCount', # noqa: E501 - 'description': 'description', # noqa: E501 - 'customer': 'customer', # noqa: E501 - 'billing_details': 'billingDetails', # noqa: E501 - 'shipping_details': 'shippingDetails', # noqa: E501 - 'trial_period_end': 'trialPeriodEnd', # noqa: E501 - 'callback_url': 'callbackUrl', # noqa: E501 - 'payment_callback_url': 'paymentCallbackUrl', # noqa: E501 - 'pause_at_period_end': 'pauseAtPeriodEnd', # noqa: E501 - 'cancel_at_period_end': 'cancelAtPeriodEnd', # noqa: E501 - 'pause_interval_count': 'pauseIntervalCount', # noqa: E501 - 'retry_schedule': 'retrySchedule', # noqa: E501 - 'metadata': 'metadata', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """UpdateSubscriptionRequest - 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 - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - amount (int): Amount intended to be collected by this payment. A positive integer representing how much to charge in the smallest currency unit (e.g., 100 cents to charge 1.00 USD). . [optional] # noqa: E501 - interval (SubscriptionInterval): [optional] # noqa: E501 - interval_count (int): Number of intervals between subscription payments.. [optional] # noqa: E501 - description (str): An arbitrary string attached to the subscription. Often useful for displaying to users. . [optional] # noqa: E501 - customer (PaymentCustomer): [optional] # noqa: E501 - billing_details (PaymentBillingDetails): [optional] # noqa: E501 - shipping_details (PaymentShippingDetails): [optional] # noqa: E501 - trial_period_end (float): The end date of the trial period. Measured in seconds since the Unix epoch.. [optional] # noqa: E501 - callback_url (str): The URL will be called each time subscription status changes. You will receive a subscription object in the body of the request. . [optional] # noqa: E501 - payment_callback_url (str): The URL will be called each time subscription creates a new payments. You will receive the payment object in the body of the request. . [optional] # noqa: E501 - pause_at_period_end (bool): If true, the subscription will be paused at the end of the current period. . [optional] # noqa: E501 - cancel_at_period_end (bool): If true, the subscription will be canceled at the end of the current period. . [optional] # noqa: E501 - pause_interval_count (int): Number of intervals when subscription will be paused before it activates again.. [optional] # noqa: E501 - retry_schedule (SubscriptionRetrySchedule): [optional] # noqa: E501 - metadata ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}): A set of key-value pairs that you can attach to a resource. This can be useful for storing additional information about the resource in a structured format.. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', True) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """UpdateSubscriptionRequest - 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 - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - amount (int): Amount intended to be collected by this payment. A positive integer representing how much to charge in the smallest currency unit (e.g., 100 cents to charge 1.00 USD). . [optional] # noqa: E501 - interval (SubscriptionInterval): [optional] # noqa: E501 - interval_count (int): Number of intervals between subscription payments.. [optional] # noqa: E501 - description (str): An arbitrary string attached to the subscription. Often useful for displaying to users. . [optional] # noqa: E501 - customer (PaymentCustomer): [optional] # noqa: E501 - billing_details (PaymentBillingDetails): [optional] # noqa: E501 - shipping_details (PaymentShippingDetails): [optional] # noqa: E501 - trial_period_end (float): The end date of the trial period. Measured in seconds since the Unix epoch.. [optional] # noqa: E501 - callback_url (str): The URL will be called each time subscription status changes. You will receive a subscription object in the body of the request. . [optional] # noqa: E501 - payment_callback_url (str): The URL will be called each time subscription creates a new payments. You will receive the payment object in the body of the request. . [optional] # noqa: E501 - pause_at_period_end (bool): If true, the subscription will be paused at the end of the current period. . [optional] # noqa: E501 - cancel_at_period_end (bool): If true, the subscription will be canceled at the end of the current period. . [optional] # noqa: E501 - pause_interval_count (int): Number of intervals when subscription will be paused before it activates again.. [optional] # noqa: E501 - retry_schedule (SubscriptionRetrySchedule): [optional] # noqa: E501 - metadata ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}): A set of key-value pairs that you can attach to a resource. This can be useful for storing additional information about the resource in a structured format.. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/Monei/model/validate_bizum_phone_request.py b/Monei/model/validate_bizum_phone_request.py deleted file mode 100644 index 94f2bdd..0000000 --- a/Monei/model/validate_bizum_phone_request.py +++ /dev/null @@ -1,279 +0,0 @@ -""" - MONEI API v1 - -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - - The version of the OpenAPI document: 1.5.0 - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from Monei.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from Monei.exceptions import ApiAttributeError - - - -class ValidateBizumPhoneRequest(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - return { - 'account_id': (str,), # noqa: E501 - 'phone_number': (str,), # noqa: E501 - 'payment_id': (str,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'account_id': 'accountId', # noqa: E501 - 'phone_number': 'phoneNumber', # noqa: E501 - 'payment_id': 'paymentId', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, account_id, phone_number, *args, **kwargs): # noqa: E501 - """ValidateBizumPhoneRequest - a model defined in OpenAPI - - Args: - account_id (str): MONEI Account identifier. - phone_number (str): Phone number in E.164 format. - - Keyword Args: - _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. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - payment_id (str): Unique identifier for the payment.. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', True) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - self.account_id = account_id - self.phone_number = phone_number - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, account_id, phone_number, *args, **kwargs): # noqa: E501 - """ValidateBizumPhoneRequest - a model defined in OpenAPI - - Args: - account_id (str): MONEI Account identifier. - phone_number (str): Phone number in E.164 format. - - Keyword Args: - _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. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - payment_id (str): Unique identifier for the payment.. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - self.account_id = account_id - self.phone_number = phone_number - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/Monei/model_utils.py b/Monei/model_utils.py deleted file mode 100644 index 665fc93..0000000 --- a/Monei/model_utils.py +++ /dev/null @@ -1,2058 +0,0 @@ -""" - MONEI API v1 - -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - - The version of the OpenAPI document: 1.5.0 - Generated by: https://openapi-generator.tech -""" - - -from datetime import date, datetime # noqa: F401 -from copy import deepcopy -import inspect -import io -import os -import pprint -import re -import tempfile -import uuid - -from dateutil.parser import parse - -from Monei.exceptions import ( - ApiKeyError, - ApiAttributeError, - ApiTypeError, - ApiValueError, -) - -none_type = type(None) -file_type = io.IOBase - - -def convert_js_args_to_python_args(fn): - from functools import wraps - @wraps(fn) - def wrapped_init(_self, *args, **kwargs): - """ - An attribute named `self` received from the api will conflicts with the reserved `self` - parameter of a class method. During generation, `self` attributes are mapped - to `_self` in models. Here, we name `_self` instead of `self` to avoid conflicts. - """ - spec_property_naming = kwargs.get('_spec_property_naming', False) - if spec_property_naming: - kwargs = change_keys_js_to_python( - kwargs, _self if isinstance( - _self, type) else _self.__class__) - return fn(_self, *args, **kwargs) - return wrapped_init - - -class cached_property(object): - # this caches the result of the function call for fn with no inputs - # use this as a decorator on function methods that you want converted - # into cached properties - result_key = '_results' - - def __init__(self, fn): - self._fn = fn - - def __get__(self, instance, cls=None): - if self.result_key in vars(self): - return vars(self)[self.result_key] - else: - result = self._fn() - setattr(self, self.result_key, result) - return result - - -PRIMITIVE_TYPES = (list, float, int, bool, datetime, date, str, file_type) - - -def allows_single_value_input(cls): - """ - This function returns True if the input composed schema model or any - descendant model allows a value only input - This is true for cases where oneOf contains items like: - oneOf: - - float - - NumberWithValidation - - StringEnum - - ArrayModel - - null - TODO: lru_cache this - """ - if ( - issubclass(cls, ModelSimple) or - cls in PRIMITIVE_TYPES - ): - return True - elif issubclass(cls, ModelComposed): - if not cls._composed_schemas['oneOf']: - return False - return any(allows_single_value_input(c) for c in cls._composed_schemas['oneOf']) - return False - - -def composed_model_input_classes(cls): - """ - This function returns a list of the possible models that can be accepted as - inputs. - TODO: lru_cache this - """ - if issubclass(cls, ModelSimple) or cls in PRIMITIVE_TYPES: - return [cls] - elif issubclass(cls, ModelNormal): - if cls.discriminator is None: - return [cls] - else: - return get_discriminated_classes(cls) - elif issubclass(cls, ModelComposed): - if not cls._composed_schemas['oneOf']: - return [] - if cls.discriminator is None: - input_classes = [] - for c in cls._composed_schemas['oneOf']: - input_classes.extend(composed_model_input_classes(c)) - return input_classes - else: - return get_discriminated_classes(cls) - return [] - - -class OpenApiModel(object): - """The base class for all OpenAPIModels""" - - def set_attribute(self, name, value): - # this is only used to set properties on self - - path_to_item = [] - if self._path_to_item: - path_to_item.extend(self._path_to_item) - path_to_item.append(name) - - if name in self.openapi_types: - required_types_mixed = self.openapi_types[name] - elif self.additional_properties_type is None: - raise ApiAttributeError( - "{0} has no attribute '{1}'".format( - type(self).__name__, name), - path_to_item - ) - elif self.additional_properties_type is not None: - required_types_mixed = self.additional_properties_type - - if get_simple_class(name) != str: - error_msg = type_error_message( - var_name=name, - var_value=name, - valid_classes=(str,), - key_type=True - ) - raise ApiTypeError( - error_msg, - path_to_item=path_to_item, - valid_classes=(str,), - key_type=True - ) - - if self._check_type: - value = validate_and_convert_types( - value, required_types_mixed, path_to_item, self._spec_property_naming, - self._check_type, configuration=self._configuration) - if (name,) in self.allowed_values: - check_allowed_values( - self.allowed_values, - (name,), - value - ) - if (name,) in self.validations: - check_validations( - self.validations, - (name,), - value, - self._configuration - ) - self.__dict__['_data_store'][name] = value - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other - - def __setattr__(self, attr, value): - """set the value of an attribute using dot notation: `instance.attr = val`""" - self[attr] = value - - def __getattr__(self, attr): - """get the value of an attribute using dot notation: `instance.attr`""" - return self.__getitem__(attr) - - def __copy__(self): - cls = self.__class__ - if self.get("_spec_property_naming", False): - return cls._new_from_openapi_data(**self.__dict__) - else: - return cls.__new__(cls, **self.__dict__) - - def __deepcopy__(self, memo): - cls = self.__class__ - - if self.get("_spec_property_naming", False): - new_inst = cls._new_from_openapi_data() - else: - new_inst = cls.__new__(cls) - - for k, v in self.__dict__.items(): - setattr(new_inst, k, deepcopy(v, memo)) - return new_inst - - - def __new__(cls, *args, **kwargs): - # this function uses the discriminator to - # pick a new schema/class to instantiate because a discriminator - # propertyName value was passed in - - if len(args) == 1: - arg = args[0] - if arg is None and is_type_nullable(cls): - # The input data is the 'null' value and the type is nullable. - return None - - if issubclass(cls, ModelComposed) and allows_single_value_input(cls): - model_kwargs = {} - oneof_instance = get_oneof_instance(cls, model_kwargs, kwargs, model_arg=arg) - return oneof_instance - - visited_composed_classes = kwargs.get('_visited_composed_classes', ()) - if ( - cls.discriminator is None or - cls in visited_composed_classes - ): - # Use case 1: this openapi schema (cls) does not have a discriminator - # Use case 2: we have already visited this class before and are sure that we - # want to instantiate it this time. We have visited this class deserializing - # a payload with a discriminator. During that process we traveled through - # this class but did not make an instance of it. Now we are making an - # instance of a composed class which contains cls in it, so this time make an instance of cls. - # - # Here's an example of use case 2: If Animal has a discriminator - # petType and we pass in "Dog", and the class Dog - # allOf includes Animal, we move through Animal - # once using the discriminator, and pick Dog. - # Then in the composed schema dog Dog, we will make an instance of the - # Animal class (because Dal has allOf: Animal) but this time we won't travel - # through Animal's discriminator because we passed in - # _visited_composed_classes = (Animal,) - - return super(OpenApiModel, cls).__new__(cls) - - # Get the name and value of the discriminator property. - # The discriminator name is obtained from the discriminator meta-data - # and the discriminator value is obtained from the input data. - discr_propertyname_py = list(cls.discriminator.keys())[0] - discr_propertyname_js = cls.attribute_map[discr_propertyname_py] - if discr_propertyname_js in kwargs: - discr_value = kwargs[discr_propertyname_js] - elif discr_propertyname_py in kwargs: - discr_value = kwargs[discr_propertyname_py] - else: - # The input data does not contain the discriminator property. - path_to_item = kwargs.get('_path_to_item', ()) - raise ApiValueError( - "Cannot deserialize input data due to missing discriminator. " - "The discriminator property '%s' is missing at path: %s" % - (discr_propertyname_js, path_to_item) - ) - - # Implementation note: the last argument to get_discriminator_class - # is a list of visited classes. get_discriminator_class may recursively - # call itself and update the list of visited classes, and the initial - # value must be an empty list. Hence not using 'visited_composed_classes' - new_cls = get_discriminator_class( - cls, discr_propertyname_py, discr_value, []) - if new_cls is None: - path_to_item = kwargs.get('_path_to_item', ()) - disc_prop_value = kwargs.get( - discr_propertyname_js, kwargs.get(discr_propertyname_py)) - raise ApiValueError( - "Cannot deserialize input data due to invalid discriminator " - "value. The OpenAPI document has no mapping for discriminator " - "property '%s'='%s' at path: %s" % - (discr_propertyname_js, disc_prop_value, path_to_item) - ) - - if new_cls in visited_composed_classes: - # if we are making an instance of a composed schema Descendent - # which allOf includes Ancestor, then Ancestor contains - # a discriminator that includes Descendent. - # So if we make an instance of Descendent, we have to make an - # instance of Ancestor to hold the allOf properties. - # This code detects that use case and makes the instance of Ancestor - # For example: - # When making an instance of Dog, _visited_composed_classes = (Dog,) - # then we make an instance of Animal to include in dog._composed_instances - # so when we are here, cls is Animal - # cls.discriminator != None - # cls not in _visited_composed_classes - # new_cls = Dog - # but we know we know that we already have Dog - # because it is in visited_composed_classes - # so make Animal here - return super(OpenApiModel, cls).__new__(cls) - - # Build a list containing all oneOf and anyOf descendants. - oneof_anyof_classes = None - if cls._composed_schemas is not None: - oneof_anyof_classes = ( - cls._composed_schemas.get('oneOf', ()) + - cls._composed_schemas.get('anyOf', ())) - oneof_anyof_child = new_cls in oneof_anyof_classes - kwargs['_visited_composed_classes'] = visited_composed_classes + (cls,) - - if cls._composed_schemas.get('allOf') and oneof_anyof_child: - # Validate that we can make self because when we make the - # new_cls it will not include the allOf validations in self - self_inst = super(OpenApiModel, cls).__new__(cls) - self_inst.__init__(*args, **kwargs) - - if kwargs.get("_spec_property_naming", False): - # when true, implies new is from deserialization - new_inst = new_cls._new_from_openapi_data(*args, **kwargs) - else: - new_inst = new_cls.__new__(new_cls, *args, **kwargs) - new_inst.__init__(*args, **kwargs) - - return new_inst - - @classmethod - @convert_js_args_to_python_args - def _new_from_openapi_data(cls, *args, **kwargs): - # this function uses the discriminator to - # pick a new schema/class to instantiate because a discriminator - # propertyName value was passed in - - if len(args) == 1: - arg = args[0] - if arg is None and is_type_nullable(cls): - # The input data is the 'null' value and the type is nullable. - return None - - if issubclass(cls, ModelComposed) and allows_single_value_input(cls): - model_kwargs = {} - oneof_instance = get_oneof_instance(cls, model_kwargs, kwargs, model_arg=arg) - return oneof_instance - - visited_composed_classes = kwargs.get('_visited_composed_classes', ()) - if ( - cls.discriminator is None or - cls in visited_composed_classes - ): - # Use case 1: this openapi schema (cls) does not have a discriminator - # Use case 2: we have already visited this class before and are sure that we - # want to instantiate it this time. We have visited this class deserializing - # a payload with a discriminator. During that process we traveled through - # this class but did not make an instance of it. Now we are making an - # instance of a composed class which contains cls in it, so this time make an instance of cls. - # - # Here's an example of use case 2: If Animal has a discriminator - # petType and we pass in "Dog", and the class Dog - # allOf includes Animal, we move through Animal - # once using the discriminator, and pick Dog. - # Then in the composed schema dog Dog, we will make an instance of the - # Animal class (because Dal has allOf: Animal) but this time we won't travel - # through Animal's discriminator because we passed in - # _visited_composed_classes = (Animal,) - - return cls._from_openapi_data(*args, **kwargs) - - # Get the name and value of the discriminator property. - # The discriminator name is obtained from the discriminator meta-data - # and the discriminator value is obtained from the input data. - discr_propertyname_py = list(cls.discriminator.keys())[0] - discr_propertyname_js = cls.attribute_map[discr_propertyname_py] - if discr_propertyname_js in kwargs: - discr_value = kwargs[discr_propertyname_js] - elif discr_propertyname_py in kwargs: - discr_value = kwargs[discr_propertyname_py] - else: - # The input data does not contain the discriminator property. - path_to_item = kwargs.get('_path_to_item', ()) - raise ApiValueError( - "Cannot deserialize input data due to missing discriminator. " - "The discriminator property '%s' is missing at path: %s" % - (discr_propertyname_js, path_to_item) - ) - - # Implementation note: the last argument to get_discriminator_class - # is a list of visited classes. get_discriminator_class may recursively - # call itself and update the list of visited classes, and the initial - # value must be an empty list. Hence not using 'visited_composed_classes' - new_cls = get_discriminator_class( - cls, discr_propertyname_py, discr_value, []) - if new_cls is None: - path_to_item = kwargs.get('_path_to_item', ()) - disc_prop_value = kwargs.get( - discr_propertyname_js, kwargs.get(discr_propertyname_py)) - raise ApiValueError( - "Cannot deserialize input data due to invalid discriminator " - "value. The OpenAPI document has no mapping for discriminator " - "property '%s'='%s' at path: %s" % - (discr_propertyname_js, disc_prop_value, path_to_item) - ) - - if new_cls in visited_composed_classes: - # if we are making an instance of a composed schema Descendent - # which allOf includes Ancestor, then Ancestor contains - # a discriminator that includes Descendent. - # So if we make an instance of Descendent, we have to make an - # instance of Ancestor to hold the allOf properties. - # This code detects that use case and makes the instance of Ancestor - # For example: - # When making an instance of Dog, _visited_composed_classes = (Dog,) - # then we make an instance of Animal to include in dog._composed_instances - # so when we are here, cls is Animal - # cls.discriminator != None - # cls not in _visited_composed_classes - # new_cls = Dog - # but we know we know that we already have Dog - # because it is in visited_composed_classes - # so make Animal here - return cls._from_openapi_data(*args, **kwargs) - - # Build a list containing all oneOf and anyOf descendants. - oneof_anyof_classes = None - if cls._composed_schemas is not None: - oneof_anyof_classes = ( - cls._composed_schemas.get('oneOf', ()) + - cls._composed_schemas.get('anyOf', ())) - oneof_anyof_child = new_cls in oneof_anyof_classes - kwargs['_visited_composed_classes'] = visited_composed_classes + (cls,) - - if cls._composed_schemas.get('allOf') and oneof_anyof_child: - # Validate that we can make self because when we make the - # new_cls it will not include the allOf validations in self - self_inst = cls._from_openapi_data(*args, **kwargs) - - new_inst = new_cls._new_from_openapi_data(*args, **kwargs) - return new_inst - - -class ModelSimple(OpenApiModel): - """the parent class of models whose type != object in their - swagger/openapi""" - - def __setitem__(self, name, value): - """set the value of an attribute using square-bracket notation: `instance[attr] = val`""" - if name in self.required_properties: - self.__dict__[name] = value - return - - self.set_attribute(name, value) - - def get(self, name, default=None): - """returns the value of an attribute or some default value if the attribute was not set""" - if name in self.required_properties: - return self.__dict__[name] - - return self.__dict__['_data_store'].get(name, default) - - def __getitem__(self, name): - """get the value of an attribute using square-bracket notation: `instance[attr]`""" - if name in self: - return self.get(name) - - raise ApiAttributeError( - "{0} has no attribute '{1}'".format( - type(self).__name__, name), - [e for e in [self._path_to_item, name] if e] - ) - - def __contains__(self, name): - """used by `in` operator to check if an attribute value was set in an instance: `'attr' in instance`""" - if name in self.required_properties: - return name in self.__dict__ - - return name in self.__dict__['_data_store'] - - def to_str(self): - """Returns the string representation of the model""" - return str(self.value) - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, self.__class__): - return False - - this_val = self._data_store['value'] - that_val = other._data_store['value'] - types = set() - types.add(this_val.__class__) - types.add(that_val.__class__) - vals_equal = this_val == that_val - return vals_equal - - -class ModelNormal(OpenApiModel): - """the parent class of models whose type == object in their - swagger/openapi""" - - def __setitem__(self, name, value): - """set the value of an attribute using square-bracket notation: `instance[attr] = val`""" - if name in self.required_properties: - self.__dict__[name] = value - return - - self.set_attribute(name, value) - - def get(self, name, default=None): - """returns the value of an attribute or some default value if the attribute was not set""" - if name in self.required_properties: - return self.__dict__[name] - - return self.__dict__['_data_store'].get(name, default) - - def __getitem__(self, name): - """get the value of an attribute using square-bracket notation: `instance[attr]`""" - if name in self: - return self.get(name) - - raise ApiAttributeError( - "{0} has no attribute '{1}'".format( - type(self).__name__, name), - [e for e in [self._path_to_item, name] if e] - ) - - def __contains__(self, name): - """used by `in` operator to check if an attribute value was set in an instance: `'attr' in instance`""" - if name in self.required_properties: - return name in self.__dict__ - - return name in self.__dict__['_data_store'] - - def to_dict(self): - """Returns the model properties as a dict""" - return model_to_dict(self, serialize=False) - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, self.__class__): - return False - - if not set(self._data_store.keys()) == set(other._data_store.keys()): - return False - for _var_name, this_val in self._data_store.items(): - that_val = other._data_store[_var_name] - types = set() - types.add(this_val.__class__) - types.add(that_val.__class__) - vals_equal = this_val == that_val - if not vals_equal: - return False - return True - - -class ModelComposed(OpenApiModel): - """the parent class of models whose type == object in their - swagger/openapi and have oneOf/allOf/anyOf - - When one sets a property we use var_name_to_model_instances to store the value in - the correct class instances + run any type checking + validation code. - When one gets a property we use var_name_to_model_instances to get the value - from the correct class instances. - This allows multiple composed schemas to contain the same property with additive - constraints on the value. - - _composed_schemas (dict) stores the anyOf/allOf/oneOf classes - key (str): allOf/oneOf/anyOf - value (list): the classes in the XOf definition. - Note: none_type can be included when the openapi document version >= 3.1.0 - _composed_instances (list): stores a list of instances of the composed schemas - defined in _composed_schemas. When properties are accessed in the self instance, - they are returned from the self._data_store or the data stores in the instances - in self._composed_schemas - _var_name_to_model_instances (dict): maps between a variable name on self and - the composed instances (self included) which contain that data - key (str): property name - value (list): list of class instances, self or instances in _composed_instances - which contain the value that the key is referring to. - """ - - def __setitem__(self, name, value): - """set the value of an attribute using square-bracket notation: `instance[attr] = val`""" - if name in self.required_properties: - self.__dict__[name] = value - return - - """ - Use cases: - 1. additional_properties_type is None (additionalProperties == False in spec) - Check for property presence in self.openapi_types - if not present then throw an error - if present set in self, set attribute - always set on composed schemas - 2. additional_properties_type exists - set attribute on self - always set on composed schemas - """ - if self.additional_properties_type is None: - """ - For an attribute to exist on a composed schema it must: - - fulfill schema_requirements in the self composed schema not considering oneOf/anyOf/allOf schemas AND - - fulfill schema_requirements in each oneOf/anyOf/allOf schemas - - schema_requirements: - For an attribute to exist on a schema it must: - - be present in properties at the schema OR - - have additionalProperties unset (defaults additionalProperties = any type) OR - - have additionalProperties set - """ - if name not in self.openapi_types: - raise ApiAttributeError( - "{0} has no attribute '{1}'".format( - type(self).__name__, name), - [e for e in [self._path_to_item, name] if e] - ) - # attribute must be set on self and composed instances - self.set_attribute(name, value) - for model_instance in self._composed_instances: - setattr(model_instance, name, value) - if name not in self._var_name_to_model_instances: - # we assigned an additional property - self.__dict__['_var_name_to_model_instances'][name] = self._composed_instances + [self] - return None - - __unset_attribute_value__ = object() - - def get(self, name, default=None): - """returns the value of an attribute or some default value if the attribute was not set""" - if name in self.required_properties: - return self.__dict__[name] - - # get the attribute from the correct instance - model_instances = self._var_name_to_model_instances.get(name) - values = [] - # A composed model stores self and child (oneof/anyOf/allOf) models under - # self._var_name_to_model_instances. - # Any property must exist in self and all model instances - # The value stored in all model instances must be the same - if model_instances: - for model_instance in model_instances: - if name in model_instance._data_store: - v = model_instance._data_store[name] - if v not in values: - values.append(v) - len_values = len(values) - if len_values == 0: - return default - elif len_values == 1: - return values[0] - elif len_values > 1: - raise ApiValueError( - "Values stored for property {0} in {1} differ when looking " - "at self and self's composed instances. All values must be " - "the same".format(name, type(self).__name__), - [e for e in [self._path_to_item, name] if e] - ) - - def __getitem__(self, name): - """get the value of an attribute using square-bracket notation: `instance[attr]`""" - value = self.get(name, self.__unset_attribute_value__) - if value is self.__unset_attribute_value__: - raise ApiAttributeError( - "{0} has no attribute '{1}'".format( - type(self).__name__, name), - [e for e in [self._path_to_item, name] if e] - ) - return value - - def __contains__(self, name): - """used by `in` operator to check if an attribute value was set in an instance: `'attr' in instance`""" - - if name in self.required_properties: - return name in self.__dict__ - - model_instances = self._var_name_to_model_instances.get( - name, self._additional_properties_model_instances) - - if model_instances: - for model_instance in model_instances: - if name in model_instance._data_store: - return True - - return False - - def to_dict(self): - """Returns the model properties as a dict""" - return model_to_dict(self, serialize=False) - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, self.__class__): - return False - - if not set(self._data_store.keys()) == set(other._data_store.keys()): - return False - for _var_name, this_val in self._data_store.items(): - that_val = other._data_store[_var_name] - types = set() - types.add(this_val.__class__) - types.add(that_val.__class__) - vals_equal = this_val == that_val - if not vals_equal: - return False - return True - - -COERCION_INDEX_BY_TYPE = { - ModelComposed: 0, - ModelNormal: 1, - ModelSimple: 2, - none_type: 3, # The type of 'None'. - list: 4, - dict: 5, - float: 6, - int: 7, - bool: 8, - datetime: 9, - date: 10, - str: 11, - file_type: 12, # 'file_type' is an alias for the built-in 'file' or 'io.IOBase' type. -} - -# these are used to limit what type conversions we try to do -# when we have a valid type already and we want to try converting -# to another type -UPCONVERSION_TYPE_PAIRS = ( - (str, datetime), - (str, date), - # A float may be serialized as an integer, e.g. '3' is a valid serialized float. - (int, float), - (list, ModelComposed), - (dict, ModelComposed), - (str, ModelComposed), - (int, ModelComposed), - (float, ModelComposed), - (list, ModelComposed), - (list, ModelNormal), - (dict, ModelNormal), - (str, ModelSimple), - (int, ModelSimple), - (float, ModelSimple), - (list, ModelSimple), -) - -COERCIBLE_TYPE_PAIRS = { - False: ( # client instantiation of a model with client data - # (dict, ModelComposed), - # (list, ModelComposed), - # (dict, ModelNormal), - # (list, ModelNormal), - # (str, ModelSimple), - # (int, ModelSimple), - # (float, ModelSimple), - # (list, ModelSimple), - # (str, int), - # (str, float), - # (str, datetime), - # (str, date), - # (int, str), - # (float, str), - ), - True: ( # server -> client data - (dict, ModelComposed), - (list, ModelComposed), - (dict, ModelNormal), - (list, ModelNormal), - (str, ModelSimple), - (int, ModelSimple), - (float, ModelSimple), - (list, ModelSimple), - # (str, int), - # (str, float), - (str, datetime), - (str, date), - # (int, str), - # (float, str), - (str, file_type) - ), -} - - -def get_simple_class(input_value): - """Returns an input_value's simple class that we will use for type checking - Python2: - float and int will return int, where int is the python3 int backport - str and unicode will return str, where str is the python3 str backport - Note: float and int ARE both instances of int backport - Note: str_py2 and unicode_py2 are NOT both instances of str backport - - Args: - input_value (class/class_instance): the item for which we will return - the simple class - """ - if isinstance(input_value, type): - # input_value is a class - return input_value - elif isinstance(input_value, tuple): - return tuple - elif isinstance(input_value, list): - return list - elif isinstance(input_value, dict): - return dict - elif isinstance(input_value, none_type): - return none_type - elif isinstance(input_value, file_type): - return file_type - elif isinstance(input_value, bool): - # this must be higher than the int check because - # isinstance(True, int) == True - return bool - elif isinstance(input_value, int): - return int - elif isinstance(input_value, datetime): - # this must be higher than the date check because - # isinstance(datetime_instance, date) == True - return datetime - elif isinstance(input_value, date): - return date - elif isinstance(input_value, str): - return str - return type(input_value) - - -def check_allowed_values(allowed_values, input_variable_path, input_values): - """Raises an exception if the input_values are not allowed - - Args: - allowed_values (dict): the allowed_values dict - input_variable_path (tuple): the path to the input variable - input_values (list/str/int/float/date/datetime): the values that we - are checking to see if they are in allowed_values - """ - these_allowed_values = list(allowed_values[input_variable_path].values()) - if (isinstance(input_values, list) - and not set(input_values).issubset( - set(these_allowed_values))): - invalid_values = ", ".join( - map(str, set(input_values) - set(these_allowed_values))), - raise ApiValueError( - "Invalid values for `%s` [%s], must be a subset of [%s]" % - ( - input_variable_path[0], - invalid_values, - ", ".join(map(str, these_allowed_values)) - ) - ) - elif (isinstance(input_values, dict) - and not set( - input_values.keys()).issubset(set(these_allowed_values))): - invalid_values = ", ".join( - map(str, set(input_values.keys()) - set(these_allowed_values))) - raise ApiValueError( - "Invalid keys in `%s` [%s], must be a subset of [%s]" % - ( - input_variable_path[0], - invalid_values, - ", ".join(map(str, these_allowed_values)) - ) - ) - elif (not isinstance(input_values, (list, dict)) - and input_values not in these_allowed_values): - raise ApiValueError( - "Invalid value for `%s` (%s), must be one of %s" % - ( - input_variable_path[0], - input_values, - these_allowed_values - ) - ) - - -def is_json_validation_enabled(schema_keyword, configuration=None): - """Returns true if JSON schema validation is enabled for the specified - validation keyword. This can be used to skip JSON schema structural validation - as requested in the configuration. - - Args: - schema_keyword (string): the name of a JSON schema validation keyword. - configuration (Configuration): the configuration class. - """ - - return (configuration is None or - not hasattr(configuration, '_disabled_client_side_validations') or - schema_keyword not in configuration._disabled_client_side_validations) - - -def check_validations( - validations, input_variable_path, input_values, - configuration=None): - """Raises an exception if the input_values are invalid - - Args: - validations (dict): the validation dictionary. - input_variable_path (tuple): the path to the input variable. - input_values (list/str/int/float/date/datetime): the values that we - are checking. - configuration (Configuration): the configuration class. - """ - - if input_values is None: - return - - current_validations = validations[input_variable_path] - if (is_json_validation_enabled('multipleOf', configuration) and - 'multiple_of' in current_validations and - isinstance(input_values, (int, float)) and - not (float(input_values) / current_validations['multiple_of']).is_integer()): - # Note 'multipleOf' will be as good as the floating point arithmetic. - raise ApiValueError( - "Invalid value for `%s`, value must be a multiple of " - "`%s`" % ( - input_variable_path[0], - current_validations['multiple_of'] - ) - ) - - if (is_json_validation_enabled('maxLength', configuration) and - 'max_length' in current_validations and - len(input_values) > current_validations['max_length']): - raise ApiValueError( - "Invalid value for `%s`, length must be less than or equal to " - "`%s`" % ( - input_variable_path[0], - current_validations['max_length'] - ) - ) - - if (is_json_validation_enabled('minLength', configuration) and - 'min_length' in current_validations and - len(input_values) < current_validations['min_length']): - raise ApiValueError( - "Invalid value for `%s`, length must be greater than or equal to " - "`%s`" % ( - input_variable_path[0], - current_validations['min_length'] - ) - ) - - if (is_json_validation_enabled('maxItems', configuration) and - 'max_items' in current_validations and - len(input_values) > current_validations['max_items']): - raise ApiValueError( - "Invalid value for `%s`, number of items must be less than or " - "equal to `%s`" % ( - input_variable_path[0], - current_validations['max_items'] - ) - ) - - if (is_json_validation_enabled('minItems', configuration) and - 'min_items' in current_validations and - len(input_values) < current_validations['min_items']): - raise ValueError( - "Invalid value for `%s`, number of items must be greater than or " - "equal to `%s`" % ( - input_variable_path[0], - current_validations['min_items'] - ) - ) - - items = ('exclusive_maximum', 'inclusive_maximum', 'exclusive_minimum', - 'inclusive_minimum') - if (any(item in current_validations for item in items)): - if isinstance(input_values, list): - max_val = max(input_values) - min_val = min(input_values) - elif isinstance(input_values, dict): - max_val = max(input_values.values()) - min_val = min(input_values.values()) - else: - max_val = input_values - min_val = input_values - - if (is_json_validation_enabled('exclusiveMaximum', configuration) and - 'exclusive_maximum' in current_validations and - max_val >= current_validations['exclusive_maximum']): - raise ApiValueError( - "Invalid value for `%s`, must be a value less than `%s`" % ( - input_variable_path[0], - current_validations['exclusive_maximum'] - ) - ) - - if (is_json_validation_enabled('maximum', configuration) and - 'inclusive_maximum' in current_validations and - max_val > current_validations['inclusive_maximum']): - raise ApiValueError( - "Invalid value for `%s`, must be a value less than or equal to " - "`%s`" % ( - input_variable_path[0], - current_validations['inclusive_maximum'] - ) - ) - - if (is_json_validation_enabled('exclusiveMinimum', configuration) and - 'exclusive_minimum' in current_validations and - min_val <= current_validations['exclusive_minimum']): - raise ApiValueError( - "Invalid value for `%s`, must be a value greater than `%s`" % - ( - input_variable_path[0], - current_validations['exclusive_maximum'] - ) - ) - - if (is_json_validation_enabled('minimum', configuration) and - 'inclusive_minimum' in current_validations and - min_val < current_validations['inclusive_minimum']): - raise ApiValueError( - "Invalid value for `%s`, must be a value greater than or equal " - "to `%s`" % ( - input_variable_path[0], - current_validations['inclusive_minimum'] - ) - ) - flags = current_validations.get('regex', {}).get('flags', 0) - if (is_json_validation_enabled('pattern', configuration) and - 'regex' in current_validations and - not re.search(current_validations['regex']['pattern'], - input_values, flags=flags)): - err_msg = r"Invalid value for `%s`, must match regular expression `%s`" % ( - input_variable_path[0], - current_validations['regex']['pattern'] - ) - if flags != 0: - # Don't print the regex flags if the flags are not - # specified in the OAS document. - err_msg = r"%s with flags=`%s`" % (err_msg, flags) - raise ApiValueError(err_msg) - - -def order_response_types(required_types): - """Returns the required types sorted in coercion order - - Args: - required_types (list/tuple): collection of classes or instance of - list or dict with class information inside it. - - Returns: - (list): coercion order sorted collection of classes or instance - of list or dict with class information inside it. - """ - - def index_getter(class_or_instance): - if isinstance(class_or_instance, list): - return COERCION_INDEX_BY_TYPE[list] - elif isinstance(class_or_instance, dict): - return COERCION_INDEX_BY_TYPE[dict] - elif (inspect.isclass(class_or_instance) - and issubclass(class_or_instance, ModelComposed)): - return COERCION_INDEX_BY_TYPE[ModelComposed] - elif (inspect.isclass(class_or_instance) - and issubclass(class_or_instance, ModelNormal)): - return COERCION_INDEX_BY_TYPE[ModelNormal] - elif (inspect.isclass(class_or_instance) - and issubclass(class_or_instance, ModelSimple)): - return COERCION_INDEX_BY_TYPE[ModelSimple] - elif class_or_instance in COERCION_INDEX_BY_TYPE: - return COERCION_INDEX_BY_TYPE[class_or_instance] - raise ApiValueError("Unsupported type: %s" % class_or_instance) - - sorted_types = sorted( - required_types, - key=lambda class_or_instance: index_getter(class_or_instance) - ) - return sorted_types - - -def remove_uncoercible(required_types_classes, current_item, spec_property_naming, - must_convert=True): - """Only keeps the type conversions that are possible - - Args: - required_types_classes (tuple): tuple of classes that are required - these should be ordered by COERCION_INDEX_BY_TYPE - spec_property_naming (bool): True if the variable names in the input - data are serialized names as specified in the OpenAPI document. - False if the variables names in the input data are python - variable names in PEP-8 snake case. - current_item (any): the current item (input data) to be converted - - Keyword Args: - must_convert (bool): if True the item to convert is of the wrong - type and we want a big list of coercibles - if False, we want a limited list of coercibles - - Returns: - (list): the remaining coercible required types, classes only - """ - current_type_simple = get_simple_class(current_item) - - results_classes = [] - for required_type_class in required_types_classes: - # convert our models to OpenApiModel - required_type_class_simplified = required_type_class - if isinstance(required_type_class_simplified, type): - if issubclass(required_type_class_simplified, ModelComposed): - required_type_class_simplified = ModelComposed - elif issubclass(required_type_class_simplified, ModelNormal): - required_type_class_simplified = ModelNormal - elif issubclass(required_type_class_simplified, ModelSimple): - required_type_class_simplified = ModelSimple - - if required_type_class_simplified == current_type_simple: - # don't consider converting to one's own class - continue - - class_pair = (current_type_simple, required_type_class_simplified) - if must_convert and class_pair in COERCIBLE_TYPE_PAIRS[spec_property_naming]: - results_classes.append(required_type_class) - elif class_pair in UPCONVERSION_TYPE_PAIRS: - results_classes.append(required_type_class) - return results_classes - - -def get_discriminated_classes(cls): - """ - Returns all the classes that a discriminator converts to - TODO: lru_cache this - """ - possible_classes = [] - key = list(cls.discriminator.keys())[0] - if is_type_nullable(cls): - possible_classes.append(cls) - for discr_cls in cls.discriminator[key].values(): - if hasattr(discr_cls, 'discriminator') and discr_cls.discriminator is not None: - possible_classes.extend(get_discriminated_classes(discr_cls)) - else: - possible_classes.append(discr_cls) - return possible_classes - - -def get_possible_classes(cls, from_server_context): - # TODO: lru_cache this - possible_classes = [cls] - if from_server_context: - return possible_classes - if hasattr(cls, 'discriminator') and cls.discriminator is not None: - possible_classes = [] - possible_classes.extend(get_discriminated_classes(cls)) - elif issubclass(cls, ModelComposed): - possible_classes.extend(composed_model_input_classes(cls)) - return possible_classes - - -def get_required_type_classes(required_types_mixed, spec_property_naming): - """Converts the tuple required_types into a tuple and a dict described - below - - Args: - required_types_mixed (tuple/list): will contain either classes or - instance of list or dict - spec_property_naming (bool): if True these values came from the - server, and we use the data types in our endpoints. - If False, we are client side and we need to include - oneOf and discriminator classes inside the data types in our endpoints - - Returns: - (valid_classes, dict_valid_class_to_child_types_mixed): - valid_classes (tuple): the valid classes that the current item - should be - dict_valid_class_to_child_types_mixed (dict): - valid_class (class): this is the key - child_types_mixed (list/dict/tuple): describes the valid child - types - """ - valid_classes = [] - child_req_types_by_current_type = {} - for required_type in required_types_mixed: - if isinstance(required_type, list): - valid_classes.append(list) - child_req_types_by_current_type[list] = required_type - elif isinstance(required_type, tuple): - valid_classes.append(tuple) - child_req_types_by_current_type[tuple] = required_type - elif isinstance(required_type, dict): - valid_classes.append(dict) - child_req_types_by_current_type[dict] = required_type[str] - else: - valid_classes.extend(get_possible_classes(required_type, spec_property_naming)) - return tuple(valid_classes), child_req_types_by_current_type - - -def change_keys_js_to_python(input_dict, model_class): - """ - Converts from javascript_key keys in the input_dict to python_keys in - the output dict using the mapping in model_class. - If the input_dict contains a key which does not declared in the model_class, - the key is added to the output dict as is. The assumption is the model_class - may have undeclared properties (additionalProperties attribute in the OAS - document). - """ - - if getattr(model_class, 'attribute_map', None) is None: - return input_dict - output_dict = {} - reversed_attr_map = {value: key for key, value in - model_class.attribute_map.items()} - for javascript_key, value in input_dict.items(): - python_key = reversed_attr_map.get(javascript_key) - if python_key is None: - # if the key is unknown, it is in error or it is an - # additionalProperties variable - python_key = javascript_key - output_dict[python_key] = value - return output_dict - - -def get_type_error(var_value, path_to_item, valid_classes, key_type=False): - error_msg = type_error_message( - var_name=path_to_item[-1], - var_value=var_value, - valid_classes=valid_classes, - key_type=key_type - ) - return ApiTypeError( - error_msg, - path_to_item=path_to_item, - valid_classes=valid_classes, - key_type=key_type - ) - - -def deserialize_primitive(data, klass, path_to_item): - """Deserializes string to primitive type. - - :param data: str/int/float - :param klass: str/class the class to convert to - - :return: int, float, str, bool, date, datetime - """ - additional_message = "" - try: - if klass in {datetime, date}: - additional_message = ( - "If you need your parameter to have a fallback " - "string value, please set its type as `type: {}` in your " - "spec. That allows the value to be any type. " - ) - if klass == datetime: - if len(data) < 8: - raise ValueError("This is not a datetime") - # The string should be in iso8601 datetime format. - parsed_datetime = parse(data) - date_only = ( - parsed_datetime.hour == 0 and - parsed_datetime.minute == 0 and - parsed_datetime.second == 0 and - parsed_datetime.tzinfo is None and - 8 <= len(data) <= 10 - ) - if date_only: - raise ValueError("This is a date, not a datetime") - return parsed_datetime - elif klass == date: - if len(data) < 8: - raise ValueError("This is not a date") - return parse(data).date() - else: - converted_value = klass(data) - if isinstance(data, str) and klass == float: - if str(converted_value) != data: - # '7' -> 7.0 -> '7.0' != '7' - raise ValueError('This is not a float') - return converted_value - except (OverflowError, ValueError) as ex: - # parse can raise OverflowError - raise ApiValueError( - "{0}Failed to parse {1} as {2}".format( - additional_message, repr(data), klass.__name__ - ), - path_to_item=path_to_item - ) from ex - - -def get_discriminator_class(model_class, - discr_name, - discr_value, cls_visited): - """Returns the child class specified by the discriminator. - - Args: - model_class (OpenApiModel): the model class. - discr_name (string): the name of the discriminator property. - discr_value (any): the discriminator value. - cls_visited (list): list of model classes that have been visited. - Used to determine the discriminator class without - visiting circular references indefinitely. - - Returns: - used_model_class (class/None): the chosen child class that will be used - to deserialize the data, for example dog.Dog. - If a class is not found, None is returned. - """ - - if model_class in cls_visited: - # The class has already been visited and no suitable class was found. - return None - cls_visited.append(model_class) - used_model_class = None - if discr_name in model_class.discriminator: - class_name_to_discr_class = model_class.discriminator[discr_name] - used_model_class = class_name_to_discr_class.get(discr_value) - if used_model_class is None: - # We didn't find a discriminated class in class_name_to_discr_class. - # So look in the ancestor or descendant discriminators - # The discriminator mapping may exist in a descendant (anyOf, oneOf) - # or ancestor (allOf). - # Ancestor example: in the GrandparentAnimal -> ParentPet -> ChildCat - # hierarchy, the discriminator mappings may be defined at any level - # in the hierarchy. - # Descendant example: mammal -> whale/zebra/Pig -> BasquePig/DanishPig - # if we try to make BasquePig from mammal, we need to travel through - # the oneOf descendant discriminators to find BasquePig - descendant_classes = model_class._composed_schemas.get('oneOf', ()) + \ - model_class._composed_schemas.get('anyOf', ()) - ancestor_classes = model_class._composed_schemas.get('allOf', ()) - possible_classes = descendant_classes + ancestor_classes - for cls in possible_classes: - # Check if the schema has inherited discriminators. - if hasattr(cls, 'discriminator') and cls.discriminator is not None: - used_model_class = get_discriminator_class( - cls, discr_name, discr_value, cls_visited) - if used_model_class is not None: - return used_model_class - return used_model_class - - -def deserialize_model(model_data, model_class, path_to_item, check_type, - configuration, spec_property_naming): - """Deserializes model_data to model instance. - - Args: - model_data (int/str/float/bool/none_type/list/dict): data to instantiate the model - model_class (OpenApiModel): the model class - path_to_item (list): path to the model in the received data - check_type (bool): whether to check the data tupe for the values in - the model - configuration (Configuration): the instance to use to convert files - spec_property_naming (bool): True if the variable names in the input - data are serialized names as specified in the OpenAPI document. - False if the variables names in the input data are python - variable names in PEP-8 snake case. - - Returns: - model instance - - Raise: - ApiTypeError - ApiValueError - ApiKeyError - """ - - kw_args = dict(_check_type=check_type, - _path_to_item=path_to_item, - _configuration=configuration, - _spec_property_naming=spec_property_naming) - - if issubclass(model_class, ModelSimple): - return model_class._new_from_openapi_data(model_data, **kw_args) - elif isinstance(model_data, list): - return model_class._new_from_openapi_data(*model_data, **kw_args) - if isinstance(model_data, dict): - kw_args.update(model_data) - return model_class._new_from_openapi_data(**kw_args) - elif isinstance(model_data, PRIMITIVE_TYPES): - return model_class._new_from_openapi_data(model_data, **kw_args) - - -def deserialize_file(response_data, configuration, content_disposition=None): - """Deserializes body to file - - Saves response body into a file in a temporary folder, - using the filename from the `Content-Disposition` header if provided. - - Args: - param response_data (str): the file data to write - configuration (Configuration): the instance to use to convert files - - Keyword Args: - content_disposition (str): the value of the Content-Disposition - header - - Returns: - (file_type): the deserialized file which is open - The user is responsible for closing and reading the file - """ - fd, path = tempfile.mkstemp(dir=configuration.temp_folder_path) - os.close(fd) - os.remove(path) - - if content_disposition: - filename = re.search(r'filename=[\'"]?([^\'"\s]+)[\'"]?', - content_disposition, - flags=re.I) - if filename is not None: - filename = filename.group(1) - else: - filename = "default_" + str(uuid.uuid4()) - - path = os.path.join(os.path.dirname(path), filename) - - with open(path, "wb") as f: - if isinstance(response_data, str): - # change str to bytes so we can write it - response_data = response_data.encode('utf-8') - f.write(response_data) - - f = open(path, "rb") - return f - - -def attempt_convert_item(input_value, valid_classes, path_to_item, - configuration, spec_property_naming, key_type=False, - must_convert=False, check_type=True): - """ - Args: - input_value (any): the data to convert - valid_classes (any): the classes that are valid - path_to_item (list): the path to the item to convert - configuration (Configuration): the instance to use to convert files - spec_property_naming (bool): True if the variable names in the input - data are serialized names as specified in the OpenAPI document. - False if the variables names in the input data are python - variable names in PEP-8 snake case. - key_type (bool): if True we need to convert a key type (not supported) - must_convert (bool): if True we must convert - check_type (bool): if True we check the type or the returned data in - ModelComposed/ModelNormal/ModelSimple instances - - Returns: - instance (any) the fixed item - - Raises: - ApiTypeError - ApiValueError - ApiKeyError - """ - valid_classes_ordered = order_response_types(valid_classes) - valid_classes_coercible = remove_uncoercible( - valid_classes_ordered, input_value, spec_property_naming) - if not valid_classes_coercible or key_type: - # we do not handle keytype errors, json will take care - # of this for us - if configuration is None or not configuration.discard_unknown_keys: - raise get_type_error(input_value, path_to_item, valid_classes, - key_type=key_type) - for valid_class in valid_classes_coercible: - try: - if issubclass(valid_class, OpenApiModel): - return deserialize_model(input_value, valid_class, - path_to_item, check_type, - configuration, spec_property_naming) - elif valid_class == file_type: - return deserialize_file(input_value, configuration) - return deserialize_primitive(input_value, valid_class, - path_to_item) - except (ApiTypeError, ApiValueError, ApiKeyError) as conversion_exc: - if must_convert: - raise conversion_exc - # if we have conversion errors when must_convert == False - # we ignore the exception and move on to the next class - continue - # we were unable to convert, must_convert == False - return input_value - - -def is_type_nullable(input_type): - """ - Returns true if None is an allowed value for the specified input_type. - - A type is nullable if at least one of the following conditions is true: - 1. The OAS 'nullable' attribute has been specified, - 1. The type is the 'null' type, - 1. The type is a anyOf/oneOf composed schema, and a child schema is - the 'null' type. - Args: - input_type (type): the class of the input_value that we are - checking - Returns: - bool - """ - if input_type is none_type: - return True - if issubclass(input_type, OpenApiModel) and input_type._nullable: - return True - if issubclass(input_type, ModelComposed): - # If oneOf/anyOf, check if the 'null' type is one of the allowed types. - for t in input_type._composed_schemas.get('oneOf', ()): - if is_type_nullable(t): - return True - for t in input_type._composed_schemas.get('anyOf', ()): - if is_type_nullable(t): - return True - return False - - -def is_valid_type(input_class_simple, valid_classes): - """ - Args: - input_class_simple (class): the class of the input_value that we are - checking - valid_classes (tuple): the valid classes that the current item - should be - Returns: - bool - """ - if issubclass(input_class_simple, OpenApiModel) and \ - valid_classes == (bool, date, datetime, dict, float, int, list, str, none_type,): - return True - valid_type = input_class_simple in valid_classes - if not valid_type and ( - issubclass(input_class_simple, OpenApiModel) or - input_class_simple is none_type): - for valid_class in valid_classes: - if input_class_simple is none_type and is_type_nullable(valid_class): - # Schema is oneOf/anyOf and the 'null' type is one of the allowed types. - return True - if not (issubclass(valid_class, OpenApiModel) and valid_class.discriminator): - continue - discr_propertyname_py = list(valid_class.discriminator.keys())[0] - discriminator_classes = ( - valid_class.discriminator[discr_propertyname_py].values() - ) - valid_type = is_valid_type(input_class_simple, discriminator_classes) - if valid_type: - return True - return valid_type - - -def validate_and_convert_types(input_value, required_types_mixed, path_to_item, - spec_property_naming, _check_type, configuration=None): - """Raises a TypeError is there is a problem, otherwise returns value - - Args: - input_value (any): the data to validate/convert - required_types_mixed (list/dict/tuple): A list of - valid classes, or a list tuples of valid classes, or a dict where - the value is a tuple of value classes - path_to_item: (list) the path to the data being validated - this stores a list of keys or indices to get to the data being - validated - spec_property_naming (bool): True if the variable names in the input - data are serialized names as specified in the OpenAPI document. - False if the variables names in the input data are python - variable names in PEP-8 snake case. - _check_type: (boolean) if true, type will be checked and conversion - will be attempted. - configuration: (Configuration): the configuration class to use - when converting file_type items. - If passed, conversion will be attempted when possible - If not passed, no conversions will be attempted and - exceptions will be raised - - Returns: - the correctly typed value - - Raises: - ApiTypeError - """ - results = get_required_type_classes(required_types_mixed, spec_property_naming) - valid_classes, child_req_types_by_current_type = results - - input_class_simple = get_simple_class(input_value) - valid_type = is_valid_type(input_class_simple, valid_classes) - if not valid_type: - if (configuration - or (input_class_simple == dict - and dict not in valid_classes)): - # if input_value is not valid_type try to convert it - converted_instance = attempt_convert_item( - input_value, - valid_classes, - path_to_item, - configuration, - spec_property_naming, - key_type=False, - must_convert=True, - check_type=_check_type - ) - return converted_instance - else: - raise get_type_error(input_value, path_to_item, valid_classes, - key_type=False) - - # input_value's type is in valid_classes - if len(valid_classes) > 1 and configuration: - # there are valid classes which are not the current class - valid_classes_coercible = remove_uncoercible( - valid_classes, input_value, spec_property_naming, must_convert=False) - if valid_classes_coercible: - converted_instance = attempt_convert_item( - input_value, - valid_classes_coercible, - path_to_item, - configuration, - spec_property_naming, - key_type=False, - must_convert=False, - check_type=_check_type - ) - return converted_instance - - if child_req_types_by_current_type == {}: - # all types are of the required types and there are no more inner - # variables left to look at - return input_value - inner_required_types = child_req_types_by_current_type.get( - type(input_value) - ) - if inner_required_types is None: - # for this type, there are not more inner variables left to look at - return input_value - if isinstance(input_value, list): - if input_value == []: - # allow an empty list - return input_value - for index, inner_value in enumerate(input_value): - inner_path = list(path_to_item) - inner_path.append(index) - input_value[index] = validate_and_convert_types( - inner_value, - inner_required_types, - inner_path, - spec_property_naming, - _check_type, - configuration=configuration - ) - elif isinstance(input_value, dict): - if input_value == {}: - # allow an empty dict - return input_value - for inner_key, inner_val in input_value.items(): - inner_path = list(path_to_item) - inner_path.append(inner_key) - if get_simple_class(inner_key) != str: - raise get_type_error(inner_key, inner_path, valid_classes, - key_type=True) - input_value[inner_key] = validate_and_convert_types( - inner_val, - inner_required_types, - inner_path, - spec_property_naming, - _check_type, - configuration=configuration - ) - return input_value - - -def model_to_dict(model_instance, serialize=True): - """Returns the model properties as a dict - - Args: - model_instance (one of your model instances): the model instance that - will be converted to a dict. - - Keyword Args: - serialize (bool): if True, the keys in the dict will be values from - attribute_map - """ - result = {} - - def extract_item(item): return ( - item[0], model_to_dict( - item[1], serialize=serialize)) if hasattr( - item[1], '_data_store') else item - - model_instances = [model_instance] - if model_instance._composed_schemas: - model_instances.extend(model_instance._composed_instances) - seen_json_attribute_names = set() - used_fallback_python_attribute_names = set() - py_to_json_map = {} - for model_instance in model_instances: - for attr, value in model_instance._data_store.items(): - if serialize: - # we use get here because additional property key names do not - # exist in attribute_map - try: - attr = model_instance.attribute_map[attr] - py_to_json_map.update(model_instance.attribute_map) - seen_json_attribute_names.add(attr) - except KeyError: - used_fallback_python_attribute_names.add(attr) - if isinstance(value, list): - if not value: - # empty list or None - result[attr] = value - else: - res = [] - for v in value: - if isinstance(v, PRIMITIVE_TYPES) or v is None: - res.append(v) - elif isinstance(v, ModelSimple): - res.append(v.value) - elif isinstance(v, dict): - res.append(dict(map( - extract_item, - v.items() - ))) - else: - res.append(model_to_dict(v, serialize=serialize)) - result[attr] = res - elif isinstance(value, dict): - result[attr] = dict(map( - extract_item, - value.items() - )) - elif isinstance(value, ModelSimple): - result[attr] = value.value - elif hasattr(value, '_data_store'): - result[attr] = model_to_dict(value, serialize=serialize) - else: - result[attr] = value - if serialize: - for python_key in used_fallback_python_attribute_names: - json_key = py_to_json_map.get(python_key) - if json_key is None: - continue - if python_key == json_key: - continue - json_key_assigned_no_need_for_python_key = json_key in seen_json_attribute_names - if json_key_assigned_no_need_for_python_key: - del result[python_key] - - return result - - -def type_error_message(var_value=None, var_name=None, valid_classes=None, - key_type=None): - """ - Keyword Args: - var_value (any): the variable which has the type_error - var_name (str): the name of the variable which has the typ error - valid_classes (tuple): the accepted classes for current_item's - value - key_type (bool): False if our value is a value in a dict - True if it is a key in a dict - False if our item is an item in a list - """ - key_or_value = 'value' - if key_type: - key_or_value = 'key' - valid_classes_phrase = get_valid_classes_phrase(valid_classes) - msg = ( - "Invalid type for variable '{0}'. Required {1} type {2} and " - "passed type was {3}".format( - var_name, - key_or_value, - valid_classes_phrase, - type(var_value).__name__, - ) - ) - return msg - - -def get_valid_classes_phrase(input_classes): - """Returns a string phrase describing what types are allowed - """ - all_classes = list(input_classes) - all_classes = sorted(all_classes, key=lambda cls: cls.__name__) - all_class_names = [cls.__name__ for cls in all_classes] - if len(all_class_names) == 1: - return 'is {0}'.format(all_class_names[0]) - return "is one of [{0}]".format(", ".join(all_class_names)) - - -def get_allof_instances(self, model_args, constant_args): - """ - Args: - self: the class we are handling - model_args (dict): var_name to var_value - used to make instances - constant_args (dict): - metadata arguments: - _check_type - _path_to_item - _spec_property_naming - _configuration - _visited_composed_classes - - Returns - composed_instances (list) - """ - composed_instances = [] - for allof_class in self._composed_schemas['allOf']: - - try: - if constant_args.get('_spec_property_naming'): - allof_instance = allof_class._from_openapi_data(**model_args, **constant_args) - else: - allof_instance = allof_class(**model_args, **constant_args) - composed_instances.append(allof_instance) - except Exception as ex: - raise ApiValueError( - "Invalid inputs given to generate an instance of '%s'. The " - "input data was invalid for the allOf schema '%s' in the composed " - "schema '%s'. Error=%s" % ( - allof_class.__name__, - allof_class.__name__, - self.__class__.__name__, - str(ex) - ) - ) from ex - return composed_instances - - -def get_oneof_instance(cls, model_kwargs, constant_kwargs, model_arg=None): - """ - Find the oneOf schema that matches the input data (e.g. payload). - If exactly one schema matches the input data, an instance of that schema - is returned. - If zero or more than one schema match the input data, an exception is raised. - In OAS 3.x, the payload MUST, by validation, match exactly one of the - schemas described by oneOf. - - Args: - cls: the class we are handling - model_kwargs (dict): var_name to var_value - The input data, e.g. the payload that must match a oneOf schema - in the OpenAPI document. - constant_kwargs (dict): var_name to var_value - args that every model requires, including configuration, server - and path to item. - - Kwargs: - model_arg: (int, float, bool, str, date, datetime, ModelSimple, None): - the value to assign to a primitive class or ModelSimple class - Notes: - - this is only passed in when oneOf includes types which are not object - - None is used to suppress handling of model_arg, nullable models are handled in __new__ - - Returns - oneof_instance (instance) - """ - if len(cls._composed_schemas['oneOf']) == 0: - return None - - oneof_instances = [] - # Iterate over each oneOf schema and determine if the input data - # matches the oneOf schemas. - for oneof_class in cls._composed_schemas['oneOf']: - # The composed oneOf schema allows the 'null' type and the input data - # is the null value. This is a OAS >= 3.1 feature. - if oneof_class is none_type: - # skip none_types because we are deserializing dict data. - # none_type deserialization is handled in the __new__ method - continue - - single_value_input = allows_single_value_input(oneof_class) - - try: - if not single_value_input: - if constant_kwargs.get('_spec_property_naming'): - oneof_instance = oneof_class._from_openapi_data( - **model_kwargs, **constant_kwargs) - else: - oneof_instance = oneof_class(**model_kwargs, **constant_kwargs) - else: - if issubclass(oneof_class, ModelSimple): - if constant_kwargs.get('_spec_property_naming'): - oneof_instance = oneof_class._from_openapi_data( - model_arg, **constant_kwargs) - else: - oneof_instance = oneof_class(model_arg, **constant_kwargs) - elif oneof_class in PRIMITIVE_TYPES: - oneof_instance = validate_and_convert_types( - model_arg, - (oneof_class,), - constant_kwargs['_path_to_item'], - constant_kwargs['_spec_property_naming'], - constant_kwargs['_check_type'], - configuration=constant_kwargs['_configuration'] - ) - oneof_instances.append(oneof_instance) - except Exception: - pass - if len(oneof_instances) == 0: - raise ApiValueError( - "Invalid inputs given to generate an instance of %s. None " - "of the oneOf schemas matched the input data." % - cls.__name__ - ) - elif len(oneof_instances) > 1: - raise ApiValueError( - "Invalid inputs given to generate an instance of %s. Multiple " - "oneOf schemas matched the inputs, but a max of one is allowed." % - cls.__name__ - ) - return oneof_instances[0] - - -def get_anyof_instances(self, model_args, constant_args): - """ - Args: - self: the class we are handling - model_args (dict): var_name to var_value - The input data, e.g. the payload that must match at least one - anyOf child schema in the OpenAPI document. - constant_args (dict): var_name to var_value - args that every model requires, including configuration, server - and path to item. - - Returns - anyof_instances (list) - """ - anyof_instances = [] - if len(self._composed_schemas['anyOf']) == 0: - return anyof_instances - - for anyof_class in self._composed_schemas['anyOf']: - # The composed oneOf schema allows the 'null' type and the input data - # is the null value. This is a OAS >= 3.1 feature. - if anyof_class is none_type: - # skip none_types because we are deserializing dict data. - # none_type deserialization is handled in the __new__ method - continue - - try: - if constant_args.get('_spec_property_naming'): - anyof_instance = anyof_class._from_openapi_data(**model_args, **constant_args) - else: - anyof_instance = anyof_class(**model_args, **constant_args) - anyof_instances.append(anyof_instance) - except Exception: - pass - if len(anyof_instances) == 0: - raise ApiValueError( - "Invalid inputs given to generate an instance of %s. None of the " - "anyOf schemas matched the inputs." % - self.__class__.__name__ - ) - return anyof_instances - - -def get_discarded_args(self, composed_instances, model_args): - """ - Gathers the args that were discarded by configuration.discard_unknown_keys - """ - model_arg_keys = model_args.keys() - discarded_args = set() - # arguments passed to self were already converted to python names - # before __init__ was called - for instance in composed_instances: - if instance.__class__ in self._composed_schemas['allOf']: - try: - keys = instance.to_dict().keys() - discarded_keys = model_args - keys - discarded_args.update(discarded_keys) - except Exception: - # allOf integer schema will throw exception - pass - else: - try: - all_keys = set(model_to_dict(instance, serialize=False).keys()) - js_keys = model_to_dict(instance, serialize=True).keys() - all_keys.update(js_keys) - discarded_keys = model_arg_keys - all_keys - discarded_args.update(discarded_keys) - except Exception: - # allOf integer schema will throw exception - pass - return discarded_args - - -def validate_get_composed_info(constant_args, model_args, self): - """ - For composed schemas, generate schema instances for - all schemas in the oneOf/anyOf/allOf definition. If additional - properties are allowed, also assign those properties on - all matched schemas that contain additionalProperties. - Openapi schemas are python classes. - - Exceptions are raised if: - - 0 or > 1 oneOf schema matches the model_args input data - - no anyOf schema matches the model_args input data - - any of the allOf schemas do not match the model_args input data - - Args: - constant_args (dict): these are the args that every model requires - model_args (dict): these are the required and optional spec args that - were passed in to make this model - self (class): the class that we are instantiating - This class contains self._composed_schemas - - Returns: - composed_info (list): length three - composed_instances (list): the composed instances which are not - self - var_name_to_model_instances (dict): a dict going from var_name - to the model_instance which holds that var_name - the model_instance may be self or an instance of one of the - classes in self.composed_instances() - additional_properties_model_instances (list): a list of the - model instances which have the property - additional_properties_type. This list can include self - """ - # create composed_instances - composed_instances = [] - allof_instances = get_allof_instances(self, model_args, constant_args) - composed_instances.extend(allof_instances) - oneof_instance = get_oneof_instance(self.__class__, model_args, constant_args) - if oneof_instance is not None: - composed_instances.append(oneof_instance) - anyof_instances = get_anyof_instances(self, model_args, constant_args) - composed_instances.extend(anyof_instances) - """ - set additional_properties_model_instances - additional properties must be evaluated at the schema level - so self's additional properties are most important - If self is a composed schema with: - - no properties defined in self - - additionalProperties: False - Then for object payloads every property is an additional property - and they are not allowed, so only empty dict is allowed - - Properties must be set on all matching schemas - so when a property is assigned toa composed instance, it must be set on all - composed instances regardless of additionalProperties presence - keeping it to prevent breaking changes in v5.0.1 - TODO remove cls._additional_properties_model_instances in 6.0.0 - """ - additional_properties_model_instances = [] - if self.additional_properties_type is not None: - additional_properties_model_instances = [self] - - """ - no need to set properties on self in here, they will be set in __init__ - By here all composed schema oneOf/anyOf/allOf instances have their properties set using - model_args - """ - discarded_args = get_discarded_args(self, composed_instances, model_args) - - # map variable names to composed_instances - var_name_to_model_instances = {} - for prop_name in model_args: - if prop_name not in discarded_args: - var_name_to_model_instances[prop_name] = [self] + list( - filter( - lambda x: prop_name in x.openapi_types, composed_instances)) - - return [ - composed_instances, - var_name_to_model_instances, - additional_properties_model_instances, - discarded_args - ] diff --git a/Monei/models/__init__.py b/Monei/models/__init__.py index 3e176b8..a3288a1 100644 --- a/Monei/models/__init__.py +++ b/Monei/models/__init__.py @@ -1,101 +1,97 @@ +# coding: utf-8 + # flake8: noqa +""" + MONEI API v1 + +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

+ + The version of the OpenAPI document: 1.5.1 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 -# import all models into this package -# if you have many models here with many references from one model to another this may -# raise a RecursionError -# to avoid this, import only the models that you directly need like: -# from from Monei.model.pet import Pet -# or import this package, but before doing it, use: -# import sys -# sys.setrecursionlimit(n) -from Monei.model.activate_subscription_request import ActivateSubscriptionRequest -from Monei.model.address import Address -from Monei.model.apple_pay_domain_register200_response import ApplePayDomainRegister200Response -from Monei.model.apple_pay_domain_register400_response import ApplePayDomainRegister400Response -from Monei.model.apple_pay_domain_register401_response import ApplePayDomainRegister401Response -from Monei.model.apple_pay_domain_register404_response import ApplePayDomainRegister404Response -from Monei.model.apple_pay_domain_register422_response import ApplePayDomainRegister422Response -from Monei.model.apple_pay_domain_register500_response import ApplePayDomainRegister500Response -from Monei.model.apple_pay_domain_register503_response import ApplePayDomainRegister503Response -from Monei.model.bizum_validate_phone200_response import BizumValidatePhone200Response -from Monei.model.cancel_payment_request import CancelPaymentRequest -from Monei.model.cancel_subscription_request import CancelSubscriptionRequest -from Monei.model.capture_payment_request import CapturePaymentRequest -from Monei.model.confirm_payment_request import ConfirmPaymentRequest -from Monei.model.confirm_payment_request_payment_method import ConfirmPaymentRequestPaymentMethod -from Monei.model.confirm_payment_request_payment_method_card import ConfirmPaymentRequestPaymentMethodCard -from Monei.model.create_payment_request import CreatePaymentRequest -from Monei.model.create_subscription_request import CreateSubscriptionRequest -from Monei.model.error import Error -from Monei.model.pause_subscription_request import PauseSubscriptionRequest -from Monei.model.payment import Payment -from Monei.model.payment_billing_details import PaymentBillingDetails -from Monei.model.payment_cancellation_reason import PaymentCancellationReason -from Monei.model.payment_customer import PaymentCustomer -from Monei.model.payment_last_refund_reason import PaymentLastRefundReason -from Monei.model.payment_message_channel import PaymentMessageChannel -from Monei.model.payment_message_language import PaymentMessageLanguage -from Monei.model.payment_methods import PaymentMethods -from Monei.model.payment_methods_metadata import PaymentMethodsMetadata -from Monei.model.payment_methods_metadata_alipay import PaymentMethodsMetadataAlipay -from Monei.model.payment_methods_metadata_apple_pay import PaymentMethodsMetadataApplePay -from Monei.model.payment_methods_metadata_bancontact import PaymentMethodsMetadataBancontact -from Monei.model.payment_methods_metadata_bizum import PaymentMethodsMetadataBizum -from Monei.model.payment_methods_metadata_blik import PaymentMethodsMetadataBlik -from Monei.model.payment_methods_metadata_card import PaymentMethodsMetadataCard -from Monei.model.payment_methods_metadata_click_to_pay import PaymentMethodsMetadataClickToPay -from Monei.model.payment_methods_metadata_click_to_pay_discover import PaymentMethodsMetadataClickToPayDiscover -from Monei.model.payment_methods_metadata_click_to_pay_mastercard import PaymentMethodsMetadataClickToPayMastercard -from Monei.model.payment_methods_metadata_click_to_pay_visa import PaymentMethodsMetadataClickToPayVisa -from Monei.model.payment_methods_metadata_eps import PaymentMethodsMetadataEps -from Monei.model.payment_methods_metadata_giropay import PaymentMethodsMetadataGiropay -from Monei.model.payment_methods_metadata_google_pay import PaymentMethodsMetadataGooglePay -from Monei.model.payment_methods_metadata_i_deal import PaymentMethodsMetadataIDeal -from Monei.model.payment_methods_metadata_klarna import PaymentMethodsMetadataKlarna -from Monei.model.payment_methods_metadata_mbway import PaymentMethodsMetadataMbway -from Monei.model.payment_methods_metadata_sepa import PaymentMethodsMetadataSepa -from Monei.model.payment_methods_metadata_sofort import PaymentMethodsMetadataSofort -from Monei.model.payment_methods_metadata_trustly import PaymentMethodsMetadataTrustly -from Monei.model.payment_methods_methods import PaymentMethodsMethods -from Monei.model.payment_next_action import PaymentNextAction -from Monei.model.payment_payment_method import PaymentPaymentMethod -from Monei.model.payment_payment_method_bizum import PaymentPaymentMethodBizum -from Monei.model.payment_payment_method_bizum_input import PaymentPaymentMethodBizumInput -from Monei.model.payment_payment_method_card import PaymentPaymentMethodCard -from Monei.model.payment_payment_method_card_input import PaymentPaymentMethodCardInput -from Monei.model.payment_payment_method_cofidis import PaymentPaymentMethodCofidis -from Monei.model.payment_payment_method_input import PaymentPaymentMethodInput -from Monei.model.payment_payment_method_klarna import PaymentPaymentMethodKlarna -from Monei.model.payment_payment_method_mbway import PaymentPaymentMethodMbway -from Monei.model.payment_payment_method_paypal import PaymentPaymentMethodPaypal -from Monei.model.payment_payment_method_sepa import PaymentPaymentMethodSepa -from Monei.model.payment_payment_method_trustly import PaymentPaymentMethodTrustly -from Monei.model.payment_payment_methods import PaymentPaymentMethods -from Monei.model.payment_refund_reason import PaymentRefundReason -from Monei.model.payment_sequence import PaymentSequence -from Monei.model.payment_sequence_recurring import PaymentSequenceRecurring -from Monei.model.payment_session_details import PaymentSessionDetails -from Monei.model.payment_shipping_details import PaymentShippingDetails -from Monei.model.payment_shop import PaymentShop -from Monei.model.payment_status import PaymentStatus -from Monei.model.payment_trace_details import PaymentTraceDetails -from Monei.model.payment_transaction_type import PaymentTransactionType -from Monei.model.recurring_payment_request import RecurringPaymentRequest -from Monei.model.refund_payment_request import RefundPaymentRequest -from Monei.model.register_apple_pay_domain_request import RegisterApplePayDomainRequest -from Monei.model.send_payment_link_request import SendPaymentLinkRequest -from Monei.model.send_payment_receipt_request import SendPaymentReceiptRequest -from Monei.model.send_payment_request_request import SendPaymentRequestRequest -from Monei.model.send_subscription_link_request import SendSubscriptionLinkRequest -from Monei.model.send_subscription_status_request import SendSubscriptionStatusRequest -from Monei.model.subscription import Subscription -from Monei.model.subscription_interval import SubscriptionInterval -from Monei.model.subscription_last_payment import SubscriptionLastPayment -from Monei.model.subscription_payment_method import SubscriptionPaymentMethod -from Monei.model.subscription_payment_method_card import SubscriptionPaymentMethodCard -from Monei.model.subscription_retry_schedule import SubscriptionRetrySchedule -from Monei.model.subscription_retry_schedule_inner import SubscriptionRetryScheduleInner -from Monei.model.subscription_status import SubscriptionStatus -from Monei.model.update_subscription_request import UpdateSubscriptionRequest -from Monei.model.validate_bizum_phone_request import ValidateBizumPhoneRequest +# import models into model package +from Monei.models.activate_subscription_request import ActivateSubscriptionRequest +from Monei.models.address import Address +from Monei.models.apple_pay_domain_register200_response import ApplePayDomainRegister200Response +from Monei.models.bizum_validate_phone200_response import BizumValidatePhone200Response +from Monei.models.cancel_payment_request import CancelPaymentRequest +from Monei.models.cancel_subscription_request import CancelSubscriptionRequest +from Monei.models.capture_payment_request import CapturePaymentRequest +from Monei.models.confirm_payment_request import ConfirmPaymentRequest +from Monei.models.confirm_payment_request_payment_method import ConfirmPaymentRequestPaymentMethod +from Monei.models.confirm_payment_request_payment_method_card import ConfirmPaymentRequestPaymentMethodCard +from Monei.models.create_payment_request import CreatePaymentRequest +from Monei.models.create_subscription_request import CreateSubscriptionRequest +from Monei.models.error import Error +from Monei.models.pause_subscription_request import PauseSubscriptionRequest +from Monei.models.payment import Payment +from Monei.models.payment_billing_details import PaymentBillingDetails +from Monei.models.payment_cancellation_reason import PaymentCancellationReason +from Monei.models.payment_customer import PaymentCustomer +from Monei.models.payment_last_refund_reason import PaymentLastRefundReason +from Monei.models.payment_message_channel import PaymentMessageChannel +from Monei.models.payment_message_language import PaymentMessageLanguage +from Monei.models.payment_methods import PaymentMethods +from Monei.models.payment_methods_metadata import PaymentMethodsMetadata +from Monei.models.payment_methods_metadata_alipay import PaymentMethodsMetadataAlipay +from Monei.models.payment_methods_metadata_apple_pay import PaymentMethodsMetadataApplePay +from Monei.models.payment_methods_metadata_bancontact import PaymentMethodsMetadataBancontact +from Monei.models.payment_methods_metadata_bizum import PaymentMethodsMetadataBizum +from Monei.models.payment_methods_metadata_blik import PaymentMethodsMetadataBlik +from Monei.models.payment_methods_metadata_card import PaymentMethodsMetadataCard +from Monei.models.payment_methods_metadata_click_to_pay import PaymentMethodsMetadataClickToPay +from Monei.models.payment_methods_metadata_click_to_pay_discover import PaymentMethodsMetadataClickToPayDiscover +from Monei.models.payment_methods_metadata_click_to_pay_mastercard import PaymentMethodsMetadataClickToPayMastercard +from Monei.models.payment_methods_metadata_click_to_pay_visa import PaymentMethodsMetadataClickToPayVisa +from Monei.models.payment_methods_metadata_eps import PaymentMethodsMetadataEps +from Monei.models.payment_methods_metadata_giropay import PaymentMethodsMetadataGiropay +from Monei.models.payment_methods_metadata_google_pay import PaymentMethodsMetadataGooglePay +from Monei.models.payment_methods_metadata_i_deal import PaymentMethodsMetadataIDeal +from Monei.models.payment_methods_metadata_klarna import PaymentMethodsMetadataKlarna +from Monei.models.payment_methods_metadata_mbway import PaymentMethodsMetadataMbway +from Monei.models.payment_methods_metadata_sepa import PaymentMethodsMetadataSepa +from Monei.models.payment_methods_metadata_sofort import PaymentMethodsMetadataSofort +from Monei.models.payment_methods_metadata_trustly import PaymentMethodsMetadataTrustly +from Monei.models.payment_next_action import PaymentNextAction +from Monei.models.payment_payment_method import PaymentPaymentMethod +from Monei.models.payment_payment_method_bizum import PaymentPaymentMethodBizum +from Monei.models.payment_payment_method_bizum_input import PaymentPaymentMethodBizumInput +from Monei.models.payment_payment_method_card import PaymentPaymentMethodCard +from Monei.models.payment_payment_method_card_input import PaymentPaymentMethodCardInput +from Monei.models.payment_payment_method_cofidis import PaymentPaymentMethodCofidis +from Monei.models.payment_payment_method_input import PaymentPaymentMethodInput +from Monei.models.payment_payment_method_klarna import PaymentPaymentMethodKlarna +from Monei.models.payment_payment_method_mbway import PaymentPaymentMethodMbway +from Monei.models.payment_payment_method_paypal import PaymentPaymentMethodPaypal +from Monei.models.payment_payment_method_sepa import PaymentPaymentMethodSepa +from Monei.models.payment_payment_method_trustly import PaymentPaymentMethodTrustly +from Monei.models.payment_refund_reason import PaymentRefundReason +from Monei.models.payment_sequence import PaymentSequence +from Monei.models.payment_sequence_recurring import PaymentSequenceRecurring +from Monei.models.payment_session_details import PaymentSessionDetails +from Monei.models.payment_shipping_details import PaymentShippingDetails +from Monei.models.payment_shop import PaymentShop +from Monei.models.payment_status import PaymentStatus +from Monei.models.payment_trace_details import PaymentTraceDetails +from Monei.models.payment_transaction_type import PaymentTransactionType +from Monei.models.recurring_payment_request import RecurringPaymentRequest +from Monei.models.refund_payment_request import RefundPaymentRequest +from Monei.models.register_apple_pay_domain_request import RegisterApplePayDomainRequest +from Monei.models.send_payment_link_request import SendPaymentLinkRequest +from Monei.models.send_payment_receipt_request import SendPaymentReceiptRequest +from Monei.models.send_payment_request_request import SendPaymentRequestRequest +from Monei.models.send_subscription_link_request import SendSubscriptionLinkRequest +from Monei.models.send_subscription_status_request import SendSubscriptionStatusRequest +from Monei.models.subscription import Subscription +from Monei.models.subscription_interval import SubscriptionInterval +from Monei.models.subscription_last_payment import SubscriptionLastPayment +from Monei.models.subscription_payment_method import SubscriptionPaymentMethod +from Monei.models.subscription_payment_method_card import SubscriptionPaymentMethodCard +from Monei.models.subscription_retry_schedule_inner import SubscriptionRetryScheduleInner +from Monei.models.subscription_status import SubscriptionStatus +from Monei.models.update_subscription_request import UpdateSubscriptionRequest +from Monei.models.validate_bizum_phone_request import ValidateBizumPhoneRequest diff --git a/Monei/models/activate_subscription_request.py b/Monei/models/activate_subscription_request.py index b070dc5..2995d82 100644 --- a/Monei/models/activate_subscription_request.py +++ b/Monei/models/activate_subscription_request.py @@ -3,316 +3,99 @@ """ MONEI API v1 -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

- The version of the OpenAPI document: 1.5.0 - Generated by: https://openapi-generator.tech -""" + The version of the OpenAPI document: 1.5.1 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 +from __future__ import annotations import pprint import re # noqa: F401 +import json -import six - -from Monei.configuration import Configuration - - -class ActivateSubscriptionRequest(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self +class ActivateSubscriptionRequest(BaseModel): """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'payment_token': 'str', - 'session_id': 'str', - 'add_amount': 'int', - 'sequence_id': 'str', - 'complete_url': 'str', - 'fail_url': 'str', - 'cancel_url': 'str', - 'metadata': 'object' - } - - attribute_map = { - 'payment_token': 'paymentToken', - 'session_id': 'sessionId', - 'add_amount': 'addAmount', - 'sequence_id': 'sequenceId', - 'complete_url': 'completeUrl', - 'fail_url': 'failUrl', - 'cancel_url': 'cancelUrl', - 'metadata': 'metadata' - } - - def __init__(self, payment_token=None, session_id=None, add_amount=None, sequence_id=None, complete_url=None, fail_url=None, cancel_url=None, metadata=None, local_vars_configuration=None): # noqa: E501 - """ActivateSubscriptionRequest - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._payment_token = None - self._session_id = None - self._add_amount = None - self._sequence_id = None - self._complete_url = None - self._fail_url = None - self._cancel_url = None - self._metadata = None - self.discriminator = None - - if payment_token is not None: - self.payment_token = payment_token - if session_id is not None: - self.session_id = session_id - if add_amount is not None: - self.add_amount = add_amount - if sequence_id is not None: - self.sequence_id = sequence_id - if complete_url is not None: - self.complete_url = complete_url - if fail_url is not None: - self.fail_url = fail_url - if cancel_url is not None: - self.cancel_url = cancel_url - if metadata is not None: - self.metadata = metadata - - @property - def payment_token(self): - """Gets the payment_token of this ActivateSubscriptionRequest. # noqa: E501 - - A payment token generated by monei.js [Components](https://docs.monei.com/docs/monei-js-overview) or a paymentToken [saved after a previous successful payment](https://docs.monei.com/docs/save-payment-method). In case of the first one, you will also need to send the `sessionId` used to generate the token in the first place. # noqa: E501 - - :return: The payment_token of this ActivateSubscriptionRequest. # noqa: E501 - :rtype: str - """ - return self._payment_token - - @payment_token.setter - def payment_token(self, payment_token): - """Sets the payment_token of this ActivateSubscriptionRequest. - - A payment token generated by monei.js [Components](https://docs.monei.com/docs/monei-js-overview) or a paymentToken [saved after a previous successful payment](https://docs.monei.com/docs/save-payment-method). In case of the first one, you will also need to send the `sessionId` used to generate the token in the first place. # noqa: E501 - - :param payment_token: The payment_token of this ActivateSubscriptionRequest. # noqa: E501 - :type: str - """ - - self._payment_token = payment_token - - @property - def session_id(self): - """Gets the session_id of this ActivateSubscriptionRequest. # noqa: E501 - - A unique identifier within your system that adds security to the payment process. You need to pass the same session ID as the one used on the frontend to initialize MONEI Component (if you needed to). This is required if a payment token (not permanent) was already generated in the frontend. # noqa: E501 - - :return: The session_id of this ActivateSubscriptionRequest. # noqa: E501 - :rtype: str - """ - return self._session_id - - @session_id.setter - def session_id(self, session_id): - """Sets the session_id of this ActivateSubscriptionRequest. - - A unique identifier within your system that adds security to the payment process. You need to pass the same session ID as the one used on the frontend to initialize MONEI Component (if you needed to). This is required if a payment token (not permanent) was already generated in the frontend. # noqa: E501 - - :param session_id: The session_id of this ActivateSubscriptionRequest. # noqa: E501 - :type: str - """ - - self._session_id = session_id - - @property - def add_amount(self): - """Gets the add_amount of this ActivateSubscriptionRequest. # noqa: E501 - - The amount to be added to the subscription's initial payment. A positive integer representing how much to charge in the smallest currency unit (e.g., 100 cents to charge 1.00 USD). # noqa: E501 - - :return: The add_amount of this ActivateSubscriptionRequest. # noqa: E501 - :rtype: int - """ - return self._add_amount - - @add_amount.setter - def add_amount(self, add_amount): - """Sets the add_amount of this ActivateSubscriptionRequest. - - The amount to be added to the subscription's initial payment. A positive integer representing how much to charge in the smallest currency unit (e.g., 100 cents to charge 1.00 USD). # noqa: E501 - - :param add_amount: The add_amount of this ActivateSubscriptionRequest. # noqa: E501 - :type: int - """ - - self._add_amount = add_amount - - @property - def sequence_id(self): - """Gets the sequence_id of this ActivateSubscriptionRequest. # noqa: E501 - - A permanent identifier that refers to the initial payment of a sequence of payments. This value needs to be sent in the path for `RECURRING` payments. # noqa: E501 - - :return: The sequence_id of this ActivateSubscriptionRequest. # noqa: E501 - :rtype: str - """ - return self._sequence_id - - @sequence_id.setter - def sequence_id(self, sequence_id): - """Sets the sequence_id of this ActivateSubscriptionRequest. - - A permanent identifier that refers to the initial payment of a sequence of payments. This value needs to be sent in the path for `RECURRING` payments. # noqa: E501 - - :param sequence_id: The sequence_id of this ActivateSubscriptionRequest. # noqa: E501 - :type: str - """ - - self._sequence_id = sequence_id - - @property - def complete_url(self): - """Gets the complete_url of this ActivateSubscriptionRequest. # noqa: E501 - - The URL the customer will be directed to after transaction completed (successful or failed - except if `failUrl` is provided). # noqa: E501 - - :return: The complete_url of this ActivateSubscriptionRequest. # noqa: E501 - :rtype: str - """ - return self._complete_url - - @complete_url.setter - def complete_url(self, complete_url): - """Sets the complete_url of this ActivateSubscriptionRequest. - - The URL the customer will be directed to after transaction completed (successful or failed - except if `failUrl` is provided). # noqa: E501 - - :param complete_url: The complete_url of this ActivateSubscriptionRequest. # noqa: E501 - :type: str - """ - - self._complete_url = complete_url - - @property - def fail_url(self): - """Gets the fail_url of this ActivateSubscriptionRequest. # noqa: E501 - - The URL the customer will be directed to after transaction has failed, instead of `completeUrl` (used in hosted payment page). This allows to provide two different URLs for successful and failed payments. # noqa: E501 - - :return: The fail_url of this ActivateSubscriptionRequest. # noqa: E501 - :rtype: str - """ - return self._fail_url - - @fail_url.setter - def fail_url(self, fail_url): - """Sets the fail_url of this ActivateSubscriptionRequest. - - The URL the customer will be directed to after transaction has failed, instead of `completeUrl` (used in hosted payment page). This allows to provide two different URLs for successful and failed payments. # noqa: E501 - - :param fail_url: The fail_url of this ActivateSubscriptionRequest. # noqa: E501 - :type: str - """ - - self._fail_url = fail_url - - @property - def cancel_url(self): - """Gets the cancel_url of this ActivateSubscriptionRequest. # noqa: E501 - - The URL the customer will be directed to if they decide to cancel payment and return to your website (used in hosted payment page). # noqa: E501 - - :return: The cancel_url of this ActivateSubscriptionRequest. # noqa: E501 - :rtype: str - """ - return self._cancel_url - - @cancel_url.setter - def cancel_url(self, cancel_url): - """Sets the cancel_url of this ActivateSubscriptionRequest. - - The URL the customer will be directed to if they decide to cancel payment and return to your website (used in hosted payment page). # noqa: E501 - - :param cancel_url: The cancel_url of this ActivateSubscriptionRequest. # noqa: E501 - :type: str - """ - - self._cancel_url = cancel_url - - @property - def metadata(self): - """Gets the metadata of this ActivateSubscriptionRequest. # noqa: E501 - - A set of key-value pairs that you can attach to a resource. This can be useful for storing additional information about the resource in a structured format. # noqa: E501 - - :return: The metadata of this ActivateSubscriptionRequest. # noqa: E501 - :rtype: object - """ - return self._metadata - - @metadata.setter - def metadata(self, metadata): - """Sets the metadata of this ActivateSubscriptionRequest. - - A set of key-value pairs that you can attach to a resource. This can be useful for storing additional information about the resource in a structured format. # noqa: E501 - - :param metadata: The metadata of this ActivateSubscriptionRequest. # noqa: E501 - :type: object - """ - - self._metadata = metadata - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, ActivateSubscriptionRequest): - return False - - return self.to_dict() == other.to_dict() + ActivateSubscriptionRequest + """ # noqa: E501 + payment_token: Optional[StrictStr] = Field(default=None, description="A payment token generated by monei.js [Components](https://docs.monei.com/docs/monei-js-overview) or a paymentToken [saved after a previous successful payment](https://docs.monei.com/docs/save-payment-method). In case of the first one, you will also need to send the `sessionId` used to generate the token in the first place. ", alias="paymentToken") + session_id: Optional[StrictStr] = Field(default=None, description="A unique identifier within your system that adds security to the payment process. You need to pass the same session ID as the one used on the frontend to initialize MONEI Component (if you needed to). This is required if a payment token (not permanent) was already generated in the frontend. ", alias="sessionId") + add_amount: Optional[StrictInt] = Field(default=None, description="The amount to be added to the subscription's initial payment. A positive integer representing how much to charge in the smallest currency unit (e.g., 100 cents to charge 1.00 USD). ", alias="addAmount") + sequence_id: Optional[StrictStr] = Field(default=None, description="A permanent identifier that refers to the initial payment of a sequence of payments. This value needs to be sent in the path for `RECURRING` payments. ", alias="sequenceId") + complete_url: Optional[StrictStr] = Field(default=None, description="The URL the customer will be directed to after transaction completed (successful or failed - except if `failUrl` is provided). ", alias="completeUrl") + fail_url: Optional[StrictStr] = Field(default=None, description="The URL the customer will be directed to after transaction has failed, instead of `completeUrl` (used in hosted payment page). This allows to provide two different URLs for successful and failed payments. ", alias="failUrl") + cancel_url: Optional[StrictStr] = Field(default=None, description="The URL the customer will be directed to if they decide to cancel payment and return to your website (used in hosted payment page). ", alias="cancelUrl") + metadata: Optional[Dict[str, Any]] = Field(default=None, description="A set of key-value pairs that you can attach to a resource. This can be useful for storing additional information about the resource in a structured format.") + __properties: ClassVar[List[str]] = ["paymentToken", "sessionId", "addAmount", "sequenceId", "completeUrl", "failUrl", "cancelUrl", "metadata"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ActivateSubscriptionRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ActivateSubscriptionRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "paymentToken": obj.get("paymentToken"), + "sessionId": obj.get("sessionId"), + "addAmount": obj.get("addAmount"), + "sequenceId": obj.get("sequenceId"), + "completeUrl": obj.get("completeUrl"), + "failUrl": obj.get("failUrl"), + "cancelUrl": obj.get("cancelUrl"), + "metadata": obj.get("metadata") + }) + return _obj - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, ActivateSubscriptionRequest): - return True - return self.to_dict() != other.to_dict() diff --git a/Monei/models/address.py b/Monei/models/address.py index df9012a..8408b54 100644 --- a/Monei/models/address.py +++ b/Monei/models/address.py @@ -3,260 +3,95 @@ """ MONEI API v1 -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

- The version of the OpenAPI document: 1.5.0 - Generated by: https://openapi-generator.tech -""" + The version of the OpenAPI document: 1.5.1 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 +from __future__ import annotations import pprint import re # noqa: F401 +import json -import six - -from Monei.configuration import Configuration - +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self -class Address(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. +class Address(BaseModel): """ - openapi_types = { - 'country': 'str', - 'city': 'str', - 'line1': 'str', - 'line2': 'str', - 'zip': 'str', - 'state': 'str' - } - - attribute_map = { - 'country': 'country', - 'city': 'city', - 'line1': 'line1', - 'line2': 'line2', - 'zip': 'zip', - 'state': 'state' - } - - def __init__(self, country=None, city=None, line1=None, line2=None, zip=None, state=None, local_vars_configuration=None): # noqa: E501 - """Address - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._country = None - self._city = None - self._line1 = None - self._line2 = None - self._zip = None - self._state = None - self.discriminator = None - - if country is not None: - self.country = country - if city is not None: - self.city = city - if line1 is not None: - self.line1 = line1 - if line2 is not None: - self.line2 = line2 - if zip is not None: - self.zip = zip - if state is not None: - self.state = state - - @property - def country(self): - """Gets the country of this Address. # noqa: E501 - - Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). # noqa: E501 - - :return: The country of this Address. # noqa: E501 - :rtype: str - """ - return self._country - - @country.setter - def country(self, country): - """Sets the country of this Address. - - Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). # noqa: E501 - - :param country: The country of this Address. # noqa: E501 - :type: str - """ - - self._country = country - - @property - def city(self): - """Gets the city of this Address. # noqa: E501 - - City, district, suburb, town, or village. # noqa: E501 - - :return: The city of this Address. # noqa: E501 - :rtype: str - """ - return self._city - - @city.setter - def city(self, city): - """Sets the city of this Address. - - City, district, suburb, town, or village. # noqa: E501 - - :param city: The city of this Address. # noqa: E501 - :type: str - """ - - self._city = city - - @property - def line1(self): - """Gets the line1 of this Address. # noqa: E501 - - Address line 1 (e.g., street, PO Box, or company name). # noqa: E501 - - :return: The line1 of this Address. # noqa: E501 - :rtype: str - """ - return self._line1 - - @line1.setter - def line1(self, line1): - """Sets the line1 of this Address. - - Address line 1 (e.g., street, PO Box, or company name). # noqa: E501 - - :param line1: The line1 of this Address. # noqa: E501 - :type: str - """ - - self._line1 = line1 - - @property - def line2(self): - """Gets the line2 of this Address. # noqa: E501 - - Address line 2 (e.g., apartment, suite, unit, or building). # noqa: E501 - - :return: The line2 of this Address. # noqa: E501 - :rtype: str + Address + """ # noqa: E501 + country: Optional[StrictStr] = Field(default=None, description="Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).") + city: Optional[StrictStr] = Field(default=None, description="City, district, suburb, town, or village.") + line1: Optional[StrictStr] = Field(default=None, description="Address line 1 (e.g., street, PO Box, or company name).") + line2: Optional[StrictStr] = Field(default=None, description="Address line 2 (e.g., apartment, suite, unit, or building).") + zip: Optional[StrictStr] = Field(default=None, description="ZIP or postal code.") + state: Optional[StrictStr] = Field(default=None, description="State, county, province, or region.") + __properties: ClassVar[List[str]] = ["country", "city", "line1", "line2", "zip", "state"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of Address from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. """ - return self._line2 - - @line2.setter - def line2(self, line2): - """Sets the line2 of this Address. - - Address line 2 (e.g., apartment, suite, unit, or building). # noqa: E501 - - :param line2: The line2 of this Address. # noqa: E501 - :type: str - """ - - self._line2 = line2 - - @property - def zip(self): - """Gets the zip of this Address. # noqa: E501 - - ZIP or postal code. # noqa: E501 - - :return: The zip of this Address. # noqa: E501 - :rtype: str - """ - return self._zip - - @zip.setter - def zip(self, zip): - """Sets the zip of this Address. - - ZIP or postal code. # noqa: E501 - - :param zip: The zip of this Address. # noqa: E501 - :type: str - """ - - self._zip = zip - - @property - def state(self): - """Gets the state of this Address. # noqa: E501 - - State, county, province, or region. # noqa: E501 - - :return: The state of this Address. # noqa: E501 - :rtype: str - """ - return self._state - - @state.setter - def state(self, state): - """Sets the state of this Address. - - State, county, province, or region. # noqa: E501 - - :param state: The state of this Address. # noqa: E501 - :type: str - """ - - self._state = state - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, Address): - return False - - return self.to_dict() == other.to_dict() + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of Address from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "country": obj.get("country"), + "city": obj.get("city"), + "line1": obj.get("line1"), + "line2": obj.get("line2"), + "zip": obj.get("zip"), + "state": obj.get("state") + }) + return _obj - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, Address): - return True - return self.to_dict() != other.to_dict() diff --git a/Monei/models/apple_pay_domain_register200_response.py b/Monei/models/apple_pay_domain_register200_response.py new file mode 100644 index 0000000..167dad8 --- /dev/null +++ b/Monei/models/apple_pay_domain_register200_response.py @@ -0,0 +1,87 @@ +# coding: utf-8 + +""" + MONEI API v1 + +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

+ + The version of the OpenAPI document: 1.5.1 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictBool +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class ApplePayDomainRegister200Response(BaseModel): + """ + ApplePayDomainRegister200Response + """ # noqa: E501 + success: Optional[StrictBool] = None + __properties: ClassVar[List[str]] = ["success"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ApplePayDomainRegister200Response from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ApplePayDomainRegister200Response from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "success": obj.get("success") + }) + return _obj + + diff --git a/Monei/models/bizum_validate_phone200_response.py b/Monei/models/bizum_validate_phone200_response.py new file mode 100644 index 0000000..4031bcd --- /dev/null +++ b/Monei/models/bizum_validate_phone200_response.py @@ -0,0 +1,87 @@ +# coding: utf-8 + +""" + MONEI API v1 + +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

+ + The version of the OpenAPI document: 1.5.1 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class BizumValidatePhone200Response(BaseModel): + """ + BizumValidatePhone200Response + """ # noqa: E501 + is_valid: Optional[StrictBool] = Field(default=None, alias="isValid") + __properties: ClassVar[List[str]] = ["isValid"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BizumValidatePhone200Response from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BizumValidatePhone200Response from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "isValid": obj.get("isValid") + }) + return _obj + + diff --git a/Monei/models/cancel_payment_request.py b/Monei/models/cancel_payment_request.py index 97edaae..8deaf63 100644 --- a/Monei/models/cancel_payment_request.py +++ b/Monei/models/cancel_payment_request.py @@ -3,118 +3,86 @@ """ MONEI API v1 -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

- The version of the OpenAPI document: 1.5.0 - Generated by: https://openapi-generator.tech -""" + The version of the OpenAPI document: 1.5.1 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 +from __future__ import annotations import pprint import re # noqa: F401 +import json -import six - -from Monei.configuration import Configuration - - -class CancelPaymentRequest(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List, Optional +from Monei.models.payment_cancellation_reason import PaymentCancellationReason +from typing import Optional, Set +from typing_extensions import Self - Do not edit the class manually. +class CancelPaymentRequest(BaseModel): """ + CancelPaymentRequest + """ # noqa: E501 + cancellation_reason: Optional[PaymentCancellationReason] = Field(default=None, alias="cancellationReason") + __properties: ClassVar[List[str]] = ["cancellationReason"] - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'cancellation_reason': 'PaymentCancellationReason' - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) - attribute_map = { - 'cancellation_reason': 'cancellationReason' - } - def __init__(self, cancellation_reason=None, local_vars_configuration=None): # noqa: E501 - """CancelPaymentRequest - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) - self._cancellation_reason = None - self.discriminator = None + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) - if cancellation_reason is not None: - self.cancellation_reason = cancellation_reason + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of CancelPaymentRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) - @property - def cancellation_reason(self): - """Gets the cancellation_reason of this CancelPaymentRequest. # noqa: E501 + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: - :return: The cancellation_reason of this CancelPaymentRequest. # noqa: E501 - :rtype: PaymentCancellationReason + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. """ - return self._cancellation_reason + excluded_fields: Set[str] = set([ + ]) - @cancellation_reason.setter - def cancellation_reason(self, cancellation_reason): - """Sets the cancellation_reason of this CancelPaymentRequest. + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of CancelPaymentRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "cancellationReason": obj.get("cancellationReason") + }) + return _obj - :param cancellation_reason: The cancellation_reason of this CancelPaymentRequest. # noqa: E501 - :type: PaymentCancellationReason - """ - self._cancellation_reason = cancellation_reason - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, CancelPaymentRequest): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, CancelPaymentRequest): - return True - - return self.to_dict() != other.to_dict() diff --git a/Monei/models/cancel_subscription_request.py b/Monei/models/cancel_subscription_request.py index 80b6c2e..daa013b 100644 --- a/Monei/models/cancel_subscription_request.py +++ b/Monei/models/cancel_subscription_request.py @@ -3,120 +3,85 @@ """ MONEI API v1 -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

- The version of the OpenAPI document: 1.5.0 - Generated by: https://openapi-generator.tech -""" + The version of the OpenAPI document: 1.5.1 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 +from __future__ import annotations import pprint import re # noqa: F401 +import json -import six - -from Monei.configuration import Configuration - - -class CancelSubscriptionRequest(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech +from pydantic import BaseModel, ConfigDict, Field, StrictBool +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self - Do not edit the class manually. +class CancelSubscriptionRequest(BaseModel): """ + CancelSubscriptionRequest + """ # noqa: E501 + cancel_at_period_end: Optional[StrictBool] = Field(default=None, description="If true, the subscription will be canceled at the end of the current period. ", alias="cancelAtPeriodEnd") + __properties: ClassVar[List[str]] = ["cancelAtPeriodEnd"] - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'cancel_at_period_end': 'bool' - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) - attribute_map = { - 'cancel_at_period_end': 'cancelAtPeriodEnd' - } - def __init__(self, cancel_at_period_end=None, local_vars_configuration=None): # noqa: E501 - """CancelSubscriptionRequest - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) - self._cancel_at_period_end = None - self.discriminator = None + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) - if cancel_at_period_end is not None: - self.cancel_at_period_end = cancel_at_period_end + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of CancelSubscriptionRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) - @property - def cancel_at_period_end(self): - """Gets the cancel_at_period_end of this CancelSubscriptionRequest. # noqa: E501 + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. - If true, the subscription will be canceled at the end of the current period. # noqa: E501 + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: - :return: The cancel_at_period_end of this CancelSubscriptionRequest. # noqa: E501 - :rtype: bool + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. """ - return self._cancel_at_period_end + excluded_fields: Set[str] = set([ + ]) - @cancel_at_period_end.setter - def cancel_at_period_end(self, cancel_at_period_end): - """Sets the cancel_at_period_end of this CancelSubscriptionRequest. + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict - If true, the subscription will be canceled at the end of the current period. # noqa: E501 + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of CancelSubscriptionRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "cancelAtPeriodEnd": obj.get("cancelAtPeriodEnd") + }) + return _obj - :param cancel_at_period_end: The cancel_at_period_end of this CancelSubscriptionRequest. # noqa: E501 - :type: bool - """ - self._cancel_at_period_end = cancel_at_period_end - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, CancelSubscriptionRequest): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, CancelSubscriptionRequest): - return True - - return self.to_dict() != other.to_dict() diff --git a/Monei/models/capture_payment_request.py b/Monei/models/capture_payment_request.py index 26399fb..17a8688 100644 --- a/Monei/models/capture_payment_request.py +++ b/Monei/models/capture_payment_request.py @@ -3,120 +3,85 @@ """ MONEI API v1 -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

- The version of the OpenAPI document: 1.5.0 - Generated by: https://openapi-generator.tech -""" + The version of the OpenAPI document: 1.5.1 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 +from __future__ import annotations import pprint import re # noqa: F401 +import json -import six - -from Monei.configuration import Configuration - - -class CapturePaymentRequest(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech +from pydantic import BaseModel, ConfigDict, Field, StrictInt +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self - Do not edit the class manually. +class CapturePaymentRequest(BaseModel): """ + CapturePaymentRequest + """ # noqa: E501 + amount: Optional[StrictInt] = Field(default=None, description="The amount to capture, which must be less than or equal to the original amount. Any additional amount will be automatically refunded. ") + __properties: ClassVar[List[str]] = ["amount"] - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'amount': 'int' - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) - attribute_map = { - 'amount': 'amount' - } - def __init__(self, amount=None, local_vars_configuration=None): # noqa: E501 - """CapturePaymentRequest - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) - self._amount = None - self.discriminator = None + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) - if amount is not None: - self.amount = amount + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of CapturePaymentRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) - @property - def amount(self): - """Gets the amount of this CapturePaymentRequest. # noqa: E501 + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. - The amount to capture, which must be less than or equal to the original amount. Any additional amount will be automatically refunded. # noqa: E501 + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: - :return: The amount of this CapturePaymentRequest. # noqa: E501 - :rtype: int + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. """ - return self._amount + excluded_fields: Set[str] = set([ + ]) - @amount.setter - def amount(self, amount): - """Sets the amount of this CapturePaymentRequest. + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict - The amount to capture, which must be less than or equal to the original amount. Any additional amount will be automatically refunded. # noqa: E501 + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of CapturePaymentRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "amount": obj.get("amount") + }) + return _obj - :param amount: The amount of this CapturePaymentRequest. # noqa: E501 - :type: int - """ - self._amount = amount - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, CapturePaymentRequest): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, CapturePaymentRequest): - return True - - return self.to_dict() != other.to_dict() diff --git a/Monei/models/card.py b/Monei/models/card.py deleted file mode 100644 index 8f564dc..0000000 --- a/Monei/models/card.py +++ /dev/null @@ -1,262 +0,0 @@ -# coding: utf-8 - -""" - MONEI API v1 - -

The MONEI API is organized around REST. Our API has predictable resource-oriented URLs, accepts JSON-encoded request bodies, returns JSON-encoded responses, and uses standard HTTP response codes, authentication, and verbs.

Base URL:

https://api.monei.com/v1

Client libraries:

Important:

If you are not using our official SDKs, you need to provide a valid User-Agent header in each request, otherwise your requests will be rejected.

# noqa: E501 - - The version of the OpenAPI document: 1.2.2 - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from Monei.configuration import Configuration - - -class Card(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'number': 'str', - 'cvc': 'str', - 'exp_month': 'str', - 'exp_year': 'str', - 'cardholder_name': 'str', - 'cardholder_email': 'str' - } - - attribute_map = { - 'number': 'number', - 'cvc': 'cvc', - 'exp_month': 'expMonth', - 'exp_year': 'expYear', - 'cardholder_name': 'cardholderName', - 'cardholder_email': 'cardholderEmail' - } - - def __init__(self, number=None, cvc=None, exp_month=None, exp_year=None, cardholder_name=None, cardholder_email=None, local_vars_configuration=None): # noqa: E501 - """Card - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._number = None - self._cvc = None - self._exp_month = None - self._exp_year = None - self._cardholder_name = None - self._cardholder_email = None - self.discriminator = None - - if number is not None: - self.number = number - if cvc is not None: - self.cvc = cvc - if exp_month is not None: - self.exp_month = exp_month - if exp_year is not None: - self.exp_year = exp_year - if cardholder_name is not None: - self.cardholder_name = cardholder_name - if cardholder_email is not None: - self.cardholder_email = cardholder_email - - @property - def number(self): - """Gets the number of this Card. # noqa: E501 - - The card number, as a string without any separators. # noqa: E501 - - :return: The number of this Card. # noqa: E501 - :rtype: str - """ - return self._number - - @number.setter - def number(self, number): - """Sets the number of this Card. - - The card number, as a string without any separators. # noqa: E501 - - :param number: The number of this Card. # noqa: E501 - :type: str - """ - - self._number = number - - @property - def cvc(self): - """Gets the cvc of this Card. # noqa: E501 - - Card security code. # noqa: E501 - - :return: The cvc of this Card. # noqa: E501 - :rtype: str - """ - return self._cvc - - @cvc.setter - def cvc(self, cvc): - """Sets the cvc of this Card. - - Card security code. # noqa: E501 - - :param cvc: The cvc of this Card. # noqa: E501 - :type: str - """ - - self._cvc = cvc - - @property - def exp_month(self): - """Gets the exp_month of this Card. # noqa: E501 - - Two-digit number representing the card’s expiration month. # noqa: E501 - - :return: The exp_month of this Card. # noqa: E501 - :rtype: str - """ - return self._exp_month - - @exp_month.setter - def exp_month(self, exp_month): - """Sets the exp_month of this Card. - - Two-digit number representing the card’s expiration month. # noqa: E501 - - :param exp_month: The exp_month of this Card. # noqa: E501 - :type: str - """ - - self._exp_month = exp_month - - @property - def exp_year(self): - """Gets the exp_year of this Card. # noqa: E501 - - Two-digit number representing the card’s expiration year. # noqa: E501 - - :return: The exp_year of this Card. # noqa: E501 - :rtype: str - """ - return self._exp_year - - @exp_year.setter - def exp_year(self, exp_year): - """Sets the exp_year of this Card. - - Two-digit number representing the card’s expiration year. # noqa: E501 - - :param exp_year: The exp_year of this Card. # noqa: E501 - :type: str - """ - - self._exp_year = exp_year - - @property - def cardholder_name(self): - """Gets the cardholder_name of this Card. # noqa: E501 - - The cardholder's name, as stated in the credit card. # noqa: E501 - - :return: The cardholder_name of this Card. # noqa: E501 - :rtype: str - """ - return self._cardholder_name - - @cardholder_name.setter - def cardholder_name(self, cardholder_name): - """Sets the cardholder_name of this Card. - - The cardholder's name, as stated in the credit card. # noqa: E501 - - :param cardholder_name: The cardholder_name of this Card. # noqa: E501 - :type: str - """ - - self._cardholder_name = cardholder_name - - @property - def cardholder_email(self): - """Gets the cardholder_email of this Card. # noqa: E501 - - The cardholder's email address. # noqa: E501 - - :return: The cardholder_email of this Card. # noqa: E501 - :rtype: str - """ - return self._cardholder_email - - @cardholder_email.setter - def cardholder_email(self, cardholder_email): - """Sets the cardholder_email of this Card. - - The cardholder's email address. # noqa: E501 - - :param cardholder_email: The cardholder_email of this Card. # noqa: E501 - :type: str - """ - - self._cardholder_email = cardholder_email - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, Card): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, Card): - return True - - return self.to_dict() != other.to_dict() diff --git a/Monei/models/confirm_payment_request.py b/Monei/models/confirm_payment_request.py index cbcef4a..670bbbf 100644 --- a/Monei/models/confirm_payment_request.py +++ b/Monei/models/confirm_payment_request.py @@ -3,281 +3,113 @@ """ MONEI API v1 -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

- The version of the OpenAPI document: 1.5.0 - Generated by: https://openapi-generator.tech -""" + The version of the OpenAPI document: 1.5.1 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 +from __future__ import annotations import pprint import re # noqa: F401 - -import six - -from Monei.configuration import Configuration - - -class ConfirmPaymentRequest(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from Monei.models.confirm_payment_request_payment_method import ConfirmPaymentRequestPaymentMethod +from Monei.models.payment_billing_details import PaymentBillingDetails +from Monei.models.payment_customer import PaymentCustomer +from Monei.models.payment_shipping_details import PaymentShippingDetails +from typing import Optional, Set +from typing_extensions import Self + +class ConfirmPaymentRequest(BaseModel): """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'payment_token': 'str', - 'payment_method': 'ConfirmPaymentRequestPaymentMethod', - 'generate_payment_token': 'bool', - 'customer': 'PaymentCustomer', - 'billing_details': 'PaymentBillingDetails', - 'shipping_details': 'PaymentShippingDetails', - 'metadata': 'object' - } - - attribute_map = { - 'payment_token': 'paymentToken', - 'payment_method': 'paymentMethod', - 'generate_payment_token': 'generatePaymentToken', - 'customer': 'customer', - 'billing_details': 'billingDetails', - 'shipping_details': 'shippingDetails', - 'metadata': 'metadata' - } - - def __init__(self, payment_token=None, payment_method=None, generate_payment_token=False, customer=None, billing_details=None, shipping_details=None, metadata=None, local_vars_configuration=None): # noqa: E501 - """ConfirmPaymentRequest - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._payment_token = None - self._payment_method = None - self._generate_payment_token = None - self._customer = None - self._billing_details = None - self._shipping_details = None - self._metadata = None - self.discriminator = None - - self.payment_token = payment_token - if payment_method is not None: - self.payment_method = payment_method - if generate_payment_token is not None: - self.generate_payment_token = generate_payment_token - if customer is not None: - self.customer = customer - if billing_details is not None: - self.billing_details = billing_details - if shipping_details is not None: - self.shipping_details = shipping_details - if metadata is not None: - self.metadata = metadata - - @property - def payment_token(self): - """Gets the payment_token of this ConfirmPaymentRequest. # noqa: E501 - - A payment token generated by monei.js [Components](https://docs.monei.com/docs/monei-js-overview) or a paymentToken [saved after a previous successful payment](https://docs.monei.com/docs/save-payment-method). # noqa: E501 - - :return: The payment_token of this ConfirmPaymentRequest. # noqa: E501 - :rtype: str + ConfirmPaymentRequest + """ # noqa: E501 + payment_token: StrictStr = Field(description="A payment token generated by monei.js [Components](https://docs.monei.com/docs/monei-js-overview) or a paymentToken [saved after a previous successful payment](https://docs.monei.com/docs/save-payment-method). ", alias="paymentToken") + payment_method: Optional[ConfirmPaymentRequestPaymentMethod] = Field(default=None, alias="paymentMethod") + generate_payment_token: Optional[StrictBool] = Field(default=False, description="If set to true a permanent token that represents a payment method used in the payment will be generated. ", alias="generatePaymentToken") + customer: Optional[PaymentCustomer] = None + billing_details: Optional[PaymentBillingDetails] = Field(default=None, alias="billingDetails") + shipping_details: Optional[PaymentShippingDetails] = Field(default=None, alias="shippingDetails") + metadata: Optional[Dict[str, Any]] = Field(default=None, description="A set of key-value pairs that you can attach to a resource. This can be useful for storing additional information about the resource in a structured format.") + __properties: ClassVar[List[str]] = ["paymentToken", "paymentMethod", "generatePaymentToken", "customer", "billingDetails", "shippingDetails", "metadata"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ConfirmPaymentRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. """ - return self._payment_token - - @payment_token.setter - def payment_token(self, payment_token): - """Sets the payment_token of this ConfirmPaymentRequest. - - A payment token generated by monei.js [Components](https://docs.monei.com/docs/monei-js-overview) or a paymentToken [saved after a previous successful payment](https://docs.monei.com/docs/save-payment-method). # noqa: E501 - - :param payment_token: The payment_token of this ConfirmPaymentRequest. # noqa: E501 - :type: str - """ - if self.local_vars_configuration.client_side_validation and payment_token is None: # noqa: E501 - raise ValueError("Invalid value for `payment_token`, must not be `None`") # noqa: E501 - - self._payment_token = payment_token - - @property - def payment_method(self): - """Gets the payment_method of this ConfirmPaymentRequest. # noqa: E501 - - - :return: The payment_method of this ConfirmPaymentRequest. # noqa: E501 - :rtype: ConfirmPaymentRequestPaymentMethod - """ - return self._payment_method - - @payment_method.setter - def payment_method(self, payment_method): - """Sets the payment_method of this ConfirmPaymentRequest. - - - :param payment_method: The payment_method of this ConfirmPaymentRequest. # noqa: E501 - :type: ConfirmPaymentRequestPaymentMethod - """ - - self._payment_method = payment_method - - @property - def generate_payment_token(self): - """Gets the generate_payment_token of this ConfirmPaymentRequest. # noqa: E501 - - If set to true a permanent token that represents a payment method used in the payment will be generated. # noqa: E501 - - :return: The generate_payment_token of this ConfirmPaymentRequest. # noqa: E501 - :rtype: bool - """ - return self._generate_payment_token - - @generate_payment_token.setter - def generate_payment_token(self, generate_payment_token): - """Sets the generate_payment_token of this ConfirmPaymentRequest. - - If set to true a permanent token that represents a payment method used in the payment will be generated. # noqa: E501 - - :param generate_payment_token: The generate_payment_token of this ConfirmPaymentRequest. # noqa: E501 - :type: bool - """ - - self._generate_payment_token = generate_payment_token - - @property - def customer(self): - """Gets the customer of this ConfirmPaymentRequest. # noqa: E501 - - - :return: The customer of this ConfirmPaymentRequest. # noqa: E501 - :rtype: PaymentCustomer - """ - return self._customer - - @customer.setter - def customer(self, customer): - """Sets the customer of this ConfirmPaymentRequest. - - - :param customer: The customer of this ConfirmPaymentRequest. # noqa: E501 - :type: PaymentCustomer - """ - - self._customer = customer - - @property - def billing_details(self): - """Gets the billing_details of this ConfirmPaymentRequest. # noqa: E501 - - - :return: The billing_details of this ConfirmPaymentRequest. # noqa: E501 - :rtype: PaymentBillingDetails - """ - return self._billing_details - - @billing_details.setter - def billing_details(self, billing_details): - """Sets the billing_details of this ConfirmPaymentRequest. - - - :param billing_details: The billing_details of this ConfirmPaymentRequest. # noqa: E501 - :type: PaymentBillingDetails - """ - - self._billing_details = billing_details - - @property - def shipping_details(self): - """Gets the shipping_details of this ConfirmPaymentRequest. # noqa: E501 - - - :return: The shipping_details of this ConfirmPaymentRequest. # noqa: E501 - :rtype: PaymentShippingDetails - """ - return self._shipping_details - - @shipping_details.setter - def shipping_details(self, shipping_details): - """Sets the shipping_details of this ConfirmPaymentRequest. - - - :param shipping_details: The shipping_details of this ConfirmPaymentRequest. # noqa: E501 - :type: PaymentShippingDetails - """ - - self._shipping_details = shipping_details - - @property - def metadata(self): - """Gets the metadata of this ConfirmPaymentRequest. # noqa: E501 - - A set of key-value pairs that you can attach to a resource. This can be useful for storing additional information about the resource in a structured format. # noqa: E501 - - :return: The metadata of this ConfirmPaymentRequest. # noqa: E501 - :rtype: object - """ - return self._metadata - - @metadata.setter - def metadata(self, metadata): - """Sets the metadata of this ConfirmPaymentRequest. - - A set of key-value pairs that you can attach to a resource. This can be useful for storing additional information about the resource in a structured format. # noqa: E501 - - :param metadata: The metadata of this ConfirmPaymentRequest. # noqa: E501 - :type: object - """ - - self._metadata = metadata - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, ConfirmPaymentRequest): - return False - - return self.to_dict() == other.to_dict() + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of payment_method + if self.payment_method: + _dict['paymentMethod'] = self.payment_method.to_dict() + # override the default output from pydantic by calling `to_dict()` of customer + if self.customer: + _dict['customer'] = self.customer.to_dict() + # override the default output from pydantic by calling `to_dict()` of billing_details + if self.billing_details: + _dict['billingDetails'] = self.billing_details.to_dict() + # override the default output from pydantic by calling `to_dict()` of shipping_details + if self.shipping_details: + _dict['shippingDetails'] = self.shipping_details.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ConfirmPaymentRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "paymentToken": obj.get("paymentToken"), + "paymentMethod": ConfirmPaymentRequestPaymentMethod.from_dict(obj["paymentMethod"]) if obj.get("paymentMethod") is not None else None, + "generatePaymentToken": obj.get("generatePaymentToken") if obj.get("generatePaymentToken") is not None else False, + "customer": PaymentCustomer.from_dict(obj["customer"]) if obj.get("customer") is not None else None, + "billingDetails": PaymentBillingDetails.from_dict(obj["billingDetails"]) if obj.get("billingDetails") is not None else None, + "shippingDetails": PaymentShippingDetails.from_dict(obj["shippingDetails"]) if obj.get("shippingDetails") is not None else None, + "metadata": obj.get("metadata") + }) + return _obj - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, ConfirmPaymentRequest): - return True - return self.to_dict() != other.to_dict() diff --git a/Monei/models/confirm_payment_request_payment_method.py b/Monei/models/confirm_payment_request_payment_method.py index 3434021..9df4214 100644 --- a/Monei/models/confirm_payment_request_payment_method.py +++ b/Monei/models/confirm_payment_request_payment_method.py @@ -3,118 +3,89 @@ """ MONEI API v1 -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

- The version of the OpenAPI document: 1.5.0 - Generated by: https://openapi-generator.tech -""" + The version of the OpenAPI document: 1.5.1 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 +from __future__ import annotations import pprint import re # noqa: F401 +import json -import six - -from Monei.configuration import Configuration - - -class ConfirmPaymentRequestPaymentMethod(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, List, Optional +from Monei.models.confirm_payment_request_payment_method_card import ConfirmPaymentRequestPaymentMethodCard +from typing import Optional, Set +from typing_extensions import Self - Do not edit the class manually. +class ConfirmPaymentRequestPaymentMethod(BaseModel): """ + Additional information about the payment method used for this payment. + """ # noqa: E501 + card: Optional[ConfirmPaymentRequestPaymentMethodCard] = None + __properties: ClassVar[List[str]] = ["card"] - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'card': 'ConfirmPaymentRequestPaymentMethodCard' - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) - attribute_map = { - 'card': 'card' - } - def __init__(self, card=None, local_vars_configuration=None): # noqa: E501 - """ConfirmPaymentRequestPaymentMethod - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) - self._card = None - self.discriminator = None + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) - if card is not None: - self.card = card + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ConfirmPaymentRequestPaymentMethod from a JSON string""" + return cls.from_dict(json.loads(json_str)) - @property - def card(self): - """Gets the card of this ConfirmPaymentRequestPaymentMethod. # noqa: E501 + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: - :return: The card of this ConfirmPaymentRequestPaymentMethod. # noqa: E501 - :rtype: ConfirmPaymentRequestPaymentMethodCard + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. """ - return self._card + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of card + if self.card: + _dict['card'] = self.card.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ConfirmPaymentRequestPaymentMethod from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "card": ConfirmPaymentRequestPaymentMethodCard.from_dict(obj["card"]) if obj.get("card") is not None else None + }) + return _obj - @card.setter - def card(self, card): - """Sets the card of this ConfirmPaymentRequestPaymentMethod. - - - :param card: The card of this ConfirmPaymentRequestPaymentMethod. # noqa: E501 - :type: ConfirmPaymentRequestPaymentMethodCard - """ - self._card = card - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, ConfirmPaymentRequestPaymentMethod): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, ConfirmPaymentRequestPaymentMethod): - return True - - return self.to_dict() != other.to_dict() diff --git a/Monei/models/confirm_payment_request_payment_method_card.py b/Monei/models/confirm_payment_request_payment_method_card.py index 92524f3..a900caf 100644 --- a/Monei/models/confirm_payment_request_payment_method_card.py +++ b/Monei/models/confirm_payment_request_payment_method_card.py @@ -3,148 +3,87 @@ """ MONEI API v1 -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

- The version of the OpenAPI document: 1.5.0 - Generated by: https://openapi-generator.tech -""" + The version of the OpenAPI document: 1.5.1 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 +from __future__ import annotations import pprint import re # noqa: F401 +import json -import six - -from Monei.configuration import Configuration - - -class ConfirmPaymentRequestPaymentMethodCard(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self +class ConfirmPaymentRequestPaymentMethodCard(BaseModel): """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'cardholder_name': 'str', - 'cardholder_email': 'str' - } - - attribute_map = { - 'cardholder_name': 'cardholderName', - 'cardholder_email': 'cardholderEmail' - } - - def __init__(self, cardholder_name=None, cardholder_email=None, local_vars_configuration=None): # noqa: E501 - """ConfirmPaymentRequestPaymentMethodCard - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._cardholder_name = None - self._cardholder_email = None - self.discriminator = None - - if cardholder_name is not None: - self.cardholder_name = cardholder_name - if cardholder_email is not None: - self.cardholder_email = cardholder_email - - @property - def cardholder_name(self): - """Gets the cardholder_name of this ConfirmPaymentRequestPaymentMethodCard. # noqa: E501 - - The cardholder's name, as stated in the credit card. # noqa: E501 - - :return: The cardholder_name of this ConfirmPaymentRequestPaymentMethodCard. # noqa: E501 - :rtype: str + Additional information about the card used for this payment. + """ # noqa: E501 + cardholder_name: Optional[StrictStr] = Field(default=None, description="The cardholder's name, as stated in the credit card.", alias="cardholderName") + cardholder_email: Optional[StrictStr] = Field(default=None, description="The cardholder's email address.", alias="cardholderEmail") + __properties: ClassVar[List[str]] = ["cardholderName", "cardholderEmail"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ConfirmPaymentRequestPaymentMethodCard from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. """ - return self._cardholder_name - - @cardholder_name.setter - def cardholder_name(self, cardholder_name): - """Sets the cardholder_name of this ConfirmPaymentRequestPaymentMethodCard. + excluded_fields: Set[str] = set([ + ]) - The cardholder's name, as stated in the credit card. # noqa: E501 + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict - :param cardholder_name: The cardholder_name of this ConfirmPaymentRequestPaymentMethodCard. # noqa: E501 - :type: str - """ + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ConfirmPaymentRequestPaymentMethodCard from a dict""" + if obj is None: + return None - self._cardholder_name = cardholder_name + if not isinstance(obj, dict): + return cls.model_validate(obj) - @property - def cardholder_email(self): - """Gets the cardholder_email of this ConfirmPaymentRequestPaymentMethodCard. # noqa: E501 + _obj = cls.model_validate({ + "cardholderName": obj.get("cardholderName"), + "cardholderEmail": obj.get("cardholderEmail") + }) + return _obj - The cardholder's email address. # noqa: E501 - - :return: The cardholder_email of this ConfirmPaymentRequestPaymentMethodCard. # noqa: E501 - :rtype: str - """ - return self._cardholder_email - - @cardholder_email.setter - def cardholder_email(self, cardholder_email): - """Sets the cardholder_email of this ConfirmPaymentRequestPaymentMethodCard. - - The cardholder's email address. # noqa: E501 - - :param cardholder_email: The cardholder_email of this ConfirmPaymentRequestPaymentMethodCard. # noqa: E501 - :type: str - """ - self._cardholder_email = cardholder_email - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, ConfirmPaymentRequestPaymentMethodCard): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, ConfirmPaymentRequestPaymentMethodCard): - return True - - return self.to_dict() != other.to_dict() diff --git a/Monei/models/create_payment_request.py b/Monei/models/create_payment_request.py index 9fba364..e1d94c3 100644 --- a/Monei/models/create_payment_request.py +++ b/Monei/models/create_payment_request.py @@ -3,779 +3,158 @@ """ MONEI API v1 -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

- The version of the OpenAPI document: 1.5.0 - Generated by: https://openapi-generator.tech -""" + The version of the OpenAPI document: 1.5.1 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 +from __future__ import annotations import pprint import re # noqa: F401 - -import six - -from Monei.configuration import Configuration - - -class CreatePaymentRequest(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictFloat, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional, Union +from Monei.models.payment_billing_details import PaymentBillingDetails +from Monei.models.payment_customer import PaymentCustomer +from Monei.models.payment_payment_method_input import PaymentPaymentMethodInput +from Monei.models.payment_sequence import PaymentSequence +from Monei.models.payment_session_details import PaymentSessionDetails +from Monei.models.payment_shipping_details import PaymentShippingDetails +from Monei.models.payment_transaction_type import PaymentTransactionType +from typing import Optional, Set +from typing_extensions import Self + +class CreatePaymentRequest(BaseModel): """ - openapi_types = { - 'amount': 'int', - 'currency': 'str', - 'order_id': 'str', - 'callback_url': 'str', - 'complete_url': 'str', - 'fail_url': 'str', - 'cancel_url': 'str', - 'payment_token': 'str', - 'session_id': 'str', - 'generate_payment_token': 'bool', - 'payment_method': 'PaymentPaymentMethodInput', - 'allowed_payment_methods': 'PaymentPaymentMethods', - 'transaction_type': 'PaymentTransactionType', - 'sequence': 'PaymentSequence', - 'store_id': 'str', - 'point_of_sale_id': 'str', - 'subscription_id': 'str', - 'auto_recover': 'bool', - 'description': 'str', - 'customer': 'PaymentCustomer', - 'billing_details': 'PaymentBillingDetails', - 'shipping_details': 'PaymentShippingDetails', - 'session_details': 'PaymentSessionDetails', - 'expire_at': 'float', - 'metadata': 'object' - } - - attribute_map = { - 'amount': 'amount', - 'currency': 'currency', - 'order_id': 'orderId', - 'callback_url': 'callbackUrl', - 'complete_url': 'completeUrl', - 'fail_url': 'failUrl', - 'cancel_url': 'cancelUrl', - 'payment_token': 'paymentToken', - 'session_id': 'sessionId', - 'generate_payment_token': 'generatePaymentToken', - 'payment_method': 'paymentMethod', - 'allowed_payment_methods': 'allowedPaymentMethods', - 'transaction_type': 'transactionType', - 'sequence': 'sequence', - 'store_id': 'storeId', - 'point_of_sale_id': 'pointOfSaleId', - 'subscription_id': 'subscriptionId', - 'auto_recover': 'autoRecover', - 'description': 'description', - 'customer': 'customer', - 'billing_details': 'billingDetails', - 'shipping_details': 'shippingDetails', - 'session_details': 'sessionDetails', - 'expire_at': 'expireAt', - 'metadata': 'metadata' - } - - def __init__(self, amount=None, currency=None, order_id=None, callback_url=None, complete_url=None, fail_url=None, cancel_url=None, payment_token=None, session_id=None, generate_payment_token=False, payment_method=None, allowed_payment_methods=None, transaction_type=None, sequence=None, store_id=None, point_of_sale_id=None, subscription_id=None, auto_recover=None, description=None, customer=None, billing_details=None, shipping_details=None, session_details=None, expire_at=None, metadata=None, local_vars_configuration=None): # noqa: E501 - """CreatePaymentRequest - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._amount = None - self._currency = None - self._order_id = None - self._callback_url = None - self._complete_url = None - self._fail_url = None - self._cancel_url = None - self._payment_token = None - self._session_id = None - self._generate_payment_token = None - self._payment_method = None - self._allowed_payment_methods = None - self._transaction_type = None - self._sequence = None - self._store_id = None - self._point_of_sale_id = None - self._subscription_id = None - self._auto_recover = None - self._description = None - self._customer = None - self._billing_details = None - self._shipping_details = None - self._session_details = None - self._expire_at = None - self._metadata = None - self.discriminator = None - - self.amount = amount - self.currency = currency - self.order_id = order_id - if callback_url is not None: - self.callback_url = callback_url - if complete_url is not None: - self.complete_url = complete_url - if fail_url is not None: - self.fail_url = fail_url - if cancel_url is not None: - self.cancel_url = cancel_url - if payment_token is not None: - self.payment_token = payment_token - if session_id is not None: - self.session_id = session_id - if generate_payment_token is not None: - self.generate_payment_token = generate_payment_token - if payment_method is not None: - self.payment_method = payment_method - if allowed_payment_methods is not None: - self.allowed_payment_methods = allowed_payment_methods - if transaction_type is not None: - self.transaction_type = transaction_type - if sequence is not None: - self.sequence = sequence - if store_id is not None: - self.store_id = store_id - if point_of_sale_id is not None: - self.point_of_sale_id = point_of_sale_id - if subscription_id is not None: - self.subscription_id = subscription_id - if auto_recover is not None: - self.auto_recover = auto_recover - if description is not None: - self.description = description - if customer is not None: - self.customer = customer - if billing_details is not None: - self.billing_details = billing_details - if shipping_details is not None: - self.shipping_details = shipping_details - if session_details is not None: - self.session_details = session_details - if expire_at is not None: - self.expire_at = expire_at - if metadata is not None: - self.metadata = metadata - - @property - def amount(self): - """Gets the amount of this CreatePaymentRequest. # noqa: E501 - - Amount intended to be collected by this payment. A positive integer representing how much to charge in the smallest currency unit (e.g., 100 cents to charge 1.00 USD). # noqa: E501 - - :return: The amount of this CreatePaymentRequest. # noqa: E501 - :rtype: int - """ - return self._amount - - @amount.setter - def amount(self, amount): - """Sets the amount of this CreatePaymentRequest. - - Amount intended to be collected by this payment. A positive integer representing how much to charge in the smallest currency unit (e.g., 100 cents to charge 1.00 USD). # noqa: E501 - - :param amount: The amount of this CreatePaymentRequest. # noqa: E501 - :type: int - """ - if self.local_vars_configuration.client_side_validation and amount is None: # noqa: E501 - raise ValueError("Invalid value for `amount`, must not be `None`") # noqa: E501 - - self._amount = amount - - @property - def currency(self): - """Gets the currency of this CreatePaymentRequest. # noqa: E501 - - Three-letter [ISO currency code](https://en.wikipedia.org/wiki/ISO_4217), in uppercase. Must be a supported currency. # noqa: E501 - - :return: The currency of this CreatePaymentRequest. # noqa: E501 - :rtype: str - """ - return self._currency - - @currency.setter - def currency(self, currency): - """Sets the currency of this CreatePaymentRequest. - - Three-letter [ISO currency code](https://en.wikipedia.org/wiki/ISO_4217), in uppercase. Must be a supported currency. # noqa: E501 - - :param currency: The currency of this CreatePaymentRequest. # noqa: E501 - :type: str - """ - if self.local_vars_configuration.client_side_validation and currency is None: # noqa: E501 - raise ValueError("Invalid value for `currency`, must not be `None`") # noqa: E501 - - self._currency = currency - - @property - def order_id(self): - """Gets the order_id of this CreatePaymentRequest. # noqa: E501 - - An order ID from your system. A unique identifier that can be used to reconcile the payment with your internal system. # noqa: E501 - - :return: The order_id of this CreatePaymentRequest. # noqa: E501 - :rtype: str - """ - return self._order_id - - @order_id.setter - def order_id(self, order_id): - """Sets the order_id of this CreatePaymentRequest. - - An order ID from your system. A unique identifier that can be used to reconcile the payment with your internal system. # noqa: E501 - - :param order_id: The order_id of this CreatePaymentRequest. # noqa: E501 - :type: str - """ - if self.local_vars_configuration.client_side_validation and order_id is None: # noqa: E501 - raise ValueError("Invalid value for `order_id`, must not be `None`") # noqa: E501 - - self._order_id = order_id - - @property - def callback_url(self): - """Gets the callback_url of this CreatePaymentRequest. # noqa: E501 - - The URL to which a payment result should be sent asynchronously. # noqa: E501 - - :return: The callback_url of this CreatePaymentRequest. # noqa: E501 - :rtype: str - """ - return self._callback_url - - @callback_url.setter - def callback_url(self, callback_url): - """Sets the callback_url of this CreatePaymentRequest. - - The URL to which a payment result should be sent asynchronously. # noqa: E501 - - :param callback_url: The callback_url of this CreatePaymentRequest. # noqa: E501 - :type: str - """ - - self._callback_url = callback_url - - @property - def complete_url(self): - """Gets the complete_url of this CreatePaymentRequest. # noqa: E501 - - The URL the customer will be directed to after transaction completed (successful or failed - except if `failUrl` is provided). # noqa: E501 - - :return: The complete_url of this CreatePaymentRequest. # noqa: E501 - :rtype: str - """ - return self._complete_url - - @complete_url.setter - def complete_url(self, complete_url): - """Sets the complete_url of this CreatePaymentRequest. - - The URL the customer will be directed to after transaction completed (successful or failed - except if `failUrl` is provided). # noqa: E501 - - :param complete_url: The complete_url of this CreatePaymentRequest. # noqa: E501 - :type: str - """ - - self._complete_url = complete_url - - @property - def fail_url(self): - """Gets the fail_url of this CreatePaymentRequest. # noqa: E501 - - The URL the customer will be directed to after transaction has failed, instead of `completeUrl` (used in hosted payment page). This allows to provide two different URLs for successful and failed payments. # noqa: E501 - - :return: The fail_url of this CreatePaymentRequest. # noqa: E501 - :rtype: str - """ - return self._fail_url - - @fail_url.setter - def fail_url(self, fail_url): - """Sets the fail_url of this CreatePaymentRequest. - - The URL the customer will be directed to after transaction has failed, instead of `completeUrl` (used in hosted payment page). This allows to provide two different URLs for successful and failed payments. # noqa: E501 - - :param fail_url: The fail_url of this CreatePaymentRequest. # noqa: E501 - :type: str - """ - - self._fail_url = fail_url - - @property - def cancel_url(self): - """Gets the cancel_url of this CreatePaymentRequest. # noqa: E501 - - The URL the customer will be directed to if they decide to cancel payment and return to your website (used in hosted payment page). # noqa: E501 - - :return: The cancel_url of this CreatePaymentRequest. # noqa: E501 - :rtype: str - """ - return self._cancel_url - - @cancel_url.setter - def cancel_url(self, cancel_url): - """Sets the cancel_url of this CreatePaymentRequest. - - The URL the customer will be directed to if they decide to cancel payment and return to your website (used in hosted payment page). # noqa: E501 - - :param cancel_url: The cancel_url of this CreatePaymentRequest. # noqa: E501 - :type: str - """ - - self._cancel_url = cancel_url - - @property - def payment_token(self): - """Gets the payment_token of this CreatePaymentRequest. # noqa: E501 - - A payment token generated by monei.js [Components](https://docs.monei.com/docs/monei-js-overview) or a paymentToken [saved after a previous successful payment](https://docs.monei.com/docs/save-payment-method). In case of the first one, you will also need to send the `sessionId` used to generate the token in the first place. # noqa: E501 - - :return: The payment_token of this CreatePaymentRequest. # noqa: E501 - :rtype: str - """ - return self._payment_token - - @payment_token.setter - def payment_token(self, payment_token): - """Sets the payment_token of this CreatePaymentRequest. - - A payment token generated by monei.js [Components](https://docs.monei.com/docs/monei-js-overview) or a paymentToken [saved after a previous successful payment](https://docs.monei.com/docs/save-payment-method). In case of the first one, you will also need to send the `sessionId` used to generate the token in the first place. # noqa: E501 - - :param payment_token: The payment_token of this CreatePaymentRequest. # noqa: E501 - :type: str - """ - - self._payment_token = payment_token - - @property - def session_id(self): - """Gets the session_id of this CreatePaymentRequest. # noqa: E501 - - A unique identifier within your system that adds security to the payment process. You need to pass the same session ID as the one used on the frontend to initialize MONEI Component (if you needed to). This is required if a payment token (not permanent) was already generated in the frontend. # noqa: E501 - - :return: The session_id of this CreatePaymentRequest. # noqa: E501 - :rtype: str - """ - return self._session_id - - @session_id.setter - def session_id(self, session_id): - """Sets the session_id of this CreatePaymentRequest. - - A unique identifier within your system that adds security to the payment process. You need to pass the same session ID as the one used on the frontend to initialize MONEI Component (if you needed to). This is required if a payment token (not permanent) was already generated in the frontend. # noqa: E501 - - :param session_id: The session_id of this CreatePaymentRequest. # noqa: E501 - :type: str - """ - - self._session_id = session_id - - @property - def generate_payment_token(self): - """Gets the generate_payment_token of this CreatePaymentRequest. # noqa: E501 - - If set to true a permanent token that represents a payment method used in the payment will be generated. # noqa: E501 - - :return: The generate_payment_token of this CreatePaymentRequest. # noqa: E501 - :rtype: bool - """ - return self._generate_payment_token - - @generate_payment_token.setter - def generate_payment_token(self, generate_payment_token): - """Sets the generate_payment_token of this CreatePaymentRequest. - - If set to true a permanent token that represents a payment method used in the payment will be generated. # noqa: E501 - - :param generate_payment_token: The generate_payment_token of this CreatePaymentRequest. # noqa: E501 - :type: bool - """ - - self._generate_payment_token = generate_payment_token - - @property - def payment_method(self): - """Gets the payment_method of this CreatePaymentRequest. # noqa: E501 - - - :return: The payment_method of this CreatePaymentRequest. # noqa: E501 - :rtype: PaymentPaymentMethodInput - """ - return self._payment_method - - @payment_method.setter - def payment_method(self, payment_method): - """Sets the payment_method of this CreatePaymentRequest. - - - :param payment_method: The payment_method of this CreatePaymentRequest. # noqa: E501 - :type: PaymentPaymentMethodInput - """ - - self._payment_method = payment_method - - @property - def allowed_payment_methods(self): - """Gets the allowed_payment_methods of this CreatePaymentRequest. # noqa: E501 - - - :return: The allowed_payment_methods of this CreatePaymentRequest. # noqa: E501 - :rtype: PaymentPaymentMethods - """ - return self._allowed_payment_methods - - @allowed_payment_methods.setter - def allowed_payment_methods(self, allowed_payment_methods): - """Sets the allowed_payment_methods of this CreatePaymentRequest. - - - :param allowed_payment_methods: The allowed_payment_methods of this CreatePaymentRequest. # noqa: E501 - :type: PaymentPaymentMethods - """ - - self._allowed_payment_methods = allowed_payment_methods - - @property - def transaction_type(self): - """Gets the transaction_type of this CreatePaymentRequest. # noqa: E501 - - - :return: The transaction_type of this CreatePaymentRequest. # noqa: E501 - :rtype: PaymentTransactionType - """ - return self._transaction_type - - @transaction_type.setter - def transaction_type(self, transaction_type): - """Sets the transaction_type of this CreatePaymentRequest. - - - :param transaction_type: The transaction_type of this CreatePaymentRequest. # noqa: E501 - :type: PaymentTransactionType - """ - - self._transaction_type = transaction_type - - @property - def sequence(self): - """Gets the sequence of this CreatePaymentRequest. # noqa: E501 - - - :return: The sequence of this CreatePaymentRequest. # noqa: E501 - :rtype: PaymentSequence - """ - return self._sequence - - @sequence.setter - def sequence(self, sequence): - """Sets the sequence of this CreatePaymentRequest. - - - :param sequence: The sequence of this CreatePaymentRequest. # noqa: E501 - :type: PaymentSequence - """ - - self._sequence = sequence - - @property - def store_id(self): - """Gets the store_id of this CreatePaymentRequest. # noqa: E501 - - A unique identifier of the Store. If specified the payment is attached to this Store. # noqa: E501 - - :return: The store_id of this CreatePaymentRequest. # noqa: E501 - :rtype: str - """ - return self._store_id - - @store_id.setter - def store_id(self, store_id): - """Sets the store_id of this CreatePaymentRequest. - - A unique identifier of the Store. If specified the payment is attached to this Store. # noqa: E501 - - :param store_id: The store_id of this CreatePaymentRequest. # noqa: E501 - :type: str - """ - - self._store_id = store_id - - @property - def point_of_sale_id(self): - """Gets the point_of_sale_id of this CreatePaymentRequest. # noqa: E501 - - A unique identifier of the Point of Sale. If specified the payment is attached to this Point of Sale. If there is a QR code attached to the same Point of Sale, this payment will be available by scanning the QR code. # noqa: E501 - - :return: The point_of_sale_id of this CreatePaymentRequest. # noqa: E501 - :rtype: str - """ - return self._point_of_sale_id - - @point_of_sale_id.setter - def point_of_sale_id(self, point_of_sale_id): - """Sets the point_of_sale_id of this CreatePaymentRequest. - - A unique identifier of the Point of Sale. If specified the payment is attached to this Point of Sale. If there is a QR code attached to the same Point of Sale, this payment will be available by scanning the QR code. # noqa: E501 - - :param point_of_sale_id: The point_of_sale_id of this CreatePaymentRequest. # noqa: E501 - :type: str - """ - - self._point_of_sale_id = point_of_sale_id - - @property - def subscription_id(self): - """Gets the subscription_id of this CreatePaymentRequest. # noqa: E501 - - A unique identifier of the Subscription. If specified the payment is attached to this Subscription. # noqa: E501 - - :return: The subscription_id of this CreatePaymentRequest. # noqa: E501 - :rtype: str - """ - return self._subscription_id - - @subscription_id.setter - def subscription_id(self, subscription_id): - """Sets the subscription_id of this CreatePaymentRequest. - - A unique identifier of the Subscription. If specified the payment is attached to this Subscription. # noqa: E501 - - :param subscription_id: The subscription_id of this CreatePaymentRequest. # noqa: E501 - :type: str - """ - - self._subscription_id = subscription_id - - @property - def auto_recover(self): - """Gets the auto_recover of this CreatePaymentRequest. # noqa: E501 - - If set to `true`, the new payment will be automatically created when customer visits the payment link of the previously failed payment. Is automatically set to `true` if `completeUrl` is not provided.(set this value to `true` to create \"Pay By Link\" payments). # noqa: E501 - - :return: The auto_recover of this CreatePaymentRequest. # noqa: E501 - :rtype: bool - """ - return self._auto_recover - - @auto_recover.setter - def auto_recover(self, auto_recover): - """Sets the auto_recover of this CreatePaymentRequest. - - If set to `true`, the new payment will be automatically created when customer visits the payment link of the previously failed payment. Is automatically set to `true` if `completeUrl` is not provided.(set this value to `true` to create \"Pay By Link\" payments). # noqa: E501 - - :param auto_recover: The auto_recover of this CreatePaymentRequest. # noqa: E501 - :type: bool - """ - - self._auto_recover = auto_recover - - @property - def description(self): - """Gets the description of this CreatePaymentRequest. # noqa: E501 - - An arbitrary string attached to the payment. Often useful for displaying to users. # noqa: E501 - - :return: The description of this CreatePaymentRequest. # noqa: E501 - :rtype: str - """ - return self._description - - @description.setter - def description(self, description): - """Sets the description of this CreatePaymentRequest. - - An arbitrary string attached to the payment. Often useful for displaying to users. # noqa: E501 - - :param description: The description of this CreatePaymentRequest. # noqa: E501 - :type: str - """ - - self._description = description - - @property - def customer(self): - """Gets the customer of this CreatePaymentRequest. # noqa: E501 - - - :return: The customer of this CreatePaymentRequest. # noqa: E501 - :rtype: PaymentCustomer - """ - return self._customer - - @customer.setter - def customer(self, customer): - """Sets the customer of this CreatePaymentRequest. - - - :param customer: The customer of this CreatePaymentRequest. # noqa: E501 - :type: PaymentCustomer - """ - - self._customer = customer - - @property - def billing_details(self): - """Gets the billing_details of this CreatePaymentRequest. # noqa: E501 - - - :return: The billing_details of this CreatePaymentRequest. # noqa: E501 - :rtype: PaymentBillingDetails - """ - return self._billing_details - - @billing_details.setter - def billing_details(self, billing_details): - """Sets the billing_details of this CreatePaymentRequest. - - - :param billing_details: The billing_details of this CreatePaymentRequest. # noqa: E501 - :type: PaymentBillingDetails - """ - - self._billing_details = billing_details - - @property - def shipping_details(self): - """Gets the shipping_details of this CreatePaymentRequest. # noqa: E501 - - - :return: The shipping_details of this CreatePaymentRequest. # noqa: E501 - :rtype: PaymentShippingDetails - """ - return self._shipping_details - - @shipping_details.setter - def shipping_details(self, shipping_details): - """Sets the shipping_details of this CreatePaymentRequest. - - - :param shipping_details: The shipping_details of this CreatePaymentRequest. # noqa: E501 - :type: PaymentShippingDetails - """ - - self._shipping_details = shipping_details - - @property - def session_details(self): - """Gets the session_details of this CreatePaymentRequest. # noqa: E501 - - - :return: The session_details of this CreatePaymentRequest. # noqa: E501 - :rtype: PaymentSessionDetails - """ - return self._session_details - - @session_details.setter - def session_details(self, session_details): - """Sets the session_details of this CreatePaymentRequest. - - - :param session_details: The session_details of this CreatePaymentRequest. # noqa: E501 - :type: PaymentSessionDetails - """ - - self._session_details = session_details - - @property - def expire_at(self): - """Gets the expire_at of this CreatePaymentRequest. # noqa: E501 - - Payment expiration time. # noqa: E501 - - :return: The expire_at of this CreatePaymentRequest. # noqa: E501 - :rtype: float - """ - return self._expire_at - - @expire_at.setter - def expire_at(self, expire_at): - """Sets the expire_at of this CreatePaymentRequest. - - Payment expiration time. # noqa: E501 - - :param expire_at: The expire_at of this CreatePaymentRequest. # noqa: E501 - :type: float - """ - - self._expire_at = expire_at - - @property - def metadata(self): - """Gets the metadata of this CreatePaymentRequest. # noqa: E501 - - A set of key-value pairs that you can attach to a resource. This can be useful for storing additional information about the resource in a structured format. # noqa: E501 - - :return: The metadata of this CreatePaymentRequest. # noqa: E501 - :rtype: object - """ - return self._metadata - - @metadata.setter - def metadata(self, metadata): - """Sets the metadata of this CreatePaymentRequest. - - A set of key-value pairs that you can attach to a resource. This can be useful for storing additional information about the resource in a structured format. # noqa: E501 - - :param metadata: The metadata of this CreatePaymentRequest. # noqa: E501 - :type: object - """ - - self._metadata = metadata - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, CreatePaymentRequest): - return False - - return self.to_dict() == other.to_dict() + CreatePaymentRequest + """ # noqa: E501 + amount: StrictInt = Field(description="Amount intended to be collected by this payment. A positive integer representing how much to charge in the smallest currency unit (e.g., 100 cents to charge 1.00 USD). ") + currency: StrictStr = Field(description="Three-letter [ISO currency code](https://en.wikipedia.org/wiki/ISO_4217), in uppercase. Must be a supported currency. ") + order_id: StrictStr = Field(description="An order ID from your system. A unique identifier that can be used to reconcile the payment with your internal system. ", alias="orderId") + callback_url: Optional[StrictStr] = Field(default=None, description="The URL to which a payment result should be sent asynchronously. ", alias="callbackUrl") + complete_url: Optional[StrictStr] = Field(default=None, description="The URL the customer will be directed to after transaction completed (successful or failed - except if `failUrl` is provided). ", alias="completeUrl") + fail_url: Optional[StrictStr] = Field(default=None, description="The URL the customer will be directed to after transaction has failed, instead of `completeUrl` (used in hosted payment page). This allows to provide two different URLs for successful and failed payments. ", alias="failUrl") + cancel_url: Optional[StrictStr] = Field(default=None, description="The URL the customer will be directed to if they decide to cancel payment and return to your website (used in hosted payment page). ", alias="cancelUrl") + payment_token: Optional[StrictStr] = Field(default=None, description="A payment token generated by monei.js [Components](https://docs.monei.com/docs/monei-js-overview) or a paymentToken [saved after a previous successful payment](https://docs.monei.com/docs/save-payment-method). In case of the first one, you will also need to send the `sessionId` used to generate the token in the first place. ", alias="paymentToken") + session_id: Optional[StrictStr] = Field(default=None, description="A unique identifier within your system that adds security to the payment process. You need to pass the same session ID as the one used on the frontend to initialize MONEI Component (if you needed to). This is required if a payment token (not permanent) was already generated in the frontend. ", alias="sessionId") + generate_payment_token: Optional[StrictBool] = Field(default=False, description="If set to true a permanent token that represents a payment method used in the payment will be generated. ", alias="generatePaymentToken") + payment_method: Optional[PaymentPaymentMethodInput] = Field(default=None, alias="paymentMethod") + allowed_payment_methods: Optional[PaymentPaymentMethods] = Field(default=None, alias="allowedPaymentMethods") + transaction_type: Optional[PaymentTransactionType] = Field(default=PaymentTransactionType.SALE, alias="transactionType") + sequence: Optional[PaymentSequence] = None + store_id: Optional[StrictStr] = Field(default=None, description="A unique identifier of the Store. If specified the payment is attached to this Store. ", alias="storeId") + point_of_sale_id: Optional[StrictStr] = Field(default=None, description="A unique identifier of the Point of Sale. If specified the payment is attached to this Point of Sale. If there is a QR code attached to the same Point of Sale, this payment will be available by scanning the QR code. ", alias="pointOfSaleId") + subscription_id: Optional[StrictStr] = Field(default=None, description="A unique identifier of the Subscription. If specified the payment is attached to this Subscription. ", alias="subscriptionId") + auto_recover: Optional[StrictBool] = Field(default=None, description="If set to `true`, the new payment will be automatically created when customer visits the payment link of the previously failed payment. Is automatically set to `true` if `completeUrl` is not provided.(set this value to `true` to create \"Pay By Link\" payments).", alias="autoRecover") + description: Optional[StrictStr] = Field(default=None, description="An arbitrary string attached to the payment. Often useful for displaying to users. ") + customer: Optional[PaymentCustomer] = None + billing_details: Optional[PaymentBillingDetails] = Field(default=None, alias="billingDetails") + shipping_details: Optional[PaymentShippingDetails] = Field(default=None, alias="shippingDetails") + session_details: Optional[PaymentSessionDetails] = Field(default=None, alias="sessionDetails") + expire_at: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Payment expiration time.", alias="expireAt") + metadata: Optional[Dict[str, Any]] = Field(default=None, description="A set of key-value pairs that you can attach to a resource. This can be useful for storing additional information about the resource in a structured format.") + __properties: ClassVar[List[str]] = ["amount", "currency", "orderId", "callbackUrl", "completeUrl", "failUrl", "cancelUrl", "paymentToken", "sessionId", "generatePaymentToken", "paymentMethod", "allowedPaymentMethods", "transactionType", "sequence", "storeId", "pointOfSaleId", "subscriptionId", "autoRecover", "description", "customer", "billingDetails", "shippingDetails", "sessionDetails", "expireAt", "metadata"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of CreatePaymentRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of payment_method + if self.payment_method: + _dict['paymentMethod'] = self.payment_method.to_dict() + # override the default output from pydantic by calling `to_dict()` of sequence + if self.sequence: + _dict['sequence'] = self.sequence.to_dict() + # override the default output from pydantic by calling `to_dict()` of customer + if self.customer: + _dict['customer'] = self.customer.to_dict() + # override the default output from pydantic by calling `to_dict()` of billing_details + if self.billing_details: + _dict['billingDetails'] = self.billing_details.to_dict() + # override the default output from pydantic by calling `to_dict()` of shipping_details + if self.shipping_details: + _dict['shippingDetails'] = self.shipping_details.to_dict() + # override the default output from pydantic by calling `to_dict()` of session_details + if self.session_details: + _dict['sessionDetails'] = self.session_details.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of CreatePaymentRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "amount": obj.get("amount"), + "currency": obj.get("currency"), + "orderId": obj.get("orderId"), + "callbackUrl": obj.get("callbackUrl"), + "completeUrl": obj.get("completeUrl"), + "failUrl": obj.get("failUrl"), + "cancelUrl": obj.get("cancelUrl"), + "paymentToken": obj.get("paymentToken"), + "sessionId": obj.get("sessionId"), + "generatePaymentToken": obj.get("generatePaymentToken") if obj.get("generatePaymentToken") is not None else False, + "paymentMethod": PaymentPaymentMethodInput.from_dict(obj["paymentMethod"]) if obj.get("paymentMethod") is not None else None, + "allowedPaymentMethods": obj.get("allowedPaymentMethods"), + "transactionType": obj.get("transactionType") if obj.get("transactionType") is not None else PaymentTransactionType.SALE, + "sequence": PaymentSequence.from_dict(obj["sequence"]) if obj.get("sequence") is not None else None, + "storeId": obj.get("storeId"), + "pointOfSaleId": obj.get("pointOfSaleId"), + "subscriptionId": obj.get("subscriptionId"), + "autoRecover": obj.get("autoRecover"), + "description": obj.get("description"), + "customer": PaymentCustomer.from_dict(obj["customer"]) if obj.get("customer") is not None else None, + "billingDetails": PaymentBillingDetails.from_dict(obj["billingDetails"]) if obj.get("billingDetails") is not None else None, + "shippingDetails": PaymentShippingDetails.from_dict(obj["shippingDetails"]) if obj.get("shippingDetails") is not None else None, + "sessionDetails": PaymentSessionDetails.from_dict(obj["sessionDetails"]) if obj.get("sessionDetails") is not None else None, + "expireAt": obj.get("expireAt"), + "metadata": obj.get("metadata") + }) + return _obj - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, CreatePaymentRequest): - return True - return self.to_dict() != other.to_dict() diff --git a/Monei/models/create_subscription_request.py b/Monei/models/create_subscription_request.py index f882473..d95de35 100644 --- a/Monei/models/create_subscription_request.py +++ b/Monei/models/create_subscription_request.py @@ -3,479 +3,132 @@ """ MONEI API v1 -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

- The version of the OpenAPI document: 1.5.0 - Generated by: https://openapi-generator.tech -""" + The version of the OpenAPI document: 1.5.1 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 +from __future__ import annotations import pprint import re # noqa: F401 - -import six - -from Monei.configuration import Configuration - - -class CreateSubscriptionRequest(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional, Union +from Monei.models.payment_billing_details import PaymentBillingDetails +from Monei.models.payment_customer import PaymentCustomer +from Monei.models.payment_shipping_details import PaymentShippingDetails +from Monei.models.subscription_interval import SubscriptionInterval +from Monei.models.subscription_retry_schedule_inner import SubscriptionRetryScheduleInner +from typing import Optional, Set +from typing_extensions import Self + +class CreateSubscriptionRequest(BaseModel): """ + CreateSubscriptionRequest + """ # noqa: E501 + amount: StrictInt = Field(description="Amount intended to be collected by this payment. A positive integer representing how much to charge in the smallest currency unit (e.g., 100 cents to charge 1.00 USD). ") + currency: StrictStr = Field(description="Three-letter [ISO currency code](https://en.wikipedia.org/wiki/ISO_4217), in uppercase. Must be a supported currency. ") + interval: SubscriptionInterval + interval_count: Optional[StrictInt] = Field(default=None, description="Number of intervals between subscription payments.", alias="intervalCount") + description: Optional[StrictStr] = Field(default=None, description="An arbitrary string attached to the subscription. Often useful for displaying to users. ") + customer: Optional[PaymentCustomer] = None + billing_details: Optional[PaymentBillingDetails] = Field(default=None, alias="billingDetails") + shipping_details: Optional[PaymentShippingDetails] = Field(default=None, alias="shippingDetails") + trial_period_end: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="The end date of the trial period. Measured in seconds since the Unix epoch.", alias="trialPeriodEnd") + trial_period_days: Optional[StrictInt] = Field(default=None, description="Number of days the trial period lasts.", alias="trialPeriodDays") + retry_schedule: Optional[List[SubscriptionRetryScheduleInner]] = Field(default=None, description="Defines a custom schedule for retrying failed subscription payments. Each entry in the array specifies how long to wait before attempting the next payment retry. If not specified, the system's default retry schedule will be used. ", alias="retrySchedule") + callback_url: Optional[StrictStr] = Field(default=None, description="The URL will be called each time subscription status changes. You will receive a subscription object in the body of the request. ", alias="callbackUrl") + payment_callback_url: Optional[StrictStr] = Field(default=None, description="The URL will be called each time subscription creates a new payments. You will receive the payment object in the body of the request. ", alias="paymentCallbackUrl") + metadata: Optional[Dict[str, Any]] = Field(default=None, description="A set of key-value pairs that you can attach to a resource. This can be useful for storing additional information about the resource in a structured format.") + __properties: ClassVar[List[str]] = ["amount", "currency", "interval", "intervalCount", "description", "customer", "billingDetails", "shippingDetails", "trialPeriodEnd", "trialPeriodDays", "retrySchedule", "callbackUrl", "paymentCallbackUrl", "metadata"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of CreateSubscriptionRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of customer + if self.customer: + _dict['customer'] = self.customer.to_dict() + # override the default output from pydantic by calling `to_dict()` of billing_details + if self.billing_details: + _dict['billingDetails'] = self.billing_details.to_dict() + # override the default output from pydantic by calling `to_dict()` of shipping_details + if self.shipping_details: + _dict['shippingDetails'] = self.shipping_details.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in retry_schedule (list) + _items = [] + if self.retry_schedule: + for _item_retry_schedule in self.retry_schedule: + if _item_retry_schedule: + _items.append(_item_retry_schedule.to_dict()) + _dict['retrySchedule'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of CreateSubscriptionRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "amount": obj.get("amount"), + "currency": obj.get("currency"), + "interval": obj.get("interval"), + "intervalCount": obj.get("intervalCount"), + "description": obj.get("description"), + "customer": PaymentCustomer.from_dict(obj["customer"]) if obj.get("customer") is not None else None, + "billingDetails": PaymentBillingDetails.from_dict(obj["billingDetails"]) if obj.get("billingDetails") is not None else None, + "shippingDetails": PaymentShippingDetails.from_dict(obj["shippingDetails"]) if obj.get("shippingDetails") is not None else None, + "trialPeriodEnd": obj.get("trialPeriodEnd"), + "trialPeriodDays": obj.get("trialPeriodDays"), + "retrySchedule": [SubscriptionRetryScheduleInner.from_dict(_item) for _item in obj["retrySchedule"]] if obj.get("retrySchedule") is not None else None, + "callbackUrl": obj.get("callbackUrl"), + "paymentCallbackUrl": obj.get("paymentCallbackUrl"), + "metadata": obj.get("metadata") + }) + return _obj - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'amount': 'int', - 'currency': 'str', - 'interval': 'SubscriptionInterval', - 'interval_count': 'int', - 'description': 'str', - 'customer': 'PaymentCustomer', - 'billing_details': 'PaymentBillingDetails', - 'shipping_details': 'PaymentShippingDetails', - 'trial_period_end': 'float', - 'trial_period_days': 'int', - 'retry_schedule': 'list[object]', - 'callback_url': 'str', - 'payment_callback_url': 'str', - 'metadata': 'object' - } - - attribute_map = { - 'amount': 'amount', - 'currency': 'currency', - 'interval': 'interval', - 'interval_count': 'intervalCount', - 'description': 'description', - 'customer': 'customer', - 'billing_details': 'billingDetails', - 'shipping_details': 'shippingDetails', - 'trial_period_end': 'trialPeriodEnd', - 'trial_period_days': 'trialPeriodDays', - 'retry_schedule': 'retrySchedule', - 'callback_url': 'callbackUrl', - 'payment_callback_url': 'paymentCallbackUrl', - 'metadata': 'metadata' - } - - def __init__(self, amount=None, currency=None, interval=None, interval_count=None, description=None, customer=None, billing_details=None, shipping_details=None, trial_period_end=None, trial_period_days=None, retry_schedule=None, callback_url=None, payment_callback_url=None, metadata=None, local_vars_configuration=None): # noqa: E501 - """CreateSubscriptionRequest - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._amount = None - self._currency = None - self._interval = None - self._interval_count = None - self._description = None - self._customer = None - self._billing_details = None - self._shipping_details = None - self._trial_period_end = None - self._trial_period_days = None - self._retry_schedule = None - self._callback_url = None - self._payment_callback_url = None - self._metadata = None - self.discriminator = None - - self.amount = amount - self.currency = currency - self.interval = interval - if interval_count is not None: - self.interval_count = interval_count - if description is not None: - self.description = description - if customer is not None: - self.customer = customer - if billing_details is not None: - self.billing_details = billing_details - if shipping_details is not None: - self.shipping_details = shipping_details - if trial_period_end is not None: - self.trial_period_end = trial_period_end - if trial_period_days is not None: - self.trial_period_days = trial_period_days - if retry_schedule is not None: - self.retry_schedule = retry_schedule - if callback_url is not None: - self.callback_url = callback_url - if payment_callback_url is not None: - self.payment_callback_url = payment_callback_url - if metadata is not None: - self.metadata = metadata - - @property - def amount(self): - """Gets the amount of this CreateSubscriptionRequest. # noqa: E501 - - Amount intended to be collected by this payment. A positive integer representing how much to charge in the smallest currency unit (e.g., 100 cents to charge 1.00 USD). # noqa: E501 - - :return: The amount of this CreateSubscriptionRequest. # noqa: E501 - :rtype: int - """ - return self._amount - - @amount.setter - def amount(self, amount): - """Sets the amount of this CreateSubscriptionRequest. - - Amount intended to be collected by this payment. A positive integer representing how much to charge in the smallest currency unit (e.g., 100 cents to charge 1.00 USD). # noqa: E501 - - :param amount: The amount of this CreateSubscriptionRequest. # noqa: E501 - :type: int - """ - if self.local_vars_configuration.client_side_validation and amount is None: # noqa: E501 - raise ValueError("Invalid value for `amount`, must not be `None`") # noqa: E501 - - self._amount = amount - - @property - def currency(self): - """Gets the currency of this CreateSubscriptionRequest. # noqa: E501 - - Three-letter [ISO currency code](https://en.wikipedia.org/wiki/ISO_4217), in uppercase. Must be a supported currency. # noqa: E501 - - :return: The currency of this CreateSubscriptionRequest. # noqa: E501 - :rtype: str - """ - return self._currency - - @currency.setter - def currency(self, currency): - """Sets the currency of this CreateSubscriptionRequest. - - Three-letter [ISO currency code](https://en.wikipedia.org/wiki/ISO_4217), in uppercase. Must be a supported currency. # noqa: E501 - - :param currency: The currency of this CreateSubscriptionRequest. # noqa: E501 - :type: str - """ - if self.local_vars_configuration.client_side_validation and currency is None: # noqa: E501 - raise ValueError("Invalid value for `currency`, must not be `None`") # noqa: E501 - - self._currency = currency - - @property - def interval(self): - """Gets the interval of this CreateSubscriptionRequest. # noqa: E501 - - - :return: The interval of this CreateSubscriptionRequest. # noqa: E501 - :rtype: SubscriptionInterval - """ - return self._interval - - @interval.setter - def interval(self, interval): - """Sets the interval of this CreateSubscriptionRequest. - - - :param interval: The interval of this CreateSubscriptionRequest. # noqa: E501 - :type: SubscriptionInterval - """ - if self.local_vars_configuration.client_side_validation and interval is None: # noqa: E501 - raise ValueError("Invalid value for `interval`, must not be `None`") # noqa: E501 - - self._interval = interval - - @property - def interval_count(self): - """Gets the interval_count of this CreateSubscriptionRequest. # noqa: E501 - - Number of intervals between subscription payments. # noqa: E501 - - :return: The interval_count of this CreateSubscriptionRequest. # noqa: E501 - :rtype: int - """ - return self._interval_count - - @interval_count.setter - def interval_count(self, interval_count): - """Sets the interval_count of this CreateSubscriptionRequest. - - Number of intervals between subscription payments. # noqa: E501 - - :param interval_count: The interval_count of this CreateSubscriptionRequest. # noqa: E501 - :type: int - """ - - self._interval_count = interval_count - - @property - def description(self): - """Gets the description of this CreateSubscriptionRequest. # noqa: E501 - - An arbitrary string attached to the subscription. Often useful for displaying to users. # noqa: E501 - - :return: The description of this CreateSubscriptionRequest. # noqa: E501 - :rtype: str - """ - return self._description - - @description.setter - def description(self, description): - """Sets the description of this CreateSubscriptionRequest. - - An arbitrary string attached to the subscription. Often useful for displaying to users. # noqa: E501 - - :param description: The description of this CreateSubscriptionRequest. # noqa: E501 - :type: str - """ - - self._description = description - - @property - def customer(self): - """Gets the customer of this CreateSubscriptionRequest. # noqa: E501 - - - :return: The customer of this CreateSubscriptionRequest. # noqa: E501 - :rtype: PaymentCustomer - """ - return self._customer - - @customer.setter - def customer(self, customer): - """Sets the customer of this CreateSubscriptionRequest. - - - :param customer: The customer of this CreateSubscriptionRequest. # noqa: E501 - :type: PaymentCustomer - """ - - self._customer = customer - - @property - def billing_details(self): - """Gets the billing_details of this CreateSubscriptionRequest. # noqa: E501 - - - :return: The billing_details of this CreateSubscriptionRequest. # noqa: E501 - :rtype: PaymentBillingDetails - """ - return self._billing_details - - @billing_details.setter - def billing_details(self, billing_details): - """Sets the billing_details of this CreateSubscriptionRequest. - - - :param billing_details: The billing_details of this CreateSubscriptionRequest. # noqa: E501 - :type: PaymentBillingDetails - """ - - self._billing_details = billing_details - - @property - def shipping_details(self): - """Gets the shipping_details of this CreateSubscriptionRequest. # noqa: E501 - - - :return: The shipping_details of this CreateSubscriptionRequest. # noqa: E501 - :rtype: PaymentShippingDetails - """ - return self._shipping_details - - @shipping_details.setter - def shipping_details(self, shipping_details): - """Sets the shipping_details of this CreateSubscriptionRequest. - - - :param shipping_details: The shipping_details of this CreateSubscriptionRequest. # noqa: E501 - :type: PaymentShippingDetails - """ - - self._shipping_details = shipping_details - - @property - def trial_period_end(self): - """Gets the trial_period_end of this CreateSubscriptionRequest. # noqa: E501 - - The end date of the trial period. Measured in seconds since the Unix epoch. # noqa: E501 - - :return: The trial_period_end of this CreateSubscriptionRequest. # noqa: E501 - :rtype: float - """ - return self._trial_period_end - - @trial_period_end.setter - def trial_period_end(self, trial_period_end): - """Sets the trial_period_end of this CreateSubscriptionRequest. - - The end date of the trial period. Measured in seconds since the Unix epoch. # noqa: E501 - - :param trial_period_end: The trial_period_end of this CreateSubscriptionRequest. # noqa: E501 - :type: float - """ - - self._trial_period_end = trial_period_end - - @property - def trial_period_days(self): - """Gets the trial_period_days of this CreateSubscriptionRequest. # noqa: E501 - - Number of days the trial period lasts. # noqa: E501 - - :return: The trial_period_days of this CreateSubscriptionRequest. # noqa: E501 - :rtype: int - """ - return self._trial_period_days - - @trial_period_days.setter - def trial_period_days(self, trial_period_days): - """Sets the trial_period_days of this CreateSubscriptionRequest. - - Number of days the trial period lasts. # noqa: E501 - - :param trial_period_days: The trial_period_days of this CreateSubscriptionRequest. # noqa: E501 - :type: int - """ - - self._trial_period_days = trial_period_days - - @property - def retry_schedule(self): - """Gets the retry_schedule of this CreateSubscriptionRequest. # noqa: E501 - - Defines a custom schedule for retrying failed subscription payments. Each entry in the array specifies how long to wait before attempting the next payment retry. If not specified, the system's default retry schedule will be used. # noqa: E501 - - :return: The retry_schedule of this CreateSubscriptionRequest. # noqa: E501 - :rtype: list[object] - """ - return self._retry_schedule - - @retry_schedule.setter - def retry_schedule(self, retry_schedule): - """Sets the retry_schedule of this CreateSubscriptionRequest. - - Defines a custom schedule for retrying failed subscription payments. Each entry in the array specifies how long to wait before attempting the next payment retry. If not specified, the system's default retry schedule will be used. # noqa: E501 - - :param retry_schedule: The retry_schedule of this CreateSubscriptionRequest. # noqa: E501 - :type: list[object] - """ - - self._retry_schedule = retry_schedule - - @property - def callback_url(self): - """Gets the callback_url of this CreateSubscriptionRequest. # noqa: E501 - - The URL will be called each time subscription status changes. You will receive a subscription object in the body of the request. # noqa: E501 - - :return: The callback_url of this CreateSubscriptionRequest. # noqa: E501 - :rtype: str - """ - return self._callback_url - - @callback_url.setter - def callback_url(self, callback_url): - """Sets the callback_url of this CreateSubscriptionRequest. - - The URL will be called each time subscription status changes. You will receive a subscription object in the body of the request. # noqa: E501 - - :param callback_url: The callback_url of this CreateSubscriptionRequest. # noqa: E501 - :type: str - """ - - self._callback_url = callback_url - - @property - def payment_callback_url(self): - """Gets the payment_callback_url of this CreateSubscriptionRequest. # noqa: E501 - - The URL will be called each time subscription creates a new payments. You will receive the payment object in the body of the request. # noqa: E501 - - :return: The payment_callback_url of this CreateSubscriptionRequest. # noqa: E501 - :rtype: str - """ - return self._payment_callback_url - - @payment_callback_url.setter - def payment_callback_url(self, payment_callback_url): - """Sets the payment_callback_url of this CreateSubscriptionRequest. - - The URL will be called each time subscription creates a new payments. You will receive the payment object in the body of the request. # noqa: E501 - - :param payment_callback_url: The payment_callback_url of this CreateSubscriptionRequest. # noqa: E501 - :type: str - """ - - self._payment_callback_url = payment_callback_url - - @property - def metadata(self): - """Gets the metadata of this CreateSubscriptionRequest. # noqa: E501 - - A set of key-value pairs that you can attach to a resource. This can be useful for storing additional information about the resource in a structured format. # noqa: E501 - - :return: The metadata of this CreateSubscriptionRequest. # noqa: E501 - :rtype: object - """ - return self._metadata - - @metadata.setter - def metadata(self, metadata): - """Sets the metadata of this CreateSubscriptionRequest. - - A set of key-value pairs that you can attach to a resource. This can be useful for storing additional information about the resource in a structured format. # noqa: E501 - - :param metadata: The metadata of this CreateSubscriptionRequest. # noqa: E501 - :type: object - """ - - self._metadata = metadata - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, CreateSubscriptionRequest): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, CreateSubscriptionRequest): - return True - return self.to_dict() != other.to_dict() diff --git a/Monei/models/error.py b/Monei/models/error.py index 798681d..86a865a 100644 --- a/Monei/models/error.py +++ b/Monei/models/error.py @@ -3,237 +3,94 @@ """ MONEI API v1 -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

- The version of the OpenAPI document: 1.5.0 - Generated by: https://openapi-generator.tech -""" + The version of the OpenAPI document: 1.5.1 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 +from __future__ import annotations import pprint import re # noqa: F401 +import json -import six - -from Monei.configuration import Configuration - - -class Error(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self +class Error(BaseModel): """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'status': 'str', - 'status_code': 'int', - 'message': 'str', - 'request_id': 'str', - 'request_time': 'datetime' - } - - attribute_map = { - 'status': 'status', - 'status_code': 'statusCode', - 'message': 'message', - 'request_id': 'requestId', - 'request_time': 'requestTime' - } - - def __init__(self, status=None, status_code=None, message=None, request_id=None, request_time=None, local_vars_configuration=None): # noqa: E501 - """Error - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._status = None - self._status_code = None - self._message = None - self._request_id = None - self._request_time = None - self.discriminator = None - - self.status = status - self.status_code = status_code - self.message = message - self.request_id = request_id - self.request_time = request_time - - @property - def status(self): - """Gets the status of this Error. # noqa: E501 - - Error type identifier # noqa: E501 - - :return: The status of this Error. # noqa: E501 - :rtype: str - """ - return self._status - - @status.setter - def status(self, status): - """Sets the status of this Error. - - Error type identifier # noqa: E501 - - :param status: The status of this Error. # noqa: E501 - :type: str - """ - if self.local_vars_configuration.client_side_validation and status is None: # noqa: E501 - raise ValueError("Invalid value for `status`, must not be `None`") # noqa: E501 - - self._status = status - - @property - def status_code(self): - """Gets the status_code of this Error. # noqa: E501 - - HTTP status code # noqa: E501 - - :return: The status_code of this Error. # noqa: E501 - :rtype: int - """ - return self._status_code - - @status_code.setter - def status_code(self, status_code): - """Sets the status_code of this Error. - - HTTP status code # noqa: E501 - - :param status_code: The status_code of this Error. # noqa: E501 - :type: int - """ - if self.local_vars_configuration.client_side_validation and status_code is None: # noqa: E501 - raise ValueError("Invalid value for `status_code`, must not be `None`") # noqa: E501 - - self._status_code = status_code - - @property - def message(self): - """Gets the message of this Error. # noqa: E501 - - Human-readable error message # noqa: E501 - - :return: The message of this Error. # noqa: E501 - :rtype: str - """ - return self._message - - @message.setter - def message(self, message): - """Sets the message of this Error. - - Human-readable error message # noqa: E501 - - :param message: The message of this Error. # noqa: E501 - :type: str - """ - if self.local_vars_configuration.client_side_validation and message is None: # noqa: E501 - raise ValueError("Invalid value for `message`, must not be `None`") # noqa: E501 - - self._message = message - - @property - def request_id(self): - """Gets the request_id of this Error. # noqa: E501 - - Unique identifier for the request # noqa: E501 - - :return: The request_id of this Error. # noqa: E501 - :rtype: str - """ - return self._request_id - - @request_id.setter - def request_id(self, request_id): - """Sets the request_id of this Error. - - Unique identifier for the request # noqa: E501 - - :param request_id: The request_id of this Error. # noqa: E501 - :type: str - """ - if self.local_vars_configuration.client_side_validation and request_id is None: # noqa: E501 - raise ValueError("Invalid value for `request_id`, must not be `None`") # noqa: E501 - - self._request_id = request_id - - @property - def request_time(self): - """Gets the request_time of this Error. # noqa: E501 - - Timestamp when the request was processed # noqa: E501 - - :return: The request_time of this Error. # noqa: E501 - :rtype: datetime + Error + """ # noqa: E501 + status: StrictStr = Field(description="Error type identifier") + status_code: StrictInt = Field(description="HTTP status code", alias="statusCode") + message: StrictStr = Field(description="Human-readable error message") + request_id: StrictStr = Field(description="Unique identifier for the request", alias="requestId") + request_time: datetime = Field(description="Timestamp when the request was processed", alias="requestTime") + __properties: ClassVar[List[str]] = ["status", "statusCode", "message", "requestId", "requestTime"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of Error from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. """ - return self._request_time - - @request_time.setter - def request_time(self, request_time): - """Sets the request_time of this Error. + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of Error from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "status": obj.get("status"), + "statusCode": obj.get("statusCode"), + "message": obj.get("message"), + "requestId": obj.get("requestId"), + "requestTime": obj.get("requestTime") + }) + return _obj - Timestamp when the request was processed # noqa: E501 - :param request_time: The request_time of this Error. # noqa: E501 - :type: datetime - """ - if self.local_vars_configuration.client_side_validation and request_time is None: # noqa: E501 - raise ValueError("Invalid value for `request_time`, must not be `None`") # noqa: E501 - - self._request_time = request_time - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, Error): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, Error): - return True - - return self.to_dict() != other.to_dict() diff --git a/Monei/models/inline_object.py b/Monei/models/inline_object.py deleted file mode 100644 index 0eeae39..0000000 --- a/Monei/models/inline_object.py +++ /dev/null @@ -1,122 +0,0 @@ -# coding: utf-8 - -""" - MONEI API v1 - -

The MONEI API is organized around REST. Our API has predictable resource-oriented URLs, accepts JSON-encoded request bodies, returns JSON-encoded responses, and uses standard HTTP response codes, authentication, and verbs.

Base URL:

https://api.monei.com/v1

Client libraries:

# noqa: E501 - - The version of the OpenAPI document: 1.1.0 - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from Monei.configuration import Configuration - - -class InlineObject(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'domain_name': 'str' - } - - attribute_map = { - 'domain_name': 'domainName' - } - - def __init__(self, domain_name=None, local_vars_configuration=None): # noqa: E501 - """InlineObject - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._domain_name = None - self.discriminator = None - - if domain_name is not None: - self.domain_name = domain_name - - @property - def domain_name(self): - """Gets the domain_name of this InlineObject. # noqa: E501 - - The domain name to register for Apple Pay. # noqa: E501 - - :return: The domain_name of this InlineObject. # noqa: E501 - :rtype: str - """ - return self._domain_name - - @domain_name.setter - def domain_name(self, domain_name): - """Sets the domain_name of this InlineObject. - - The domain name to register for Apple Pay. # noqa: E501 - - :param domain_name: The domain_name of this InlineObject. # noqa: E501 - :type: str - """ - - self._domain_name = domain_name - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, InlineObject): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, InlineObject): - return True - - return self.to_dict() != other.to_dict() diff --git a/Monei/models/inline_response200.py b/Monei/models/inline_response200.py deleted file mode 100644 index 1997f22..0000000 --- a/Monei/models/inline_response200.py +++ /dev/null @@ -1,120 +0,0 @@ -# coding: utf-8 - -""" - MONEI API v1 - -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - - The version of the OpenAPI document: 1.5.0 - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from Monei.configuration import Configuration - - -class InlineResponse200(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'success': 'bool' - } - - attribute_map = { - 'success': 'success' - } - - def __init__(self, success=None, local_vars_configuration=None): # noqa: E501 - """InlineResponse200 - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._success = None - self.discriminator = None - - if success is not None: - self.success = success - - @property - def success(self): - """Gets the success of this InlineResponse200. # noqa: E501 - - - :return: The success of this InlineResponse200. # noqa: E501 - :rtype: bool - """ - return self._success - - @success.setter - def success(self, success): - """Sets the success of this InlineResponse200. - - - :param success: The success of this InlineResponse200. # noqa: E501 - :type: bool - """ - - self._success = success - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, InlineResponse200): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, InlineResponse200): - return True - - return self.to_dict() != other.to_dict() diff --git a/Monei/models/inline_response2001.py b/Monei/models/inline_response2001.py deleted file mode 100644 index 8a5cf6d..0000000 --- a/Monei/models/inline_response2001.py +++ /dev/null @@ -1,120 +0,0 @@ -# coding: utf-8 - -""" - MONEI API v1 - -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - - The version of the OpenAPI document: 1.5.0 - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from Monei.configuration import Configuration - - -class InlineResponse2001(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'is_valid': 'bool' - } - - attribute_map = { - 'is_valid': 'isValid' - } - - def __init__(self, is_valid=None, local_vars_configuration=None): # noqa: E501 - """InlineResponse2001 - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._is_valid = None - self.discriminator = None - - if is_valid is not None: - self.is_valid = is_valid - - @property - def is_valid(self): - """Gets the is_valid of this InlineResponse2001. # noqa: E501 - - - :return: The is_valid of this InlineResponse2001. # noqa: E501 - :rtype: bool - """ - return self._is_valid - - @is_valid.setter - def is_valid(self, is_valid): - """Sets the is_valid of this InlineResponse2001. - - - :param is_valid: The is_valid of this InlineResponse2001. # noqa: E501 - :type: bool - """ - - self._is_valid = is_valid - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, InlineResponse2001): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, InlineResponse2001): - return True - - return self.to_dict() != other.to_dict() diff --git a/Monei/models/pause_subscription_request.py b/Monei/models/pause_subscription_request.py index 2bb17f9..995c9e8 100644 --- a/Monei/models/pause_subscription_request.py +++ b/Monei/models/pause_subscription_request.py @@ -3,148 +3,87 @@ """ MONEI API v1 -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

- The version of the OpenAPI document: 1.5.0 - Generated by: https://openapi-generator.tech -""" + The version of the OpenAPI document: 1.5.1 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 +from __future__ import annotations import pprint import re # noqa: F401 +import json -import six - -from Monei.configuration import Configuration - - -class PauseSubscriptionRequest(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self +class PauseSubscriptionRequest(BaseModel): """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'pause_at_period_end': 'bool', - 'pause_interval_count': 'int' - } - - attribute_map = { - 'pause_at_period_end': 'pauseAtPeriodEnd', - 'pause_interval_count': 'pauseIntervalCount' - } - - def __init__(self, pause_at_period_end=None, pause_interval_count=None, local_vars_configuration=None): # noqa: E501 - """PauseSubscriptionRequest - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._pause_at_period_end = None - self._pause_interval_count = None - self.discriminator = None - - if pause_at_period_end is not None: - self.pause_at_period_end = pause_at_period_end - if pause_interval_count is not None: - self.pause_interval_count = pause_interval_count - - @property - def pause_at_period_end(self): - """Gets the pause_at_period_end of this PauseSubscriptionRequest. # noqa: E501 - - If true, the subscription will be paused at the end of the current period. # noqa: E501 - - :return: The pause_at_period_end of this PauseSubscriptionRequest. # noqa: E501 - :rtype: bool + PauseSubscriptionRequest + """ # noqa: E501 + pause_at_period_end: Optional[StrictBool] = Field(default=None, description="If true, the subscription will be paused at the end of the current period. ", alias="pauseAtPeriodEnd") + pause_interval_count: Optional[StrictInt] = Field(default=None, description="Number of intervals when subscription will be paused before it activates again.", alias="pauseIntervalCount") + __properties: ClassVar[List[str]] = ["pauseAtPeriodEnd", "pauseIntervalCount"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PauseSubscriptionRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. """ - return self._pause_at_period_end - - @pause_at_period_end.setter - def pause_at_period_end(self, pause_at_period_end): - """Sets the pause_at_period_end of this PauseSubscriptionRequest. + excluded_fields: Set[str] = set([ + ]) - If true, the subscription will be paused at the end of the current period. # noqa: E501 + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict - :param pause_at_period_end: The pause_at_period_end of this PauseSubscriptionRequest. # noqa: E501 - :type: bool - """ + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PauseSubscriptionRequest from a dict""" + if obj is None: + return None - self._pause_at_period_end = pause_at_period_end + if not isinstance(obj, dict): + return cls.model_validate(obj) - @property - def pause_interval_count(self): - """Gets the pause_interval_count of this PauseSubscriptionRequest. # noqa: E501 + _obj = cls.model_validate({ + "pauseAtPeriodEnd": obj.get("pauseAtPeriodEnd"), + "pauseIntervalCount": obj.get("pauseIntervalCount") + }) + return _obj - Number of intervals when subscription will be paused before it activates again. # noqa: E501 - - :return: The pause_interval_count of this PauseSubscriptionRequest. # noqa: E501 - :rtype: int - """ - return self._pause_interval_count - - @pause_interval_count.setter - def pause_interval_count(self, pause_interval_count): - """Sets the pause_interval_count of this PauseSubscriptionRequest. - - Number of intervals when subscription will be paused before it activates again. # noqa: E501 - - :param pause_interval_count: The pause_interval_count of this PauseSubscriptionRequest. # noqa: E501 - :type: int - """ - self._pause_interval_count = pause_interval_count - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, PauseSubscriptionRequest): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, PauseSubscriptionRequest): - return True - - return self.to_dict() != other.to_dict() diff --git a/Monei/models/payment.py b/Monei/models/payment.py index dbe4e57..46b4d85 100644 --- a/Monei/models/payment.py +++ b/Monei/models/payment.py @@ -3,936 +3,184 @@ """ MONEI API v1 -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

- The version of the OpenAPI document: 1.5.0 - Generated by: https://openapi-generator.tech -""" + The version of the OpenAPI document: 1.5.1 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 +from __future__ import annotations import pprint import re # noqa: F401 - -import six - -from Monei.configuration import Configuration - - -class Payment(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from Monei.models.payment_billing_details import PaymentBillingDetails +from Monei.models.payment_cancellation_reason import PaymentCancellationReason +from Monei.models.payment_customer import PaymentCustomer +from Monei.models.payment_last_refund_reason import PaymentLastRefundReason +from Monei.models.payment_next_action import PaymentNextAction +from Monei.models.payment_payment_method import PaymentPaymentMethod +from Monei.models.payment_sequence import PaymentSequence +from Monei.models.payment_session_details import PaymentSessionDetails +from Monei.models.payment_shipping_details import PaymentShippingDetails +from Monei.models.payment_shop import PaymentShop +from Monei.models.payment_status import PaymentStatus +from Monei.models.payment_trace_details import PaymentTraceDetails +from typing import Optional, Set +from typing_extensions import Self + +class Payment(BaseModel): """ + Payment + """ # noqa: E501 + id: Optional[StrictStr] = Field(default=None, description="Unique identifier for the payment.") + amount: Optional[StrictInt] = Field(default=None, description="Amount intended to be collected by this payment. A positive integer representing how much to charge in the smallest currency unit (e.g., 100 cents to charge 1.00 USD). ") + currency: Optional[StrictStr] = Field(default=None, description="Three-letter [ISO currency code](https://en.wikipedia.org/wiki/ISO_4217), in uppercase. Must be a supported currency. ") + order_id: Optional[StrictStr] = Field(default=None, description="An order ID from your system. A unique identifier that can be used to reconcile the payment with your internal system. ", alias="orderId") + description: Optional[StrictStr] = Field(default=None, description="An arbitrary string attached to the payment. Often useful for displaying to users. ") + account_id: Optional[StrictStr] = Field(default=None, description="MONEI Account identifier.", alias="accountId") + authorization_code: Optional[StrictStr] = Field(default=None, description="Unique identifier provided by the bank performing transaction. ", alias="authorizationCode") + livemode: Optional[StrictBool] = Field(default=None, description="Has the value `true` if the resource exists in live mode or the value `false` if the resource exists in test mode.") + status: Optional[PaymentStatus] = None + status_code: Optional[StrictStr] = Field(default=None, description="Payment status code. ", alias="statusCode") + status_message: Optional[StrictStr] = Field(default=None, description="Human readable status message, can be displayed to a user. ", alias="statusMessage") + customer: Optional[PaymentCustomer] = None + shop: Optional[PaymentShop] = None + billing_details: Optional[PaymentBillingDetails] = Field(default=None, alias="billingDetails") + shipping_details: Optional[PaymentShippingDetails] = Field(default=None, alias="shippingDetails") + refunded_amount: Optional[StrictInt] = Field(default=None, description="Amount in cents refunded (can be less than the amount attribute on the payment if a partial refund was issued). ", alias="refundedAmount") + last_refund_amount: Optional[StrictInt] = Field(default=None, description="Amount in cents refunded in the last transaction.", alias="lastRefundAmount") + last_refund_reason: Optional[PaymentLastRefundReason] = Field(default=None, alias="lastRefundReason") + cancellation_reason: Optional[PaymentCancellationReason] = Field(default=None, alias="cancellationReason") + session_details: Optional[PaymentSessionDetails] = Field(default=None, alias="sessionDetails") + trace_details: Optional[PaymentTraceDetails] = Field(default=None, alias="traceDetails") + payment_token: Optional[StrictStr] = Field(default=None, description="A permanent token represents a payment method used in the payment. Pass `generatePaymentToken: true` when you creating a payment to generate it. You can pass it as `paymentToken` parameter to create other payments with the same payment method. This token does not expire, and should only be used server-side. ", alias="paymentToken") + payment_method: Optional[PaymentPaymentMethod] = Field(default=None, alias="paymentMethod") + sequence: Optional[PaymentSequence] = None + sequence_id: Optional[StrictStr] = Field(default=None, description="A permanent identifier that refers to the initial payment of a sequence of payments. This value needs to be sent in the path for `RECURRING` payments. ", alias="sequenceId") + store_id: Optional[StrictStr] = Field(default=None, description="A unique identifier of the Store. If specified the payment is attached to this Store. ", alias="storeId") + point_of_sale_id: Optional[StrictStr] = Field(default=None, description="A unique identifier of the Point of Sale. If specified the payment is attached to this Point of Sale. If there is a QR code attached to the same Point of Sale, this payment will be available by scanning the QR code. ", alias="pointOfSaleId") + metadata: Optional[Dict[str, Any]] = Field(default=None, description="A set of key-value pairs that you can attach to a resource. This can be useful for storing additional information about the resource in a structured format.") + next_action: Optional[PaymentNextAction] = Field(default=None, alias="nextAction") + created_at: Optional[StrictInt] = Field(default=None, description="Time at which the resource was created. Measured in seconds since the Unix epoch.", alias="createdAt") + updated_at: Optional[StrictInt] = Field(default=None, description="Time at which the resource updated last time. Measured in seconds since the Unix epoch.", alias="updatedAt") + __properties: ClassVar[List[str]] = ["id", "amount", "currency", "orderId", "description", "accountId", "authorizationCode", "livemode", "status", "statusCode", "statusMessage", "customer", "shop", "billingDetails", "shippingDetails", "refundedAmount", "lastRefundAmount", "lastRefundReason", "cancellationReason", "sessionDetails", "traceDetails", "paymentToken", "paymentMethod", "sequence", "sequenceId", "storeId", "pointOfSaleId", "metadata", "nextAction", "createdAt", "updatedAt"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of Payment from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of customer + if self.customer: + _dict['customer'] = self.customer.to_dict() + # override the default output from pydantic by calling `to_dict()` of shop + if self.shop: + _dict['shop'] = self.shop.to_dict() + # override the default output from pydantic by calling `to_dict()` of billing_details + if self.billing_details: + _dict['billingDetails'] = self.billing_details.to_dict() + # override the default output from pydantic by calling `to_dict()` of shipping_details + if self.shipping_details: + _dict['shippingDetails'] = self.shipping_details.to_dict() + # override the default output from pydantic by calling `to_dict()` of session_details + if self.session_details: + _dict['sessionDetails'] = self.session_details.to_dict() + # override the default output from pydantic by calling `to_dict()` of trace_details + if self.trace_details: + _dict['traceDetails'] = self.trace_details.to_dict() + # override the default output from pydantic by calling `to_dict()` of payment_method + if self.payment_method: + _dict['paymentMethod'] = self.payment_method.to_dict() + # override the default output from pydantic by calling `to_dict()` of sequence + if self.sequence: + _dict['sequence'] = self.sequence.to_dict() + # override the default output from pydantic by calling `to_dict()` of next_action + if self.next_action: + _dict['nextAction'] = self.next_action.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of Payment from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "amount": obj.get("amount"), + "currency": obj.get("currency"), + "orderId": obj.get("orderId"), + "description": obj.get("description"), + "accountId": obj.get("accountId"), + "authorizationCode": obj.get("authorizationCode"), + "livemode": obj.get("livemode"), + "status": obj.get("status"), + "statusCode": obj.get("statusCode"), + "statusMessage": obj.get("statusMessage"), + "customer": PaymentCustomer.from_dict(obj["customer"]) if obj.get("customer") is not None else None, + "shop": PaymentShop.from_dict(obj["shop"]) if obj.get("shop") is not None else None, + "billingDetails": PaymentBillingDetails.from_dict(obj["billingDetails"]) if obj.get("billingDetails") is not None else None, + "shippingDetails": PaymentShippingDetails.from_dict(obj["shippingDetails"]) if obj.get("shippingDetails") is not None else None, + "refundedAmount": obj.get("refundedAmount"), + "lastRefundAmount": obj.get("lastRefundAmount"), + "lastRefundReason": obj.get("lastRefundReason"), + "cancellationReason": obj.get("cancellationReason"), + "sessionDetails": PaymentSessionDetails.from_dict(obj["sessionDetails"]) if obj.get("sessionDetails") is not None else None, + "traceDetails": PaymentTraceDetails.from_dict(obj["traceDetails"]) if obj.get("traceDetails") is not None else None, + "paymentToken": obj.get("paymentToken"), + "paymentMethod": PaymentPaymentMethod.from_dict(obj["paymentMethod"]) if obj.get("paymentMethod") is not None else None, + "sequence": PaymentSequence.from_dict(obj["sequence"]) if obj.get("sequence") is not None else None, + "sequenceId": obj.get("sequenceId"), + "storeId": obj.get("storeId"), + "pointOfSaleId": obj.get("pointOfSaleId"), + "metadata": obj.get("metadata"), + "nextAction": PaymentNextAction.from_dict(obj["nextAction"]) if obj.get("nextAction") is not None else None, + "createdAt": obj.get("createdAt"), + "updatedAt": obj.get("updatedAt") + }) + return _obj - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'id': 'str', - 'amount': 'int', - 'currency': 'str', - 'order_id': 'str', - 'description': 'str', - 'account_id': 'str', - 'authorization_code': 'str', - 'livemode': 'bool', - 'status': 'PaymentStatus', - 'status_code': 'str', - 'status_message': 'str', - 'customer': 'PaymentCustomer', - 'shop': 'PaymentShop', - 'billing_details': 'PaymentBillingDetails', - 'shipping_details': 'PaymentShippingDetails', - 'refunded_amount': 'int', - 'last_refund_amount': 'int', - 'last_refund_reason': 'PaymentLastRefundReason', - 'cancellation_reason': 'PaymentCancellationReason', - 'session_details': 'PaymentSessionDetails', - 'trace_details': 'PaymentTraceDetails', - 'payment_token': 'str', - 'payment_method': 'PaymentPaymentMethod', - 'sequence': 'PaymentSequence', - 'sequence_id': 'str', - 'store_id': 'str', - 'point_of_sale_id': 'str', - 'metadata': 'object', - 'next_action': 'PaymentNextAction', - 'created_at': 'int', - 'updated_at': 'int' - } - - attribute_map = { - 'id': 'id', - 'amount': 'amount', - 'currency': 'currency', - 'order_id': 'orderId', - 'description': 'description', - 'account_id': 'accountId', - 'authorization_code': 'authorizationCode', - 'livemode': 'livemode', - 'status': 'status', - 'status_code': 'statusCode', - 'status_message': 'statusMessage', - 'customer': 'customer', - 'shop': 'shop', - 'billing_details': 'billingDetails', - 'shipping_details': 'shippingDetails', - 'refunded_amount': 'refundedAmount', - 'last_refund_amount': 'lastRefundAmount', - 'last_refund_reason': 'lastRefundReason', - 'cancellation_reason': 'cancellationReason', - 'session_details': 'sessionDetails', - 'trace_details': 'traceDetails', - 'payment_token': 'paymentToken', - 'payment_method': 'paymentMethod', - 'sequence': 'sequence', - 'sequence_id': 'sequenceId', - 'store_id': 'storeId', - 'point_of_sale_id': 'pointOfSaleId', - 'metadata': 'metadata', - 'next_action': 'nextAction', - 'created_at': 'createdAt', - 'updated_at': 'updatedAt' - } - - def __init__(self, id=None, amount=None, currency=None, order_id=None, description=None, account_id=None, authorization_code=None, livemode=None, status=None, status_code=None, status_message=None, customer=None, shop=None, billing_details=None, shipping_details=None, refunded_amount=None, last_refund_amount=None, last_refund_reason=None, cancellation_reason=None, session_details=None, trace_details=None, payment_token=None, payment_method=None, sequence=None, sequence_id=None, store_id=None, point_of_sale_id=None, metadata=None, next_action=None, created_at=None, updated_at=None, local_vars_configuration=None): # noqa: E501 - """Payment - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._id = None - self._amount = None - self._currency = None - self._order_id = None - self._description = None - self._account_id = None - self._authorization_code = None - self._livemode = None - self._status = None - self._status_code = None - self._status_message = None - self._customer = None - self._shop = None - self._billing_details = None - self._shipping_details = None - self._refunded_amount = None - self._last_refund_amount = None - self._last_refund_reason = None - self._cancellation_reason = None - self._session_details = None - self._trace_details = None - self._payment_token = None - self._payment_method = None - self._sequence = None - self._sequence_id = None - self._store_id = None - self._point_of_sale_id = None - self._metadata = None - self._next_action = None - self._created_at = None - self._updated_at = None - self.discriminator = None - - if id is not None: - self.id = id - if amount is not None: - self.amount = amount - if currency is not None: - self.currency = currency - if order_id is not None: - self.order_id = order_id - if description is not None: - self.description = description - if account_id is not None: - self.account_id = account_id - if authorization_code is not None: - self.authorization_code = authorization_code - if livemode is not None: - self.livemode = livemode - if status is not None: - self.status = status - if status_code is not None: - self.status_code = status_code - if status_message is not None: - self.status_message = status_message - if customer is not None: - self.customer = customer - if shop is not None: - self.shop = shop - if billing_details is not None: - self.billing_details = billing_details - if shipping_details is not None: - self.shipping_details = shipping_details - if refunded_amount is not None: - self.refunded_amount = refunded_amount - if last_refund_amount is not None: - self.last_refund_amount = last_refund_amount - if last_refund_reason is not None: - self.last_refund_reason = last_refund_reason - if cancellation_reason is not None: - self.cancellation_reason = cancellation_reason - if session_details is not None: - self.session_details = session_details - if trace_details is not None: - self.trace_details = trace_details - if payment_token is not None: - self.payment_token = payment_token - if payment_method is not None: - self.payment_method = payment_method - if sequence is not None: - self.sequence = sequence - if sequence_id is not None: - self.sequence_id = sequence_id - if store_id is not None: - self.store_id = store_id - if point_of_sale_id is not None: - self.point_of_sale_id = point_of_sale_id - if metadata is not None: - self.metadata = metadata - if next_action is not None: - self.next_action = next_action - if created_at is not None: - self.created_at = created_at - if updated_at is not None: - self.updated_at = updated_at - - @property - def id(self): - """Gets the id of this Payment. # noqa: E501 - - Unique identifier for the payment. # noqa: E501 - - :return: The id of this Payment. # noqa: E501 - :rtype: str - """ - return self._id - - @id.setter - def id(self, id): - """Sets the id of this Payment. - - Unique identifier for the payment. # noqa: E501 - - :param id: The id of this Payment. # noqa: E501 - :type: str - """ - - self._id = id - - @property - def amount(self): - """Gets the amount of this Payment. # noqa: E501 - - Amount intended to be collected by this payment. A positive integer representing how much to charge in the smallest currency unit (e.g., 100 cents to charge 1.00 USD). # noqa: E501 - - :return: The amount of this Payment. # noqa: E501 - :rtype: int - """ - return self._amount - - @amount.setter - def amount(self, amount): - """Sets the amount of this Payment. - - Amount intended to be collected by this payment. A positive integer representing how much to charge in the smallest currency unit (e.g., 100 cents to charge 1.00 USD). # noqa: E501 - - :param amount: The amount of this Payment. # noqa: E501 - :type: int - """ - - self._amount = amount - - @property - def currency(self): - """Gets the currency of this Payment. # noqa: E501 - - Three-letter [ISO currency code](https://en.wikipedia.org/wiki/ISO_4217), in uppercase. Must be a supported currency. # noqa: E501 - - :return: The currency of this Payment. # noqa: E501 - :rtype: str - """ - return self._currency - - @currency.setter - def currency(self, currency): - """Sets the currency of this Payment. - - Three-letter [ISO currency code](https://en.wikipedia.org/wiki/ISO_4217), in uppercase. Must be a supported currency. # noqa: E501 - - :param currency: The currency of this Payment. # noqa: E501 - :type: str - """ - - self._currency = currency - - @property - def order_id(self): - """Gets the order_id of this Payment. # noqa: E501 - - An order ID from your system. A unique identifier that can be used to reconcile the payment with your internal system. # noqa: E501 - - :return: The order_id of this Payment. # noqa: E501 - :rtype: str - """ - return self._order_id - - @order_id.setter - def order_id(self, order_id): - """Sets the order_id of this Payment. - - An order ID from your system. A unique identifier that can be used to reconcile the payment with your internal system. # noqa: E501 - - :param order_id: The order_id of this Payment. # noqa: E501 - :type: str - """ - - self._order_id = order_id - - @property - def description(self): - """Gets the description of this Payment. # noqa: E501 - - An arbitrary string attached to the payment. Often useful for displaying to users. # noqa: E501 - - :return: The description of this Payment. # noqa: E501 - :rtype: str - """ - return self._description - - @description.setter - def description(self, description): - """Sets the description of this Payment. - - An arbitrary string attached to the payment. Often useful for displaying to users. # noqa: E501 - - :param description: The description of this Payment. # noqa: E501 - :type: str - """ - - self._description = description - - @property - def account_id(self): - """Gets the account_id of this Payment. # noqa: E501 - - MONEI Account identifier. # noqa: E501 - - :return: The account_id of this Payment. # noqa: E501 - :rtype: str - """ - return self._account_id - - @account_id.setter - def account_id(self, account_id): - """Sets the account_id of this Payment. - - MONEI Account identifier. # noqa: E501 - - :param account_id: The account_id of this Payment. # noqa: E501 - :type: str - """ - - self._account_id = account_id - - @property - def authorization_code(self): - """Gets the authorization_code of this Payment. # noqa: E501 - - Unique identifier provided by the bank performing transaction. # noqa: E501 - - :return: The authorization_code of this Payment. # noqa: E501 - :rtype: str - """ - return self._authorization_code - - @authorization_code.setter - def authorization_code(self, authorization_code): - """Sets the authorization_code of this Payment. - - Unique identifier provided by the bank performing transaction. # noqa: E501 - - :param authorization_code: The authorization_code of this Payment. # noqa: E501 - :type: str - """ - - self._authorization_code = authorization_code - - @property - def livemode(self): - """Gets the livemode of this Payment. # noqa: E501 - - Has the value `true` if the resource exists in live mode or the value `false` if the resource exists in test mode. # noqa: E501 - - :return: The livemode of this Payment. # noqa: E501 - :rtype: bool - """ - return self._livemode - - @livemode.setter - def livemode(self, livemode): - """Sets the livemode of this Payment. - - Has the value `true` if the resource exists in live mode or the value `false` if the resource exists in test mode. # noqa: E501 - - :param livemode: The livemode of this Payment. # noqa: E501 - :type: bool - """ - - self._livemode = livemode - - @property - def status(self): - """Gets the status of this Payment. # noqa: E501 - - - :return: The status of this Payment. # noqa: E501 - :rtype: PaymentStatus - """ - return self._status - - @status.setter - def status(self, status): - """Sets the status of this Payment. - - - :param status: The status of this Payment. # noqa: E501 - :type: PaymentStatus - """ - - self._status = status - - @property - def status_code(self): - """Gets the status_code of this Payment. # noqa: E501 - - Payment status code. # noqa: E501 - - :return: The status_code of this Payment. # noqa: E501 - :rtype: str - """ - return self._status_code - - @status_code.setter - def status_code(self, status_code): - """Sets the status_code of this Payment. - - Payment status code. # noqa: E501 - - :param status_code: The status_code of this Payment. # noqa: E501 - :type: str - """ - - self._status_code = status_code - - @property - def status_message(self): - """Gets the status_message of this Payment. # noqa: E501 - - Human readable status message, can be displayed to a user. # noqa: E501 - - :return: The status_message of this Payment. # noqa: E501 - :rtype: str - """ - return self._status_message - - @status_message.setter - def status_message(self, status_message): - """Sets the status_message of this Payment. - - Human readable status message, can be displayed to a user. # noqa: E501 - - :param status_message: The status_message of this Payment. # noqa: E501 - :type: str - """ - - self._status_message = status_message - - @property - def customer(self): - """Gets the customer of this Payment. # noqa: E501 - - - :return: The customer of this Payment. # noqa: E501 - :rtype: PaymentCustomer - """ - return self._customer - - @customer.setter - def customer(self, customer): - """Sets the customer of this Payment. - - - :param customer: The customer of this Payment. # noqa: E501 - :type: PaymentCustomer - """ - - self._customer = customer - - @property - def shop(self): - """Gets the shop of this Payment. # noqa: E501 - - - :return: The shop of this Payment. # noqa: E501 - :rtype: PaymentShop - """ - return self._shop - - @shop.setter - def shop(self, shop): - """Sets the shop of this Payment. - - - :param shop: The shop of this Payment. # noqa: E501 - :type: PaymentShop - """ - - self._shop = shop - - @property - def billing_details(self): - """Gets the billing_details of this Payment. # noqa: E501 - - - :return: The billing_details of this Payment. # noqa: E501 - :rtype: PaymentBillingDetails - """ - return self._billing_details - - @billing_details.setter - def billing_details(self, billing_details): - """Sets the billing_details of this Payment. - - - :param billing_details: The billing_details of this Payment. # noqa: E501 - :type: PaymentBillingDetails - """ - - self._billing_details = billing_details - - @property - def shipping_details(self): - """Gets the shipping_details of this Payment. # noqa: E501 - - - :return: The shipping_details of this Payment. # noqa: E501 - :rtype: PaymentShippingDetails - """ - return self._shipping_details - - @shipping_details.setter - def shipping_details(self, shipping_details): - """Sets the shipping_details of this Payment. - - - :param shipping_details: The shipping_details of this Payment. # noqa: E501 - :type: PaymentShippingDetails - """ - - self._shipping_details = shipping_details - - @property - def refunded_amount(self): - """Gets the refunded_amount of this Payment. # noqa: E501 - - Amount in cents refunded (can be less than the amount attribute on the payment if a partial refund was issued). # noqa: E501 - - :return: The refunded_amount of this Payment. # noqa: E501 - :rtype: int - """ - return self._refunded_amount - - @refunded_amount.setter - def refunded_amount(self, refunded_amount): - """Sets the refunded_amount of this Payment. - - Amount in cents refunded (can be less than the amount attribute on the payment if a partial refund was issued). # noqa: E501 - - :param refunded_amount: The refunded_amount of this Payment. # noqa: E501 - :type: int - """ - - self._refunded_amount = refunded_amount - - @property - def last_refund_amount(self): - """Gets the last_refund_amount of this Payment. # noqa: E501 - - Amount in cents refunded in the last transaction. # noqa: E501 - - :return: The last_refund_amount of this Payment. # noqa: E501 - :rtype: int - """ - return self._last_refund_amount - - @last_refund_amount.setter - def last_refund_amount(self, last_refund_amount): - """Sets the last_refund_amount of this Payment. - - Amount in cents refunded in the last transaction. # noqa: E501 - - :param last_refund_amount: The last_refund_amount of this Payment. # noqa: E501 - :type: int - """ - - self._last_refund_amount = last_refund_amount - - @property - def last_refund_reason(self): - """Gets the last_refund_reason of this Payment. # noqa: E501 - - - :return: The last_refund_reason of this Payment. # noqa: E501 - :rtype: PaymentLastRefundReason - """ - return self._last_refund_reason - - @last_refund_reason.setter - def last_refund_reason(self, last_refund_reason): - """Sets the last_refund_reason of this Payment. - - - :param last_refund_reason: The last_refund_reason of this Payment. # noqa: E501 - :type: PaymentLastRefundReason - """ - - self._last_refund_reason = last_refund_reason - - @property - def cancellation_reason(self): - """Gets the cancellation_reason of this Payment. # noqa: E501 - - - :return: The cancellation_reason of this Payment. # noqa: E501 - :rtype: PaymentCancellationReason - """ - return self._cancellation_reason - - @cancellation_reason.setter - def cancellation_reason(self, cancellation_reason): - """Sets the cancellation_reason of this Payment. - - - :param cancellation_reason: The cancellation_reason of this Payment. # noqa: E501 - :type: PaymentCancellationReason - """ - - self._cancellation_reason = cancellation_reason - - @property - def session_details(self): - """Gets the session_details of this Payment. # noqa: E501 - - - :return: The session_details of this Payment. # noqa: E501 - :rtype: PaymentSessionDetails - """ - return self._session_details - - @session_details.setter - def session_details(self, session_details): - """Sets the session_details of this Payment. - - - :param session_details: The session_details of this Payment. # noqa: E501 - :type: PaymentSessionDetails - """ - - self._session_details = session_details - - @property - def trace_details(self): - """Gets the trace_details of this Payment. # noqa: E501 - - - :return: The trace_details of this Payment. # noqa: E501 - :rtype: PaymentTraceDetails - """ - return self._trace_details - - @trace_details.setter - def trace_details(self, trace_details): - """Sets the trace_details of this Payment. - - - :param trace_details: The trace_details of this Payment. # noqa: E501 - :type: PaymentTraceDetails - """ - - self._trace_details = trace_details - - @property - def payment_token(self): - """Gets the payment_token of this Payment. # noqa: E501 - - A permanent token represents a payment method used in the payment. Pass `generatePaymentToken: true` when you creating a payment to generate it. You can pass it as `paymentToken` parameter to create other payments with the same payment method. This token does not expire, and should only be used server-side. # noqa: E501 - - :return: The payment_token of this Payment. # noqa: E501 - :rtype: str - """ - return self._payment_token - - @payment_token.setter - def payment_token(self, payment_token): - """Sets the payment_token of this Payment. - - A permanent token represents a payment method used in the payment. Pass `generatePaymentToken: true` when you creating a payment to generate it. You can pass it as `paymentToken` parameter to create other payments with the same payment method. This token does not expire, and should only be used server-side. # noqa: E501 - - :param payment_token: The payment_token of this Payment. # noqa: E501 - :type: str - """ - - self._payment_token = payment_token - - @property - def payment_method(self): - """Gets the payment_method of this Payment. # noqa: E501 - - - :return: The payment_method of this Payment. # noqa: E501 - :rtype: PaymentPaymentMethod - """ - return self._payment_method - - @payment_method.setter - def payment_method(self, payment_method): - """Sets the payment_method of this Payment. - - - :param payment_method: The payment_method of this Payment. # noqa: E501 - :type: PaymentPaymentMethod - """ - - self._payment_method = payment_method - - @property - def sequence(self): - """Gets the sequence of this Payment. # noqa: E501 - - - :return: The sequence of this Payment. # noqa: E501 - :rtype: PaymentSequence - """ - return self._sequence - - @sequence.setter - def sequence(self, sequence): - """Sets the sequence of this Payment. - - - :param sequence: The sequence of this Payment. # noqa: E501 - :type: PaymentSequence - """ - - self._sequence = sequence - - @property - def sequence_id(self): - """Gets the sequence_id of this Payment. # noqa: E501 - - A permanent identifier that refers to the initial payment of a sequence of payments. This value needs to be sent in the path for `RECURRING` payments. # noqa: E501 - - :return: The sequence_id of this Payment. # noqa: E501 - :rtype: str - """ - return self._sequence_id - - @sequence_id.setter - def sequence_id(self, sequence_id): - """Sets the sequence_id of this Payment. - - A permanent identifier that refers to the initial payment of a sequence of payments. This value needs to be sent in the path for `RECURRING` payments. # noqa: E501 - - :param sequence_id: The sequence_id of this Payment. # noqa: E501 - :type: str - """ - - self._sequence_id = sequence_id - - @property - def store_id(self): - """Gets the store_id of this Payment. # noqa: E501 - - A unique identifier of the Store. If specified the payment is attached to this Store. # noqa: E501 - - :return: The store_id of this Payment. # noqa: E501 - :rtype: str - """ - return self._store_id - - @store_id.setter - def store_id(self, store_id): - """Sets the store_id of this Payment. - - A unique identifier of the Store. If specified the payment is attached to this Store. # noqa: E501 - - :param store_id: The store_id of this Payment. # noqa: E501 - :type: str - """ - - self._store_id = store_id - - @property - def point_of_sale_id(self): - """Gets the point_of_sale_id of this Payment. # noqa: E501 - - A unique identifier of the Point of Sale. If specified the payment is attached to this Point of Sale. If there is a QR code attached to the same Point of Sale, this payment will be available by scanning the QR code. # noqa: E501 - - :return: The point_of_sale_id of this Payment. # noqa: E501 - :rtype: str - """ - return self._point_of_sale_id - - @point_of_sale_id.setter - def point_of_sale_id(self, point_of_sale_id): - """Sets the point_of_sale_id of this Payment. - - A unique identifier of the Point of Sale. If specified the payment is attached to this Point of Sale. If there is a QR code attached to the same Point of Sale, this payment will be available by scanning the QR code. # noqa: E501 - - :param point_of_sale_id: The point_of_sale_id of this Payment. # noqa: E501 - :type: str - """ - - self._point_of_sale_id = point_of_sale_id - - @property - def metadata(self): - """Gets the metadata of this Payment. # noqa: E501 - - A set of key-value pairs that you can attach to a resource. This can be useful for storing additional information about the resource in a structured format. # noqa: E501 - - :return: The metadata of this Payment. # noqa: E501 - :rtype: object - """ - return self._metadata - - @metadata.setter - def metadata(self, metadata): - """Sets the metadata of this Payment. - - A set of key-value pairs that you can attach to a resource. This can be useful for storing additional information about the resource in a structured format. # noqa: E501 - - :param metadata: The metadata of this Payment. # noqa: E501 - :type: object - """ - - self._metadata = metadata - - @property - def next_action(self): - """Gets the next_action of this Payment. # noqa: E501 - - - :return: The next_action of this Payment. # noqa: E501 - :rtype: PaymentNextAction - """ - return self._next_action - - @next_action.setter - def next_action(self, next_action): - """Sets the next_action of this Payment. - - - :param next_action: The next_action of this Payment. # noqa: E501 - :type: PaymentNextAction - """ - - self._next_action = next_action - - @property - def created_at(self): - """Gets the created_at of this Payment. # noqa: E501 - - Time at which the resource was created. Measured in seconds since the Unix epoch. # noqa: E501 - - :return: The created_at of this Payment. # noqa: E501 - :rtype: int - """ - return self._created_at - - @created_at.setter - def created_at(self, created_at): - """Sets the created_at of this Payment. - - Time at which the resource was created. Measured in seconds since the Unix epoch. # noqa: E501 - - :param created_at: The created_at of this Payment. # noqa: E501 - :type: int - """ - - self._created_at = created_at - - @property - def updated_at(self): - """Gets the updated_at of this Payment. # noqa: E501 - - Time at which the resource updated last time. Measured in seconds since the Unix epoch. # noqa: E501 - - :return: The updated_at of this Payment. # noqa: E501 - :rtype: int - """ - return self._updated_at - - @updated_at.setter - def updated_at(self, updated_at): - """Sets the updated_at of this Payment. - - Time at which the resource updated last time. Measured in seconds since the Unix epoch. # noqa: E501 - - :param updated_at: The updated_at of this Payment. # noqa: E501 - :type: int - """ - - self._updated_at = updated_at - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, Payment): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, Payment): - return True - return self.to_dict() != other.to_dict() diff --git a/Monei/models/payment_billing_details.py b/Monei/models/payment_billing_details.py index 252e23c..b5a95b9 100644 --- a/Monei/models/payment_billing_details.py +++ b/Monei/models/payment_billing_details.py @@ -3,258 +3,99 @@ """ MONEI API v1 -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

- The version of the OpenAPI document: 1.5.0 - Generated by: https://openapi-generator.tech -""" + The version of the OpenAPI document: 1.5.1 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 +from __future__ import annotations import pprint import re # noqa: F401 +import json -import six - -from Monei.configuration import Configuration - +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from Monei.models.address import Address +from typing import Optional, Set +from typing_extensions import Self -class PaymentBillingDetails(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. +class PaymentBillingDetails(BaseModel): """ - openapi_types = { - 'name': 'str', - 'email': 'str', - 'phone': 'str', - 'company': 'str', - 'tax_id': 'str', - 'address': 'Address' - } - - attribute_map = { - 'name': 'name', - 'email': 'email', - 'phone': 'phone', - 'company': 'company', - 'tax_id': 'taxId', - 'address': 'address' - } - - def __init__(self, name=None, email=None, phone=None, company=None, tax_id=None, address=None, local_vars_configuration=None): # noqa: E501 - """PaymentBillingDetails - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._name = None - self._email = None - self._phone = None - self._company = None - self._tax_id = None - self._address = None - self.discriminator = None - - if name is not None: - self.name = name - if email is not None: - self.email = email - if phone is not None: - self.phone = phone - if company is not None: - self.company = company - if tax_id is not None: - self.tax_id = tax_id - if address is not None: - self.address = address - - @property - def name(self): - """Gets the name of this PaymentBillingDetails. # noqa: E501 - - The customer's billing full name. # noqa: E501 - - :return: The name of this PaymentBillingDetails. # noqa: E501 - :rtype: str - """ - return self._name - - @name.setter - def name(self, name): - """Sets the name of this PaymentBillingDetails. - - The customer's billing full name. # noqa: E501 - - :param name: The name of this PaymentBillingDetails. # noqa: E501 - :type: str - """ - - self._name = name - - @property - def email(self): - """Gets the email of this PaymentBillingDetails. # noqa: E501 - - The customer's billing email address. # noqa: E501 - - :return: The email of this PaymentBillingDetails. # noqa: E501 - :rtype: str - """ - return self._email - - @email.setter - def email(self, email): - """Sets the email of this PaymentBillingDetails. - - The customer's billing email address. # noqa: E501 - - :param email: The email of this PaymentBillingDetails. # noqa: E501 - :type: str - """ - - self._email = email - - @property - def phone(self): - """Gets the phone of this PaymentBillingDetails. # noqa: E501 - - The customer's billing phone number in E.164 format. # noqa: E501 - - :return: The phone of this PaymentBillingDetails. # noqa: E501 - :rtype: str - """ - return self._phone - - @phone.setter - def phone(self, phone): - """Sets the phone of this PaymentBillingDetails. - - The customer's billing phone number in E.164 format. # noqa: E501 - - :param phone: The phone of this PaymentBillingDetails. # noqa: E501 - :type: str - """ - - self._phone = phone - - @property - def company(self): - """Gets the company of this PaymentBillingDetails. # noqa: E501 - - Billing company name. # noqa: E501 - - :return: The company of this PaymentBillingDetails. # noqa: E501 - :rtype: str + Billing information associated with the payment method at the time of the transaction. + """ # noqa: E501 + name: Optional[StrictStr] = Field(default=None, description="The customer's billing full name.") + email: Optional[StrictStr] = Field(default=None, description="The customer's billing email address.") + phone: Optional[StrictStr] = Field(default=None, description="The customer's billing phone number in E.164 format.") + company: Optional[StrictStr] = Field(default=None, description="Billing company name.") + tax_id: Optional[StrictStr] = Field(default=None, description="Company tax ID.", alias="taxId") + address: Optional[Address] = None + __properties: ClassVar[List[str]] = ["name", "email", "phone", "company", "taxId", "address"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PaymentBillingDetails from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. """ - return self._company - - @company.setter - def company(self, company): - """Sets the company of this PaymentBillingDetails. - - Billing company name. # noqa: E501 - - :param company: The company of this PaymentBillingDetails. # noqa: E501 - :type: str - """ - - self._company = company - - @property - def tax_id(self): - """Gets the tax_id of this PaymentBillingDetails. # noqa: E501 - - Company tax ID. # noqa: E501 - - :return: The tax_id of this PaymentBillingDetails. # noqa: E501 - :rtype: str - """ - return self._tax_id - - @tax_id.setter - def tax_id(self, tax_id): - """Sets the tax_id of this PaymentBillingDetails. - - Company tax ID. # noqa: E501 - - :param tax_id: The tax_id of this PaymentBillingDetails. # noqa: E501 - :type: str - """ - - self._tax_id = tax_id - - @property - def address(self): - """Gets the address of this PaymentBillingDetails. # noqa: E501 - - - :return: The address of this PaymentBillingDetails. # noqa: E501 - :rtype: Address - """ - return self._address - - @address.setter - def address(self, address): - """Sets the address of this PaymentBillingDetails. - - - :param address: The address of this PaymentBillingDetails. # noqa: E501 - :type: Address - """ - - self._address = address - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, PaymentBillingDetails): - return False - - return self.to_dict() == other.to_dict() + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of address + if self.address: + _dict['address'] = self.address.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PaymentBillingDetails from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "name": obj.get("name"), + "email": obj.get("email"), + "phone": obj.get("phone"), + "company": obj.get("company"), + "taxId": obj.get("taxId"), + "address": Address.from_dict(obj["address"]) if obj.get("address") is not None else None + }) + return _obj - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, PaymentBillingDetails): - return True - return self.to_dict() != other.to_dict() diff --git a/Monei/models/payment_cancellation_reason.py b/Monei/models/payment_cancellation_reason.py index 841cef5..916651c 100644 --- a/Monei/models/payment_cancellation_reason.py +++ b/Monei/models/payment_cancellation_reason.py @@ -3,99 +3,36 @@ """ MONEI API v1 -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

- The version of the OpenAPI document: 1.5.0 - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 + The version of the OpenAPI document: 1.5.1 + Generated by OpenAPI Generator (https://openapi-generator.tech) -import six + Do not edit the class manually. +""" # noqa: E501 -from Monei.configuration import Configuration +from __future__ import annotations +import json +from enum import Enum +from typing_extensions import Self -class PaymentCancellationReason(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - Do not edit the class manually. +class PaymentCancellationReason(str, Enum): """ - - """ - allowed enum values + The reason for canceling the Payment. """ - DUPLICATED = "duplicated" - FRAUDULENT = "fraudulent" - REQUESTED_BY_CUSTOMER = "requested_by_customer" - - allowable_values = [DUPLICATED, FRAUDULENT, REQUESTED_BY_CUSTOMER] # noqa: E501 """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. + allowed enum values """ - openapi_types = { - } - - attribute_map = { - } - - def __init__(self, local_vars_configuration=None): # noqa: E501 - """PaymentCancellationReason - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - self.discriminator = None - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, PaymentCancellationReason): - return False + DUPLICATED = 'duplicated' + FRAUDULENT = 'fraudulent' + REQUESTED_BY_CUSTOMER = 'requested_by_customer' - return self.to_dict() == other.to_dict() + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of PaymentCancellationReason from a JSON string""" + return cls(json.loads(json_str)) - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, PaymentCancellationReason): - return True - return self.to_dict() != other.to_dict() diff --git a/Monei/models/payment_customer.py b/Monei/models/payment_customer.py index 7cc04f6..e4f9150 100644 --- a/Monei/models/payment_customer.py +++ b/Monei/models/payment_customer.py @@ -3,176 +3,89 @@ """ MONEI API v1 -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

- The version of the OpenAPI document: 1.5.0 - Generated by: https://openapi-generator.tech -""" + The version of the OpenAPI document: 1.5.1 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 +from __future__ import annotations import pprint import re # noqa: F401 +import json -import six - -from Monei.configuration import Configuration - - -class PaymentCustomer(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self +class PaymentCustomer(BaseModel): """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'email': 'str', - 'name': 'str', - 'phone': 'str' - } - - attribute_map = { - 'email': 'email', - 'name': 'name', - 'phone': 'phone' - } - - def __init__(self, email=None, name=None, phone=None, local_vars_configuration=None): # noqa: E501 - """PaymentCustomer - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._email = None - self._name = None - self._phone = None - self.discriminator = None - - if email is not None: - self.email = email - if name is not None: - self.name = name - if phone is not None: - self.phone = phone - - @property - def email(self): - """Gets the email of this PaymentCustomer. # noqa: E501 - - The customer's email address. # noqa: E501 - - :return: The email of this PaymentCustomer. # noqa: E501 - :rtype: str + PaymentCustomer + """ # noqa: E501 + email: Optional[StrictStr] = Field(default=None, description="The customer's email address.") + name: Optional[StrictStr] = Field(default=None, description="The customer's full name or business name.") + phone: Optional[StrictStr] = Field(default=None, description="The customer's phone number in E.164 format.") + __properties: ClassVar[List[str]] = ["email", "name", "phone"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PaymentCustomer from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. """ - return self._email + excluded_fields: Set[str] = set([ + ]) - @email.setter - def email(self, email): - """Sets the email of this PaymentCustomer. + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict - The customer's email address. # noqa: E501 + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PaymentCustomer from a dict""" + if obj is None: + return None - :param email: The email of this PaymentCustomer. # noqa: E501 - :type: str - """ + if not isinstance(obj, dict): + return cls.model_validate(obj) - self._email = email + _obj = cls.model_validate({ + "email": obj.get("email"), + "name": obj.get("name"), + "phone": obj.get("phone") + }) + return _obj - @property - def name(self): - """Gets the name of this PaymentCustomer. # noqa: E501 - - The customer's full name or business name. # noqa: E501 - - :return: The name of this PaymentCustomer. # noqa: E501 - :rtype: str - """ - return self._name - - @name.setter - def name(self, name): - """Sets the name of this PaymentCustomer. - - The customer's full name or business name. # noqa: E501 - - :param name: The name of this PaymentCustomer. # noqa: E501 - :type: str - """ - - self._name = name - - @property - def phone(self): - """Gets the phone of this PaymentCustomer. # noqa: E501 - - The customer's phone number in E.164 format. # noqa: E501 - - :return: The phone of this PaymentCustomer. # noqa: E501 - :rtype: str - """ - return self._phone - - @phone.setter - def phone(self, phone): - """Sets the phone of this PaymentCustomer. - - The customer's phone number in E.164 format. # noqa: E501 - - :param phone: The phone of this PaymentCustomer. # noqa: E501 - :type: str - """ - self._phone = phone - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, PaymentCustomer): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, PaymentCustomer): - return True - - return self.to_dict() != other.to_dict() diff --git a/Monei/models/payment_last_refund_reason.py b/Monei/models/payment_last_refund_reason.py index 3908635..1d30132 100644 --- a/Monei/models/payment_last_refund_reason.py +++ b/Monei/models/payment_last_refund_reason.py @@ -3,99 +3,36 @@ """ MONEI API v1 -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

- The version of the OpenAPI document: 1.5.0 - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 + The version of the OpenAPI document: 1.5.1 + Generated by OpenAPI Generator (https://openapi-generator.tech) -import six + Do not edit the class manually. +""" # noqa: E501 -from Monei.configuration import Configuration +from __future__ import annotations +import json +from enum import Enum +from typing_extensions import Self -class PaymentLastRefundReason(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - Do not edit the class manually. +class PaymentLastRefundReason(str, Enum): """ - - """ - allowed enum values + The reason of the last refund transaction. """ - DUPLICATED = "duplicated" - FRAUDULENT = "fraudulent" - REQUESTED_BY_CUSTOMER = "requested_by_customer" - - allowable_values = [DUPLICATED, FRAUDULENT, REQUESTED_BY_CUSTOMER] # noqa: E501 """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. + allowed enum values """ - openapi_types = { - } - - attribute_map = { - } - - def __init__(self, local_vars_configuration=None): # noqa: E501 - """PaymentLastRefundReason - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - self.discriminator = None - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, PaymentLastRefundReason): - return False + DUPLICATED = 'duplicated' + FRAUDULENT = 'fraudulent' + REQUESTED_BY_CUSTOMER = 'requested_by_customer' - return self.to_dict() == other.to_dict() + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of PaymentLastRefundReason from a JSON string""" + return cls(json.loads(json_str)) - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, PaymentLastRefundReason): - return True - return self.to_dict() != other.to_dict() diff --git a/Monei/models/payment_message_channel.py b/Monei/models/payment_message_channel.py index d453a76..083d4a0 100644 --- a/Monei/models/payment_message_channel.py +++ b/Monei/models/payment_message_channel.py @@ -3,99 +3,36 @@ """ MONEI API v1 -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

- The version of the OpenAPI document: 1.5.0 - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 + The version of the OpenAPI document: 1.5.1 + Generated by OpenAPI Generator (https://openapi-generator.tech) -import six + Do not edit the class manually. +""" # noqa: E501 -from Monei.configuration import Configuration +from __future__ import annotations +import json +from enum import Enum +from typing_extensions import Self -class PaymentMessageChannel(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - Do not edit the class manually. +class PaymentMessageChannel(str, Enum): """ - - """ - allowed enum values + The channel used to send the payment message. """ - EMAIL = "EMAIL" - WHATSAPP = "WHATSAPP" - SMS = "SMS" - - allowable_values = [EMAIL, WHATSAPP, SMS] # noqa: E501 """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. + allowed enum values """ - openapi_types = { - } - - attribute_map = { - } - - def __init__(self, local_vars_configuration=None): # noqa: E501 - """PaymentMessageChannel - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - self.discriminator = None - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, PaymentMessageChannel): - return False + EMAIL = 'EMAIL' + WHATSAPP = 'WHATSAPP' + SMS = 'SMS' - return self.to_dict() == other.to_dict() + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of PaymentMessageChannel from a JSON string""" + return cls(json.loads(json_str)) - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, PaymentMessageChannel): - return True - return self.to_dict() != other.to_dict() diff --git a/Monei/models/payment_message_language.py b/Monei/models/payment_message_language.py index 4e88999..14806fa 100644 --- a/Monei/models/payment_message_language.py +++ b/Monei/models/payment_message_language.py @@ -3,103 +3,40 @@ """ MONEI API v1 -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

- The version of the OpenAPI document: 1.5.0 - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 + The version of the OpenAPI document: 1.5.1 + Generated by OpenAPI Generator (https://openapi-generator.tech) -import six + Do not edit the class manually. +""" # noqa: E501 -from Monei.configuration import Configuration +from __future__ import annotations +import json +from enum import Enum +from typing_extensions import Self -class PaymentMessageLanguage(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - Do not edit the class manually. +class PaymentMessageLanguage(str, Enum): """ - - """ - allowed enum values + The language of message sent to the customer. If not provided the default customer language is used if available. """ - EN = "en" - ES = "es" - CA = "ca" - PT = "pt" - DE = "de" - IT = "it" - FR = "fr" - - allowable_values = [EN, ES, CA, PT, DE, IT, FR] # noqa: E501 """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. + allowed enum values """ - openapi_types = { - } - - attribute_map = { - } - - def __init__(self, local_vars_configuration=None): # noqa: E501 - """PaymentMessageLanguage - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - self.discriminator = None - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, PaymentMessageLanguage): - return False + EN = 'en' + ES = 'es' + CA = 'ca' + PT = 'pt' + DE = 'de' + IT = 'it' + FR = 'fr' - return self.to_dict() == other.to_dict() + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of PaymentMessageLanguage from a JSON string""" + return cls(json.loads(json_str)) - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, PaymentMessageLanguage): - return True - return self.to_dict() != other.to_dict() diff --git a/Monei/models/payment_methods.py b/Monei/models/payment_methods.py index 24664d4..0505ab9 100644 --- a/Monei/models/payment_methods.py +++ b/Monei/models/payment_methods.py @@ -3,350 +3,116 @@ """ MONEI API v1 -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

- The version of the OpenAPI document: 1.5.0 - Generated by: https://openapi-generator.tech -""" + The version of the OpenAPI document: 1.5.1 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 +from __future__ import annotations import pprint import re # noqa: F401 +import json -import six - -from Monei.configuration import Configuration +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from Monei.models.payment_methods_metadata import PaymentMethodsMetadata +from typing import Optional, Set +from typing_extensions import Self - -class PaymentMethods(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. +class PaymentMethods(BaseModel): """ + PaymentMethods + """ # noqa: E501 + livemode: Optional[StrictBool] = Field(default=None, description="Has the value `true` if the resource exists in live mode or the value `false` if the resource exists in test mode.") + payment_methods: Optional[List[StrictStr]] = Field(default=None, description="An array of available payment methods for the account or payment. Possible values include: - `alipay` - Alipay - `applePay` - Apple Pay - `bancontact` - Bancontact - `bizum` - Bizum - `blik` - BLIK - `card` - Credit or debit card - `cardPresent` - Card present (physical POS) - `clickToPay` - Click to Pay - `cofidis` - Cofidis - `cofidisLoan` - Cofidis Loan - `eps` - EPS - `giropay` - Giropay - `googlePay` - Google Pay - `iDeal` - iDEAL - `klarna` - Klarna - `mbway` - MB WAY - `multibanco` - Multibanco - `paypal` - PayPal - `sepa` - SEPA Direct Debit - `sofort` - Sofort - `trustly` - Trustly ", alias="paymentMethods") + metadata: Optional[PaymentMethodsMetadata] = None + merchant_name: Optional[StrictStr] = Field(default=None, description="The name of the merchant", alias="merchantName") + merchant_url: Optional[StrictStr] = Field(default=None, description="The URL of the merchant's website", alias="merchantUrl") + country_code: Optional[StrictStr] = Field(default=None, description="Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).", alias="countryCode") + account_id: Optional[StrictStr] = Field(default=None, description="MONEI Account identifier.", alias="accountId") + amount: Optional[StrictInt] = Field(default=None, description="The amount of the payment in the smallest currency unit. For example, 10 EUR = 1000 cents. Only present when querying by paymentId. ") + currency: Optional[StrictStr] = Field(default=None, description="Three-letter ISO currency code, in uppercase. Only present when querying by paymentId. ") + __properties: ClassVar[List[str]] = ["livemode", "paymentMethods", "metadata", "merchantName", "merchantUrl", "countryCode", "accountId", "amount", "currency"] + + @field_validator('payment_methods') + def payment_methods_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + for i in value: + if i not in set(['alipay', 'applePay', 'bancontact', 'bizum', 'blik', 'card', 'cardPresent', 'clickToPay', 'cofidis', 'cofidisLoan', 'eps', 'giropay', 'googlePay', 'iDeal', 'klarna', 'mbway', 'multibanco', 'paypal', 'sepa', 'sofort', 'trustly']): + raise ValueError("each list item must be one of ('alipay', 'applePay', 'bancontact', 'bizum', 'blik', 'card', 'cardPresent', 'clickToPay', 'cofidis', 'cofidisLoan', 'eps', 'giropay', 'googlePay', 'iDeal', 'klarna', 'mbway', 'multibanco', 'paypal', 'sepa', 'sofort', 'trustly')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PaymentMethods from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of metadata + if self.metadata: + _dict['metadata'] = self.metadata.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PaymentMethods from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "livemode": obj.get("livemode"), + "paymentMethods": obj.get("paymentMethods"), + "metadata": PaymentMethodsMetadata.from_dict(obj["metadata"]) if obj.get("metadata") is not None else None, + "merchantName": obj.get("merchantName"), + "merchantUrl": obj.get("merchantUrl"), + "countryCode": obj.get("countryCode"), + "accountId": obj.get("accountId"), + "amount": obj.get("amount"), + "currency": obj.get("currency") + }) + return _obj - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'livemode': 'bool', - 'payment_methods': 'list[str]', - 'metadata': 'PaymentMethodsMetadata', - 'merchant_name': 'str', - 'merchant_url': 'str', - 'country_code': 'str', - 'account_id': 'str', - 'amount': 'int', - 'currency': 'str' - } - - attribute_map = { - 'livemode': 'livemode', - 'payment_methods': 'paymentMethods', - 'metadata': 'metadata', - 'merchant_name': 'merchantName', - 'merchant_url': 'merchantUrl', - 'country_code': 'countryCode', - 'account_id': 'accountId', - 'amount': 'amount', - 'currency': 'currency' - } - - def __init__(self, livemode=None, payment_methods=None, metadata=None, merchant_name=None, merchant_url=None, country_code=None, account_id=None, amount=None, currency=None, local_vars_configuration=None): # noqa: E501 - """PaymentMethods - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._livemode = None - self._payment_methods = None - self._metadata = None - self._merchant_name = None - self._merchant_url = None - self._country_code = None - self._account_id = None - self._amount = None - self._currency = None - self.discriminator = None - - if livemode is not None: - self.livemode = livemode - if payment_methods is not None: - self.payment_methods = payment_methods - if metadata is not None: - self.metadata = metadata - if merchant_name is not None: - self.merchant_name = merchant_name - if merchant_url is not None: - self.merchant_url = merchant_url - if country_code is not None: - self.country_code = country_code - if account_id is not None: - self.account_id = account_id - if amount is not None: - self.amount = amount - if currency is not None: - self.currency = currency - - @property - def livemode(self): - """Gets the livemode of this PaymentMethods. # noqa: E501 - - Has the value `true` if the resource exists in live mode or the value `false` if the resource exists in test mode. # noqa: E501 - - :return: The livemode of this PaymentMethods. # noqa: E501 - :rtype: bool - """ - return self._livemode - - @livemode.setter - def livemode(self, livemode): - """Sets the livemode of this PaymentMethods. - - Has the value `true` if the resource exists in live mode or the value `false` if the resource exists in test mode. # noqa: E501 - - :param livemode: The livemode of this PaymentMethods. # noqa: E501 - :type: bool - """ - - self._livemode = livemode - - @property - def payment_methods(self): - """Gets the payment_methods of this PaymentMethods. # noqa: E501 - - An array of available payment methods for the account or payment. Possible values include: - `alipay` - Alipay - `applePay` - Apple Pay - `bancontact` - Bancontact - `bizum` - Bizum - `blik` - BLIK - `card` - Credit or debit card - `cardPresent` - Card present (physical POS) - `clickToPay` - Click to Pay - `cofidis` - Cofidis - `cofidisLoan` - Cofidis Loan - `eps` - EPS - `giropay` - Giropay - `googlePay` - Google Pay - `iDeal` - iDEAL - `klarna` - Klarna - `mbway` - MB WAY - `multibanco` - Multibanco - `paypal` - PayPal - `sepa` - SEPA Direct Debit - `sofort` - Sofort - `trustly` - Trustly # noqa: E501 - - :return: The payment_methods of this PaymentMethods. # noqa: E501 - :rtype: list[str] - """ - return self._payment_methods - - @payment_methods.setter - def payment_methods(self, payment_methods): - """Sets the payment_methods of this PaymentMethods. - - An array of available payment methods for the account or payment. Possible values include: - `alipay` - Alipay - `applePay` - Apple Pay - `bancontact` - Bancontact - `bizum` - Bizum - `blik` - BLIK - `card` - Credit or debit card - `cardPresent` - Card present (physical POS) - `clickToPay` - Click to Pay - `cofidis` - Cofidis - `cofidisLoan` - Cofidis Loan - `eps` - EPS - `giropay` - Giropay - `googlePay` - Google Pay - `iDeal` - iDEAL - `klarna` - Klarna - `mbway` - MB WAY - `multibanco` - Multibanco - `paypal` - PayPal - `sepa` - SEPA Direct Debit - `sofort` - Sofort - `trustly` - Trustly # noqa: E501 - - :param payment_methods: The payment_methods of this PaymentMethods. # noqa: E501 - :type: list[str] - """ - allowed_values = ["alipay", "applePay", "bancontact", "bizum", "blik", "card", "cardPresent", "clickToPay", "cofidis", "cofidisLoan", "eps", "giropay", "googlePay", "iDeal", "klarna", "mbway", "multibanco", "paypal", "sepa", "sofort", "trustly"] # noqa: E501 - if (self.local_vars_configuration.client_side_validation and - not set(payment_methods).issubset(set(allowed_values))): # noqa: E501 - raise ValueError( - "Invalid values for `payment_methods` [{0}], must be a subset of [{1}]" # noqa: E501 - .format(", ".join(map(str, set(payment_methods) - set(allowed_values))), # noqa: E501 - ", ".join(map(str, allowed_values))) - ) - - self._payment_methods = payment_methods - - @property - def metadata(self): - """Gets the metadata of this PaymentMethods. # noqa: E501 - - - :return: The metadata of this PaymentMethods. # noqa: E501 - :rtype: PaymentMethodsMetadata - """ - return self._metadata - - @metadata.setter - def metadata(self, metadata): - """Sets the metadata of this PaymentMethods. - - - :param metadata: The metadata of this PaymentMethods. # noqa: E501 - :type: PaymentMethodsMetadata - """ - - self._metadata = metadata - - @property - def merchant_name(self): - """Gets the merchant_name of this PaymentMethods. # noqa: E501 - - The name of the merchant # noqa: E501 - - :return: The merchant_name of this PaymentMethods. # noqa: E501 - :rtype: str - """ - return self._merchant_name - - @merchant_name.setter - def merchant_name(self, merchant_name): - """Sets the merchant_name of this PaymentMethods. - - The name of the merchant # noqa: E501 - - :param merchant_name: The merchant_name of this PaymentMethods. # noqa: E501 - :type: str - """ - - self._merchant_name = merchant_name - - @property - def merchant_url(self): - """Gets the merchant_url of this PaymentMethods. # noqa: E501 - - The URL of the merchant's website # noqa: E501 - - :return: The merchant_url of this PaymentMethods. # noqa: E501 - :rtype: str - """ - return self._merchant_url - - @merchant_url.setter - def merchant_url(self, merchant_url): - """Sets the merchant_url of this PaymentMethods. - - The URL of the merchant's website # noqa: E501 - - :param merchant_url: The merchant_url of this PaymentMethods. # noqa: E501 - :type: str - """ - - self._merchant_url = merchant_url - - @property - def country_code(self): - """Gets the country_code of this PaymentMethods. # noqa: E501 - - Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). # noqa: E501 - - :return: The country_code of this PaymentMethods. # noqa: E501 - :rtype: str - """ - return self._country_code - - @country_code.setter - def country_code(self, country_code): - """Sets the country_code of this PaymentMethods. - - Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). # noqa: E501 - - :param country_code: The country_code of this PaymentMethods. # noqa: E501 - :type: str - """ - - self._country_code = country_code - - @property - def account_id(self): - """Gets the account_id of this PaymentMethods. # noqa: E501 - - MONEI Account identifier. # noqa: E501 - - :return: The account_id of this PaymentMethods. # noqa: E501 - :rtype: str - """ - return self._account_id - - @account_id.setter - def account_id(self, account_id): - """Sets the account_id of this PaymentMethods. - - MONEI Account identifier. # noqa: E501 - - :param account_id: The account_id of this PaymentMethods. # noqa: E501 - :type: str - """ - - self._account_id = account_id - - @property - def amount(self): - """Gets the amount of this PaymentMethods. # noqa: E501 - - The amount of the payment in the smallest currency unit. For example, 10 EUR = 1000 cents. Only present when querying by paymentId. # noqa: E501 - - :return: The amount of this PaymentMethods. # noqa: E501 - :rtype: int - """ - return self._amount - - @amount.setter - def amount(self, amount): - """Sets the amount of this PaymentMethods. - - The amount of the payment in the smallest currency unit. For example, 10 EUR = 1000 cents. Only present when querying by paymentId. # noqa: E501 - - :param amount: The amount of this PaymentMethods. # noqa: E501 - :type: int - """ - - self._amount = amount - - @property - def currency(self): - """Gets the currency of this PaymentMethods. # noqa: E501 - - Three-letter ISO currency code, in uppercase. Only present when querying by paymentId. # noqa: E501 - - :return: The currency of this PaymentMethods. # noqa: E501 - :rtype: str - """ - return self._currency - - @currency.setter - def currency(self, currency): - """Sets the currency of this PaymentMethods. - - Three-letter ISO currency code, in uppercase. Only present when querying by paymentId. # noqa: E501 - - :param currency: The currency of this PaymentMethods. # noqa: E501 - :type: str - """ - - self._currency = currency - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, PaymentMethods): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, PaymentMethods): - return True - return self.to_dict() != other.to_dict() diff --git a/Monei/models/payment_methods_metadata.py b/Monei/models/payment_methods_metadata.py index 11615f3..a57ac5e 100644 --- a/Monei/models/payment_methods_metadata.py +++ b/Monei/models/payment_methods_metadata.py @@ -3,534 +3,184 @@ """ MONEI API v1 -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

- The version of the OpenAPI document: 1.5.0 - Generated by: https://openapi-generator.tech -""" + The version of the OpenAPI document: 1.5.1 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 +from __future__ import annotations import pprint import re # noqa: F401 - -import six - -from Monei.configuration import Configuration - - -class PaymentMethodsMetadata(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List, Optional +from Monei.models.payment_methods_metadata_alipay import PaymentMethodsMetadataAlipay +from Monei.models.payment_methods_metadata_apple_pay import PaymentMethodsMetadataApplePay +from Monei.models.payment_methods_metadata_bancontact import PaymentMethodsMetadataBancontact +from Monei.models.payment_methods_metadata_bizum import PaymentMethodsMetadataBizum +from Monei.models.payment_methods_metadata_blik import PaymentMethodsMetadataBlik +from Monei.models.payment_methods_metadata_card import PaymentMethodsMetadataCard +from Monei.models.payment_methods_metadata_click_to_pay import PaymentMethodsMetadataClickToPay +from Monei.models.payment_methods_metadata_eps import PaymentMethodsMetadataEps +from Monei.models.payment_methods_metadata_giropay import PaymentMethodsMetadataGiropay +from Monei.models.payment_methods_metadata_google_pay import PaymentMethodsMetadataGooglePay +from Monei.models.payment_methods_metadata_i_deal import PaymentMethodsMetadataIDeal +from Monei.models.payment_methods_metadata_klarna import PaymentMethodsMetadataKlarna +from Monei.models.payment_methods_metadata_mbway import PaymentMethodsMetadataMbway +from Monei.models.payment_methods_metadata_sepa import PaymentMethodsMetadataSepa +from Monei.models.payment_methods_metadata_sofort import PaymentMethodsMetadataSofort +from Monei.models.payment_methods_metadata_trustly import PaymentMethodsMetadataTrustly +from typing import Optional, Set +from typing_extensions import Self + +class PaymentMethodsMetadata(BaseModel): """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'alipay': 'PaymentMethodsMetadataAlipay', - 'bancontact': 'PaymentMethodsMetadataBancontact', - 'bizum': 'PaymentMethodsMetadataBizum', - 'blik': 'PaymentMethodsMetadataBlik', - 'card': 'PaymentMethodsMetadataCard', - 'eps': 'PaymentMethodsMetadataEps', - 'i_deal': 'PaymentMethodsMetadataIDeal', - 'mbway': 'PaymentMethodsMetadataMbway', - 'multibanco': 'PaymentMethodsMetadataMbway', - 'sofort': 'PaymentMethodsMetadataSofort', - 'trustly': 'PaymentMethodsMetadataTrustly', - 'sepa': 'PaymentMethodsMetadataSepa', - 'klarna': 'PaymentMethodsMetadataKlarna', - 'giropay': 'PaymentMethodsMetadataGiropay', - 'google_pay': 'PaymentMethodsMetadataGooglePay', - 'apple_pay': 'PaymentMethodsMetadataApplePay', - 'click_to_pay': 'PaymentMethodsMetadataClickToPay' - } - - attribute_map = { - 'alipay': 'alipay', - 'bancontact': 'bancontact', - 'bizum': 'bizum', - 'blik': 'blik', - 'card': 'card', - 'eps': 'eps', - 'i_deal': 'iDeal', - 'mbway': 'mbway', - 'multibanco': 'multibanco', - 'sofort': 'sofort', - 'trustly': 'trustly', - 'sepa': 'sepa', - 'klarna': 'klarna', - 'giropay': 'giropay', - 'google_pay': 'googlePay', - 'apple_pay': 'applePay', - 'click_to_pay': 'clickToPay' - } - - def __init__(self, alipay=None, bancontact=None, bizum=None, blik=None, card=None, eps=None, i_deal=None, mbway=None, multibanco=None, sofort=None, trustly=None, sepa=None, klarna=None, giropay=None, google_pay=None, apple_pay=None, click_to_pay=None, local_vars_configuration=None): # noqa: E501 - """PaymentMethodsMetadata - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._alipay = None - self._bancontact = None - self._bizum = None - self._blik = None - self._card = None - self._eps = None - self._i_deal = None - self._mbway = None - self._multibanco = None - self._sofort = None - self._trustly = None - self._sepa = None - self._klarna = None - self._giropay = None - self._google_pay = None - self._apple_pay = None - self._click_to_pay = None - self.discriminator = None - - if alipay is not None: - self.alipay = alipay - if bancontact is not None: - self.bancontact = bancontact - if bizum is not None: - self.bizum = bizum - if blik is not None: - self.blik = blik - if card is not None: - self.card = card - if eps is not None: - self.eps = eps - if i_deal is not None: - self.i_deal = i_deal - if mbway is not None: - self.mbway = mbway - if multibanco is not None: - self.multibanco = multibanco - if sofort is not None: - self.sofort = sofort - if trustly is not None: - self.trustly = trustly - if sepa is not None: - self.sepa = sepa - if klarna is not None: - self.klarna = klarna - if giropay is not None: - self.giropay = giropay - if google_pay is not None: - self.google_pay = google_pay - if apple_pay is not None: - self.apple_pay = apple_pay - if click_to_pay is not None: - self.click_to_pay = click_to_pay - - @property - def alipay(self): - """Gets the alipay of this PaymentMethodsMetadata. # noqa: E501 - - - :return: The alipay of this PaymentMethodsMetadata. # noqa: E501 - :rtype: PaymentMethodsMetadataAlipay - """ - return self._alipay - - @alipay.setter - def alipay(self, alipay): - """Sets the alipay of this PaymentMethodsMetadata. - - - :param alipay: The alipay of this PaymentMethodsMetadata. # noqa: E501 - :type: PaymentMethodsMetadataAlipay - """ - - self._alipay = alipay - - @property - def bancontact(self): - """Gets the bancontact of this PaymentMethodsMetadata. # noqa: E501 - - - :return: The bancontact of this PaymentMethodsMetadata. # noqa: E501 - :rtype: PaymentMethodsMetadataBancontact - """ - return self._bancontact - - @bancontact.setter - def bancontact(self, bancontact): - """Sets the bancontact of this PaymentMethodsMetadata. - - - :param bancontact: The bancontact of this PaymentMethodsMetadata. # noqa: E501 - :type: PaymentMethodsMetadataBancontact - """ - - self._bancontact = bancontact - - @property - def bizum(self): - """Gets the bizum of this PaymentMethodsMetadata. # noqa: E501 - - - :return: The bizum of this PaymentMethodsMetadata. # noqa: E501 - :rtype: PaymentMethodsMetadataBizum - """ - return self._bizum - - @bizum.setter - def bizum(self, bizum): - """Sets the bizum of this PaymentMethodsMetadata. - - - :param bizum: The bizum of this PaymentMethodsMetadata. # noqa: E501 - :type: PaymentMethodsMetadataBizum - """ - - self._bizum = bizum - - @property - def blik(self): - """Gets the blik of this PaymentMethodsMetadata. # noqa: E501 - - - :return: The blik of this PaymentMethodsMetadata. # noqa: E501 - :rtype: PaymentMethodsMetadataBlik - """ - return self._blik - - @blik.setter - def blik(self, blik): - """Sets the blik of this PaymentMethodsMetadata. - - - :param blik: The blik of this PaymentMethodsMetadata. # noqa: E501 - :type: PaymentMethodsMetadataBlik - """ - - self._blik = blik - - @property - def card(self): - """Gets the card of this PaymentMethodsMetadata. # noqa: E501 - - - :return: The card of this PaymentMethodsMetadata. # noqa: E501 - :rtype: PaymentMethodsMetadataCard - """ - return self._card - - @card.setter - def card(self, card): - """Sets the card of this PaymentMethodsMetadata. - - - :param card: The card of this PaymentMethodsMetadata. # noqa: E501 - :type: PaymentMethodsMetadataCard - """ - - self._card = card - - @property - def eps(self): - """Gets the eps of this PaymentMethodsMetadata. # noqa: E501 - - - :return: The eps of this PaymentMethodsMetadata. # noqa: E501 - :rtype: PaymentMethodsMetadataEps - """ - return self._eps - - @eps.setter - def eps(self, eps): - """Sets the eps of this PaymentMethodsMetadata. - - - :param eps: The eps of this PaymentMethodsMetadata. # noqa: E501 - :type: PaymentMethodsMetadataEps - """ - - self._eps = eps - - @property - def i_deal(self): - """Gets the i_deal of this PaymentMethodsMetadata. # noqa: E501 - - - :return: The i_deal of this PaymentMethodsMetadata. # noqa: E501 - :rtype: PaymentMethodsMetadataIDeal - """ - return self._i_deal - - @i_deal.setter - def i_deal(self, i_deal): - """Sets the i_deal of this PaymentMethodsMetadata. - - - :param i_deal: The i_deal of this PaymentMethodsMetadata. # noqa: E501 - :type: PaymentMethodsMetadataIDeal - """ - - self._i_deal = i_deal - - @property - def mbway(self): - """Gets the mbway of this PaymentMethodsMetadata. # noqa: E501 - - - :return: The mbway of this PaymentMethodsMetadata. # noqa: E501 - :rtype: PaymentMethodsMetadataMbway - """ - return self._mbway - - @mbway.setter - def mbway(self, mbway): - """Sets the mbway of this PaymentMethodsMetadata. - - - :param mbway: The mbway of this PaymentMethodsMetadata. # noqa: E501 - :type: PaymentMethodsMetadataMbway - """ - - self._mbway = mbway - - @property - def multibanco(self): - """Gets the multibanco of this PaymentMethodsMetadata. # noqa: E501 - - - :return: The multibanco of this PaymentMethodsMetadata. # noqa: E501 - :rtype: PaymentMethodsMetadataMbway - """ - return self._multibanco - - @multibanco.setter - def multibanco(self, multibanco): - """Sets the multibanco of this PaymentMethodsMetadata. - - - :param multibanco: The multibanco of this PaymentMethodsMetadata. # noqa: E501 - :type: PaymentMethodsMetadataMbway - """ - - self._multibanco = multibanco - - @property - def sofort(self): - """Gets the sofort of this PaymentMethodsMetadata. # noqa: E501 - - - :return: The sofort of this PaymentMethodsMetadata. # noqa: E501 - :rtype: PaymentMethodsMetadataSofort - """ - return self._sofort - - @sofort.setter - def sofort(self, sofort): - """Sets the sofort of this PaymentMethodsMetadata. - - - :param sofort: The sofort of this PaymentMethodsMetadata. # noqa: E501 - :type: PaymentMethodsMetadataSofort - """ - - self._sofort = sofort - - @property - def trustly(self): - """Gets the trustly of this PaymentMethodsMetadata. # noqa: E501 - - - :return: The trustly of this PaymentMethodsMetadata. # noqa: E501 - :rtype: PaymentMethodsMetadataTrustly - """ - return self._trustly - - @trustly.setter - def trustly(self, trustly): - """Sets the trustly of this PaymentMethodsMetadata. - - - :param trustly: The trustly of this PaymentMethodsMetadata. # noqa: E501 - :type: PaymentMethodsMetadataTrustly - """ - - self._trustly = trustly - - @property - def sepa(self): - """Gets the sepa of this PaymentMethodsMetadata. # noqa: E501 - - - :return: The sepa of this PaymentMethodsMetadata. # noqa: E501 - :rtype: PaymentMethodsMetadataSepa - """ - return self._sepa - - @sepa.setter - def sepa(self, sepa): - """Sets the sepa of this PaymentMethodsMetadata. - - - :param sepa: The sepa of this PaymentMethodsMetadata. # noqa: E501 - :type: PaymentMethodsMetadataSepa - """ - - self._sepa = sepa - - @property - def klarna(self): - """Gets the klarna of this PaymentMethodsMetadata. # noqa: E501 - - - :return: The klarna of this PaymentMethodsMetadata. # noqa: E501 - :rtype: PaymentMethodsMetadataKlarna - """ - return self._klarna - - @klarna.setter - def klarna(self, klarna): - """Sets the klarna of this PaymentMethodsMetadata. - - - :param klarna: The klarna of this PaymentMethodsMetadata. # noqa: E501 - :type: PaymentMethodsMetadataKlarna - """ - - self._klarna = klarna - - @property - def giropay(self): - """Gets the giropay of this PaymentMethodsMetadata. # noqa: E501 - - - :return: The giropay of this PaymentMethodsMetadata. # noqa: E501 - :rtype: PaymentMethodsMetadataGiropay - """ - return self._giropay - - @giropay.setter - def giropay(self, giropay): - """Sets the giropay of this PaymentMethodsMetadata. - - - :param giropay: The giropay of this PaymentMethodsMetadata. # noqa: E501 - :type: PaymentMethodsMetadataGiropay - """ - - self._giropay = giropay - - @property - def google_pay(self): - """Gets the google_pay of this PaymentMethodsMetadata. # noqa: E501 - - - :return: The google_pay of this PaymentMethodsMetadata. # noqa: E501 - :rtype: PaymentMethodsMetadataGooglePay - """ - return self._google_pay - - @google_pay.setter - def google_pay(self, google_pay): - """Sets the google_pay of this PaymentMethodsMetadata. - - - :param google_pay: The google_pay of this PaymentMethodsMetadata. # noqa: E501 - :type: PaymentMethodsMetadataGooglePay - """ - - self._google_pay = google_pay - - @property - def apple_pay(self): - """Gets the apple_pay of this PaymentMethodsMetadata. # noqa: E501 - - - :return: The apple_pay of this PaymentMethodsMetadata. # noqa: E501 - :rtype: PaymentMethodsMetadataApplePay - """ - return self._apple_pay - - @apple_pay.setter - def apple_pay(self, apple_pay): - """Sets the apple_pay of this PaymentMethodsMetadata. - - - :param apple_pay: The apple_pay of this PaymentMethodsMetadata. # noqa: E501 - :type: PaymentMethodsMetadataApplePay - """ - - self._apple_pay = apple_pay - - @property - def click_to_pay(self): - """Gets the click_to_pay of this PaymentMethodsMetadata. # noqa: E501 - - - :return: The click_to_pay of this PaymentMethodsMetadata. # noqa: E501 - :rtype: PaymentMethodsMetadataClickToPay - """ - return self._click_to_pay - - @click_to_pay.setter - def click_to_pay(self, click_to_pay): - """Sets the click_to_pay of this PaymentMethodsMetadata. - - - :param click_to_pay: The click_to_pay of this PaymentMethodsMetadata. # noqa: E501 - :type: PaymentMethodsMetadataClickToPay - """ - - self._click_to_pay = click_to_pay - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, PaymentMethodsMetadata): - return False - - return self.to_dict() == other.to_dict() + Additional configuration details for each payment method. + """ # noqa: E501 + alipay: Optional[PaymentMethodsMetadataAlipay] = None + bancontact: Optional[PaymentMethodsMetadataBancontact] = None + bizum: Optional[PaymentMethodsMetadataBizum] = None + blik: Optional[PaymentMethodsMetadataBlik] = None + card: Optional[PaymentMethodsMetadataCard] = None + eps: Optional[PaymentMethodsMetadataEps] = None + i_deal: Optional[PaymentMethodsMetadataIDeal] = Field(default=None, alias="iDeal") + mbway: Optional[PaymentMethodsMetadataMbway] = None + multibanco: Optional[PaymentMethodsMetadataMbway] = None + sofort: Optional[PaymentMethodsMetadataSofort] = None + trustly: Optional[PaymentMethodsMetadataTrustly] = None + sepa: Optional[PaymentMethodsMetadataSepa] = None + klarna: Optional[PaymentMethodsMetadataKlarna] = None + giropay: Optional[PaymentMethodsMetadataGiropay] = None + google_pay: Optional[PaymentMethodsMetadataGooglePay] = Field(default=None, alias="googlePay") + apple_pay: Optional[PaymentMethodsMetadataApplePay] = Field(default=None, alias="applePay") + click_to_pay: Optional[PaymentMethodsMetadataClickToPay] = Field(default=None, alias="clickToPay") + __properties: ClassVar[List[str]] = ["alipay", "bancontact", "bizum", "blik", "card", "eps", "iDeal", "mbway", "multibanco", "sofort", "trustly", "sepa", "klarna", "giropay", "googlePay", "applePay", "clickToPay"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PaymentMethodsMetadata from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of alipay + if self.alipay: + _dict['alipay'] = self.alipay.to_dict() + # override the default output from pydantic by calling `to_dict()` of bancontact + if self.bancontact: + _dict['bancontact'] = self.bancontact.to_dict() + # override the default output from pydantic by calling `to_dict()` of bizum + if self.bizum: + _dict['bizum'] = self.bizum.to_dict() + # override the default output from pydantic by calling `to_dict()` of blik + if self.blik: + _dict['blik'] = self.blik.to_dict() + # override the default output from pydantic by calling `to_dict()` of card + if self.card: + _dict['card'] = self.card.to_dict() + # override the default output from pydantic by calling `to_dict()` of eps + if self.eps: + _dict['eps'] = self.eps.to_dict() + # override the default output from pydantic by calling `to_dict()` of i_deal + if self.i_deal: + _dict['iDeal'] = self.i_deal.to_dict() + # override the default output from pydantic by calling `to_dict()` of mbway + if self.mbway: + _dict['mbway'] = self.mbway.to_dict() + # override the default output from pydantic by calling `to_dict()` of multibanco + if self.multibanco: + _dict['multibanco'] = self.multibanco.to_dict() + # override the default output from pydantic by calling `to_dict()` of sofort + if self.sofort: + _dict['sofort'] = self.sofort.to_dict() + # override the default output from pydantic by calling `to_dict()` of trustly + if self.trustly: + _dict['trustly'] = self.trustly.to_dict() + # override the default output from pydantic by calling `to_dict()` of sepa + if self.sepa: + _dict['sepa'] = self.sepa.to_dict() + # override the default output from pydantic by calling `to_dict()` of klarna + if self.klarna: + _dict['klarna'] = self.klarna.to_dict() + # override the default output from pydantic by calling `to_dict()` of giropay + if self.giropay: + _dict['giropay'] = self.giropay.to_dict() + # override the default output from pydantic by calling `to_dict()` of google_pay + if self.google_pay: + _dict['googlePay'] = self.google_pay.to_dict() + # override the default output from pydantic by calling `to_dict()` of apple_pay + if self.apple_pay: + _dict['applePay'] = self.apple_pay.to_dict() + # override the default output from pydantic by calling `to_dict()` of click_to_pay + if self.click_to_pay: + _dict['clickToPay'] = self.click_to_pay.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PaymentMethodsMetadata from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "alipay": PaymentMethodsMetadataAlipay.from_dict(obj["alipay"]) if obj.get("alipay") is not None else None, + "bancontact": PaymentMethodsMetadataBancontact.from_dict(obj["bancontact"]) if obj.get("bancontact") is not None else None, + "bizum": PaymentMethodsMetadataBizum.from_dict(obj["bizum"]) if obj.get("bizum") is not None else None, + "blik": PaymentMethodsMetadataBlik.from_dict(obj["blik"]) if obj.get("blik") is not None else None, + "card": PaymentMethodsMetadataCard.from_dict(obj["card"]) if obj.get("card") is not None else None, + "eps": PaymentMethodsMetadataEps.from_dict(obj["eps"]) if obj.get("eps") is not None else None, + "iDeal": PaymentMethodsMetadataIDeal.from_dict(obj["iDeal"]) if obj.get("iDeal") is not None else None, + "mbway": PaymentMethodsMetadataMbway.from_dict(obj["mbway"]) if obj.get("mbway") is not None else None, + "multibanco": PaymentMethodsMetadataMbway.from_dict(obj["multibanco"]) if obj.get("multibanco") is not None else None, + "sofort": PaymentMethodsMetadataSofort.from_dict(obj["sofort"]) if obj.get("sofort") is not None else None, + "trustly": PaymentMethodsMetadataTrustly.from_dict(obj["trustly"]) if obj.get("trustly") is not None else None, + "sepa": PaymentMethodsMetadataSepa.from_dict(obj["sepa"]) if obj.get("sepa") is not None else None, + "klarna": PaymentMethodsMetadataKlarna.from_dict(obj["klarna"]) if obj.get("klarna") is not None else None, + "giropay": PaymentMethodsMetadataGiropay.from_dict(obj["giropay"]) if obj.get("giropay") is not None else None, + "googlePay": PaymentMethodsMetadataGooglePay.from_dict(obj["googlePay"]) if obj.get("googlePay") is not None else None, + "applePay": PaymentMethodsMetadataApplePay.from_dict(obj["applePay"]) if obj.get("applePay") is not None else None, + "clickToPay": PaymentMethodsMetadataClickToPay.from_dict(obj["clickToPay"]) if obj.get("clickToPay") is not None else None + }) + return _obj - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, PaymentMethodsMetadata): - return True - return self.to_dict() != other.to_dict() diff --git a/Monei/models/payment_methods_metadata_alipay.py b/Monei/models/payment_methods_metadata_alipay.py index 81abc57..34a19c4 100644 --- a/Monei/models/payment_methods_metadata_alipay.py +++ b/Monei/models/payment_methods_metadata_alipay.py @@ -3,120 +3,85 @@ """ MONEI API v1 -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

- The version of the OpenAPI document: 1.5.0 - Generated by: https://openapi-generator.tech -""" + The version of the OpenAPI document: 1.5.1 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 +from __future__ import annotations import pprint import re # noqa: F401 +import json -import six - -from Monei.configuration import Configuration - - -class PaymentMethodsMetadataAlipay(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self - Do not edit the class manually. +class PaymentMethodsMetadataAlipay(BaseModel): """ + PaymentMethodsMetadataAlipay + """ # noqa: E501 + countries: Optional[List[StrictStr]] = Field(default=None, description="List of countries where the payment method is available") + __properties: ClassVar[List[str]] = ["countries"] - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'countries': 'list[str]' - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) - attribute_map = { - 'countries': 'countries' - } - def __init__(self, countries=None, local_vars_configuration=None): # noqa: E501 - """PaymentMethodsMetadataAlipay - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) - self._countries = None - self.discriminator = None + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) - if countries is not None: - self.countries = countries + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PaymentMethodsMetadataAlipay from a JSON string""" + return cls.from_dict(json.loads(json_str)) - @property - def countries(self): - """Gets the countries of this PaymentMethodsMetadataAlipay. # noqa: E501 + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. - List of countries where the payment method is available # noqa: E501 + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: - :return: The countries of this PaymentMethodsMetadataAlipay. # noqa: E501 - :rtype: list[str] + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. """ - return self._countries + excluded_fields: Set[str] = set([ + ]) - @countries.setter - def countries(self, countries): - """Sets the countries of this PaymentMethodsMetadataAlipay. + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict - List of countries where the payment method is available # noqa: E501 + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PaymentMethodsMetadataAlipay from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "countries": obj.get("countries") + }) + return _obj - :param countries: The countries of this PaymentMethodsMetadataAlipay. # noqa: E501 - :type: list[str] - """ - self._countries = countries - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, PaymentMethodsMetadataAlipay): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, PaymentMethodsMetadataAlipay): - return True - - return self.to_dict() != other.to_dict() diff --git a/Monei/models/payment_methods_metadata_apple_pay.py b/Monei/models/payment_methods_metadata_apple_pay.py index edb46ef..5d963dc 100644 --- a/Monei/models/payment_methods_metadata_apple_pay.py +++ b/Monei/models/payment_methods_metadata_apple_pay.py @@ -3,120 +3,85 @@ """ MONEI API v1 -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

- The version of the OpenAPI document: 1.5.0 - Generated by: https://openapi-generator.tech -""" + The version of the OpenAPI document: 1.5.1 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 +from __future__ import annotations import pprint import re # noqa: F401 +import json -import six - -from Monei.configuration import Configuration - - -class PaymentMethodsMetadataApplePay(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self - Do not edit the class manually. +class PaymentMethodsMetadataApplePay(BaseModel): """ + PaymentMethodsMetadataApplePay + """ # noqa: E501 + merchant_id: Optional[StrictStr] = Field(default=None, description="Apple Pay merchant ID", alias="merchantId") + __properties: ClassVar[List[str]] = ["merchantId"] - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'merchant_id': 'str' - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) - attribute_map = { - 'merchant_id': 'merchantId' - } - def __init__(self, merchant_id=None, local_vars_configuration=None): # noqa: E501 - """PaymentMethodsMetadataApplePay - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) - self._merchant_id = None - self.discriminator = None + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) - if merchant_id is not None: - self.merchant_id = merchant_id + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PaymentMethodsMetadataApplePay from a JSON string""" + return cls.from_dict(json.loads(json_str)) - @property - def merchant_id(self): - """Gets the merchant_id of this PaymentMethodsMetadataApplePay. # noqa: E501 + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. - Apple Pay merchant ID # noqa: E501 + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: - :return: The merchant_id of this PaymentMethodsMetadataApplePay. # noqa: E501 - :rtype: str + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. """ - return self._merchant_id + excluded_fields: Set[str] = set([ + ]) - @merchant_id.setter - def merchant_id(self, merchant_id): - """Sets the merchant_id of this PaymentMethodsMetadataApplePay. + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict - Apple Pay merchant ID # noqa: E501 + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PaymentMethodsMetadataApplePay from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "merchantId": obj.get("merchantId") + }) + return _obj - :param merchant_id: The merchant_id of this PaymentMethodsMetadataApplePay. # noqa: E501 - :type: str - """ - self._merchant_id = merchant_id - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, PaymentMethodsMetadataApplePay): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, PaymentMethodsMetadataApplePay): - return True - - return self.to_dict() != other.to_dict() diff --git a/Monei/models/payment_methods_metadata_bancontact.py b/Monei/models/payment_methods_metadata_bancontact.py index 3b5706d..bac5edb 100644 --- a/Monei/models/payment_methods_metadata_bancontact.py +++ b/Monei/models/payment_methods_metadata_bancontact.py @@ -3,120 +3,85 @@ """ MONEI API v1 -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

- The version of the OpenAPI document: 1.5.0 - Generated by: https://openapi-generator.tech -""" + The version of the OpenAPI document: 1.5.1 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 +from __future__ import annotations import pprint import re # noqa: F401 +import json -import six - -from Monei.configuration import Configuration - - -class PaymentMethodsMetadataBancontact(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self - Do not edit the class manually. +class PaymentMethodsMetadataBancontact(BaseModel): """ + PaymentMethodsMetadataBancontact + """ # noqa: E501 + countries: Optional[List[StrictStr]] = Field(default=None, description="List of countries where the payment method is available") + __properties: ClassVar[List[str]] = ["countries"] - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'countries': 'list[str]' - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) - attribute_map = { - 'countries': 'countries' - } - def __init__(self, countries=None, local_vars_configuration=None): # noqa: E501 - """PaymentMethodsMetadataBancontact - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) - self._countries = None - self.discriminator = None + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) - if countries is not None: - self.countries = countries + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PaymentMethodsMetadataBancontact from a JSON string""" + return cls.from_dict(json.loads(json_str)) - @property - def countries(self): - """Gets the countries of this PaymentMethodsMetadataBancontact. # noqa: E501 + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. - List of countries where the payment method is available # noqa: E501 + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: - :return: The countries of this PaymentMethodsMetadataBancontact. # noqa: E501 - :rtype: list[str] + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. """ - return self._countries + excluded_fields: Set[str] = set([ + ]) - @countries.setter - def countries(self, countries): - """Sets the countries of this PaymentMethodsMetadataBancontact. + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict - List of countries where the payment method is available # noqa: E501 + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PaymentMethodsMetadataBancontact from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "countries": obj.get("countries") + }) + return _obj - :param countries: The countries of this PaymentMethodsMetadataBancontact. # noqa: E501 - :type: list[str] - """ - self._countries = countries - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, PaymentMethodsMetadataBancontact): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, PaymentMethodsMetadataBancontact): - return True - - return self.to_dict() != other.to_dict() diff --git a/Monei/models/payment_methods_metadata_bizum.py b/Monei/models/payment_methods_metadata_bizum.py index 91a07cb..79a21fa 100644 --- a/Monei/models/payment_methods_metadata_bizum.py +++ b/Monei/models/payment_methods_metadata_bizum.py @@ -3,120 +3,85 @@ """ MONEI API v1 -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

- The version of the OpenAPI document: 1.5.0 - Generated by: https://openapi-generator.tech -""" + The version of the OpenAPI document: 1.5.1 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 +from __future__ import annotations import pprint import re # noqa: F401 +import json -import six - -from Monei.configuration import Configuration - - -class PaymentMethodsMetadataBizum(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self - Do not edit the class manually. +class PaymentMethodsMetadataBizum(BaseModel): """ + PaymentMethodsMetadataBizum + """ # noqa: E501 + countries: Optional[List[StrictStr]] = Field(default=None, description="List of countries where the payment method is available") + __properties: ClassVar[List[str]] = ["countries"] - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'countries': 'list[str]' - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) - attribute_map = { - 'countries': 'countries' - } - def __init__(self, countries=None, local_vars_configuration=None): # noqa: E501 - """PaymentMethodsMetadataBizum - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) - self._countries = None - self.discriminator = None + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) - if countries is not None: - self.countries = countries + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PaymentMethodsMetadataBizum from a JSON string""" + return cls.from_dict(json.loads(json_str)) - @property - def countries(self): - """Gets the countries of this PaymentMethodsMetadataBizum. # noqa: E501 + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. - List of countries where the payment method is available # noqa: E501 + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: - :return: The countries of this PaymentMethodsMetadataBizum. # noqa: E501 - :rtype: list[str] + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. """ - return self._countries + excluded_fields: Set[str] = set([ + ]) - @countries.setter - def countries(self, countries): - """Sets the countries of this PaymentMethodsMetadataBizum. + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict - List of countries where the payment method is available # noqa: E501 + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PaymentMethodsMetadataBizum from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "countries": obj.get("countries") + }) + return _obj - :param countries: The countries of this PaymentMethodsMetadataBizum. # noqa: E501 - :type: list[str] - """ - self._countries = countries - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, PaymentMethodsMetadataBizum): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, PaymentMethodsMetadataBizum): - return True - - return self.to_dict() != other.to_dict() diff --git a/Monei/models/payment_methods_metadata_blik.py b/Monei/models/payment_methods_metadata_blik.py index 2e9eff9..b156876 100644 --- a/Monei/models/payment_methods_metadata_blik.py +++ b/Monei/models/payment_methods_metadata_blik.py @@ -3,120 +3,85 @@ """ MONEI API v1 -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

- The version of the OpenAPI document: 1.5.0 - Generated by: https://openapi-generator.tech -""" + The version of the OpenAPI document: 1.5.1 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 +from __future__ import annotations import pprint import re # noqa: F401 +import json -import six - -from Monei.configuration import Configuration - - -class PaymentMethodsMetadataBlik(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self - Do not edit the class manually. +class PaymentMethodsMetadataBlik(BaseModel): """ + PaymentMethodsMetadataBlik + """ # noqa: E501 + countries: Optional[List[StrictStr]] = Field(default=None, description="List of countries where the payment method is available") + __properties: ClassVar[List[str]] = ["countries"] - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'countries': 'list[str]' - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) - attribute_map = { - 'countries': 'countries' - } - def __init__(self, countries=None, local_vars_configuration=None): # noqa: E501 - """PaymentMethodsMetadataBlik - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) - self._countries = None - self.discriminator = None + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) - if countries is not None: - self.countries = countries + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PaymentMethodsMetadataBlik from a JSON string""" + return cls.from_dict(json.loads(json_str)) - @property - def countries(self): - """Gets the countries of this PaymentMethodsMetadataBlik. # noqa: E501 + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. - List of countries where the payment method is available # noqa: E501 + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: - :return: The countries of this PaymentMethodsMetadataBlik. # noqa: E501 - :rtype: list[str] + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. """ - return self._countries + excluded_fields: Set[str] = set([ + ]) - @countries.setter - def countries(self, countries): - """Sets the countries of this PaymentMethodsMetadataBlik. + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict - List of countries where the payment method is available # noqa: E501 + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PaymentMethodsMetadataBlik from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "countries": obj.get("countries") + }) + return _obj - :param countries: The countries of this PaymentMethodsMetadataBlik. # noqa: E501 - :type: list[str] - """ - self._countries = countries - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, PaymentMethodsMetadataBlik): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, PaymentMethodsMetadataBlik): - return True - - return self.to_dict() != other.to_dict() diff --git a/Monei/models/payment_methods_metadata_card.py b/Monei/models/payment_methods_metadata_card.py index 9c5ef1e..400ca9a 100644 --- a/Monei/models/payment_methods_metadata_card.py +++ b/Monei/models/payment_methods_metadata_card.py @@ -3,120 +3,85 @@ """ MONEI API v1 -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

- The version of the OpenAPI document: 1.5.0 - Generated by: https://openapi-generator.tech -""" + The version of the OpenAPI document: 1.5.1 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 +from __future__ import annotations import pprint import re # noqa: F401 +import json -import six - -from Monei.configuration import Configuration - - -class PaymentMethodsMetadataCard(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self - Do not edit the class manually. +class PaymentMethodsMetadataCard(BaseModel): """ + PaymentMethodsMetadataCard + """ # noqa: E501 + brands: Optional[List[StrictStr]] = Field(default=None, description="List of card brands supported") + __properties: ClassVar[List[str]] = ["brands"] - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'brands': 'list[str]' - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) - attribute_map = { - 'brands': 'brands' - } - def __init__(self, brands=None, local_vars_configuration=None): # noqa: E501 - """PaymentMethodsMetadataCard - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) - self._brands = None - self.discriminator = None + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) - if brands is not None: - self.brands = brands + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PaymentMethodsMetadataCard from a JSON string""" + return cls.from_dict(json.loads(json_str)) - @property - def brands(self): - """Gets the brands of this PaymentMethodsMetadataCard. # noqa: E501 + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. - List of card brands supported # noqa: E501 + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: - :return: The brands of this PaymentMethodsMetadataCard. # noqa: E501 - :rtype: list[str] + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. """ - return self._brands + excluded_fields: Set[str] = set([ + ]) - @brands.setter - def brands(self, brands): - """Sets the brands of this PaymentMethodsMetadataCard. + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict - List of card brands supported # noqa: E501 + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PaymentMethodsMetadataCard from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "brands": obj.get("brands") + }) + return _obj - :param brands: The brands of this PaymentMethodsMetadataCard. # noqa: E501 - :type: list[str] - """ - self._brands = brands - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, PaymentMethodsMetadataCard): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, PaymentMethodsMetadataCard): - return True - - return self.to_dict() != other.to_dict() diff --git a/Monei/models/payment_methods_metadata_click_to_pay.py b/Monei/models/payment_methods_metadata_click_to_pay.py index a163a03..99d0c55 100644 --- a/Monei/models/payment_methods_metadata_click_to_pay.py +++ b/Monei/models/payment_methods_metadata_click_to_pay.py @@ -3,226 +3,105 @@ """ MONEI API v1 -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

- The version of the OpenAPI document: 1.5.0 - Generated by: https://openapi-generator.tech -""" + The version of the OpenAPI document: 1.5.1 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 +from __future__ import annotations import pprint import re # noqa: F401 +import json -import six - -from Monei.configuration import Configuration +from pydantic import BaseModel, ConfigDict, Field, StrictBool +from typing import Any, ClassVar, Dict, List, Optional +from Monei.models.payment_methods_metadata_click_to_pay_discover import PaymentMethodsMetadataClickToPayDiscover +from Monei.models.payment_methods_metadata_click_to_pay_mastercard import PaymentMethodsMetadataClickToPayMastercard +from Monei.models.payment_methods_metadata_click_to_pay_visa import PaymentMethodsMetadataClickToPayVisa +from typing import Optional, Set +from typing_extensions import Self - -class PaymentMethodsMetadataClickToPay(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. +class PaymentMethodsMetadataClickToPay(BaseModel): """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'token_support': 'bool', - 'preselected': 'bool', - 'visa': 'PaymentMethodsMetadataClickToPayVisa', - 'mastercard': 'PaymentMethodsMetadataClickToPayMastercard', - 'discover': 'PaymentMethodsMetadataClickToPayDiscover' - } - - attribute_map = { - 'token_support': 'tokenSupport', - 'preselected': 'preselected', - 'visa': 'visa', - 'mastercard': 'mastercard', - 'discover': 'discover' - } - - def __init__(self, token_support=None, preselected=None, visa=None, mastercard=None, discover=None, local_vars_configuration=None): # noqa: E501 - """PaymentMethodsMetadataClickToPay - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._token_support = None - self._preselected = None - self._visa = None - self._mastercard = None - self._discover = None - self.discriminator = None - - if token_support is not None: - self.token_support = token_support - if preselected is not None: - self.preselected = preselected - if visa is not None: - self.visa = visa - if mastercard is not None: - self.mastercard = mastercard - if discover is not None: - self.discover = discover - - @property - def token_support(self): - """Gets the token_support of this PaymentMethodsMetadataClickToPay. # noqa: E501 - - Whether token support is enabled # noqa: E501 - - :return: The token_support of this PaymentMethodsMetadataClickToPay. # noqa: E501 - :rtype: bool + PaymentMethodsMetadataClickToPay + """ # noqa: E501 + token_support: Optional[StrictBool] = Field(default=None, description="Whether token support is enabled", alias="tokenSupport") + preselected: Optional[StrictBool] = Field(default=None, description="Whether the method is preselected") + visa: Optional[PaymentMethodsMetadataClickToPayVisa] = None + mastercard: Optional[PaymentMethodsMetadataClickToPayMastercard] = None + discover: Optional[PaymentMethodsMetadataClickToPayDiscover] = None + __properties: ClassVar[List[str]] = ["tokenSupport", "preselected", "visa", "mastercard", "discover"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PaymentMethodsMetadataClickToPay from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. """ - return self._token_support - - @token_support.setter - def token_support(self, token_support): - """Sets the token_support of this PaymentMethodsMetadataClickToPay. - - Whether token support is enabled # noqa: E501 - - :param token_support: The token_support of this PaymentMethodsMetadataClickToPay. # noqa: E501 - :type: bool - """ - - self._token_support = token_support - - @property - def preselected(self): - """Gets the preselected of this PaymentMethodsMetadataClickToPay. # noqa: E501 - - Whether the method is preselected # noqa: E501 - - :return: The preselected of this PaymentMethodsMetadataClickToPay. # noqa: E501 - :rtype: bool - """ - return self._preselected - - @preselected.setter - def preselected(self, preselected): - """Sets the preselected of this PaymentMethodsMetadataClickToPay. - - Whether the method is preselected # noqa: E501 - - :param preselected: The preselected of this PaymentMethodsMetadataClickToPay. # noqa: E501 - :type: bool - """ - - self._preselected = preselected - - @property - def visa(self): - """Gets the visa of this PaymentMethodsMetadataClickToPay. # noqa: E501 + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of visa + if self.visa: + _dict['visa'] = self.visa.to_dict() + # override the default output from pydantic by calling `to_dict()` of mastercard + if self.mastercard: + _dict['mastercard'] = self.mastercard.to_dict() + # override the default output from pydantic by calling `to_dict()` of discover + if self.discover: + _dict['discover'] = self.discover.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PaymentMethodsMetadataClickToPay from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "tokenSupport": obj.get("tokenSupport"), + "preselected": obj.get("preselected"), + "visa": PaymentMethodsMetadataClickToPayVisa.from_dict(obj["visa"]) if obj.get("visa") is not None else None, + "mastercard": PaymentMethodsMetadataClickToPayMastercard.from_dict(obj["mastercard"]) if obj.get("mastercard") is not None else None, + "discover": PaymentMethodsMetadataClickToPayDiscover.from_dict(obj["discover"]) if obj.get("discover") is not None else None + }) + return _obj - :return: The visa of this PaymentMethodsMetadataClickToPay. # noqa: E501 - :rtype: PaymentMethodsMetadataClickToPayVisa - """ - return self._visa - - @visa.setter - def visa(self, visa): - """Sets the visa of this PaymentMethodsMetadataClickToPay. - - - :param visa: The visa of this PaymentMethodsMetadataClickToPay. # noqa: E501 - :type: PaymentMethodsMetadataClickToPayVisa - """ - - self._visa = visa - - @property - def mastercard(self): - """Gets the mastercard of this PaymentMethodsMetadataClickToPay. # noqa: E501 - - - :return: The mastercard of this PaymentMethodsMetadataClickToPay. # noqa: E501 - :rtype: PaymentMethodsMetadataClickToPayMastercard - """ - return self._mastercard - - @mastercard.setter - def mastercard(self, mastercard): - """Sets the mastercard of this PaymentMethodsMetadataClickToPay. - - - :param mastercard: The mastercard of this PaymentMethodsMetadataClickToPay. # noqa: E501 - :type: PaymentMethodsMetadataClickToPayMastercard - """ - - self._mastercard = mastercard - - @property - def discover(self): - """Gets the discover of this PaymentMethodsMetadataClickToPay. # noqa: E501 - - - :return: The discover of this PaymentMethodsMetadataClickToPay. # noqa: E501 - :rtype: PaymentMethodsMetadataClickToPayDiscover - """ - return self._discover - - @discover.setter - def discover(self, discover): - """Sets the discover of this PaymentMethodsMetadataClickToPay. - - - :param discover: The discover of this PaymentMethodsMetadataClickToPay. # noqa: E501 - :type: PaymentMethodsMetadataClickToPayDiscover - """ - - self._discover = discover - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, PaymentMethodsMetadataClickToPay): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, PaymentMethodsMetadataClickToPay): - return True - - return self.to_dict() != other.to_dict() diff --git a/Monei/models/payment_methods_metadata_click_to_pay_discover.py b/Monei/models/payment_methods_metadata_click_to_pay_discover.py index f93820f..5adb2ee 100644 --- a/Monei/models/payment_methods_metadata_click_to_pay_discover.py +++ b/Monei/models/payment_methods_metadata_click_to_pay_discover.py @@ -3,144 +3,87 @@ """ MONEI API v1 -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

- The version of the OpenAPI document: 1.5.0 - Generated by: https://openapi-generator.tech -""" + The version of the OpenAPI document: 1.5.1 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 +from __future__ import annotations import pprint import re # noqa: F401 +import json -import six - -from Monei.configuration import Configuration - - -class PaymentMethodsMetadataClickToPayDiscover(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self +class PaymentMethodsMetadataClickToPayDiscover(BaseModel): """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'srci_dpa_id': 'str', - 'src_initiator_id': 'str' - } - - attribute_map = { - 'srci_dpa_id': 'srciDpaId', - 'src_initiator_id': 'srcInitiatorId' - } - - def __init__(self, srci_dpa_id=None, src_initiator_id=None, local_vars_configuration=None): # noqa: E501 - """PaymentMethodsMetadataClickToPayDiscover - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._srci_dpa_id = None - self._src_initiator_id = None - self.discriminator = None - - if srci_dpa_id is not None: - self.srci_dpa_id = srci_dpa_id - if src_initiator_id is not None: - self.src_initiator_id = src_initiator_id - - @property - def srci_dpa_id(self): - """Gets the srci_dpa_id of this PaymentMethodsMetadataClickToPayDiscover. # noqa: E501 - - - :return: The srci_dpa_id of this PaymentMethodsMetadataClickToPayDiscover. # noqa: E501 - :rtype: str + PaymentMethodsMetadataClickToPayDiscover + """ # noqa: E501 + srci_dpa_id: Optional[StrictStr] = Field(default=None, alias="srciDpaId") + src_initiator_id: Optional[StrictStr] = Field(default=None, alias="srcInitiatorId") + __properties: ClassVar[List[str]] = ["srciDpaId", "srcInitiatorId"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PaymentMethodsMetadataClickToPayDiscover from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. """ - return self._srci_dpa_id - - @srci_dpa_id.setter - def srci_dpa_id(self, srci_dpa_id): - """Sets the srci_dpa_id of this PaymentMethodsMetadataClickToPayDiscover. + excluded_fields: Set[str] = set([ + ]) + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict - :param srci_dpa_id: The srci_dpa_id of this PaymentMethodsMetadataClickToPayDiscover. # noqa: E501 - :type: str - """ + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PaymentMethodsMetadataClickToPayDiscover from a dict""" + if obj is None: + return None - self._srci_dpa_id = srci_dpa_id + if not isinstance(obj, dict): + return cls.model_validate(obj) - @property - def src_initiator_id(self): - """Gets the src_initiator_id of this PaymentMethodsMetadataClickToPayDiscover. # noqa: E501 + _obj = cls.model_validate({ + "srciDpaId": obj.get("srciDpaId"), + "srcInitiatorId": obj.get("srcInitiatorId") + }) + return _obj - :return: The src_initiator_id of this PaymentMethodsMetadataClickToPayDiscover. # noqa: E501 - :rtype: str - """ - return self._src_initiator_id - - @src_initiator_id.setter - def src_initiator_id(self, src_initiator_id): - """Sets the src_initiator_id of this PaymentMethodsMetadataClickToPayDiscover. - - - :param src_initiator_id: The src_initiator_id of this PaymentMethodsMetadataClickToPayDiscover. # noqa: E501 - :type: str - """ - - self._src_initiator_id = src_initiator_id - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, PaymentMethodsMetadataClickToPayDiscover): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, PaymentMethodsMetadataClickToPayDiscover): - return True - - return self.to_dict() != other.to_dict() diff --git a/Monei/models/payment_methods_metadata_click_to_pay_mastercard.py b/Monei/models/payment_methods_metadata_click_to_pay_mastercard.py index 2e91674..0d388f6 100644 --- a/Monei/models/payment_methods_metadata_click_to_pay_mastercard.py +++ b/Monei/models/payment_methods_metadata_click_to_pay_mastercard.py @@ -3,144 +3,87 @@ """ MONEI API v1 -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

- The version of the OpenAPI document: 1.5.0 - Generated by: https://openapi-generator.tech -""" + The version of the OpenAPI document: 1.5.1 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 +from __future__ import annotations import pprint import re # noqa: F401 +import json -import six - -from Monei.configuration import Configuration - - -class PaymentMethodsMetadataClickToPayMastercard(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self +class PaymentMethodsMetadataClickToPayMastercard(BaseModel): """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'srci_dpa_id': 'str', - 'src_initiator_id': 'str' - } - - attribute_map = { - 'srci_dpa_id': 'srciDpaId', - 'src_initiator_id': 'srcInitiatorId' - } - - def __init__(self, srci_dpa_id=None, src_initiator_id=None, local_vars_configuration=None): # noqa: E501 - """PaymentMethodsMetadataClickToPayMastercard - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._srci_dpa_id = None - self._src_initiator_id = None - self.discriminator = None - - if srci_dpa_id is not None: - self.srci_dpa_id = srci_dpa_id - if src_initiator_id is not None: - self.src_initiator_id = src_initiator_id - - @property - def srci_dpa_id(self): - """Gets the srci_dpa_id of this PaymentMethodsMetadataClickToPayMastercard. # noqa: E501 - - - :return: The srci_dpa_id of this PaymentMethodsMetadataClickToPayMastercard. # noqa: E501 - :rtype: str + PaymentMethodsMetadataClickToPayMastercard + """ # noqa: E501 + srci_dpa_id: Optional[StrictStr] = Field(default=None, alias="srciDpaId") + src_initiator_id: Optional[StrictStr] = Field(default=None, alias="srcInitiatorId") + __properties: ClassVar[List[str]] = ["srciDpaId", "srcInitiatorId"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PaymentMethodsMetadataClickToPayMastercard from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. """ - return self._srci_dpa_id - - @srci_dpa_id.setter - def srci_dpa_id(self, srci_dpa_id): - """Sets the srci_dpa_id of this PaymentMethodsMetadataClickToPayMastercard. + excluded_fields: Set[str] = set([ + ]) + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict - :param srci_dpa_id: The srci_dpa_id of this PaymentMethodsMetadataClickToPayMastercard. # noqa: E501 - :type: str - """ + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PaymentMethodsMetadataClickToPayMastercard from a dict""" + if obj is None: + return None - self._srci_dpa_id = srci_dpa_id + if not isinstance(obj, dict): + return cls.model_validate(obj) - @property - def src_initiator_id(self): - """Gets the src_initiator_id of this PaymentMethodsMetadataClickToPayMastercard. # noqa: E501 + _obj = cls.model_validate({ + "srciDpaId": obj.get("srciDpaId"), + "srcInitiatorId": obj.get("srcInitiatorId") + }) + return _obj - :return: The src_initiator_id of this PaymentMethodsMetadataClickToPayMastercard. # noqa: E501 - :rtype: str - """ - return self._src_initiator_id - - @src_initiator_id.setter - def src_initiator_id(self, src_initiator_id): - """Sets the src_initiator_id of this PaymentMethodsMetadataClickToPayMastercard. - - - :param src_initiator_id: The src_initiator_id of this PaymentMethodsMetadataClickToPayMastercard. # noqa: E501 - :type: str - """ - - self._src_initiator_id = src_initiator_id - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, PaymentMethodsMetadataClickToPayMastercard): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, PaymentMethodsMetadataClickToPayMastercard): - return True - - return self.to_dict() != other.to_dict() diff --git a/Monei/models/payment_methods_metadata_click_to_pay_visa.py b/Monei/models/payment_methods_metadata_click_to_pay_visa.py index 18c3c4b..908b104 100644 --- a/Monei/models/payment_methods_metadata_click_to_pay_visa.py +++ b/Monei/models/payment_methods_metadata_click_to_pay_visa.py @@ -3,144 +3,87 @@ """ MONEI API v1 -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

- The version of the OpenAPI document: 1.5.0 - Generated by: https://openapi-generator.tech -""" + The version of the OpenAPI document: 1.5.1 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 +from __future__ import annotations import pprint import re # noqa: F401 +import json -import six - -from Monei.configuration import Configuration - - -class PaymentMethodsMetadataClickToPayVisa(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self +class PaymentMethodsMetadataClickToPayVisa(BaseModel): """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'srci_dpa_id': 'str', - 'src_initiator_id': 'str' - } - - attribute_map = { - 'srci_dpa_id': 'srciDpaId', - 'src_initiator_id': 'srcInitiatorId' - } - - def __init__(self, srci_dpa_id=None, src_initiator_id=None, local_vars_configuration=None): # noqa: E501 - """PaymentMethodsMetadataClickToPayVisa - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._srci_dpa_id = None - self._src_initiator_id = None - self.discriminator = None - - if srci_dpa_id is not None: - self.srci_dpa_id = srci_dpa_id - if src_initiator_id is not None: - self.src_initiator_id = src_initiator_id - - @property - def srci_dpa_id(self): - """Gets the srci_dpa_id of this PaymentMethodsMetadataClickToPayVisa. # noqa: E501 - - - :return: The srci_dpa_id of this PaymentMethodsMetadataClickToPayVisa. # noqa: E501 - :rtype: str + PaymentMethodsMetadataClickToPayVisa + """ # noqa: E501 + srci_dpa_id: Optional[StrictStr] = Field(default=None, alias="srciDpaId") + src_initiator_id: Optional[StrictStr] = Field(default=None, alias="srcInitiatorId") + __properties: ClassVar[List[str]] = ["srciDpaId", "srcInitiatorId"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PaymentMethodsMetadataClickToPayVisa from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. """ - return self._srci_dpa_id - - @srci_dpa_id.setter - def srci_dpa_id(self, srci_dpa_id): - """Sets the srci_dpa_id of this PaymentMethodsMetadataClickToPayVisa. + excluded_fields: Set[str] = set([ + ]) + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict - :param srci_dpa_id: The srci_dpa_id of this PaymentMethodsMetadataClickToPayVisa. # noqa: E501 - :type: str - """ + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PaymentMethodsMetadataClickToPayVisa from a dict""" + if obj is None: + return None - self._srci_dpa_id = srci_dpa_id + if not isinstance(obj, dict): + return cls.model_validate(obj) - @property - def src_initiator_id(self): - """Gets the src_initiator_id of this PaymentMethodsMetadataClickToPayVisa. # noqa: E501 + _obj = cls.model_validate({ + "srciDpaId": obj.get("srciDpaId"), + "srcInitiatorId": obj.get("srcInitiatorId") + }) + return _obj - :return: The src_initiator_id of this PaymentMethodsMetadataClickToPayVisa. # noqa: E501 - :rtype: str - """ - return self._src_initiator_id - - @src_initiator_id.setter - def src_initiator_id(self, src_initiator_id): - """Sets the src_initiator_id of this PaymentMethodsMetadataClickToPayVisa. - - - :param src_initiator_id: The src_initiator_id of this PaymentMethodsMetadataClickToPayVisa. # noqa: E501 - :type: str - """ - - self._src_initiator_id = src_initiator_id - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, PaymentMethodsMetadataClickToPayVisa): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, PaymentMethodsMetadataClickToPayVisa): - return True - - return self.to_dict() != other.to_dict() diff --git a/Monei/models/payment_methods_metadata_eps.py b/Monei/models/payment_methods_metadata_eps.py index f58bccf..7a03630 100644 --- a/Monei/models/payment_methods_metadata_eps.py +++ b/Monei/models/payment_methods_metadata_eps.py @@ -3,120 +3,85 @@ """ MONEI API v1 -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

- The version of the OpenAPI document: 1.5.0 - Generated by: https://openapi-generator.tech -""" + The version of the OpenAPI document: 1.5.1 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 +from __future__ import annotations import pprint import re # noqa: F401 +import json -import six - -from Monei.configuration import Configuration - - -class PaymentMethodsMetadataEps(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self - Do not edit the class manually. +class PaymentMethodsMetadataEps(BaseModel): """ + PaymentMethodsMetadataEps + """ # noqa: E501 + countries: Optional[List[StrictStr]] = Field(default=None, description="List of countries where the payment method is available") + __properties: ClassVar[List[str]] = ["countries"] - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'countries': 'list[str]' - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) - attribute_map = { - 'countries': 'countries' - } - def __init__(self, countries=None, local_vars_configuration=None): # noqa: E501 - """PaymentMethodsMetadataEps - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) - self._countries = None - self.discriminator = None + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) - if countries is not None: - self.countries = countries + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PaymentMethodsMetadataEps from a JSON string""" + return cls.from_dict(json.loads(json_str)) - @property - def countries(self): - """Gets the countries of this PaymentMethodsMetadataEps. # noqa: E501 + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. - List of countries where the payment method is available # noqa: E501 + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: - :return: The countries of this PaymentMethodsMetadataEps. # noqa: E501 - :rtype: list[str] + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. """ - return self._countries + excluded_fields: Set[str] = set([ + ]) - @countries.setter - def countries(self, countries): - """Sets the countries of this PaymentMethodsMetadataEps. + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict - List of countries where the payment method is available # noqa: E501 + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PaymentMethodsMetadataEps from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "countries": obj.get("countries") + }) + return _obj - :param countries: The countries of this PaymentMethodsMetadataEps. # noqa: E501 - :type: list[str] - """ - self._countries = countries - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, PaymentMethodsMetadataEps): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, PaymentMethodsMetadataEps): - return True - - return self.to_dict() != other.to_dict() diff --git a/Monei/models/payment_methods_metadata_giropay.py b/Monei/models/payment_methods_metadata_giropay.py index f096ed8..d6a8b97 100644 --- a/Monei/models/payment_methods_metadata_giropay.py +++ b/Monei/models/payment_methods_metadata_giropay.py @@ -3,120 +3,85 @@ """ MONEI API v1 -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

- The version of the OpenAPI document: 1.5.0 - Generated by: https://openapi-generator.tech -""" + The version of the OpenAPI document: 1.5.1 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 +from __future__ import annotations import pprint import re # noqa: F401 +import json -import six - -from Monei.configuration import Configuration - - -class PaymentMethodsMetadataGiropay(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self - Do not edit the class manually. +class PaymentMethodsMetadataGiropay(BaseModel): """ + PaymentMethodsMetadataGiropay + """ # noqa: E501 + countries: Optional[List[StrictStr]] = Field(default=None, description="List of countries where the payment method is available") + __properties: ClassVar[List[str]] = ["countries"] - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'countries': 'list[str]' - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) - attribute_map = { - 'countries': 'countries' - } - def __init__(self, countries=None, local_vars_configuration=None): # noqa: E501 - """PaymentMethodsMetadataGiropay - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) - self._countries = None - self.discriminator = None + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) - if countries is not None: - self.countries = countries + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PaymentMethodsMetadataGiropay from a JSON string""" + return cls.from_dict(json.loads(json_str)) - @property - def countries(self): - """Gets the countries of this PaymentMethodsMetadataGiropay. # noqa: E501 + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. - List of countries where the payment method is available # noqa: E501 + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: - :return: The countries of this PaymentMethodsMetadataGiropay. # noqa: E501 - :rtype: list[str] + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. """ - return self._countries + excluded_fields: Set[str] = set([ + ]) - @countries.setter - def countries(self, countries): - """Sets the countries of this PaymentMethodsMetadataGiropay. + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict - List of countries where the payment method is available # noqa: E501 + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PaymentMethodsMetadataGiropay from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "countries": obj.get("countries") + }) + return _obj - :param countries: The countries of this PaymentMethodsMetadataGiropay. # noqa: E501 - :type: list[str] - """ - self._countries = countries - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, PaymentMethodsMetadataGiropay): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, PaymentMethodsMetadataGiropay): - return True - - return self.to_dict() != other.to_dict() diff --git a/Monei/models/payment_methods_metadata_google_pay.py b/Monei/models/payment_methods_metadata_google_pay.py index 7b8f1ac..269ef0b 100644 --- a/Monei/models/payment_methods_metadata_google_pay.py +++ b/Monei/models/payment_methods_metadata_google_pay.py @@ -3,148 +3,87 @@ """ MONEI API v1 -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

- The version of the OpenAPI document: 1.5.0 - Generated by: https://openapi-generator.tech -""" + The version of the OpenAPI document: 1.5.1 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 +from __future__ import annotations import pprint import re # noqa: F401 +import json -import six - -from Monei.configuration import Configuration - - -class PaymentMethodsMetadataGooglePay(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self +class PaymentMethodsMetadataGooglePay(BaseModel): """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'merchant_id': 'str', - 'cvc_required': 'bool' - } - - attribute_map = { - 'merchant_id': 'merchantId', - 'cvc_required': 'cvcRequired' - } - - def __init__(self, merchant_id=None, cvc_required=None, local_vars_configuration=None): # noqa: E501 - """PaymentMethodsMetadataGooglePay - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._merchant_id = None - self._cvc_required = None - self.discriminator = None - - if merchant_id is not None: - self.merchant_id = merchant_id - if cvc_required is not None: - self.cvc_required = cvc_required - - @property - def merchant_id(self): - """Gets the merchant_id of this PaymentMethodsMetadataGooglePay. # noqa: E501 - - Google Pay merchant ID # noqa: E501 - - :return: The merchant_id of this PaymentMethodsMetadataGooglePay. # noqa: E501 - :rtype: str + PaymentMethodsMetadataGooglePay + """ # noqa: E501 + merchant_id: Optional[StrictStr] = Field(default=None, description="Google Pay merchant ID", alias="merchantId") + cvc_required: Optional[StrictBool] = Field(default=None, description="Whether CVC is required for Google Pay transactions", alias="cvcRequired") + __properties: ClassVar[List[str]] = ["merchantId", "cvcRequired"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PaymentMethodsMetadataGooglePay from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. """ - return self._merchant_id - - @merchant_id.setter - def merchant_id(self, merchant_id): - """Sets the merchant_id of this PaymentMethodsMetadataGooglePay. + excluded_fields: Set[str] = set([ + ]) - Google Pay merchant ID # noqa: E501 + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict - :param merchant_id: The merchant_id of this PaymentMethodsMetadataGooglePay. # noqa: E501 - :type: str - """ + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PaymentMethodsMetadataGooglePay from a dict""" + if obj is None: + return None - self._merchant_id = merchant_id + if not isinstance(obj, dict): + return cls.model_validate(obj) - @property - def cvc_required(self): - """Gets the cvc_required of this PaymentMethodsMetadataGooglePay. # noqa: E501 + _obj = cls.model_validate({ + "merchantId": obj.get("merchantId"), + "cvcRequired": obj.get("cvcRequired") + }) + return _obj - Whether CVC is required for Google Pay transactions # noqa: E501 - - :return: The cvc_required of this PaymentMethodsMetadataGooglePay. # noqa: E501 - :rtype: bool - """ - return self._cvc_required - - @cvc_required.setter - def cvc_required(self, cvc_required): - """Sets the cvc_required of this PaymentMethodsMetadataGooglePay. - - Whether CVC is required for Google Pay transactions # noqa: E501 - - :param cvc_required: The cvc_required of this PaymentMethodsMetadataGooglePay. # noqa: E501 - :type: bool - """ - self._cvc_required = cvc_required - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, PaymentMethodsMetadataGooglePay): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, PaymentMethodsMetadataGooglePay): - return True - - return self.to_dict() != other.to_dict() diff --git a/Monei/models/payment_methods_metadata_i_deal.py b/Monei/models/payment_methods_metadata_i_deal.py index c5313f3..cae9d0c 100644 --- a/Monei/models/payment_methods_metadata_i_deal.py +++ b/Monei/models/payment_methods_metadata_i_deal.py @@ -3,120 +3,85 @@ """ MONEI API v1 -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

- The version of the OpenAPI document: 1.5.0 - Generated by: https://openapi-generator.tech -""" + The version of the OpenAPI document: 1.5.1 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 +from __future__ import annotations import pprint import re # noqa: F401 +import json -import six - -from Monei.configuration import Configuration - - -class PaymentMethodsMetadataIDeal(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self - Do not edit the class manually. +class PaymentMethodsMetadataIDeal(BaseModel): """ + PaymentMethodsMetadataIDeal + """ # noqa: E501 + countries: Optional[List[StrictStr]] = Field(default=None, description="List of countries where the payment method is available") + __properties: ClassVar[List[str]] = ["countries"] - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'countries': 'list[str]' - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) - attribute_map = { - 'countries': 'countries' - } - def __init__(self, countries=None, local_vars_configuration=None): # noqa: E501 - """PaymentMethodsMetadataIDeal - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) - self._countries = None - self.discriminator = None + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) - if countries is not None: - self.countries = countries + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PaymentMethodsMetadataIDeal from a JSON string""" + return cls.from_dict(json.loads(json_str)) - @property - def countries(self): - """Gets the countries of this PaymentMethodsMetadataIDeal. # noqa: E501 + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. - List of countries where the payment method is available # noqa: E501 + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: - :return: The countries of this PaymentMethodsMetadataIDeal. # noqa: E501 - :rtype: list[str] + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. """ - return self._countries + excluded_fields: Set[str] = set([ + ]) - @countries.setter - def countries(self, countries): - """Sets the countries of this PaymentMethodsMetadataIDeal. + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict - List of countries where the payment method is available # noqa: E501 + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PaymentMethodsMetadataIDeal from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "countries": obj.get("countries") + }) + return _obj - :param countries: The countries of this PaymentMethodsMetadataIDeal. # noqa: E501 - :type: list[str] - """ - self._countries = countries - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, PaymentMethodsMetadataIDeal): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, PaymentMethodsMetadataIDeal): - return True - - return self.to_dict() != other.to_dict() diff --git a/Monei/models/payment_methods_metadata_klarna.py b/Monei/models/payment_methods_metadata_klarna.py index 91271ee..e7fb21f 100644 --- a/Monei/models/payment_methods_metadata_klarna.py +++ b/Monei/models/payment_methods_metadata_klarna.py @@ -3,120 +3,85 @@ """ MONEI API v1 -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

- The version of the OpenAPI document: 1.5.0 - Generated by: https://openapi-generator.tech -""" + The version of the OpenAPI document: 1.5.1 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 +from __future__ import annotations import pprint import re # noqa: F401 +import json -import six - -from Monei.configuration import Configuration - - -class PaymentMethodsMetadataKlarna(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self - Do not edit the class manually. +class PaymentMethodsMetadataKlarna(BaseModel): """ + PaymentMethodsMetadataKlarna + """ # noqa: E501 + countries: Optional[List[StrictStr]] = Field(default=None, description="List of countries where the payment method is available") + __properties: ClassVar[List[str]] = ["countries"] - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'countries': 'list[str]' - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) - attribute_map = { - 'countries': 'countries' - } - def __init__(self, countries=None, local_vars_configuration=None): # noqa: E501 - """PaymentMethodsMetadataKlarna - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) - self._countries = None - self.discriminator = None + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) - if countries is not None: - self.countries = countries + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PaymentMethodsMetadataKlarna from a JSON string""" + return cls.from_dict(json.loads(json_str)) - @property - def countries(self): - """Gets the countries of this PaymentMethodsMetadataKlarna. # noqa: E501 + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. - List of countries where the payment method is available # noqa: E501 + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: - :return: The countries of this PaymentMethodsMetadataKlarna. # noqa: E501 - :rtype: list[str] + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. """ - return self._countries + excluded_fields: Set[str] = set([ + ]) - @countries.setter - def countries(self, countries): - """Sets the countries of this PaymentMethodsMetadataKlarna. + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict - List of countries where the payment method is available # noqa: E501 + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PaymentMethodsMetadataKlarna from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "countries": obj.get("countries") + }) + return _obj - :param countries: The countries of this PaymentMethodsMetadataKlarna. # noqa: E501 - :type: list[str] - """ - self._countries = countries - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, PaymentMethodsMetadataKlarna): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, PaymentMethodsMetadataKlarna): - return True - - return self.to_dict() != other.to_dict() diff --git a/Monei/models/payment_methods_metadata_mbway.py b/Monei/models/payment_methods_metadata_mbway.py index b2a302a..24d06f2 100644 --- a/Monei/models/payment_methods_metadata_mbway.py +++ b/Monei/models/payment_methods_metadata_mbway.py @@ -3,120 +3,85 @@ """ MONEI API v1 -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

- The version of the OpenAPI document: 1.5.0 - Generated by: https://openapi-generator.tech -""" + The version of the OpenAPI document: 1.5.1 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 +from __future__ import annotations import pprint import re # noqa: F401 +import json -import six - -from Monei.configuration import Configuration - - -class PaymentMethodsMetadataMbway(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self - Do not edit the class manually. +class PaymentMethodsMetadataMbway(BaseModel): """ + PaymentMethodsMetadataMbway + """ # noqa: E501 + countries: Optional[List[StrictStr]] = Field(default=None, description="List of countries where the payment method is available") + __properties: ClassVar[List[str]] = ["countries"] - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'countries': 'list[str]' - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) - attribute_map = { - 'countries': 'countries' - } - def __init__(self, countries=None, local_vars_configuration=None): # noqa: E501 - """PaymentMethodsMetadataMbway - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) - self._countries = None - self.discriminator = None + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) - if countries is not None: - self.countries = countries + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PaymentMethodsMetadataMbway from a JSON string""" + return cls.from_dict(json.loads(json_str)) - @property - def countries(self): - """Gets the countries of this PaymentMethodsMetadataMbway. # noqa: E501 + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. - List of countries where the payment method is available # noqa: E501 + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: - :return: The countries of this PaymentMethodsMetadataMbway. # noqa: E501 - :rtype: list[str] + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. """ - return self._countries + excluded_fields: Set[str] = set([ + ]) - @countries.setter - def countries(self, countries): - """Sets the countries of this PaymentMethodsMetadataMbway. + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict - List of countries where the payment method is available # noqa: E501 + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PaymentMethodsMetadataMbway from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "countries": obj.get("countries") + }) + return _obj - :param countries: The countries of this PaymentMethodsMetadataMbway. # noqa: E501 - :type: list[str] - """ - self._countries = countries - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, PaymentMethodsMetadataMbway): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, PaymentMethodsMetadataMbway): - return True - - return self.to_dict() != other.to_dict() diff --git a/Monei/models/payment_methods_metadata_sepa.py b/Monei/models/payment_methods_metadata_sepa.py index f0f52c0..d133d01 100644 --- a/Monei/models/payment_methods_metadata_sepa.py +++ b/Monei/models/payment_methods_metadata_sepa.py @@ -3,120 +3,85 @@ """ MONEI API v1 -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

- The version of the OpenAPI document: 1.5.0 - Generated by: https://openapi-generator.tech -""" + The version of the OpenAPI document: 1.5.1 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 +from __future__ import annotations import pprint import re # noqa: F401 +import json -import six - -from Monei.configuration import Configuration - - -class PaymentMethodsMetadataSepa(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self - Do not edit the class manually. +class PaymentMethodsMetadataSepa(BaseModel): """ + PaymentMethodsMetadataSepa + """ # noqa: E501 + countries: Optional[List[StrictStr]] = Field(default=None, description="List of countries where the payment method is available") + __properties: ClassVar[List[str]] = ["countries"] - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'countries': 'list[str]' - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) - attribute_map = { - 'countries': 'countries' - } - def __init__(self, countries=None, local_vars_configuration=None): # noqa: E501 - """PaymentMethodsMetadataSepa - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) - self._countries = None - self.discriminator = None + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) - if countries is not None: - self.countries = countries + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PaymentMethodsMetadataSepa from a JSON string""" + return cls.from_dict(json.loads(json_str)) - @property - def countries(self): - """Gets the countries of this PaymentMethodsMetadataSepa. # noqa: E501 + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. - List of countries where the payment method is available # noqa: E501 + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: - :return: The countries of this PaymentMethodsMetadataSepa. # noqa: E501 - :rtype: list[str] + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. """ - return self._countries + excluded_fields: Set[str] = set([ + ]) - @countries.setter - def countries(self, countries): - """Sets the countries of this PaymentMethodsMetadataSepa. + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict - List of countries where the payment method is available # noqa: E501 + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PaymentMethodsMetadataSepa from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "countries": obj.get("countries") + }) + return _obj - :param countries: The countries of this PaymentMethodsMetadataSepa. # noqa: E501 - :type: list[str] - """ - self._countries = countries - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, PaymentMethodsMetadataSepa): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, PaymentMethodsMetadataSepa): - return True - - return self.to_dict() != other.to_dict() diff --git a/Monei/models/payment_methods_metadata_sofort.py b/Monei/models/payment_methods_metadata_sofort.py index 7e7e578..db88586 100644 --- a/Monei/models/payment_methods_metadata_sofort.py +++ b/Monei/models/payment_methods_metadata_sofort.py @@ -3,120 +3,85 @@ """ MONEI API v1 -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

- The version of the OpenAPI document: 1.5.0 - Generated by: https://openapi-generator.tech -""" + The version of the OpenAPI document: 1.5.1 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 +from __future__ import annotations import pprint import re # noqa: F401 +import json -import six - -from Monei.configuration import Configuration - - -class PaymentMethodsMetadataSofort(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self - Do not edit the class manually. +class PaymentMethodsMetadataSofort(BaseModel): """ + PaymentMethodsMetadataSofort + """ # noqa: E501 + countries: Optional[List[StrictStr]] = Field(default=None, description="List of countries where the payment method is available") + __properties: ClassVar[List[str]] = ["countries"] - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'countries': 'list[str]' - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) - attribute_map = { - 'countries': 'countries' - } - def __init__(self, countries=None, local_vars_configuration=None): # noqa: E501 - """PaymentMethodsMetadataSofort - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) - self._countries = None - self.discriminator = None + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) - if countries is not None: - self.countries = countries + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PaymentMethodsMetadataSofort from a JSON string""" + return cls.from_dict(json.loads(json_str)) - @property - def countries(self): - """Gets the countries of this PaymentMethodsMetadataSofort. # noqa: E501 + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. - List of countries where the payment method is available # noqa: E501 + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: - :return: The countries of this PaymentMethodsMetadataSofort. # noqa: E501 - :rtype: list[str] + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. """ - return self._countries + excluded_fields: Set[str] = set([ + ]) - @countries.setter - def countries(self, countries): - """Sets the countries of this PaymentMethodsMetadataSofort. + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict - List of countries where the payment method is available # noqa: E501 + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PaymentMethodsMetadataSofort from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "countries": obj.get("countries") + }) + return _obj - :param countries: The countries of this PaymentMethodsMetadataSofort. # noqa: E501 - :type: list[str] - """ - self._countries = countries - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, PaymentMethodsMetadataSofort): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, PaymentMethodsMetadataSofort): - return True - - return self.to_dict() != other.to_dict() diff --git a/Monei/models/payment_methods_metadata_trustly.py b/Monei/models/payment_methods_metadata_trustly.py index 5c3a3c1..00fe682 100644 --- a/Monei/models/payment_methods_metadata_trustly.py +++ b/Monei/models/payment_methods_metadata_trustly.py @@ -3,120 +3,85 @@ """ MONEI API v1 -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

- The version of the OpenAPI document: 1.5.0 - Generated by: https://openapi-generator.tech -""" + The version of the OpenAPI document: 1.5.1 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 +from __future__ import annotations import pprint import re # noqa: F401 +import json -import six - -from Monei.configuration import Configuration - - -class PaymentMethodsMetadataTrustly(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self - Do not edit the class manually. +class PaymentMethodsMetadataTrustly(BaseModel): """ + PaymentMethodsMetadataTrustly + """ # noqa: E501 + countries: Optional[List[StrictStr]] = Field(default=None, description="List of countries where the payment method is available") + __properties: ClassVar[List[str]] = ["countries"] - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'countries': 'list[str]' - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) - attribute_map = { - 'countries': 'countries' - } - def __init__(self, countries=None, local_vars_configuration=None): # noqa: E501 - """PaymentMethodsMetadataTrustly - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) - self._countries = None - self.discriminator = None + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) - if countries is not None: - self.countries = countries + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PaymentMethodsMetadataTrustly from a JSON string""" + return cls.from_dict(json.loads(json_str)) - @property - def countries(self): - """Gets the countries of this PaymentMethodsMetadataTrustly. # noqa: E501 + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. - List of countries where the payment method is available # noqa: E501 + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: - :return: The countries of this PaymentMethodsMetadataTrustly. # noqa: E501 - :rtype: list[str] + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. """ - return self._countries + excluded_fields: Set[str] = set([ + ]) - @countries.setter - def countries(self, countries): - """Sets the countries of this PaymentMethodsMetadataTrustly. + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict - List of countries where the payment method is available # noqa: E501 + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PaymentMethodsMetadataTrustly from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "countries": obj.get("countries") + }) + return _obj - :param countries: The countries of this PaymentMethodsMetadataTrustly. # noqa: E501 - :type: list[str] - """ - self._countries = countries - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, PaymentMethodsMetadataTrustly): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, PaymentMethodsMetadataTrustly): - return True - - return self.to_dict() != other.to_dict() diff --git a/Monei/models/payment_next_action.py b/Monei/models/payment_next_action.py index e79a3a6..72fed36 100644 --- a/Monei/models/payment_next_action.py +++ b/Monei/models/payment_next_action.py @@ -3,182 +3,99 @@ """ MONEI API v1 -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

- The version of the OpenAPI document: 1.5.0 - Generated by: https://openapi-generator.tech -""" + The version of the OpenAPI document: 1.5.1 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 +from __future__ import annotations import pprint import re # noqa: F401 +import json -import six - -from Monei.configuration import Configuration - - -class PaymentNextAction(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self +class PaymentNextAction(BaseModel): """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'type': 'str', - 'must_redirect': 'bool', - 'redirect_url': 'str' - } - - attribute_map = { - 'type': 'type', - 'must_redirect': 'mustRedirect', - 'redirect_url': 'redirectUrl' - } - - def __init__(self, type=None, must_redirect=None, redirect_url=None, local_vars_configuration=None): # noqa: E501 - """PaymentNextAction - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._type = None - self._must_redirect = None - self._redirect_url = None - self.discriminator = None - - if type is not None: - self.type = type - if must_redirect is not None: - self.must_redirect = must_redirect - if redirect_url is not None: - self.redirect_url = redirect_url - - @property - def type(self): - """Gets the type of this PaymentNextAction. # noqa: E501 - - - `CONFIRM` - Your customer needs to be redirected to a [hosted payment page](https://docs.monei.com/docs/use-prebuilt-payment-page) or confirm payment using [payment token](https://docs.monei.com/docs/accept-card-payment#3-submitting-the-payment-to-monei-client-side). The **redirectUrl** will point to the hosted payment page. - `FRICTIONLESS_CHALLENGE` - Your customer needs to be redirected to the frictionless 3d secure challenge page provided by the bank. The **redirectUrl** will point to the frictionless 3d secure challenge page provided by the bank. - `CHALLENGE` - Your customer needs to be redirected to the 3d secure challenge page provided by the bank. The **redirectUrl** will point to the 3d secure challenge page provided by the bank. - `COMPLETE` - The payment is completed. The **redirectUrl** will be the **completeUrl** if it was provided when the payment was created. - `BIZUM_CHALLENGE` - Your customer will be redirected to the Bizum hosted payment page. # noqa: E501 - - :return: The type of this PaymentNextAction. # noqa: E501 - :rtype: str + If present, this property tells you what actions you need to take in order for your customer to fulfill a payment using the provided source. + """ # noqa: E501 + type: Optional[StrictStr] = Field(default=None, description="- `CONFIRM` - Your customer needs to be redirected to a [hosted payment page](https://docs.monei.com/docs/use-prebuilt-payment-page) or confirm payment using [payment token](https://docs.monei.com/docs/accept-card-payment#3-submitting-the-payment-to-monei-client-side). The **redirectUrl** will point to the hosted payment page. - `FRICTIONLESS_CHALLENGE` - Your customer needs to be redirected to the frictionless 3d secure challenge page provided by the bank. The **redirectUrl** will point to the frictionless 3d secure challenge page provided by the bank. - `CHALLENGE` - Your customer needs to be redirected to the 3d secure challenge page provided by the bank. The **redirectUrl** will point to the 3d secure challenge page provided by the bank. - `COMPLETE` - The payment is completed. The **redirectUrl** will be the **completeUrl** if it was provided when the payment was created. - `BIZUM_CHALLENGE` - Your customer will be redirected to the Bizum hosted payment page. ") + must_redirect: Optional[StrictBool] = Field(default=None, description="If `true` you have to redirect your customer to the **redirectUrl** to continue payment process. ", alias="mustRedirect") + redirect_url: Optional[StrictStr] = Field(default=None, description="Redirect your customer to this url to continue payment process. ", alias="redirectUrl") + __properties: ClassVar[List[str]] = ["type", "mustRedirect", "redirectUrl"] + + @field_validator('type') + def type_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['CONFIRM', 'CHALLENGE', 'FRICTIONLESS_CHALLENGE', 'BIZUM_CHALLENGE', 'COMPLETE']): + raise ValueError("must be one of enum values ('CONFIRM', 'CHALLENGE', 'FRICTIONLESS_CHALLENGE', 'BIZUM_CHALLENGE', 'COMPLETE')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PaymentNextAction from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. """ - return self._type + excluded_fields: Set[str] = set([ + ]) - @type.setter - def type(self, type): - """Sets the type of this PaymentNextAction. + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict - - `CONFIRM` - Your customer needs to be redirected to a [hosted payment page](https://docs.monei.com/docs/use-prebuilt-payment-page) or confirm payment using [payment token](https://docs.monei.com/docs/accept-card-payment#3-submitting-the-payment-to-monei-client-side). The **redirectUrl** will point to the hosted payment page. - `FRICTIONLESS_CHALLENGE` - Your customer needs to be redirected to the frictionless 3d secure challenge page provided by the bank. The **redirectUrl** will point to the frictionless 3d secure challenge page provided by the bank. - `CHALLENGE` - Your customer needs to be redirected to the 3d secure challenge page provided by the bank. The **redirectUrl** will point to the 3d secure challenge page provided by the bank. - `COMPLETE` - The payment is completed. The **redirectUrl** will be the **completeUrl** if it was provided when the payment was created. - `BIZUM_CHALLENGE` - Your customer will be redirected to the Bizum hosted payment page. # noqa: E501 + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PaymentNextAction from a dict""" + if obj is None: + return None - :param type: The type of this PaymentNextAction. # noqa: E501 - :type: str - """ - allowed_values = ["CONFIRM", "CHALLENGE", "FRICTIONLESS_CHALLENGE", "BIZUM_CHALLENGE", "COMPLETE"] # noqa: E501 - if self.local_vars_configuration.client_side_validation and type not in allowed_values: # noqa: E501 - raise ValueError( - "Invalid value for `type` ({0}), must be one of {1}" # noqa: E501 - .format(type, allowed_values) - ) + if not isinstance(obj, dict): + return cls.model_validate(obj) - self._type = type + _obj = cls.model_validate({ + "type": obj.get("type"), + "mustRedirect": obj.get("mustRedirect"), + "redirectUrl": obj.get("redirectUrl") + }) + return _obj - @property - def must_redirect(self): - """Gets the must_redirect of this PaymentNextAction. # noqa: E501 - - If `true` you have to redirect your customer to the **redirectUrl** to continue payment process. # noqa: E501 - - :return: The must_redirect of this PaymentNextAction. # noqa: E501 - :rtype: bool - """ - return self._must_redirect - - @must_redirect.setter - def must_redirect(self, must_redirect): - """Sets the must_redirect of this PaymentNextAction. - - If `true` you have to redirect your customer to the **redirectUrl** to continue payment process. # noqa: E501 - - :param must_redirect: The must_redirect of this PaymentNextAction. # noqa: E501 - :type: bool - """ - - self._must_redirect = must_redirect - - @property - def redirect_url(self): - """Gets the redirect_url of this PaymentNextAction. # noqa: E501 - - Redirect your customer to this url to continue payment process. # noqa: E501 - - :return: The redirect_url of this PaymentNextAction. # noqa: E501 - :rtype: str - """ - return self._redirect_url - - @redirect_url.setter - def redirect_url(self, redirect_url): - """Sets the redirect_url of this PaymentNextAction. - - Redirect your customer to this url to continue payment process. # noqa: E501 - - :param redirect_url: The redirect_url of this PaymentNextAction. # noqa: E501 - :type: str - """ - self._redirect_url = redirect_url - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, PaymentNextAction): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, PaymentNextAction): - return True - - return self.to_dict() != other.to_dict() diff --git a/Monei/models/payment_payment_method.py b/Monei/models/payment_payment_method.py index 26cb9d4..060a98f 100644 --- a/Monei/models/payment_payment_method.py +++ b/Monei/models/payment_payment_method.py @@ -3,360 +3,148 @@ """ MONEI API v1 -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

- The version of the OpenAPI document: 1.5.0 - Generated by: https://openapi-generator.tech -""" + The version of the OpenAPI document: 1.5.1 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 +from __future__ import annotations import pprint import re # noqa: F401 - -import six - -from Monei.configuration import Configuration - - -class PaymentPaymentMethod(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from Monei.models.payment_payment_method_bizum import PaymentPaymentMethodBizum +from Monei.models.payment_payment_method_card import PaymentPaymentMethodCard +from Monei.models.payment_payment_method_cofidis import PaymentPaymentMethodCofidis +from Monei.models.payment_payment_method_klarna import PaymentPaymentMethodKlarna +from Monei.models.payment_payment_method_mbway import PaymentPaymentMethodMbway +from Monei.models.payment_payment_method_paypal import PaymentPaymentMethodPaypal +from Monei.models.payment_payment_method_sepa import PaymentPaymentMethodSepa +from Monei.models.payment_payment_method_trustly import PaymentPaymentMethodTrustly +from typing import Optional, Set +from typing_extensions import Self + +class PaymentPaymentMethod(BaseModel): """ - openapi_types = { - 'method': 'str', - 'card': 'PaymentPaymentMethodCard', - 'bizum': 'PaymentPaymentMethodBizum', - 'paypal': 'PaymentPaymentMethodPaypal', - 'cofidis': 'PaymentPaymentMethodCofidis', - 'cofidis_loan': 'PaymentPaymentMethodCofidis', - 'mbway': 'PaymentPaymentMethodMbway', - 'trustly': 'PaymentPaymentMethodTrustly', - 'sepa': 'PaymentPaymentMethodSepa', - 'klarna': 'PaymentPaymentMethodKlarna' - } - - attribute_map = { - 'method': 'method', - 'card': 'card', - 'bizum': 'bizum', - 'paypal': 'paypal', - 'cofidis': 'cofidis', - 'cofidis_loan': 'cofidisLoan', - 'mbway': 'mbway', - 'trustly': 'trustly', - 'sepa': 'sepa', - 'klarna': 'klarna' - } - - def __init__(self, method=None, card=None, bizum=None, paypal=None, cofidis=None, cofidis_loan=None, mbway=None, trustly=None, sepa=None, klarna=None, local_vars_configuration=None): # noqa: E501 - """PaymentPaymentMethod - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._method = None - self._card = None - self._bizum = None - self._paypal = None - self._cofidis = None - self._cofidis_loan = None - self._mbway = None - self._trustly = None - self._sepa = None - self._klarna = None - self.discriminator = None - - if method is not None: - self.method = method - if card is not None: - self.card = card - if bizum is not None: - self.bizum = bizum - if paypal is not None: - self.paypal = paypal - if cofidis is not None: - self.cofidis = cofidis - if cofidis_loan is not None: - self.cofidis_loan = cofidis_loan - if mbway is not None: - self.mbway = mbway - if trustly is not None: - self.trustly = trustly - if sepa is not None: - self.sepa = sepa - if klarna is not None: - self.klarna = klarna - - @property - def method(self): - """Gets the method of this PaymentPaymentMethod. # noqa: E501 - - Payment method type. # noqa: E501 - - :return: The method of this PaymentPaymentMethod. # noqa: E501 - :rtype: str - """ - return self._method - - @method.setter - def method(self, method): - """Sets the method of this PaymentPaymentMethod. - - Payment method type. # noqa: E501 - - :param method: The method of this PaymentPaymentMethod. # noqa: E501 - :type: str - """ - allowed_values = ["alipay", "card", "bizum", "paypal", "cofidis", "cofidisLoan", "mbway", "multibanco", "iDeal", "bancontact", "sofort", "trustly", "sepa", "klarna", "giropay", "eps", "blik"] # noqa: E501 - if self.local_vars_configuration.client_side_validation and method not in allowed_values: # noqa: E501 - raise ValueError( - "Invalid value for `method` ({0}), must be one of {1}" # noqa: E501 - .format(method, allowed_values) - ) - - self._method = method - - @property - def card(self): - """Gets the card of this PaymentPaymentMethod. # noqa: E501 - - - :return: The card of this PaymentPaymentMethod. # noqa: E501 - :rtype: PaymentPaymentMethodCard - """ - return self._card - - @card.setter - def card(self, card): - """Sets the card of this PaymentPaymentMethod. - - - :param card: The card of this PaymentPaymentMethod. # noqa: E501 - :type: PaymentPaymentMethodCard - """ - - self._card = card - - @property - def bizum(self): - """Gets the bizum of this PaymentPaymentMethod. # noqa: E501 - - - :return: The bizum of this PaymentPaymentMethod. # noqa: E501 - :rtype: PaymentPaymentMethodBizum - """ - return self._bizum - - @bizum.setter - def bizum(self, bizum): - """Sets the bizum of this PaymentPaymentMethod. - - - :param bizum: The bizum of this PaymentPaymentMethod. # noqa: E501 - :type: PaymentPaymentMethodBizum - """ - - self._bizum = bizum - - @property - def paypal(self): - """Gets the paypal of this PaymentPaymentMethod. # noqa: E501 - - - :return: The paypal of this PaymentPaymentMethod. # noqa: E501 - :rtype: PaymentPaymentMethodPaypal - """ - return self._paypal - - @paypal.setter - def paypal(self, paypal): - """Sets the paypal of this PaymentPaymentMethod. - - - :param paypal: The paypal of this PaymentPaymentMethod. # noqa: E501 - :type: PaymentPaymentMethodPaypal - """ - - self._paypal = paypal - - @property - def cofidis(self): - """Gets the cofidis of this PaymentPaymentMethod. # noqa: E501 - - - :return: The cofidis of this PaymentPaymentMethod. # noqa: E501 - :rtype: PaymentPaymentMethodCofidis - """ - return self._cofidis - - @cofidis.setter - def cofidis(self, cofidis): - """Sets the cofidis of this PaymentPaymentMethod. - - - :param cofidis: The cofidis of this PaymentPaymentMethod. # noqa: E501 - :type: PaymentPaymentMethodCofidis - """ - - self._cofidis = cofidis - - @property - def cofidis_loan(self): - """Gets the cofidis_loan of this PaymentPaymentMethod. # noqa: E501 - - - :return: The cofidis_loan of this PaymentPaymentMethod. # noqa: E501 - :rtype: PaymentPaymentMethodCofidis - """ - return self._cofidis_loan - - @cofidis_loan.setter - def cofidis_loan(self, cofidis_loan): - """Sets the cofidis_loan of this PaymentPaymentMethod. - - - :param cofidis_loan: The cofidis_loan of this PaymentPaymentMethod. # noqa: E501 - :type: PaymentPaymentMethodCofidis - """ - - self._cofidis_loan = cofidis_loan - - @property - def mbway(self): - """Gets the mbway of this PaymentPaymentMethod. # noqa: E501 - - - :return: The mbway of this PaymentPaymentMethod. # noqa: E501 - :rtype: PaymentPaymentMethodMbway - """ - return self._mbway - - @mbway.setter - def mbway(self, mbway): - """Sets the mbway of this PaymentPaymentMethod. - - - :param mbway: The mbway of this PaymentPaymentMethod. # noqa: E501 - :type: PaymentPaymentMethodMbway - """ - - self._mbway = mbway - - @property - def trustly(self): - """Gets the trustly of this PaymentPaymentMethod. # noqa: E501 - - - :return: The trustly of this PaymentPaymentMethod. # noqa: E501 - :rtype: PaymentPaymentMethodTrustly - """ - return self._trustly - - @trustly.setter - def trustly(self, trustly): - """Sets the trustly of this PaymentPaymentMethod. - - - :param trustly: The trustly of this PaymentPaymentMethod. # noqa: E501 - :type: PaymentPaymentMethodTrustly - """ - - self._trustly = trustly - - @property - def sepa(self): - """Gets the sepa of this PaymentPaymentMethod. # noqa: E501 - - - :return: The sepa of this PaymentPaymentMethod. # noqa: E501 - :rtype: PaymentPaymentMethodSepa - """ - return self._sepa - - @sepa.setter - def sepa(self, sepa): - """Sets the sepa of this PaymentPaymentMethod. - - - :param sepa: The sepa of this PaymentPaymentMethod. # noqa: E501 - :type: PaymentPaymentMethodSepa - """ - - self._sepa = sepa - - @property - def klarna(self): - """Gets the klarna of this PaymentPaymentMethod. # noqa: E501 - - - :return: The klarna of this PaymentPaymentMethod. # noqa: E501 - :rtype: PaymentPaymentMethodKlarna - """ - return self._klarna - - @klarna.setter - def klarna(self, klarna): - """Sets the klarna of this PaymentPaymentMethod. - - - :param klarna: The klarna of this PaymentPaymentMethod. # noqa: E501 - :type: PaymentPaymentMethodKlarna - """ - - self._klarna = klarna - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, PaymentPaymentMethod): - return False - - return self.to_dict() == other.to_dict() + Details about the payment method at the time of the transaction. + """ # noqa: E501 + method: Optional[StrictStr] = Field(default=None, description="Payment method type.") + card: Optional[PaymentPaymentMethodCard] = None + bizum: Optional[PaymentPaymentMethodBizum] = None + paypal: Optional[PaymentPaymentMethodPaypal] = None + cofidis: Optional[PaymentPaymentMethodCofidis] = None + cofidis_loan: Optional[PaymentPaymentMethodCofidis] = Field(default=None, alias="cofidisLoan") + mbway: Optional[PaymentPaymentMethodMbway] = None + trustly: Optional[PaymentPaymentMethodTrustly] = None + sepa: Optional[PaymentPaymentMethodSepa] = None + klarna: Optional[PaymentPaymentMethodKlarna] = None + __properties: ClassVar[List[str]] = ["method", "card", "bizum", "paypal", "cofidis", "cofidisLoan", "mbway", "trustly", "sepa", "klarna"] + + @field_validator('method') + def method_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['alipay', 'card', 'bizum', 'paypal', 'cofidis', 'cofidisLoan', 'mbway', 'multibanco', 'iDeal', 'bancontact', 'sofort', 'trustly', 'sepa', 'klarna', 'giropay', 'eps', 'blik']): + raise ValueError("must be one of enum values ('alipay', 'card', 'bizum', 'paypal', 'cofidis', 'cofidisLoan', 'mbway', 'multibanco', 'iDeal', 'bancontact', 'sofort', 'trustly', 'sepa', 'klarna', 'giropay', 'eps', 'blik')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PaymentPaymentMethod from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of card + if self.card: + _dict['card'] = self.card.to_dict() + # override the default output from pydantic by calling `to_dict()` of bizum + if self.bizum: + _dict['bizum'] = self.bizum.to_dict() + # override the default output from pydantic by calling `to_dict()` of paypal + if self.paypal: + _dict['paypal'] = self.paypal.to_dict() + # override the default output from pydantic by calling `to_dict()` of cofidis + if self.cofidis: + _dict['cofidis'] = self.cofidis.to_dict() + # override the default output from pydantic by calling `to_dict()` of cofidis_loan + if self.cofidis_loan: + _dict['cofidisLoan'] = self.cofidis_loan.to_dict() + # override the default output from pydantic by calling `to_dict()` of mbway + if self.mbway: + _dict['mbway'] = self.mbway.to_dict() + # override the default output from pydantic by calling `to_dict()` of trustly + if self.trustly: + _dict['trustly'] = self.trustly.to_dict() + # override the default output from pydantic by calling `to_dict()` of sepa + if self.sepa: + _dict['sepa'] = self.sepa.to_dict() + # override the default output from pydantic by calling `to_dict()` of klarna + if self.klarna: + _dict['klarna'] = self.klarna.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PaymentPaymentMethod from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "method": obj.get("method"), + "card": PaymentPaymentMethodCard.from_dict(obj["card"]) if obj.get("card") is not None else None, + "bizum": PaymentPaymentMethodBizum.from_dict(obj["bizum"]) if obj.get("bizum") is not None else None, + "paypal": PaymentPaymentMethodPaypal.from_dict(obj["paypal"]) if obj.get("paypal") is not None else None, + "cofidis": PaymentPaymentMethodCofidis.from_dict(obj["cofidis"]) if obj.get("cofidis") is not None else None, + "cofidisLoan": PaymentPaymentMethodCofidis.from_dict(obj["cofidisLoan"]) if obj.get("cofidisLoan") is not None else None, + "mbway": PaymentPaymentMethodMbway.from_dict(obj["mbway"]) if obj.get("mbway") is not None else None, + "trustly": PaymentPaymentMethodTrustly.from_dict(obj["trustly"]) if obj.get("trustly") is not None else None, + "sepa": PaymentPaymentMethodSepa.from_dict(obj["sepa"]) if obj.get("sepa") is not None else None, + "klarna": PaymentPaymentMethodKlarna.from_dict(obj["klarna"]) if obj.get("klarna") is not None else None + }) + return _obj - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, PaymentPaymentMethod): - return True - return self.to_dict() != other.to_dict() diff --git a/Monei/models/payment_payment_method_bizum.py b/Monei/models/payment_payment_method_bizum.py index f099b46..9667a7c 100644 --- a/Monei/models/payment_payment_method_bizum.py +++ b/Monei/models/payment_payment_method_bizum.py @@ -3,120 +3,85 @@ """ MONEI API v1 -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

- The version of the OpenAPI document: 1.5.0 - Generated by: https://openapi-generator.tech -""" + The version of the OpenAPI document: 1.5.1 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 +from __future__ import annotations import pprint import re # noqa: F401 +import json -import six - -from Monei.configuration import Configuration - - -class PaymentPaymentMethodBizum(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self - Do not edit the class manually. +class PaymentPaymentMethodBizum(BaseModel): """ + Details about the Bizum account used as payment method at the time of the transaction. + """ # noqa: E501 + phone_number: Optional[StrictStr] = Field(default=None, description="Phone number in E.164 format used to pay with `bizum`.", alias="phoneNumber") + __properties: ClassVar[List[str]] = ["phoneNumber"] - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'phone_number': 'str' - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) - attribute_map = { - 'phone_number': 'phoneNumber' - } - def __init__(self, phone_number=None, local_vars_configuration=None): # noqa: E501 - """PaymentPaymentMethodBizum - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) - self._phone_number = None - self.discriminator = None + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) - if phone_number is not None: - self.phone_number = phone_number + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PaymentPaymentMethodBizum from a JSON string""" + return cls.from_dict(json.loads(json_str)) - @property - def phone_number(self): - """Gets the phone_number of this PaymentPaymentMethodBizum. # noqa: E501 + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. - Phone number in E.164 format used to pay with `bizum`. # noqa: E501 + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: - :return: The phone_number of this PaymentPaymentMethodBizum. # noqa: E501 - :rtype: str + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. """ - return self._phone_number + excluded_fields: Set[str] = set([ + ]) - @phone_number.setter - def phone_number(self, phone_number): - """Sets the phone_number of this PaymentPaymentMethodBizum. + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict - Phone number in E.164 format used to pay with `bizum`. # noqa: E501 + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PaymentPaymentMethodBizum from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "phoneNumber": obj.get("phoneNumber") + }) + return _obj - :param phone_number: The phone_number of this PaymentPaymentMethodBizum. # noqa: E501 - :type: str - """ - self._phone_number = phone_number - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, PaymentPaymentMethodBizum): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, PaymentPaymentMethodBizum): - return True - - return self.to_dict() != other.to_dict() diff --git a/Monei/models/payment_payment_method_bizum_input.py b/Monei/models/payment_payment_method_bizum_input.py index c8d59cf..1600d00 100644 --- a/Monei/models/payment_payment_method_bizum_input.py +++ b/Monei/models/payment_payment_method_bizum_input.py @@ -3,120 +3,85 @@ """ MONEI API v1 -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

- The version of the OpenAPI document: 1.5.0 - Generated by: https://openapi-generator.tech -""" + The version of the OpenAPI document: 1.5.1 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 +from __future__ import annotations import pprint import re # noqa: F401 +import json -import six - -from Monei.configuration import Configuration - - -class PaymentPaymentMethodBizumInput(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self - Do not edit the class manually. +class PaymentPaymentMethodBizumInput(BaseModel): """ + Details about the Bizum account used for this payment. If provided phone number is valid and registered in Bizum, MONEI will try to confirm the payment directly. + """ # noqa: E501 + phone_number: Optional[StrictStr] = Field(default=None, description="Phone number in E.164 format used to pay with `bizum`.", alias="phoneNumber") + __properties: ClassVar[List[str]] = ["phoneNumber"] - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'phone_number': 'str' - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) - attribute_map = { - 'phone_number': 'phoneNumber' - } - def __init__(self, phone_number=None, local_vars_configuration=None): # noqa: E501 - """PaymentPaymentMethodBizumInput - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) - self._phone_number = None - self.discriminator = None + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) - if phone_number is not None: - self.phone_number = phone_number + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PaymentPaymentMethodBizumInput from a JSON string""" + return cls.from_dict(json.loads(json_str)) - @property - def phone_number(self): - """Gets the phone_number of this PaymentPaymentMethodBizumInput. # noqa: E501 + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. - Phone number in E.164 format used to pay with `bizum`. # noqa: E501 + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: - :return: The phone_number of this PaymentPaymentMethodBizumInput. # noqa: E501 - :rtype: str + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. """ - return self._phone_number + excluded_fields: Set[str] = set([ + ]) - @phone_number.setter - def phone_number(self, phone_number): - """Sets the phone_number of this PaymentPaymentMethodBizumInput. + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict - Phone number in E.164 format used to pay with `bizum`. # noqa: E501 + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PaymentPaymentMethodBizumInput from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "phoneNumber": obj.get("phoneNumber") + }) + return _obj - :param phone_number: The phone_number of this PaymentPaymentMethodBizumInput. # noqa: E501 - :type: str - """ - self._phone_number = phone_number - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, PaymentPaymentMethodBizumInput): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, PaymentPaymentMethodBizumInput): - return True - - return self.to_dict() != other.to_dict() diff --git a/Monei/models/payment_payment_method_card.py b/Monei/models/payment_payment_method_card.py index a7795cb..378c229 100644 --- a/Monei/models/payment_payment_method_card.py +++ b/Monei/models/payment_payment_method_card.py @@ -3,424 +3,145 @@ """ MONEI API v1 -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

- The version of the OpenAPI document: 1.5.0 - Generated by: https://openapi-generator.tech -""" + The version of the OpenAPI document: 1.5.1 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 +from __future__ import annotations import pprint import re # noqa: F401 +import json -import six - -from Monei.configuration import Configuration +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self - -class PaymentPaymentMethodCard(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. +class PaymentPaymentMethodCard(BaseModel): """ + Details about the card used as payment method at the time of the transaction. + """ # noqa: E501 + country: Optional[StrictStr] = Field(default=None, description="Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).") + brand: Optional[StrictStr] = Field(default=None, description="Card brand.") + type: Optional[StrictStr] = Field(default=None, description="Card type `debit` or `credit`.") + three_d_secure: Optional[StrictBool] = Field(default=None, description="Whether this transaction used 3D Secure authentication.", alias="threeDSecure") + three_d_secure_version: Optional[StrictStr] = Field(default=None, description="The protocol version of the 3DS challenge.", alias="threeDSecureVersion") + three_d_secure_flow: Optional[StrictStr] = Field(default=None, description="The flow used for 3DS authentication. - `CHALLENGE` - In a challenge flow, the issuer requires additional shopper interaction, either through biometrics, two-factor authentication, or similar methods based on [Strong Customer Authentication (SCA)](https://en.wikipedia.org/wiki/Strong_customer_authentication) factors. - `FRICTIONLESS` - In a frictionless flow, the acquirer, issuer, and card scheme exchange all necessary information in the background through passive authentication using the shopper's device fingerprint. The transaction is completed without further shopper interaction. - `FRICTIONLESS_CHALLENGE` - This flow is the complete 3DS flow. It is similar to the 3DS frictionless flow but includes an additional authentication step (challenge) that will be invoked if the information provided in the data collection step does not suffice to determine the risk-level of the transaction. - `DIRECT` - This transaction did not require [Strong Customer Authentication (SCA)](https://en.wikipedia.org/wiki/Strong_customer_authentication) due to the low risk ", alias="threeDSecureFlow") + expiration: Optional[StrictInt] = Field(default=None, description="Time at which the card will expire. Measured in seconds since the Unix epoch. ") + last4: Optional[StrictStr] = Field(default=None, description="The last four digits of the card.") + tokenization_method: Optional[StrictStr] = Field(default=None, description="The digital wallet used to tokenize the card.", alias="tokenizationMethod") + cardholder_name: Optional[StrictStr] = Field(default=None, description="The name of the cardholder.", alias="cardholderName") + cardholder_email: Optional[StrictStr] = Field(default=None, description="The email of the cardholder.", alias="cardholderEmail") + __properties: ClassVar[List[str]] = ["country", "brand", "type", "threeDSecure", "threeDSecureVersion", "threeDSecureFlow", "expiration", "last4", "tokenizationMethod", "cardholderName", "cardholderEmail"] + + @field_validator('brand') + def brand_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['visa', 'mastercard', 'diners', 'amex', 'jcb', 'unionpay', 'unknown']): + raise ValueError("must be one of enum values ('visa', 'mastercard', 'diners', 'amex', 'jcb', 'unionpay', 'unknown')") + return value + + @field_validator('type') + def type_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['debit', 'credit']): + raise ValueError("must be one of enum values ('debit', 'credit')") + return value + + @field_validator('three_d_secure_flow') + def three_d_secure_flow_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['CHALLENGE', 'FRICTIONLESS', 'FRICTIONLESS_CHALLENGE', 'DIRECT']): + raise ValueError("must be one of enum values ('CHALLENGE', 'FRICTIONLESS', 'FRICTIONLESS_CHALLENGE', 'DIRECT')") + return value + + @field_validator('tokenization_method') + def tokenization_method_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['applePay', 'googlePay', 'clickToPay']): + raise ValueError("must be one of enum values ('applePay', 'googlePay', 'clickToPay')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PaymentPaymentMethodCard from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PaymentPaymentMethodCard from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "country": obj.get("country"), + "brand": obj.get("brand"), + "type": obj.get("type"), + "threeDSecure": obj.get("threeDSecure"), + "threeDSecureVersion": obj.get("threeDSecureVersion"), + "threeDSecureFlow": obj.get("threeDSecureFlow"), + "expiration": obj.get("expiration"), + "last4": obj.get("last4"), + "tokenizationMethod": obj.get("tokenizationMethod"), + "cardholderName": obj.get("cardholderName"), + "cardholderEmail": obj.get("cardholderEmail") + }) + return _obj - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'country': 'str', - 'brand': 'str', - 'type': 'str', - 'three_d_secure': 'bool', - 'three_d_secure_version': 'str', - 'three_d_secure_flow': 'str', - 'expiration': 'int', - 'last4': 'str', - 'tokenization_method': 'str', - 'cardholder_name': 'str', - 'cardholder_email': 'str' - } - - attribute_map = { - 'country': 'country', - 'brand': 'brand', - 'type': 'type', - 'three_d_secure': 'threeDSecure', - 'three_d_secure_version': 'threeDSecureVersion', - 'three_d_secure_flow': 'threeDSecureFlow', - 'expiration': 'expiration', - 'last4': 'last4', - 'tokenization_method': 'tokenizationMethod', - 'cardholder_name': 'cardholderName', - 'cardholder_email': 'cardholderEmail' - } - - def __init__(self, country=None, brand=None, type=None, three_d_secure=None, three_d_secure_version=None, three_d_secure_flow=None, expiration=None, last4=None, tokenization_method=None, cardholder_name=None, cardholder_email=None, local_vars_configuration=None): # noqa: E501 - """PaymentPaymentMethodCard - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._country = None - self._brand = None - self._type = None - self._three_d_secure = None - self._three_d_secure_version = None - self._three_d_secure_flow = None - self._expiration = None - self._last4 = None - self._tokenization_method = None - self._cardholder_name = None - self._cardholder_email = None - self.discriminator = None - - if country is not None: - self.country = country - if brand is not None: - self.brand = brand - if type is not None: - self.type = type - if three_d_secure is not None: - self.three_d_secure = three_d_secure - if three_d_secure_version is not None: - self.three_d_secure_version = three_d_secure_version - if three_d_secure_flow is not None: - self.three_d_secure_flow = three_d_secure_flow - if expiration is not None: - self.expiration = expiration - if last4 is not None: - self.last4 = last4 - if tokenization_method is not None: - self.tokenization_method = tokenization_method - if cardholder_name is not None: - self.cardholder_name = cardholder_name - if cardholder_email is not None: - self.cardholder_email = cardholder_email - - @property - def country(self): - """Gets the country of this PaymentPaymentMethodCard. # noqa: E501 - - Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). # noqa: E501 - - :return: The country of this PaymentPaymentMethodCard. # noqa: E501 - :rtype: str - """ - return self._country - - @country.setter - def country(self, country): - """Sets the country of this PaymentPaymentMethodCard. - - Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). # noqa: E501 - - :param country: The country of this PaymentPaymentMethodCard. # noqa: E501 - :type: str - """ - - self._country = country - - @property - def brand(self): - """Gets the brand of this PaymentPaymentMethodCard. # noqa: E501 - - Card brand. # noqa: E501 - - :return: The brand of this PaymentPaymentMethodCard. # noqa: E501 - :rtype: str - """ - return self._brand - - @brand.setter - def brand(self, brand): - """Sets the brand of this PaymentPaymentMethodCard. - - Card brand. # noqa: E501 - - :param brand: The brand of this PaymentPaymentMethodCard. # noqa: E501 - :type: str - """ - allowed_values = ["visa", "mastercard", "diners", "amex", "jcb", "unionpay", "unknown"] # noqa: E501 - if self.local_vars_configuration.client_side_validation and brand not in allowed_values: # noqa: E501 - raise ValueError( - "Invalid value for `brand` ({0}), must be one of {1}" # noqa: E501 - .format(brand, allowed_values) - ) - - self._brand = brand - - @property - def type(self): - """Gets the type of this PaymentPaymentMethodCard. # noqa: E501 - - Card type `debit` or `credit`. # noqa: E501 - - :return: The type of this PaymentPaymentMethodCard. # noqa: E501 - :rtype: str - """ - return self._type - - @type.setter - def type(self, type): - """Sets the type of this PaymentPaymentMethodCard. - - Card type `debit` or `credit`. # noqa: E501 - - :param type: The type of this PaymentPaymentMethodCard. # noqa: E501 - :type: str - """ - allowed_values = ["debit", "credit"] # noqa: E501 - if self.local_vars_configuration.client_side_validation and type not in allowed_values: # noqa: E501 - raise ValueError( - "Invalid value for `type` ({0}), must be one of {1}" # noqa: E501 - .format(type, allowed_values) - ) - - self._type = type - - @property - def three_d_secure(self): - """Gets the three_d_secure of this PaymentPaymentMethodCard. # noqa: E501 - - Whether this transaction used 3D Secure authentication. # noqa: E501 - - :return: The three_d_secure of this PaymentPaymentMethodCard. # noqa: E501 - :rtype: bool - """ - return self._three_d_secure - - @three_d_secure.setter - def three_d_secure(self, three_d_secure): - """Sets the three_d_secure of this PaymentPaymentMethodCard. - - Whether this transaction used 3D Secure authentication. # noqa: E501 - - :param three_d_secure: The three_d_secure of this PaymentPaymentMethodCard. # noqa: E501 - :type: bool - """ - - self._three_d_secure = three_d_secure - - @property - def three_d_secure_version(self): - """Gets the three_d_secure_version of this PaymentPaymentMethodCard. # noqa: E501 - - The protocol version of the 3DS challenge. # noqa: E501 - - :return: The three_d_secure_version of this PaymentPaymentMethodCard. # noqa: E501 - :rtype: str - """ - return self._three_d_secure_version - - @three_d_secure_version.setter - def three_d_secure_version(self, three_d_secure_version): - """Sets the three_d_secure_version of this PaymentPaymentMethodCard. - - The protocol version of the 3DS challenge. # noqa: E501 - - :param three_d_secure_version: The three_d_secure_version of this PaymentPaymentMethodCard. # noqa: E501 - :type: str - """ - - self._three_d_secure_version = three_d_secure_version - - @property - def three_d_secure_flow(self): - """Gets the three_d_secure_flow of this PaymentPaymentMethodCard. # noqa: E501 - - The flow used for 3DS authentication. - `CHALLENGE` - In a challenge flow, the issuer requires additional shopper interaction, either through biometrics, two-factor authentication, or similar methods based on [Strong Customer Authentication (SCA)](https://en.wikipedia.org/wiki/Strong_customer_authentication) factors. - `FRICTIONLESS` - In a frictionless flow, the acquirer, issuer, and card scheme exchange all necessary information in the background through passive authentication using the shopper's device fingerprint. The transaction is completed without further shopper interaction. - `FRICTIONLESS_CHALLENGE` - This flow is the complete 3DS flow. It is similar to the 3DS frictionless flow but includes an additional authentication step (challenge) that will be invoked if the information provided in the data collection step does not suffice to determine the risk-level of the transaction. - `DIRECT` - This transaction did not require [Strong Customer Authentication (SCA)](https://en.wikipedia.org/wiki/Strong_customer_authentication) due to the low risk # noqa: E501 - - :return: The three_d_secure_flow of this PaymentPaymentMethodCard. # noqa: E501 - :rtype: str - """ - return self._three_d_secure_flow - - @three_d_secure_flow.setter - def three_d_secure_flow(self, three_d_secure_flow): - """Sets the three_d_secure_flow of this PaymentPaymentMethodCard. - - The flow used for 3DS authentication. - `CHALLENGE` - In a challenge flow, the issuer requires additional shopper interaction, either through biometrics, two-factor authentication, or similar methods based on [Strong Customer Authentication (SCA)](https://en.wikipedia.org/wiki/Strong_customer_authentication) factors. - `FRICTIONLESS` - In a frictionless flow, the acquirer, issuer, and card scheme exchange all necessary information in the background through passive authentication using the shopper's device fingerprint. The transaction is completed without further shopper interaction. - `FRICTIONLESS_CHALLENGE` - This flow is the complete 3DS flow. It is similar to the 3DS frictionless flow but includes an additional authentication step (challenge) that will be invoked if the information provided in the data collection step does not suffice to determine the risk-level of the transaction. - `DIRECT` - This transaction did not require [Strong Customer Authentication (SCA)](https://en.wikipedia.org/wiki/Strong_customer_authentication) due to the low risk # noqa: E501 - - :param three_d_secure_flow: The three_d_secure_flow of this PaymentPaymentMethodCard. # noqa: E501 - :type: str - """ - allowed_values = ["CHALLENGE", "FRICTIONLESS", "FRICTIONLESS_CHALLENGE", "DIRECT"] # noqa: E501 - if self.local_vars_configuration.client_side_validation and three_d_secure_flow not in allowed_values: # noqa: E501 - raise ValueError( - "Invalid value for `three_d_secure_flow` ({0}), must be one of {1}" # noqa: E501 - .format(three_d_secure_flow, allowed_values) - ) - - self._three_d_secure_flow = three_d_secure_flow - - @property - def expiration(self): - """Gets the expiration of this PaymentPaymentMethodCard. # noqa: E501 - - Time at which the card will expire. Measured in seconds since the Unix epoch. # noqa: E501 - - :return: The expiration of this PaymentPaymentMethodCard. # noqa: E501 - :rtype: int - """ - return self._expiration - - @expiration.setter - def expiration(self, expiration): - """Sets the expiration of this PaymentPaymentMethodCard. - - Time at which the card will expire. Measured in seconds since the Unix epoch. # noqa: E501 - - :param expiration: The expiration of this PaymentPaymentMethodCard. # noqa: E501 - :type: int - """ - - self._expiration = expiration - - @property - def last4(self): - """Gets the last4 of this PaymentPaymentMethodCard. # noqa: E501 - - The last four digits of the card. # noqa: E501 - - :return: The last4 of this PaymentPaymentMethodCard. # noqa: E501 - :rtype: str - """ - return self._last4 - - @last4.setter - def last4(self, last4): - """Sets the last4 of this PaymentPaymentMethodCard. - - The last four digits of the card. # noqa: E501 - - :param last4: The last4 of this PaymentPaymentMethodCard. # noqa: E501 - :type: str - """ - - self._last4 = last4 - - @property - def tokenization_method(self): - """Gets the tokenization_method of this PaymentPaymentMethodCard. # noqa: E501 - - The digital wallet used to tokenize the card. # noqa: E501 - - :return: The tokenization_method of this PaymentPaymentMethodCard. # noqa: E501 - :rtype: str - """ - return self._tokenization_method - - @tokenization_method.setter - def tokenization_method(self, tokenization_method): - """Sets the tokenization_method of this PaymentPaymentMethodCard. - - The digital wallet used to tokenize the card. # noqa: E501 - - :param tokenization_method: The tokenization_method of this PaymentPaymentMethodCard. # noqa: E501 - :type: str - """ - allowed_values = ["applePay", "googlePay", "clickToPay"] # noqa: E501 - if self.local_vars_configuration.client_side_validation and tokenization_method not in allowed_values: # noqa: E501 - raise ValueError( - "Invalid value for `tokenization_method` ({0}), must be one of {1}" # noqa: E501 - .format(tokenization_method, allowed_values) - ) - - self._tokenization_method = tokenization_method - - @property - def cardholder_name(self): - """Gets the cardholder_name of this PaymentPaymentMethodCard. # noqa: E501 - - The name of the cardholder. # noqa: E501 - - :return: The cardholder_name of this PaymentPaymentMethodCard. # noqa: E501 - :rtype: str - """ - return self._cardholder_name - - @cardholder_name.setter - def cardholder_name(self, cardholder_name): - """Sets the cardholder_name of this PaymentPaymentMethodCard. - - The name of the cardholder. # noqa: E501 - - :param cardholder_name: The cardholder_name of this PaymentPaymentMethodCard. # noqa: E501 - :type: str - """ - - self._cardholder_name = cardholder_name - - @property - def cardholder_email(self): - """Gets the cardholder_email of this PaymentPaymentMethodCard. # noqa: E501 - - The email of the cardholder. # noqa: E501 - - :return: The cardholder_email of this PaymentPaymentMethodCard. # noqa: E501 - :rtype: str - """ - return self._cardholder_email - - @cardholder_email.setter - def cardholder_email(self, cardholder_email): - """Sets the cardholder_email of this PaymentPaymentMethodCard. - - The email of the cardholder. # noqa: E501 - - :param cardholder_email: The cardholder_email of this PaymentPaymentMethodCard. # noqa: E501 - :type: str - """ - - self._cardholder_email = cardholder_email - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, PaymentPaymentMethodCard): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, PaymentPaymentMethodCard): - return True - return self.to_dict() != other.to_dict() diff --git a/Monei/models/payment_payment_method_card_input.py b/Monei/models/payment_payment_method_card_input.py index 9bcaef2..9745725 100644 --- a/Monei/models/payment_payment_method_card_input.py +++ b/Monei/models/payment_payment_method_card_input.py @@ -3,260 +3,95 @@ """ MONEI API v1 -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

- The version of the OpenAPI document: 1.5.0 - Generated by: https://openapi-generator.tech -""" + The version of the OpenAPI document: 1.5.1 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 +from __future__ import annotations import pprint import re # noqa: F401 +import json -import six - -from Monei.configuration import Configuration - +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self -class PaymentPaymentMethodCardInput(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. +class PaymentPaymentMethodCardInput(BaseModel): """ - openapi_types = { - 'number': 'str', - 'cvc': 'str', - 'exp_month': 'str', - 'exp_year': 'str', - 'cardholder_name': 'str', - 'cardholder_email': 'str' - } - - attribute_map = { - 'number': 'number', - 'cvc': 'cvc', - 'exp_month': 'expMonth', - 'exp_year': 'expYear', - 'cardholder_name': 'cardholderName', - 'cardholder_email': 'cardholderEmail' - } - - def __init__(self, number=None, cvc=None, exp_month=None, exp_year=None, cardholder_name=None, cardholder_email=None, local_vars_configuration=None): # noqa: E501 - """PaymentPaymentMethodCardInput - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._number = None - self._cvc = None - self._exp_month = None - self._exp_year = None - self._cardholder_name = None - self._cardholder_email = None - self.discriminator = None - - if number is not None: - self.number = number - if cvc is not None: - self.cvc = cvc - if exp_month is not None: - self.exp_month = exp_month - if exp_year is not None: - self.exp_year = exp_year - if cardholder_name is not None: - self.cardholder_name = cardholder_name - if cardholder_email is not None: - self.cardholder_email = cardholder_email - - @property - def number(self): - """Gets the number of this PaymentPaymentMethodCardInput. # noqa: E501 - - The card number, as a string without any separators. # noqa: E501 - - :return: The number of this PaymentPaymentMethodCardInput. # noqa: E501 - :rtype: str - """ - return self._number - - @number.setter - def number(self, number): - """Sets the number of this PaymentPaymentMethodCardInput. - - The card number, as a string without any separators. # noqa: E501 - - :param number: The number of this PaymentPaymentMethodCardInput. # noqa: E501 - :type: str - """ - - self._number = number - - @property - def cvc(self): - """Gets the cvc of this PaymentPaymentMethodCardInput. # noqa: E501 - - Card security code. # noqa: E501 - - :return: The cvc of this PaymentPaymentMethodCardInput. # noqa: E501 - :rtype: str - """ - return self._cvc - - @cvc.setter - def cvc(self, cvc): - """Sets the cvc of this PaymentPaymentMethodCardInput. - - Card security code. # noqa: E501 - - :param cvc: The cvc of this PaymentPaymentMethodCardInput. # noqa: E501 - :type: str - """ - - self._cvc = cvc - - @property - def exp_month(self): - """Gets the exp_month of this PaymentPaymentMethodCardInput. # noqa: E501 - - Two-digit number representing the card's expiration month. # noqa: E501 - - :return: The exp_month of this PaymentPaymentMethodCardInput. # noqa: E501 - :rtype: str - """ - return self._exp_month - - @exp_month.setter - def exp_month(self, exp_month): - """Sets the exp_month of this PaymentPaymentMethodCardInput. - - Two-digit number representing the card's expiration month. # noqa: E501 - - :param exp_month: The exp_month of this PaymentPaymentMethodCardInput. # noqa: E501 - :type: str - """ - - self._exp_month = exp_month - - @property - def exp_year(self): - """Gets the exp_year of this PaymentPaymentMethodCardInput. # noqa: E501 - - Two-digit number representing the card's expiration year. # noqa: E501 - - :return: The exp_year of this PaymentPaymentMethodCardInput. # noqa: E501 - :rtype: str + Details about the card used as payment method. If provided, MONEI will try to confirm the payment directly. + """ # noqa: E501 + number: Optional[StrictStr] = Field(default=None, description="The card number, as a string without any separators.") + cvc: Optional[StrictStr] = Field(default=None, description="Card security code.") + exp_month: Optional[StrictStr] = Field(default=None, description="Two-digit number representing the card's expiration month.", alias="expMonth") + exp_year: Optional[StrictStr] = Field(default=None, description="Two-digit number representing the card's expiration year.", alias="expYear") + cardholder_name: Optional[StrictStr] = Field(default=None, description="The cardholder's name, as stated in the credit card.", alias="cardholderName") + cardholder_email: Optional[StrictStr] = Field(default=None, description="The cardholder's email address.", alias="cardholderEmail") + __properties: ClassVar[List[str]] = ["number", "cvc", "expMonth", "expYear", "cardholderName", "cardholderEmail"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PaymentPaymentMethodCardInput from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. """ - return self._exp_year - - @exp_year.setter - def exp_year(self, exp_year): - """Sets the exp_year of this PaymentPaymentMethodCardInput. - - Two-digit number representing the card's expiration year. # noqa: E501 - - :param exp_year: The exp_year of this PaymentPaymentMethodCardInput. # noqa: E501 - :type: str - """ - - self._exp_year = exp_year - - @property - def cardholder_name(self): - """Gets the cardholder_name of this PaymentPaymentMethodCardInput. # noqa: E501 - - The cardholder's name, as stated in the credit card. # noqa: E501 - - :return: The cardholder_name of this PaymentPaymentMethodCardInput. # noqa: E501 - :rtype: str - """ - return self._cardholder_name - - @cardholder_name.setter - def cardholder_name(self, cardholder_name): - """Sets the cardholder_name of this PaymentPaymentMethodCardInput. - - The cardholder's name, as stated in the credit card. # noqa: E501 - - :param cardholder_name: The cardholder_name of this PaymentPaymentMethodCardInput. # noqa: E501 - :type: str - """ - - self._cardholder_name = cardholder_name - - @property - def cardholder_email(self): - """Gets the cardholder_email of this PaymentPaymentMethodCardInput. # noqa: E501 - - The cardholder's email address. # noqa: E501 - - :return: The cardholder_email of this PaymentPaymentMethodCardInput. # noqa: E501 - :rtype: str - """ - return self._cardholder_email - - @cardholder_email.setter - def cardholder_email(self, cardholder_email): - """Sets the cardholder_email of this PaymentPaymentMethodCardInput. - - The cardholder's email address. # noqa: E501 - - :param cardholder_email: The cardholder_email of this PaymentPaymentMethodCardInput. # noqa: E501 - :type: str - """ - - self._cardholder_email = cardholder_email - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, PaymentPaymentMethodCardInput): - return False - - return self.to_dict() == other.to_dict() + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PaymentPaymentMethodCardInput from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "number": obj.get("number"), + "cvc": obj.get("cvc"), + "expMonth": obj.get("expMonth"), + "expYear": obj.get("expYear"), + "cardholderName": obj.get("cardholderName"), + "cardholderEmail": obj.get("cardholderEmail") + }) + return _obj - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, PaymentPaymentMethodCardInput): - return True - return self.to_dict() != other.to_dict() diff --git a/Monei/models/payment_payment_method_cofidis.py b/Monei/models/payment_payment_method_cofidis.py index a0c65ca..11b04e3 100644 --- a/Monei/models/payment_payment_method_cofidis.py +++ b/Monei/models/payment_payment_method_cofidis.py @@ -3,120 +3,85 @@ """ MONEI API v1 -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

- The version of the OpenAPI document: 1.5.0 - Generated by: https://openapi-generator.tech -""" + The version of the OpenAPI document: 1.5.1 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 +from __future__ import annotations import pprint import re # noqa: F401 +import json -import six - -from Monei.configuration import Configuration - - -class PaymentPaymentMethodCofidis(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self - Do not edit the class manually. +class PaymentPaymentMethodCofidis(BaseModel): """ + Details from Cofidis order used as payment method at the time of the transaction. + """ # noqa: E501 + order_id: Optional[StrictStr] = Field(default=None, description="The Cofidis' order ID.", alias="orderId") + __properties: ClassVar[List[str]] = ["orderId"] - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'order_id': 'str' - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) - attribute_map = { - 'order_id': 'orderId' - } - def __init__(self, order_id=None, local_vars_configuration=None): # noqa: E501 - """PaymentPaymentMethodCofidis - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) - self._order_id = None - self.discriminator = None + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) - if order_id is not None: - self.order_id = order_id + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PaymentPaymentMethodCofidis from a JSON string""" + return cls.from_dict(json.loads(json_str)) - @property - def order_id(self): - """Gets the order_id of this PaymentPaymentMethodCofidis. # noqa: E501 + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. - The Cofidis' order ID. # noqa: E501 + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: - :return: The order_id of this PaymentPaymentMethodCofidis. # noqa: E501 - :rtype: str + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. """ - return self._order_id + excluded_fields: Set[str] = set([ + ]) - @order_id.setter - def order_id(self, order_id): - """Sets the order_id of this PaymentPaymentMethodCofidis. + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict - The Cofidis' order ID. # noqa: E501 + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PaymentPaymentMethodCofidis from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "orderId": obj.get("orderId") + }) + return _obj - :param order_id: The order_id of this PaymentPaymentMethodCofidis. # noqa: E501 - :type: str - """ - self._order_id = order_id - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, PaymentPaymentMethodCofidis): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, PaymentPaymentMethodCofidis): - return True - - return self.to_dict() != other.to_dict() diff --git a/Monei/models/payment_payment_method_input.py b/Monei/models/payment_payment_method_input.py index 98c889f..6ee6c8c 100644 --- a/Monei/models/payment_payment_method_input.py +++ b/Monei/models/payment_payment_method_input.py @@ -3,144 +3,95 @@ """ MONEI API v1 -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

- The version of the OpenAPI document: 1.5.0 - Generated by: https://openapi-generator.tech -""" + The version of the OpenAPI document: 1.5.1 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 +from __future__ import annotations import pprint import re # noqa: F401 +import json -import six - -from Monei.configuration import Configuration - - -class PaymentPaymentMethodInput(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, List, Optional +from Monei.models.payment_payment_method_bizum_input import PaymentPaymentMethodBizumInput +from Monei.models.payment_payment_method_card_input import PaymentPaymentMethodCardInput +from typing import Optional, Set +from typing_extensions import Self +class PaymentPaymentMethodInput(BaseModel): """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'card': 'PaymentPaymentMethodCardInput', - 'bizum': 'PaymentPaymentMethodBizumInput' - } - - attribute_map = { - 'card': 'card', - 'bizum': 'bizum' - } - - def __init__(self, card=None, bizum=None, local_vars_configuration=None): # noqa: E501 - """PaymentPaymentMethodInput - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._card = None - self._bizum = None - self.discriminator = None - - if card is not None: - self.card = card - if bizum is not None: - self.bizum = bizum - - @property - def card(self): - """Gets the card of this PaymentPaymentMethodInput. # noqa: E501 - - - :return: The card of this PaymentPaymentMethodInput. # noqa: E501 - :rtype: PaymentPaymentMethodCardInput - """ - return self._card - - @card.setter - def card(self, card): - """Sets the card of this PaymentPaymentMethodInput. - - - :param card: The card of this PaymentPaymentMethodInput. # noqa: E501 - :type: PaymentPaymentMethodCardInput + An information about a payment method used for this payment. We recommend using `paymentToken` instead, as it is more secure way to pass sensitive payment information. Processing credit card information on your server requires [PCI DSS compliance](https://www.investopedia.com/terms/p/pci-compliance.asp). + """ # noqa: E501 + card: Optional[PaymentPaymentMethodCardInput] = None + bizum: Optional[PaymentPaymentMethodBizumInput] = None + __properties: ClassVar[List[str]] = ["card", "bizum"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PaymentPaymentMethodInput from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of card + if self.card: + _dict['card'] = self.card.to_dict() + # override the default output from pydantic by calling `to_dict()` of bizum + if self.bizum: + _dict['bizum'] = self.bizum.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PaymentPaymentMethodInput from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "card": PaymentPaymentMethodCardInput.from_dict(obj["card"]) if obj.get("card") is not None else None, + "bizum": PaymentPaymentMethodBizumInput.from_dict(obj["bizum"]) if obj.get("bizum") is not None else None + }) + return _obj - self._card = card - - @property - def bizum(self): - """Gets the bizum of this PaymentPaymentMethodInput. # noqa: E501 - - - :return: The bizum of this PaymentPaymentMethodInput. # noqa: E501 - :rtype: PaymentPaymentMethodBizumInput - """ - return self._bizum - - @bizum.setter - def bizum(self, bizum): - """Sets the bizum of this PaymentPaymentMethodInput. - - - :param bizum: The bizum of this PaymentPaymentMethodInput. # noqa: E501 - :type: PaymentPaymentMethodBizumInput - """ - self._bizum = bizum - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, PaymentPaymentMethodInput): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, PaymentPaymentMethodInput): - return True - - return self.to_dict() != other.to_dict() diff --git a/Monei/models/payment_payment_method_klarna.py b/Monei/models/payment_payment_method_klarna.py index 0f87c1f..11606bb 100644 --- a/Monei/models/payment_payment_method_klarna.py +++ b/Monei/models/payment_payment_method_klarna.py @@ -3,156 +3,107 @@ """ MONEI API v1 -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

- The version of the OpenAPI document: 1.5.0 - Generated by: https://openapi-generator.tech -""" + The version of the OpenAPI document: 1.5.1 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 +from __future__ import annotations import pprint import re # noqa: F401 +import json -import six - -from Monei.configuration import Configuration - - -class PaymentPaymentMethodKlarna(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ +from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self +class PaymentPaymentMethodKlarna(BaseModel): """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'billing_category': 'str', - 'auth_payment_method': 'str' - } - - attribute_map = { - 'billing_category': 'billingCategory', - 'auth_payment_method': 'authPaymentMethod' - } - - def __init__(self, billing_category=None, auth_payment_method=None, local_vars_configuration=None): # noqa: E501 - """PaymentPaymentMethodKlarna - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._billing_category = None - self._auth_payment_method = None - self.discriminator = None - - if billing_category is not None: - self.billing_category = billing_category - if auth_payment_method is not None: - self.auth_payment_method = auth_payment_method - - @property - def billing_category(self): - """Gets the billing_category of this PaymentPaymentMethodKlarna. # noqa: E501 - - - :return: The billing_category of this PaymentPaymentMethodKlarna. # noqa: E501 - :rtype: str - """ - return self._billing_category - - @billing_category.setter - def billing_category(self, billing_category): - """Sets the billing_category of this PaymentPaymentMethodKlarna. - - - :param billing_category: The billing_category of this PaymentPaymentMethodKlarna. # noqa: E501 - :type: str + Details from Klarna order used as payment method at the time of the transaction. + """ # noqa: E501 + billing_category: Optional[StrictStr] = Field(default=None, alias="billingCategory") + auth_payment_method: Optional[StrictStr] = Field(default=None, alias="authPaymentMethod") + __properties: ClassVar[List[str]] = ["billingCategory", "authPaymentMethod"] + + @field_validator('billing_category') + def billing_category_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['PAY_LATER', 'PAY_NOW', 'SLICE_IT', 'SLICE_IT_BY_CARD']): + raise ValueError("must be one of enum values ('PAY_LATER', 'PAY_NOW', 'SLICE_IT', 'SLICE_IT_BY_CARD')") + return value + + @field_validator('auth_payment_method') + def auth_payment_method_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['invoice', 'fixed_amount', 'pix', 'base_account', 'deferred_interest', 'direct_debit', 'direct_bank_transfer', 'b2b_invoice', 'card', 'slice_it_by_card']): + raise ValueError("must be one of enum values ('invoice', 'fixed_amount', 'pix', 'base_account', 'deferred_interest', 'direct_debit', 'direct_bank_transfer', 'b2b_invoice', 'card', 'slice_it_by_card')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PaymentPaymentMethodKlarna from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. """ - allowed_values = ["PAY_LATER", "PAY_NOW", "SLICE_IT", "SLICE_IT_BY_CARD"] # noqa: E501 - if self.local_vars_configuration.client_side_validation and billing_category not in allowed_values: # noqa: E501 - raise ValueError( - "Invalid value for `billing_category` ({0}), must be one of {1}" # noqa: E501 - .format(billing_category, allowed_values) - ) - - self._billing_category = billing_category + excluded_fields: Set[str] = set([ + ]) - @property - def auth_payment_method(self): - """Gets the auth_payment_method of this PaymentPaymentMethodKlarna. # noqa: E501 + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PaymentPaymentMethodKlarna from a dict""" + if obj is None: + return None - :return: The auth_payment_method of this PaymentPaymentMethodKlarna. # noqa: E501 - :rtype: str - """ - return self._auth_payment_method + if not isinstance(obj, dict): + return cls.model_validate(obj) - @auth_payment_method.setter - def auth_payment_method(self, auth_payment_method): - """Sets the auth_payment_method of this PaymentPaymentMethodKlarna. + _obj = cls.model_validate({ + "billingCategory": obj.get("billingCategory"), + "authPaymentMethod": obj.get("authPaymentMethod") + }) + return _obj - :param auth_payment_method: The auth_payment_method of this PaymentPaymentMethodKlarna. # noqa: E501 - :type: str - """ - allowed_values = ["invoice", "fixed_amount", "pix", "base_account", "deferred_interest", "direct_debit", "direct_bank_transfer", "b2b_invoice", "card", "slice_it_by_card"] # noqa: E501 - if self.local_vars_configuration.client_side_validation and auth_payment_method not in allowed_values: # noqa: E501 - raise ValueError( - "Invalid value for `auth_payment_method` ({0}), must be one of {1}" # noqa: E501 - .format(auth_payment_method, allowed_values) - ) - - self._auth_payment_method = auth_payment_method - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, PaymentPaymentMethodKlarna): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, PaymentPaymentMethodKlarna): - return True - - return self.to_dict() != other.to_dict() diff --git a/Monei/models/payment_payment_method_mbway.py b/Monei/models/payment_payment_method_mbway.py index 5e93c06..8ab8207 100644 --- a/Monei/models/payment_payment_method_mbway.py +++ b/Monei/models/payment_payment_method_mbway.py @@ -3,120 +3,85 @@ """ MONEI API v1 -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

- The version of the OpenAPI document: 1.5.0 - Generated by: https://openapi-generator.tech -""" + The version of the OpenAPI document: 1.5.1 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 +from __future__ import annotations import pprint import re # noqa: F401 +import json -import six - -from Monei.configuration import Configuration - - -class PaymentPaymentMethodMbway(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self - Do not edit the class manually. +class PaymentPaymentMethodMbway(BaseModel): """ + Details from MBWay order used as payment method at the time of the transaction. + """ # noqa: E501 + phone_number: Optional[StrictStr] = Field(default=None, description="Phone number in E.164 format used to pay with `mbway`.", alias="phoneNumber") + __properties: ClassVar[List[str]] = ["phoneNumber"] - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'phone_number': 'str' - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) - attribute_map = { - 'phone_number': 'phoneNumber' - } - def __init__(self, phone_number=None, local_vars_configuration=None): # noqa: E501 - """PaymentPaymentMethodMbway - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) - self._phone_number = None - self.discriminator = None + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) - if phone_number is not None: - self.phone_number = phone_number + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PaymentPaymentMethodMbway from a JSON string""" + return cls.from_dict(json.loads(json_str)) - @property - def phone_number(self): - """Gets the phone_number of this PaymentPaymentMethodMbway. # noqa: E501 + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. - Phone number in E.164 format used to pay with `mbway`. # noqa: E501 + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: - :return: The phone_number of this PaymentPaymentMethodMbway. # noqa: E501 - :rtype: str + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. """ - return self._phone_number + excluded_fields: Set[str] = set([ + ]) - @phone_number.setter - def phone_number(self, phone_number): - """Sets the phone_number of this PaymentPaymentMethodMbway. + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict - Phone number in E.164 format used to pay with `mbway`. # noqa: E501 + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PaymentPaymentMethodMbway from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "phoneNumber": obj.get("phoneNumber") + }) + return _obj - :param phone_number: The phone_number of this PaymentPaymentMethodMbway. # noqa: E501 - :type: str - """ - self._phone_number = phone_number - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, PaymentPaymentMethodMbway): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, PaymentPaymentMethodMbway): - return True - - return self.to_dict() != other.to_dict() diff --git a/Monei/models/payment_payment_method_paypal.py b/Monei/models/payment_payment_method_paypal.py index 97a21c0..848af50 100644 --- a/Monei/models/payment_payment_method_paypal.py +++ b/Monei/models/payment_payment_method_paypal.py @@ -3,120 +3,85 @@ """ MONEI API v1 -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

- The version of the OpenAPI document: 1.5.0 - Generated by: https://openapi-generator.tech -""" + The version of the OpenAPI document: 1.5.1 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 +from __future__ import annotations import pprint import re # noqa: F401 +import json -import six - -from Monei.configuration import Configuration - - -class PaymentPaymentMethodPaypal(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self - Do not edit the class manually. +class PaymentPaymentMethodPaypal(BaseModel): """ + Details from Paypal order used as payment method at the time of the transaction. + """ # noqa: E501 + order_id: Optional[StrictStr] = Field(default=None, description="The Paypal's order ID.", alias="orderId") + __properties: ClassVar[List[str]] = ["orderId"] - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'order_id': 'str' - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) - attribute_map = { - 'order_id': 'orderId' - } - def __init__(self, order_id=None, local_vars_configuration=None): # noqa: E501 - """PaymentPaymentMethodPaypal - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) - self._order_id = None - self.discriminator = None + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) - if order_id is not None: - self.order_id = order_id + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PaymentPaymentMethodPaypal from a JSON string""" + return cls.from_dict(json.loads(json_str)) - @property - def order_id(self): - """Gets the order_id of this PaymentPaymentMethodPaypal. # noqa: E501 + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. - The Paypal's order ID. # noqa: E501 + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: - :return: The order_id of this PaymentPaymentMethodPaypal. # noqa: E501 - :rtype: str + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. """ - return self._order_id + excluded_fields: Set[str] = set([ + ]) - @order_id.setter - def order_id(self, order_id): - """Sets the order_id of this PaymentPaymentMethodPaypal. + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict - The Paypal's order ID. # noqa: E501 + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PaymentPaymentMethodPaypal from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "orderId": obj.get("orderId") + }) + return _obj - :param order_id: The order_id of this PaymentPaymentMethodPaypal. # noqa: E501 - :type: str - """ - self._order_id = order_id - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, PaymentPaymentMethodPaypal): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, PaymentPaymentMethodPaypal): - return True - - return self.to_dict() != other.to_dict() diff --git a/Monei/models/payment_payment_method_sepa.py b/Monei/models/payment_payment_method_sepa.py index 06a199b..41ff750 100644 --- a/Monei/models/payment_payment_method_sepa.py +++ b/Monei/models/payment_payment_method_sepa.py @@ -3,344 +3,101 @@ """ MONEI API v1 -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

- The version of the OpenAPI document: 1.5.0 - Generated by: https://openapi-generator.tech -""" + The version of the OpenAPI document: 1.5.1 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 +from __future__ import annotations import pprint import re # noqa: F401 +import json -import six - -from Monei.configuration import Configuration +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self - -class PaymentPaymentMethodSepa(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. +class PaymentPaymentMethodSepa(BaseModel): """ + Details from SEPA order used as payment method at the time of the transaction. + """ # noqa: E501 + accountholder_address: Optional[StrictStr] = Field(default=None, description="The address of the account holder.", alias="accountholderAddress") + accountholder_email: Optional[StrictStr] = Field(default=None, description="The email of the account holder.", alias="accountholderEmail") + accountholder_name: Optional[StrictStr] = Field(default=None, description="The name of the account holder.", alias="accountholderName") + country_code: Optional[StrictStr] = Field(default=None, description="The country code of the account holder.", alias="countryCode") + bank_address: Optional[StrictStr] = Field(default=None, description="The address of the bank.", alias="bankAddress") + bank_code: Optional[StrictStr] = Field(default=None, description="The code of the bank.", alias="bankCode") + bank_name: Optional[StrictStr] = Field(default=None, description="The name of the bank.", alias="bankName") + bic: Optional[StrictStr] = Field(default=None, description="The BIC of the bank.") + last4: Optional[StrictStr] = Field(default=None, description="The last 4 digits of the IBAN.") + __properties: ClassVar[List[str]] = ["accountholderAddress", "accountholderEmail", "accountholderName", "countryCode", "bankAddress", "bankCode", "bankName", "bic", "last4"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PaymentPaymentMethodSepa from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PaymentPaymentMethodSepa from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "accountholderAddress": obj.get("accountholderAddress"), + "accountholderEmail": obj.get("accountholderEmail"), + "accountholderName": obj.get("accountholderName"), + "countryCode": obj.get("countryCode"), + "bankAddress": obj.get("bankAddress"), + "bankCode": obj.get("bankCode"), + "bankName": obj.get("bankName"), + "bic": obj.get("bic"), + "last4": obj.get("last4") + }) + return _obj - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'accountholder_address': 'str', - 'accountholder_email': 'str', - 'accountholder_name': 'str', - 'country_code': 'str', - 'bank_address': 'str', - 'bank_code': 'str', - 'bank_name': 'str', - 'bic': 'str', - 'last4': 'str' - } - - attribute_map = { - 'accountholder_address': 'accountholderAddress', - 'accountholder_email': 'accountholderEmail', - 'accountholder_name': 'accountholderName', - 'country_code': 'countryCode', - 'bank_address': 'bankAddress', - 'bank_code': 'bankCode', - 'bank_name': 'bankName', - 'bic': 'bic', - 'last4': 'last4' - } - - def __init__(self, accountholder_address=None, accountholder_email=None, accountholder_name=None, country_code=None, bank_address=None, bank_code=None, bank_name=None, bic=None, last4=None, local_vars_configuration=None): # noqa: E501 - """PaymentPaymentMethodSepa - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._accountholder_address = None - self._accountholder_email = None - self._accountholder_name = None - self._country_code = None - self._bank_address = None - self._bank_code = None - self._bank_name = None - self._bic = None - self._last4 = None - self.discriminator = None - - if accountholder_address is not None: - self.accountholder_address = accountholder_address - if accountholder_email is not None: - self.accountholder_email = accountholder_email - if accountholder_name is not None: - self.accountholder_name = accountholder_name - if country_code is not None: - self.country_code = country_code - if bank_address is not None: - self.bank_address = bank_address - if bank_code is not None: - self.bank_code = bank_code - if bank_name is not None: - self.bank_name = bank_name - if bic is not None: - self.bic = bic - if last4 is not None: - self.last4 = last4 - - @property - def accountholder_address(self): - """Gets the accountholder_address of this PaymentPaymentMethodSepa. # noqa: E501 - - The address of the account holder. # noqa: E501 - - :return: The accountholder_address of this PaymentPaymentMethodSepa. # noqa: E501 - :rtype: str - """ - return self._accountholder_address - - @accountholder_address.setter - def accountholder_address(self, accountholder_address): - """Sets the accountholder_address of this PaymentPaymentMethodSepa. - - The address of the account holder. # noqa: E501 - - :param accountholder_address: The accountholder_address of this PaymentPaymentMethodSepa. # noqa: E501 - :type: str - """ - - self._accountholder_address = accountholder_address - - @property - def accountholder_email(self): - """Gets the accountholder_email of this PaymentPaymentMethodSepa. # noqa: E501 - - The email of the account holder. # noqa: E501 - - :return: The accountholder_email of this PaymentPaymentMethodSepa. # noqa: E501 - :rtype: str - """ - return self._accountholder_email - - @accountholder_email.setter - def accountholder_email(self, accountholder_email): - """Sets the accountholder_email of this PaymentPaymentMethodSepa. - - The email of the account holder. # noqa: E501 - - :param accountholder_email: The accountholder_email of this PaymentPaymentMethodSepa. # noqa: E501 - :type: str - """ - - self._accountholder_email = accountholder_email - - @property - def accountholder_name(self): - """Gets the accountholder_name of this PaymentPaymentMethodSepa. # noqa: E501 - - The name of the account holder. # noqa: E501 - - :return: The accountholder_name of this PaymentPaymentMethodSepa. # noqa: E501 - :rtype: str - """ - return self._accountholder_name - - @accountholder_name.setter - def accountholder_name(self, accountholder_name): - """Sets the accountholder_name of this PaymentPaymentMethodSepa. - - The name of the account holder. # noqa: E501 - - :param accountholder_name: The accountholder_name of this PaymentPaymentMethodSepa. # noqa: E501 - :type: str - """ - - self._accountholder_name = accountholder_name - - @property - def country_code(self): - """Gets the country_code of this PaymentPaymentMethodSepa. # noqa: E501 - - The country code of the account holder. # noqa: E501 - - :return: The country_code of this PaymentPaymentMethodSepa. # noqa: E501 - :rtype: str - """ - return self._country_code - - @country_code.setter - def country_code(self, country_code): - """Sets the country_code of this PaymentPaymentMethodSepa. - - The country code of the account holder. # noqa: E501 - - :param country_code: The country_code of this PaymentPaymentMethodSepa. # noqa: E501 - :type: str - """ - - self._country_code = country_code - - @property - def bank_address(self): - """Gets the bank_address of this PaymentPaymentMethodSepa. # noqa: E501 - - The address of the bank. # noqa: E501 - - :return: The bank_address of this PaymentPaymentMethodSepa. # noqa: E501 - :rtype: str - """ - return self._bank_address - - @bank_address.setter - def bank_address(self, bank_address): - """Sets the bank_address of this PaymentPaymentMethodSepa. - - The address of the bank. # noqa: E501 - - :param bank_address: The bank_address of this PaymentPaymentMethodSepa. # noqa: E501 - :type: str - """ - - self._bank_address = bank_address - - @property - def bank_code(self): - """Gets the bank_code of this PaymentPaymentMethodSepa. # noqa: E501 - - The code of the bank. # noqa: E501 - - :return: The bank_code of this PaymentPaymentMethodSepa. # noqa: E501 - :rtype: str - """ - return self._bank_code - - @bank_code.setter - def bank_code(self, bank_code): - """Sets the bank_code of this PaymentPaymentMethodSepa. - - The code of the bank. # noqa: E501 - - :param bank_code: The bank_code of this PaymentPaymentMethodSepa. # noqa: E501 - :type: str - """ - - self._bank_code = bank_code - - @property - def bank_name(self): - """Gets the bank_name of this PaymentPaymentMethodSepa. # noqa: E501 - - The name of the bank. # noqa: E501 - - :return: The bank_name of this PaymentPaymentMethodSepa. # noqa: E501 - :rtype: str - """ - return self._bank_name - - @bank_name.setter - def bank_name(self, bank_name): - """Sets the bank_name of this PaymentPaymentMethodSepa. - - The name of the bank. # noqa: E501 - - :param bank_name: The bank_name of this PaymentPaymentMethodSepa. # noqa: E501 - :type: str - """ - - self._bank_name = bank_name - - @property - def bic(self): - """Gets the bic of this PaymentPaymentMethodSepa. # noqa: E501 - - The BIC of the bank. # noqa: E501 - - :return: The bic of this PaymentPaymentMethodSepa. # noqa: E501 - :rtype: str - """ - return self._bic - - @bic.setter - def bic(self, bic): - """Sets the bic of this PaymentPaymentMethodSepa. - - The BIC of the bank. # noqa: E501 - - :param bic: The bic of this PaymentPaymentMethodSepa. # noqa: E501 - :type: str - """ - - self._bic = bic - - @property - def last4(self): - """Gets the last4 of this PaymentPaymentMethodSepa. # noqa: E501 - - The last 4 digits of the IBAN. # noqa: E501 - - :return: The last4 of this PaymentPaymentMethodSepa. # noqa: E501 - :rtype: str - """ - return self._last4 - - @last4.setter - def last4(self, last4): - """Sets the last4 of this PaymentPaymentMethodSepa. - - The last 4 digits of the IBAN. # noqa: E501 - - :param last4: The last4 of this PaymentPaymentMethodSepa. # noqa: E501 - :type: str - """ - - self._last4 = last4 - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, PaymentPaymentMethodSepa): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, PaymentPaymentMethodSepa): - return True - return self.to_dict() != other.to_dict() diff --git a/Monei/models/payment_payment_method_trustly.py b/Monei/models/payment_payment_method_trustly.py index 6e583ef..9c6fa0a 100644 --- a/Monei/models/payment_payment_method_trustly.py +++ b/Monei/models/payment_payment_method_trustly.py @@ -3,120 +3,85 @@ """ MONEI API v1 -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

- The version of the OpenAPI document: 1.5.0 - Generated by: https://openapi-generator.tech -""" + The version of the OpenAPI document: 1.5.1 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 +from __future__ import annotations import pprint import re # noqa: F401 +import json -import six - -from Monei.configuration import Configuration - - -class PaymentPaymentMethodTrustly(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self - Do not edit the class manually. +class PaymentPaymentMethodTrustly(BaseModel): """ + Details from Trustly order used as payment method at the time of the transaction. + """ # noqa: E501 + customer_id: Optional[StrictStr] = Field(default=None, description="The Trustly's customer ID.", alias="customerId") + __properties: ClassVar[List[str]] = ["customerId"] - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'customer_id': 'str' - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) - attribute_map = { - 'customer_id': 'customerId' - } - def __init__(self, customer_id=None, local_vars_configuration=None): # noqa: E501 - """PaymentPaymentMethodTrustly - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) - self._customer_id = None - self.discriminator = None + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) - if customer_id is not None: - self.customer_id = customer_id + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PaymentPaymentMethodTrustly from a JSON string""" + return cls.from_dict(json.loads(json_str)) - @property - def customer_id(self): - """Gets the customer_id of this PaymentPaymentMethodTrustly. # noqa: E501 + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. - The Trustly's customer ID. # noqa: E501 + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: - :return: The customer_id of this PaymentPaymentMethodTrustly. # noqa: E501 - :rtype: str + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. """ - return self._customer_id + excluded_fields: Set[str] = set([ + ]) - @customer_id.setter - def customer_id(self, customer_id): - """Sets the customer_id of this PaymentPaymentMethodTrustly. + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict - The Trustly's customer ID. # noqa: E501 + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PaymentPaymentMethodTrustly from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "customerId": obj.get("customerId") + }) + return _obj - :param customer_id: The customer_id of this PaymentPaymentMethodTrustly. # noqa: E501 - :type: str - """ - self._customer_id = customer_id - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, PaymentPaymentMethodTrustly): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, PaymentPaymentMethodTrustly): - return True - - return self.to_dict() != other.to_dict() diff --git a/Monei/models/payment_refund_reason.py b/Monei/models/payment_refund_reason.py index 5ecc3fa..cd49d48 100644 --- a/Monei/models/payment_refund_reason.py +++ b/Monei/models/payment_refund_reason.py @@ -3,99 +3,36 @@ """ MONEI API v1 -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

- The version of the OpenAPI document: 1.5.0 - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 + The version of the OpenAPI document: 1.5.1 + Generated by OpenAPI Generator (https://openapi-generator.tech) -import six + Do not edit the class manually. +""" # noqa: E501 -from Monei.configuration import Configuration +from __future__ import annotations +import json +from enum import Enum +from typing_extensions import Self -class PaymentRefundReason(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - Do not edit the class manually. +class PaymentRefundReason(str, Enum): """ - - """ - allowed enum values + The reason for refunding the Payment. """ - DUPLICATED = "duplicated" - FRAUDULENT = "fraudulent" - REQUESTED_BY_CUSTOMER = "requested_by_customer" - - allowable_values = [DUPLICATED, FRAUDULENT, REQUESTED_BY_CUSTOMER] # noqa: E501 """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. + allowed enum values """ - openapi_types = { - } - - attribute_map = { - } - - def __init__(self, local_vars_configuration=None): # noqa: E501 - """PaymentRefundReason - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - self.discriminator = None - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, PaymentRefundReason): - return False + DUPLICATED = 'duplicated' + FRAUDULENT = 'fraudulent' + REQUESTED_BY_CUSTOMER = 'requested_by_customer' - return self.to_dict() == other.to_dict() + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of PaymentRefundReason from a JSON string""" + return cls(json.loads(json_str)) - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, PaymentRefundReason): - return True - return self.to_dict() != other.to_dict() diff --git a/Monei/models/payment_sequence.py b/Monei/models/payment_sequence.py index 000044f..527410b 100644 --- a/Monei/models/payment_sequence.py +++ b/Monei/models/payment_sequence.py @@ -3,151 +3,98 @@ """ MONEI API v1 -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

- The version of the OpenAPI document: 1.5.0 - Generated by: https://openapi-generator.tech -""" + The version of the OpenAPI document: 1.5.1 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 +from __future__ import annotations import pprint import re # noqa: F401 +import json -import six - -from Monei.configuration import Configuration +from pydantic import BaseModel, ConfigDict, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from Monei.models.payment_sequence_recurring import PaymentSequenceRecurring +from typing import Optional, Set +from typing_extensions import Self - -class PaymentSequence(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. +class PaymentSequence(BaseModel): """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'type': 'str', - 'recurring': 'PaymentSequenceRecurring' - } - - attribute_map = { - 'type': 'type', - 'recurring': 'recurring' - } - - def __init__(self, type=None, recurring=None, local_vars_configuration=None): # noqa: E501 - """PaymentSequence - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._type = None - self._recurring = None - self.discriminator = None - - self.type = type - if recurring is not None: - self.recurring = recurring - - @property - def type(self): - """Gets the type of this PaymentSequence. # noqa: E501 - - - :return: The type of this PaymentSequence. # noqa: E501 - :rtype: str - """ - return self._type - - @type.setter - def type(self, type): - """Sets the type of this PaymentSequence. - - - :param type: The type of this PaymentSequence. # noqa: E501 - :type: str - """ - if self.local_vars_configuration.client_side_validation and type is None: # noqa: E501 - raise ValueError("Invalid value for `type`, must not be `None`") # noqa: E501 - allowed_values = ["recurring"] # noqa: E501 - if self.local_vars_configuration.client_side_validation and type not in allowed_values: # noqa: E501 - raise ValueError( - "Invalid value for `type` ({0}), must be one of {1}" # noqa: E501 - .format(type, allowed_values) - ) - - self._type = type - - @property - def recurring(self): - """Gets the recurring of this PaymentSequence. # noqa: E501 - - - :return: The recurring of this PaymentSequence. # noqa: E501 - :rtype: PaymentSequenceRecurring + This field needs to be sent in order to mark the beginning of a sequence of payments (recurring/subscriptions, installments, and so). Specific configurations can be set in the inside properties (`recurring`). + """ # noqa: E501 + type: StrictStr + recurring: Optional[PaymentSequenceRecurring] = None + __properties: ClassVar[List[str]] = ["type", "recurring"] + + @field_validator('type') + def type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['recurring']): + raise ValueError("must be one of enum values ('recurring')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PaymentSequence from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. """ - return self._recurring + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of recurring + if self.recurring: + _dict['recurring'] = self.recurring.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PaymentSequence from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "type": obj.get("type"), + "recurring": PaymentSequenceRecurring.from_dict(obj["recurring"]) if obj.get("recurring") is not None else None + }) + return _obj - @recurring.setter - def recurring(self, recurring): - """Sets the recurring of this PaymentSequence. - - - :param recurring: The recurring of this PaymentSequence. # noqa: E501 - :type: PaymentSequenceRecurring - """ - self._recurring = recurring - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, PaymentSequence): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, PaymentSequence): - return True - - return self.to_dict() != other.to_dict() diff --git a/Monei/models/payment_sequence_recurring.py b/Monei/models/payment_sequence_recurring.py index c2956a6..26d059b 100644 --- a/Monei/models/payment_sequence_recurring.py +++ b/Monei/models/payment_sequence_recurring.py @@ -3,148 +3,87 @@ """ MONEI API v1 -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

- The version of the OpenAPI document: 1.5.0 - Generated by: https://openapi-generator.tech -""" + The version of the OpenAPI document: 1.5.1 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 +from __future__ import annotations import pprint import re # noqa: F401 +import json -import six - -from Monei.configuration import Configuration - - -class PaymentSequenceRecurring(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self +class PaymentSequenceRecurring(BaseModel): """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'expiry': 'str', - 'frequency': 'int' - } - - attribute_map = { - 'expiry': 'expiry', - 'frequency': 'frequency' - } - - def __init__(self, expiry='*(The payment method or card expiration)*', frequency=25, local_vars_configuration=None): # noqa: E501 - """PaymentSequenceRecurring - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._expiry = None - self._frequency = None - self.discriminator = None - - if expiry is not None: - self.expiry = expiry - if frequency is not None: - self.frequency = frequency - - @property - def expiry(self): - """Gets the expiry of this PaymentSequenceRecurring. # noqa: E501 - - Date after which no further recurring payments will be performed. Must be formatted as `YYYYMMDD`. # noqa: E501 - - :return: The expiry of this PaymentSequenceRecurring. # noqa: E501 - :rtype: str + Specific configurations for recurring payments. Will only be used when `sequence`.`type` is `recurring`. + """ # noqa: E501 + expiry: Optional[StrictStr] = Field(default='*(The payment method or card expiration)*', description="Date after which no further recurring payments will be performed. Must be formatted as `YYYYMMDD`. ") + frequency: Optional[StrictInt] = Field(default=25, description="The minimum number of **days** between the different recurring payments. ") + __properties: ClassVar[List[str]] = ["expiry", "frequency"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PaymentSequenceRecurring from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. """ - return self._expiry - - @expiry.setter - def expiry(self, expiry): - """Sets the expiry of this PaymentSequenceRecurring. + excluded_fields: Set[str] = set([ + ]) - Date after which no further recurring payments will be performed. Must be formatted as `YYYYMMDD`. # noqa: E501 + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict - :param expiry: The expiry of this PaymentSequenceRecurring. # noqa: E501 - :type: str - """ + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PaymentSequenceRecurring from a dict""" + if obj is None: + return None - self._expiry = expiry + if not isinstance(obj, dict): + return cls.model_validate(obj) - @property - def frequency(self): - """Gets the frequency of this PaymentSequenceRecurring. # noqa: E501 + _obj = cls.model_validate({ + "expiry": obj.get("expiry") if obj.get("expiry") is not None else '*(The payment method or card expiration)*', + "frequency": obj.get("frequency") if obj.get("frequency") is not None else 25 + }) + return _obj - The minimum number of **days** between the different recurring payments. # noqa: E501 - - :return: The frequency of this PaymentSequenceRecurring. # noqa: E501 - :rtype: int - """ - return self._frequency - - @frequency.setter - def frequency(self, frequency): - """Sets the frequency of this PaymentSequenceRecurring. - - The minimum number of **days** between the different recurring payments. # noqa: E501 - - :param frequency: The frequency of this PaymentSequenceRecurring. # noqa: E501 - :type: int - """ - self._frequency = frequency - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, PaymentSequenceRecurring): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, PaymentSequenceRecurring): - return True - - return self.to_dict() != other.to_dict() diff --git a/Monei/models/payment_session_details.py b/Monei/models/payment_session_details.py index f5977f8..998cd15 100644 --- a/Monei/models/payment_session_details.py +++ b/Monei/models/payment_session_details.py @@ -3,568 +3,117 @@ """ MONEI API v1 -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

- The version of the OpenAPI document: 1.5.0 - Generated by: https://openapi-generator.tech -""" + The version of the OpenAPI document: 1.5.1 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 +from __future__ import annotations import pprint import re # noqa: F401 +import json -import six - -from Monei.configuration import Configuration - - -class PaymentSessionDetails(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self +class PaymentSessionDetails(BaseModel): """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'ip': 'str', - 'country_code': 'str', - 'lang': 'str', - 'device_type': 'str', - 'device_model': 'str', - 'browser': 'str', - 'browser_version': 'str', - 'os': 'str', - 'os_version': 'str', - 'source': 'str', - 'source_version': 'str', - 'user_agent': 'str', - 'browser_accept': 'str', - 'browser_color_depth': 'int', - 'browser_screen_height': 'int', - 'browser_screen_width': 'int', - 'browser_timezone_offset': 'str' - } - - attribute_map = { - 'ip': 'ip', - 'country_code': 'countryCode', - 'lang': 'lang', - 'device_type': 'deviceType', - 'device_model': 'deviceModel', - 'browser': 'browser', - 'browser_version': 'browserVersion', - 'os': 'os', - 'os_version': 'osVersion', - 'source': 'source', - 'source_version': 'sourceVersion', - 'user_agent': 'userAgent', - 'browser_accept': 'browserAccept', - 'browser_color_depth': 'browserColorDepth', - 'browser_screen_height': 'browserScreenHeight', - 'browser_screen_width': 'browserScreenWidth', - 'browser_timezone_offset': 'browserTimezoneOffset' - } - - def __init__(self, ip=None, country_code=None, lang=None, device_type=None, device_model=None, browser=None, browser_version=None, os=None, os_version=None, source=None, source_version=None, user_agent=None, browser_accept=None, browser_color_depth=None, browser_screen_height=None, browser_screen_width=None, browser_timezone_offset=None, local_vars_configuration=None): # noqa: E501 - """PaymentSessionDetails - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._ip = None - self._country_code = None - self._lang = None - self._device_type = None - self._device_model = None - self._browser = None - self._browser_version = None - self._os = None - self._os_version = None - self._source = None - self._source_version = None - self._user_agent = None - self._browser_accept = None - self._browser_color_depth = None - self._browser_screen_height = None - self._browser_screen_width = None - self._browser_timezone_offset = None - self.discriminator = None - - if ip is not None: - self.ip = ip - if country_code is not None: - self.country_code = country_code - if lang is not None: - self.lang = lang - if device_type is not None: - self.device_type = device_type - if device_model is not None: - self.device_model = device_model - if browser is not None: - self.browser = browser - if browser_version is not None: - self.browser_version = browser_version - if os is not None: - self.os = os - if os_version is not None: - self.os_version = os_version - if source is not None: - self.source = source - if source_version is not None: - self.source_version = source_version - if user_agent is not None: - self.user_agent = user_agent - if browser_accept is not None: - self.browser_accept = browser_accept - if browser_color_depth is not None: - self.browser_color_depth = browser_color_depth - if browser_screen_height is not None: - self.browser_screen_height = browser_screen_height - if browser_screen_width is not None: - self.browser_screen_width = browser_screen_width - if browser_timezone_offset is not None: - self.browser_timezone_offset = browser_timezone_offset - - @property - def ip(self): - """Gets the ip of this PaymentSessionDetails. # noqa: E501 - - The IP address where the operation originated. # noqa: E501 - - :return: The ip of this PaymentSessionDetails. # noqa: E501 - :rtype: str - """ - return self._ip - - @ip.setter - def ip(self, ip): - """Sets the ip of this PaymentSessionDetails. - - The IP address where the operation originated. # noqa: E501 - - :param ip: The ip of this PaymentSessionDetails. # noqa: E501 - :type: str - """ - - self._ip = ip - - @property - def country_code(self): - """Gets the country_code of this PaymentSessionDetails. # noqa: E501 - - Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). # noqa: E501 - - :return: The country_code of this PaymentSessionDetails. # noqa: E501 - :rtype: str - """ - return self._country_code - - @country_code.setter - def country_code(self, country_code): - """Sets the country_code of this PaymentSessionDetails. - - Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). # noqa: E501 - - :param country_code: The country_code of this PaymentSessionDetails. # noqa: E501 - :type: str - """ - - self._country_code = country_code - - @property - def lang(self): - """Gets the lang of this PaymentSessionDetails. # noqa: E501 - - Two-letter language code ([ISO 639-1](https://en.wikipedia.org/wiki/ISO_639-1)). # noqa: E501 - - :return: The lang of this PaymentSessionDetails. # noqa: E501 - :rtype: str - """ - return self._lang - - @lang.setter - def lang(self, lang): - """Sets the lang of this PaymentSessionDetails. - - Two-letter language code ([ISO 639-1](https://en.wikipedia.org/wiki/ISO_639-1)). # noqa: E501 - - :param lang: The lang of this PaymentSessionDetails. # noqa: E501 - :type: str - """ - - self._lang = lang - - @property - def device_type(self): - """Gets the device_type of this PaymentSessionDetails. # noqa: E501 - - Device type, could be `desktop`, `mobile`, `smartTV`, `tablet`. # noqa: E501 - - :return: The device_type of this PaymentSessionDetails. # noqa: E501 - :rtype: str - """ - return self._device_type - - @device_type.setter - def device_type(self, device_type): - """Sets the device_type of this PaymentSessionDetails. - - Device type, could be `desktop`, `mobile`, `smartTV`, `tablet`. # noqa: E501 - - :param device_type: The device_type of this PaymentSessionDetails. # noqa: E501 - :type: str - """ - - self._device_type = device_type - - @property - def device_model(self): - """Gets the device_model of this PaymentSessionDetails. # noqa: E501 - - Information about the device used for the browser session (e.g., `iPhone`). # noqa: E501 - - :return: The device_model of this PaymentSessionDetails. # noqa: E501 - :rtype: str - """ - return self._device_model - - @device_model.setter - def device_model(self, device_model): - """Sets the device_model of this PaymentSessionDetails. - - Information about the device used for the browser session (e.g., `iPhone`). # noqa: E501 - - :param device_model: The device_model of this PaymentSessionDetails. # noqa: E501 - :type: str - """ - - self._device_model = device_model - - @property - def browser(self): - """Gets the browser of this PaymentSessionDetails. # noqa: E501 - - The browser used in this browser session (e.g., `Mobile Safari`). # noqa: E501 - - :return: The browser of this PaymentSessionDetails. # noqa: E501 - :rtype: str - """ - return self._browser - - @browser.setter - def browser(self, browser): - """Sets the browser of this PaymentSessionDetails. - - The browser used in this browser session (e.g., `Mobile Safari`). # noqa: E501 - - :param browser: The browser of this PaymentSessionDetails. # noqa: E501 - :type: str - """ - - self._browser = browser - - @property - def browser_version(self): - """Gets the browser_version of this PaymentSessionDetails. # noqa: E501 - - The version for the browser session (e.g., `13.1.1`). # noqa: E501 - - :return: The browser_version of this PaymentSessionDetails. # noqa: E501 - :rtype: str - """ - return self._browser_version - - @browser_version.setter - def browser_version(self, browser_version): - """Sets the browser_version of this PaymentSessionDetails. - - The version for the browser session (e.g., `13.1.1`). # noqa: E501 - - :param browser_version: The browser_version of this PaymentSessionDetails. # noqa: E501 - :type: str - """ - - self._browser_version = browser_version - - @property - def os(self): - """Gets the os of this PaymentSessionDetails. # noqa: E501 - - Operation system (e.g., `iOS`). # noqa: E501 - - :return: The os of this PaymentSessionDetails. # noqa: E501 - :rtype: str - """ - return self._os - - @os.setter - def os(self, os): - """Sets the os of this PaymentSessionDetails. - - Operation system (e.g., `iOS`). # noqa: E501 - - :param os: The os of this PaymentSessionDetails. # noqa: E501 - :type: str - """ - - self._os = os - - @property - def os_version(self): - """Gets the os_version of this PaymentSessionDetails. # noqa: E501 - - Operation system version (e.g., `13.5.1`). # noqa: E501 - - :return: The os_version of this PaymentSessionDetails. # noqa: E501 - :rtype: str - """ - return self._os_version - - @os_version.setter - def os_version(self, os_version): - """Sets the os_version of this PaymentSessionDetails. - - Operation system version (e.g., `13.5.1`). # noqa: E501 - - :param os_version: The os_version of this PaymentSessionDetails. # noqa: E501 - :type: str - """ - - self._os_version = os_version - - @property - def source(self): - """Gets the source of this PaymentSessionDetails. # noqa: E501 - - The source component from where the operation was generated (mostly for our SDK's). # noqa: E501 - - :return: The source of this PaymentSessionDetails. # noqa: E501 - :rtype: str - """ - return self._source - - @source.setter - def source(self, source): - """Sets the source of this PaymentSessionDetails. - - The source component from where the operation was generated (mostly for our SDK's). # noqa: E501 - - :param source: The source of this PaymentSessionDetails. # noqa: E501 - :type: str - """ - - self._source = source - - @property - def source_version(self): - """Gets the source_version of this PaymentSessionDetails. # noqa: E501 - - The source component version from where the operation was generated (mostly for our SDK's). # noqa: E501 - - :return: The source_version of this PaymentSessionDetails. # noqa: E501 - :rtype: str - """ - return self._source_version - - @source_version.setter - def source_version(self, source_version): - """Sets the source_version of this PaymentSessionDetails. - - The source component version from where the operation was generated (mostly for our SDK's). # noqa: E501 - - :param source_version: The source_version of this PaymentSessionDetails. # noqa: E501 - :type: str - """ - - self._source_version = source_version - - @property - def user_agent(self): - """Gets the user_agent of this PaymentSessionDetails. # noqa: E501 - - Full user agent string of the browser session. # noqa: E501 - - :return: The user_agent of this PaymentSessionDetails. # noqa: E501 - :rtype: str - """ - return self._user_agent - - @user_agent.setter - def user_agent(self, user_agent): - """Sets the user_agent of this PaymentSessionDetails. - - Full user agent string of the browser session. # noqa: E501 - - :param user_agent: The user_agent of this PaymentSessionDetails. # noqa: E501 - :type: str - """ - - self._user_agent = user_agent - - @property - def browser_accept(self): - """Gets the browser_accept of this PaymentSessionDetails. # noqa: E501 - - Browser accept header. # noqa: E501 - - :return: The browser_accept of this PaymentSessionDetails. # noqa: E501 - :rtype: str - """ - return self._browser_accept - - @browser_accept.setter - def browser_accept(self, browser_accept): - """Sets the browser_accept of this PaymentSessionDetails. - - Browser accept header. # noqa: E501 - - :param browser_accept: The browser_accept of this PaymentSessionDetails. # noqa: E501 - :type: str - """ - - self._browser_accept = browser_accept - - @property - def browser_color_depth(self): - """Gets the browser_color_depth of this PaymentSessionDetails. # noqa: E501 - - The color depth of the browser session (e.g., `24`). # noqa: E501 - - :return: The browser_color_depth of this PaymentSessionDetails. # noqa: E501 - :rtype: int - """ - return self._browser_color_depth - - @browser_color_depth.setter - def browser_color_depth(self, browser_color_depth): - """Sets the browser_color_depth of this PaymentSessionDetails. - - The color depth of the browser session (e.g., `24`). # noqa: E501 - - :param browser_color_depth: The browser_color_depth of this PaymentSessionDetails. # noqa: E501 - :type: int - """ - - self._browser_color_depth = browser_color_depth - - @property - def browser_screen_height(self): - """Gets the browser_screen_height of this PaymentSessionDetails. # noqa: E501 - - The screen height of the browser session (e.g., `1152`). # noqa: E501 - - :return: The browser_screen_height of this PaymentSessionDetails. # noqa: E501 - :rtype: int - """ - return self._browser_screen_height - - @browser_screen_height.setter - def browser_screen_height(self, browser_screen_height): - """Sets the browser_screen_height of this PaymentSessionDetails. - - The screen height of the browser session (e.g., `1152`). # noqa: E501 - - :param browser_screen_height: The browser_screen_height of this PaymentSessionDetails. # noqa: E501 - :type: int - """ - - self._browser_screen_height = browser_screen_height - - @property - def browser_screen_width(self): - """Gets the browser_screen_width of this PaymentSessionDetails. # noqa: E501 - - The screen width of the browser session (e.g., `2048`). # noqa: E501 - - :return: The browser_screen_width of this PaymentSessionDetails. # noqa: E501 - :rtype: int - """ - return self._browser_screen_width - - @browser_screen_width.setter - def browser_screen_width(self, browser_screen_width): - """Sets the browser_screen_width of this PaymentSessionDetails. - - The screen width of the browser session (e.g., `2048`). # noqa: E501 - - :param browser_screen_width: The browser_screen_width of this PaymentSessionDetails. # noqa: E501 - :type: int - """ - - self._browser_screen_width = browser_screen_width - - @property - def browser_timezone_offset(self): - """Gets the browser_timezone_offset of this PaymentSessionDetails. # noqa: E501 - - The timezone offset of the browser session (e.g., `-120`). # noqa: E501 - - :return: The browser_timezone_offset of this PaymentSessionDetails. # noqa: E501 - :rtype: str - """ - return self._browser_timezone_offset - - @browser_timezone_offset.setter - def browser_timezone_offset(self, browser_timezone_offset): - """Sets the browser_timezone_offset of this PaymentSessionDetails. - - The timezone offset of the browser session (e.g., `-120`). # noqa: E501 - - :param browser_timezone_offset: The browser_timezone_offset of this PaymentSessionDetails. # noqa: E501 - :type: str - """ - - self._browser_timezone_offset = browser_timezone_offset - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, PaymentSessionDetails): - return False - - return self.to_dict() == other.to_dict() + Information related to the browsing session of the user who initiated the payment. + """ # noqa: E501 + ip: Optional[StrictStr] = Field(default=None, description="The IP address where the operation originated.") + country_code: Optional[StrictStr] = Field(default=None, description="Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).", alias="countryCode") + lang: Optional[StrictStr] = Field(default=None, description="Two-letter language code ([ISO 639-1](https://en.wikipedia.org/wiki/ISO_639-1)).") + device_type: Optional[StrictStr] = Field(default=None, description="Device type, could be `desktop`, `mobile`, `smartTV`, `tablet`.", alias="deviceType") + device_model: Optional[StrictStr] = Field(default=None, description="Information about the device used for the browser session (e.g., `iPhone`).", alias="deviceModel") + browser: Optional[StrictStr] = Field(default=None, description="The browser used in this browser session (e.g., `Mobile Safari`).") + browser_version: Optional[StrictStr] = Field(default=None, description="The version for the browser session (e.g., `13.1.1`).", alias="browserVersion") + os: Optional[StrictStr] = Field(default=None, description="Operation system (e.g., `iOS`).") + os_version: Optional[StrictStr] = Field(default=None, description="Operation system version (e.g., `13.5.1`).", alias="osVersion") + source: Optional[StrictStr] = Field(default=None, description="The source component from where the operation was generated (mostly for our SDK's).") + source_version: Optional[StrictStr] = Field(default=None, description="The source component version from where the operation was generated (mostly for our SDK's).", alias="sourceVersion") + user_agent: Optional[StrictStr] = Field(default=None, description="Full user agent string of the browser session.", alias="userAgent") + browser_accept: Optional[StrictStr] = Field(default=None, description="Browser accept header.", alias="browserAccept") + browser_color_depth: Optional[StrictInt] = Field(default=None, description="The color depth of the browser session (e.g., `24`).", alias="browserColorDepth") + browser_screen_height: Optional[StrictInt] = Field(default=None, description="The screen height of the browser session (e.g., `1152`).", alias="browserScreenHeight") + browser_screen_width: Optional[StrictInt] = Field(default=None, description="The screen width of the browser session (e.g., `2048`).", alias="browserScreenWidth") + browser_timezone_offset: Optional[StrictStr] = Field(default=None, description="The timezone offset of the browser session (e.g., `-120`).", alias="browserTimezoneOffset") + __properties: ClassVar[List[str]] = ["ip", "countryCode", "lang", "deviceType", "deviceModel", "browser", "browserVersion", "os", "osVersion", "source", "sourceVersion", "userAgent", "browserAccept", "browserColorDepth", "browserScreenHeight", "browserScreenWidth", "browserTimezoneOffset"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PaymentSessionDetails from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PaymentSessionDetails from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "ip": obj.get("ip"), + "countryCode": obj.get("countryCode"), + "lang": obj.get("lang"), + "deviceType": obj.get("deviceType"), + "deviceModel": obj.get("deviceModel"), + "browser": obj.get("browser"), + "browserVersion": obj.get("browserVersion"), + "os": obj.get("os"), + "osVersion": obj.get("osVersion"), + "source": obj.get("source"), + "sourceVersion": obj.get("sourceVersion"), + "userAgent": obj.get("userAgent"), + "browserAccept": obj.get("browserAccept"), + "browserColorDepth": obj.get("browserColorDepth"), + "browserScreenHeight": obj.get("browserScreenHeight"), + "browserScreenWidth": obj.get("browserScreenWidth"), + "browserTimezoneOffset": obj.get("browserTimezoneOffset") + }) + return _obj - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, PaymentSessionDetails): - return True - return self.to_dict() != other.to_dict() diff --git a/Monei/models/payment_shipping_details.py b/Monei/models/payment_shipping_details.py index 378a006..515903a 100644 --- a/Monei/models/payment_shipping_details.py +++ b/Monei/models/payment_shipping_details.py @@ -3,258 +3,99 @@ """ MONEI API v1 -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

- The version of the OpenAPI document: 1.5.0 - Generated by: https://openapi-generator.tech -""" + The version of the OpenAPI document: 1.5.1 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 +from __future__ import annotations import pprint import re # noqa: F401 +import json -import six - -from Monei.configuration import Configuration - +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from Monei.models.address import Address +from typing import Optional, Set +from typing_extensions import Self -class PaymentShippingDetails(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. +class PaymentShippingDetails(BaseModel): """ - openapi_types = { - 'name': 'str', - 'email': 'str', - 'phone': 'str', - 'company': 'str', - 'tax_id': 'str', - 'address': 'Address' - } - - attribute_map = { - 'name': 'name', - 'email': 'email', - 'phone': 'phone', - 'company': 'company', - 'tax_id': 'taxId', - 'address': 'address' - } - - def __init__(self, name=None, email=None, phone=None, company=None, tax_id=None, address=None, local_vars_configuration=None): # noqa: E501 - """PaymentShippingDetails - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._name = None - self._email = None - self._phone = None - self._company = None - self._tax_id = None - self._address = None - self.discriminator = None - - if name is not None: - self.name = name - if email is not None: - self.email = email - if phone is not None: - self.phone = phone - if company is not None: - self.company = company - if tax_id is not None: - self.tax_id = tax_id - if address is not None: - self.address = address - - @property - def name(self): - """Gets the name of this PaymentShippingDetails. # noqa: E501 - - The shipping customer's full name. # noqa: E501 - - :return: The name of this PaymentShippingDetails. # noqa: E501 - :rtype: str - """ - return self._name - - @name.setter - def name(self, name): - """Sets the name of this PaymentShippingDetails. - - The shipping customer's full name. # noqa: E501 - - :param name: The name of this PaymentShippingDetails. # noqa: E501 - :type: str - """ - - self._name = name - - @property - def email(self): - """Gets the email of this PaymentShippingDetails. # noqa: E501 - - The shipping customer's email address. # noqa: E501 - - :return: The email of this PaymentShippingDetails. # noqa: E501 - :rtype: str - """ - return self._email - - @email.setter - def email(self, email): - """Sets the email of this PaymentShippingDetails. - - The shipping customer's email address. # noqa: E501 - - :param email: The email of this PaymentShippingDetails. # noqa: E501 - :type: str - """ - - self._email = email - - @property - def phone(self): - """Gets the phone of this PaymentShippingDetails. # noqa: E501 - - The shipping customer's phone number in E.164 format. # noqa: E501 - - :return: The phone of this PaymentShippingDetails. # noqa: E501 - :rtype: str - """ - return self._phone - - @phone.setter - def phone(self, phone): - """Sets the phone of this PaymentShippingDetails. - - The shipping customer's phone number in E.164 format. # noqa: E501 - - :param phone: The phone of this PaymentShippingDetails. # noqa: E501 - :type: str - """ - - self._phone = phone - - @property - def company(self): - """Gets the company of this PaymentShippingDetails. # noqa: E501 - - Name of the company where the shipment is going. # noqa: E501 - - :return: The company of this PaymentShippingDetails. # noqa: E501 - :rtype: str + Shipping information associated with the payment. + """ # noqa: E501 + name: Optional[StrictStr] = Field(default=None, description="The shipping customer's full name.") + email: Optional[StrictStr] = Field(default=None, description="The shipping customer's email address.") + phone: Optional[StrictStr] = Field(default=None, description="The shipping customer's phone number in E.164 format.") + company: Optional[StrictStr] = Field(default=None, description="Name of the company where the shipment is going.") + tax_id: Optional[StrictStr] = Field(default=None, description="Company tax ID.", alias="taxId") + address: Optional[Address] = None + __properties: ClassVar[List[str]] = ["name", "email", "phone", "company", "taxId", "address"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PaymentShippingDetails from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. """ - return self._company - - @company.setter - def company(self, company): - """Sets the company of this PaymentShippingDetails. - - Name of the company where the shipment is going. # noqa: E501 - - :param company: The company of this PaymentShippingDetails. # noqa: E501 - :type: str - """ - - self._company = company - - @property - def tax_id(self): - """Gets the tax_id of this PaymentShippingDetails. # noqa: E501 - - Company tax ID. # noqa: E501 - - :return: The tax_id of this PaymentShippingDetails. # noqa: E501 - :rtype: str - """ - return self._tax_id - - @tax_id.setter - def tax_id(self, tax_id): - """Sets the tax_id of this PaymentShippingDetails. - - Company tax ID. # noqa: E501 - - :param tax_id: The tax_id of this PaymentShippingDetails. # noqa: E501 - :type: str - """ - - self._tax_id = tax_id - - @property - def address(self): - """Gets the address of this PaymentShippingDetails. # noqa: E501 - - - :return: The address of this PaymentShippingDetails. # noqa: E501 - :rtype: Address - """ - return self._address - - @address.setter - def address(self, address): - """Sets the address of this PaymentShippingDetails. - - - :param address: The address of this PaymentShippingDetails. # noqa: E501 - :type: Address - """ - - self._address = address - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, PaymentShippingDetails): - return False - - return self.to_dict() == other.to_dict() + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of address + if self.address: + _dict['address'] = self.address.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PaymentShippingDetails from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "name": obj.get("name"), + "email": obj.get("email"), + "phone": obj.get("phone"), + "company": obj.get("company"), + "taxId": obj.get("taxId"), + "address": Address.from_dict(obj["address"]) if obj.get("address") is not None else None + }) + return _obj - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, PaymentShippingDetails): - return True - return self.to_dict() != other.to_dict() diff --git a/Monei/models/payment_shop.py b/Monei/models/payment_shop.py index 42b2758..0e4e2a2 100644 --- a/Monei/models/payment_shop.py +++ b/Monei/models/payment_shop.py @@ -3,148 +3,87 @@ """ MONEI API v1 -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

- The version of the OpenAPI document: 1.5.0 - Generated by: https://openapi-generator.tech -""" + The version of the OpenAPI document: 1.5.1 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 +from __future__ import annotations import pprint import re # noqa: F401 +import json -import six - -from Monei.configuration import Configuration - - -class PaymentShop(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self +class PaymentShop(BaseModel): """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'name': 'str', - 'country': 'str' - } - - attribute_map = { - 'name': 'name', - 'country': 'country' - } - - def __init__(self, name=None, country=None, local_vars_configuration=None): # noqa: E501 - """PaymentShop - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._name = None - self._country = None - self.discriminator = None - - if name is not None: - self.name = name - if country is not None: - self.country = country - - @property - def name(self): - """Gets the name of this PaymentShop. # noqa: E501 - - The shop name. # noqa: E501 - - :return: The name of this PaymentShop. # noqa: E501 - :rtype: str + The information about the shop (used in [hosted payment page](https://docs.monei.com/docs/use-prebuilt-payment-page)). + """ # noqa: E501 + name: Optional[StrictStr] = Field(default=None, description="The shop name.") + country: Optional[StrictStr] = Field(default=None, description="Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).") + __properties: ClassVar[List[str]] = ["name", "country"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PaymentShop from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. """ - return self._name - - @name.setter - def name(self, name): - """Sets the name of this PaymentShop. + excluded_fields: Set[str] = set([ + ]) - The shop name. # noqa: E501 + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict - :param name: The name of this PaymentShop. # noqa: E501 - :type: str - """ + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PaymentShop from a dict""" + if obj is None: + return None - self._name = name + if not isinstance(obj, dict): + return cls.model_validate(obj) - @property - def country(self): - """Gets the country of this PaymentShop. # noqa: E501 + _obj = cls.model_validate({ + "name": obj.get("name"), + "country": obj.get("country") + }) + return _obj - Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). # noqa: E501 - - :return: The country of this PaymentShop. # noqa: E501 - :rtype: str - """ - return self._country - - @country.setter - def country(self, country): - """Sets the country of this PaymentShop. - - Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). # noqa: E501 - - :param country: The country of this PaymentShop. # noqa: E501 - :type: str - """ - self._country = country - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, PaymentShop): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, PaymentShop): - return True - - return self.to_dict() != other.to_dict() diff --git a/Monei/models/payment_status.py b/Monei/models/payment_status.py index a9f6428..75c07f6 100644 --- a/Monei/models/payment_status.py +++ b/Monei/models/payment_status.py @@ -3,104 +3,41 @@ """ MONEI API v1 -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

- The version of the OpenAPI document: 1.5.0 - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 + The version of the OpenAPI document: 1.5.1 + Generated by OpenAPI Generator (https://openapi-generator.tech) -import six + Do not edit the class manually. +""" # noqa: E501 -from Monei.configuration import Configuration +from __future__ import annotations +import json +from enum import Enum +from typing_extensions import Self -class PaymentStatus(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - Do not edit the class manually. +class PaymentStatus(str, Enum): """ - - """ - allowed enum values + The status of the payment. """ - SUCCEEDED = "SUCCEEDED" - PENDING = "PENDING" - FAILED = "FAILED" - CANCELED = "CANCELED" - REFUNDED = "REFUNDED" - PARTIALLY_REFUNDED = "PARTIALLY_REFUNDED" - AUTHORIZED = "AUTHORIZED" - EXPIRED = "EXPIRED" - - allowable_values = [SUCCEEDED, PENDING, FAILED, CANCELED, REFUNDED, PARTIALLY_REFUNDED, AUTHORIZED, EXPIRED] # noqa: E501 """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. + allowed enum values """ - openapi_types = { - } - - attribute_map = { - } - - def __init__(self, local_vars_configuration=None): # noqa: E501 - """PaymentStatus - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - self.discriminator = None - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, PaymentStatus): - return False + SUCCEEDED = 'SUCCEEDED' + PENDING = 'PENDING' + FAILED = 'FAILED' + CANCELED = 'CANCELED' + REFUNDED = 'REFUNDED' + PARTIALLY_REFUNDED = 'PARTIALLY_REFUNDED' + AUTHORIZED = 'AUTHORIZED' + EXPIRED = 'EXPIRED' - return self.to_dict() == other.to_dict() + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of PaymentStatus from a JSON string""" + return cls(json.loads(json_str)) - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, PaymentStatus): - return True - return self.to_dict() != other.to_dict() diff --git a/Monei/models/payment_trace_details.py b/Monei/models/payment_trace_details.py index e85ff35..82280d0 100644 --- a/Monei/models/payment_trace_details.py +++ b/Monei/models/payment_trace_details.py @@ -3,624 +3,121 @@ """ MONEI API v1 -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

- The version of the OpenAPI document: 1.5.0 - Generated by: https://openapi-generator.tech -""" + The version of the OpenAPI document: 1.5.1 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 +from __future__ import annotations import pprint import re # noqa: F401 +import json -import six - -from Monei.configuration import Configuration - - -class PaymentTraceDetails(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self +class PaymentTraceDetails(BaseModel): """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'ip': 'str', - 'country_code': 'str', - 'lang': 'str', - 'device_type': 'str', - 'device_model': 'str', - 'browser': 'str', - 'browser_version': 'str', - 'os': 'str', - 'os_version': 'str', - 'source': 'str', - 'source_version': 'str', - 'user_agent': 'str', - 'browser_accept': 'str', - 'browser_color_depth': 'int', - 'browser_screen_height': 'int', - 'browser_screen_width': 'int', - 'browser_timezone_offset': 'str', - 'user_id': 'str', - 'user_email': 'str' - } - - attribute_map = { - 'ip': 'ip', - 'country_code': 'countryCode', - 'lang': 'lang', - 'device_type': 'deviceType', - 'device_model': 'deviceModel', - 'browser': 'browser', - 'browser_version': 'browserVersion', - 'os': 'os', - 'os_version': 'osVersion', - 'source': 'source', - 'source_version': 'sourceVersion', - 'user_agent': 'userAgent', - 'browser_accept': 'browserAccept', - 'browser_color_depth': 'browserColorDepth', - 'browser_screen_height': 'browserScreenHeight', - 'browser_screen_width': 'browserScreenWidth', - 'browser_timezone_offset': 'browserTimezoneOffset', - 'user_id': 'userId', - 'user_email': 'userEmail' - } - - def __init__(self, ip=None, country_code=None, lang=None, device_type=None, device_model=None, browser=None, browser_version=None, os=None, os_version=None, source=None, source_version=None, user_agent=None, browser_accept=None, browser_color_depth=None, browser_screen_height=None, browser_screen_width=None, browser_timezone_offset=None, user_id=None, user_email=None, local_vars_configuration=None): # noqa: E501 - """PaymentTraceDetails - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._ip = None - self._country_code = None - self._lang = None - self._device_type = None - self._device_model = None - self._browser = None - self._browser_version = None - self._os = None - self._os_version = None - self._source = None - self._source_version = None - self._user_agent = None - self._browser_accept = None - self._browser_color_depth = None - self._browser_screen_height = None - self._browser_screen_width = None - self._browser_timezone_offset = None - self._user_id = None - self._user_email = None - self.discriminator = None - - if ip is not None: - self.ip = ip - if country_code is not None: - self.country_code = country_code - if lang is not None: - self.lang = lang - if device_type is not None: - self.device_type = device_type - if device_model is not None: - self.device_model = device_model - if browser is not None: - self.browser = browser - if browser_version is not None: - self.browser_version = browser_version - if os is not None: - self.os = os - if os_version is not None: - self.os_version = os_version - if source is not None: - self.source = source - if source_version is not None: - self.source_version = source_version - if user_agent is not None: - self.user_agent = user_agent - if browser_accept is not None: - self.browser_accept = browser_accept - if browser_color_depth is not None: - self.browser_color_depth = browser_color_depth - if browser_screen_height is not None: - self.browser_screen_height = browser_screen_height - if browser_screen_width is not None: - self.browser_screen_width = browser_screen_width - if browser_timezone_offset is not None: - self.browser_timezone_offset = browser_timezone_offset - if user_id is not None: - self.user_id = user_id - if user_email is not None: - self.user_email = user_email - - @property - def ip(self): - """Gets the ip of this PaymentTraceDetails. # noqa: E501 - - The IP address where the operation originated. # noqa: E501 - - :return: The ip of this PaymentTraceDetails. # noqa: E501 - :rtype: str - """ - return self._ip - - @ip.setter - def ip(self, ip): - """Sets the ip of this PaymentTraceDetails. - - The IP address where the operation originated. # noqa: E501 - - :param ip: The ip of this PaymentTraceDetails. # noqa: E501 - :type: str - """ - - self._ip = ip - - @property - def country_code(self): - """Gets the country_code of this PaymentTraceDetails. # noqa: E501 - - Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). # noqa: E501 - - :return: The country_code of this PaymentTraceDetails. # noqa: E501 - :rtype: str - """ - return self._country_code - - @country_code.setter - def country_code(self, country_code): - """Sets the country_code of this PaymentTraceDetails. - - Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). # noqa: E501 - - :param country_code: The country_code of this PaymentTraceDetails. # noqa: E501 - :type: str - """ - - self._country_code = country_code - - @property - def lang(self): - """Gets the lang of this PaymentTraceDetails. # noqa: E501 - - Two-letter language code ([ISO 639-1](https://en.wikipedia.org/wiki/ISO_639-1)). # noqa: E501 - - :return: The lang of this PaymentTraceDetails. # noqa: E501 - :rtype: str - """ - return self._lang - - @lang.setter - def lang(self, lang): - """Sets the lang of this PaymentTraceDetails. - - Two-letter language code ([ISO 639-1](https://en.wikipedia.org/wiki/ISO_639-1)). # noqa: E501 - - :param lang: The lang of this PaymentTraceDetails. # noqa: E501 - :type: str - """ - - self._lang = lang - - @property - def device_type(self): - """Gets the device_type of this PaymentTraceDetails. # noqa: E501 - - Device type, could be `desktop`, `mobile`, `smartTV`, `tablet`. # noqa: E501 - - :return: The device_type of this PaymentTraceDetails. # noqa: E501 - :rtype: str - """ - return self._device_type - - @device_type.setter - def device_type(self, device_type): - """Sets the device_type of this PaymentTraceDetails. - - Device type, could be `desktop`, `mobile`, `smartTV`, `tablet`. # noqa: E501 - - :param device_type: The device_type of this PaymentTraceDetails. # noqa: E501 - :type: str - """ - - self._device_type = device_type - - @property - def device_model(self): - """Gets the device_model of this PaymentTraceDetails. # noqa: E501 - - Information about the device used for the browser session (e.g., `iPhone`). # noqa: E501 - - :return: The device_model of this PaymentTraceDetails. # noqa: E501 - :rtype: str - """ - return self._device_model - - @device_model.setter - def device_model(self, device_model): - """Sets the device_model of this PaymentTraceDetails. - - Information about the device used for the browser session (e.g., `iPhone`). # noqa: E501 - - :param device_model: The device_model of this PaymentTraceDetails. # noqa: E501 - :type: str - """ - - self._device_model = device_model - - @property - def browser(self): - """Gets the browser of this PaymentTraceDetails. # noqa: E501 - - The browser used in this browser session (e.g., `Mobile Safari`). # noqa: E501 - - :return: The browser of this PaymentTraceDetails. # noqa: E501 - :rtype: str - """ - return self._browser - - @browser.setter - def browser(self, browser): - """Sets the browser of this PaymentTraceDetails. - - The browser used in this browser session (e.g., `Mobile Safari`). # noqa: E501 - - :param browser: The browser of this PaymentTraceDetails. # noqa: E501 - :type: str - """ - - self._browser = browser - - @property - def browser_version(self): - """Gets the browser_version of this PaymentTraceDetails. # noqa: E501 - - The version for the browser session (e.g., `13.1.1`). # noqa: E501 - - :return: The browser_version of this PaymentTraceDetails. # noqa: E501 - :rtype: str - """ - return self._browser_version - - @browser_version.setter - def browser_version(self, browser_version): - """Sets the browser_version of this PaymentTraceDetails. - - The version for the browser session (e.g., `13.1.1`). # noqa: E501 - - :param browser_version: The browser_version of this PaymentTraceDetails. # noqa: E501 - :type: str - """ - - self._browser_version = browser_version - - @property - def os(self): - """Gets the os of this PaymentTraceDetails. # noqa: E501 - - Operation system (e.g., `iOS`). # noqa: E501 - - :return: The os of this PaymentTraceDetails. # noqa: E501 - :rtype: str - """ - return self._os - - @os.setter - def os(self, os): - """Sets the os of this PaymentTraceDetails. - - Operation system (e.g., `iOS`). # noqa: E501 - - :param os: The os of this PaymentTraceDetails. # noqa: E501 - :type: str - """ - - self._os = os - - @property - def os_version(self): - """Gets the os_version of this PaymentTraceDetails. # noqa: E501 - - Operation system version (e.g., `13.5.1`). # noqa: E501 - - :return: The os_version of this PaymentTraceDetails. # noqa: E501 - :rtype: str - """ - return self._os_version - - @os_version.setter - def os_version(self, os_version): - """Sets the os_version of this PaymentTraceDetails. - - Operation system version (e.g., `13.5.1`). # noqa: E501 - - :param os_version: The os_version of this PaymentTraceDetails. # noqa: E501 - :type: str - """ - - self._os_version = os_version - - @property - def source(self): - """Gets the source of this PaymentTraceDetails. # noqa: E501 - - The source component from where the operation was generated (mostly for our SDK's). # noqa: E501 - - :return: The source of this PaymentTraceDetails. # noqa: E501 - :rtype: str - """ - return self._source - - @source.setter - def source(self, source): - """Sets the source of this PaymentTraceDetails. - - The source component from where the operation was generated (mostly for our SDK's). # noqa: E501 - - :param source: The source of this PaymentTraceDetails. # noqa: E501 - :type: str - """ - - self._source = source - - @property - def source_version(self): - """Gets the source_version of this PaymentTraceDetails. # noqa: E501 - - The source component version from where the operation was generated (mostly for our SDK's). # noqa: E501 - - :return: The source_version of this PaymentTraceDetails. # noqa: E501 - :rtype: str - """ - return self._source_version - - @source_version.setter - def source_version(self, source_version): - """Sets the source_version of this PaymentTraceDetails. - - The source component version from where the operation was generated (mostly for our SDK's). # noqa: E501 - - :param source_version: The source_version of this PaymentTraceDetails. # noqa: E501 - :type: str - """ - - self._source_version = source_version - - @property - def user_agent(self): - """Gets the user_agent of this PaymentTraceDetails. # noqa: E501 - - Full user agent string of the browser session. # noqa: E501 - - :return: The user_agent of this PaymentTraceDetails. # noqa: E501 - :rtype: str - """ - return self._user_agent - - @user_agent.setter - def user_agent(self, user_agent): - """Sets the user_agent of this PaymentTraceDetails. - - Full user agent string of the browser session. # noqa: E501 - - :param user_agent: The user_agent of this PaymentTraceDetails. # noqa: E501 - :type: str - """ - - self._user_agent = user_agent - - @property - def browser_accept(self): - """Gets the browser_accept of this PaymentTraceDetails. # noqa: E501 - - Browser accept header. # noqa: E501 - - :return: The browser_accept of this PaymentTraceDetails. # noqa: E501 - :rtype: str - """ - return self._browser_accept - - @browser_accept.setter - def browser_accept(self, browser_accept): - """Sets the browser_accept of this PaymentTraceDetails. - - Browser accept header. # noqa: E501 - - :param browser_accept: The browser_accept of this PaymentTraceDetails. # noqa: E501 - :type: str - """ - - self._browser_accept = browser_accept - - @property - def browser_color_depth(self): - """Gets the browser_color_depth of this PaymentTraceDetails. # noqa: E501 - - The color depth of the browser session (e.g., `24`). # noqa: E501 - - :return: The browser_color_depth of this PaymentTraceDetails. # noqa: E501 - :rtype: int - """ - return self._browser_color_depth - - @browser_color_depth.setter - def browser_color_depth(self, browser_color_depth): - """Sets the browser_color_depth of this PaymentTraceDetails. - - The color depth of the browser session (e.g., `24`). # noqa: E501 - - :param browser_color_depth: The browser_color_depth of this PaymentTraceDetails. # noqa: E501 - :type: int - """ - - self._browser_color_depth = browser_color_depth - - @property - def browser_screen_height(self): - """Gets the browser_screen_height of this PaymentTraceDetails. # noqa: E501 - - The screen height of the browser session (e.g., `1152`). # noqa: E501 - - :return: The browser_screen_height of this PaymentTraceDetails. # noqa: E501 - :rtype: int - """ - return self._browser_screen_height - - @browser_screen_height.setter - def browser_screen_height(self, browser_screen_height): - """Sets the browser_screen_height of this PaymentTraceDetails. - - The screen height of the browser session (e.g., `1152`). # noqa: E501 - - :param browser_screen_height: The browser_screen_height of this PaymentTraceDetails. # noqa: E501 - :type: int - """ - - self._browser_screen_height = browser_screen_height - - @property - def browser_screen_width(self): - """Gets the browser_screen_width of this PaymentTraceDetails. # noqa: E501 - - The screen width of the browser session (e.g., `2048`). # noqa: E501 - - :return: The browser_screen_width of this PaymentTraceDetails. # noqa: E501 - :rtype: int - """ - return self._browser_screen_width - - @browser_screen_width.setter - def browser_screen_width(self, browser_screen_width): - """Sets the browser_screen_width of this PaymentTraceDetails. - - The screen width of the browser session (e.g., `2048`). # noqa: E501 - - :param browser_screen_width: The browser_screen_width of this PaymentTraceDetails. # noqa: E501 - :type: int - """ - - self._browser_screen_width = browser_screen_width - - @property - def browser_timezone_offset(self): - """Gets the browser_timezone_offset of this PaymentTraceDetails. # noqa: E501 - - The timezone offset of the browser session (e.g., `-120`). # noqa: E501 - - :return: The browser_timezone_offset of this PaymentTraceDetails. # noqa: E501 - :rtype: str - """ - return self._browser_timezone_offset - - @browser_timezone_offset.setter - def browser_timezone_offset(self, browser_timezone_offset): - """Sets the browser_timezone_offset of this PaymentTraceDetails. - - The timezone offset of the browser session (e.g., `-120`). # noqa: E501 - - :param browser_timezone_offset: The browser_timezone_offset of this PaymentTraceDetails. # noqa: E501 - :type: str - """ - - self._browser_timezone_offset = browser_timezone_offset - - @property - def user_id(self): - """Gets the user_id of this PaymentTraceDetails. # noqa: E501 - - The ID of the user that started the operation. # noqa: E501 - - :return: The user_id of this PaymentTraceDetails. # noqa: E501 - :rtype: str - """ - return self._user_id - - @user_id.setter - def user_id(self, user_id): - """Sets the user_id of this PaymentTraceDetails. - - The ID of the user that started the operation. # noqa: E501 - - :param user_id: The user_id of this PaymentTraceDetails. # noqa: E501 - :type: str - """ - - self._user_id = user_id - - @property - def user_email(self): - """Gets the user_email of this PaymentTraceDetails. # noqa: E501 - - The email of the user that started the operation. # noqa: E501 - - :return: The user_email of this PaymentTraceDetails. # noqa: E501 - :rtype: str - """ - return self._user_email - - @user_email.setter - def user_email(self, user_email): - """Sets the user_email of this PaymentTraceDetails. - - The email of the user that started the operation. # noqa: E501 - - :param user_email: The user_email of this PaymentTraceDetails. # noqa: E501 - :type: str - """ - - self._user_email = user_email - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, PaymentTraceDetails): - return False - - return self.to_dict() == other.to_dict() + Information related to the browsing session of the user who initiated the payment. + """ # noqa: E501 + ip: Optional[StrictStr] = Field(default=None, description="The IP address where the operation originated.") + country_code: Optional[StrictStr] = Field(default=None, description="Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).", alias="countryCode") + lang: Optional[StrictStr] = Field(default=None, description="Two-letter language code ([ISO 639-1](https://en.wikipedia.org/wiki/ISO_639-1)).") + device_type: Optional[StrictStr] = Field(default=None, description="Device type, could be `desktop`, `mobile`, `smartTV`, `tablet`.", alias="deviceType") + device_model: Optional[StrictStr] = Field(default=None, description="Information about the device used for the browser session (e.g., `iPhone`).", alias="deviceModel") + browser: Optional[StrictStr] = Field(default=None, description="The browser used in this browser session (e.g., `Mobile Safari`).") + browser_version: Optional[StrictStr] = Field(default=None, description="The version for the browser session (e.g., `13.1.1`).", alias="browserVersion") + os: Optional[StrictStr] = Field(default=None, description="Operation system (e.g., `iOS`).") + os_version: Optional[StrictStr] = Field(default=None, description="Operation system version (e.g., `13.5.1`).", alias="osVersion") + source: Optional[StrictStr] = Field(default=None, description="The source component from where the operation was generated (mostly for our SDK's).") + source_version: Optional[StrictStr] = Field(default=None, description="The source component version from where the operation was generated (mostly for our SDK's).", alias="sourceVersion") + user_agent: Optional[StrictStr] = Field(default=None, description="Full user agent string of the browser session.", alias="userAgent") + browser_accept: Optional[StrictStr] = Field(default=None, description="Browser accept header.", alias="browserAccept") + browser_color_depth: Optional[StrictInt] = Field(default=None, description="The color depth of the browser session (e.g., `24`).", alias="browserColorDepth") + browser_screen_height: Optional[StrictInt] = Field(default=None, description="The screen height of the browser session (e.g., `1152`).", alias="browserScreenHeight") + browser_screen_width: Optional[StrictInt] = Field(default=None, description="The screen width of the browser session (e.g., `2048`).", alias="browserScreenWidth") + browser_timezone_offset: Optional[StrictStr] = Field(default=None, description="The timezone offset of the browser session (e.g., `-120`).", alias="browserTimezoneOffset") + user_id: Optional[StrictStr] = Field(default=None, description="The ID of the user that started the operation.", alias="userId") + user_email: Optional[StrictStr] = Field(default=None, description="The email of the user that started the operation.", alias="userEmail") + __properties: ClassVar[List[str]] = ["ip", "countryCode", "lang", "deviceType", "deviceModel", "browser", "browserVersion", "os", "osVersion", "source", "sourceVersion", "userAgent", "browserAccept", "browserColorDepth", "browserScreenHeight", "browserScreenWidth", "browserTimezoneOffset", "userId", "userEmail"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PaymentTraceDetails from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PaymentTraceDetails from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "ip": obj.get("ip"), + "countryCode": obj.get("countryCode"), + "lang": obj.get("lang"), + "deviceType": obj.get("deviceType"), + "deviceModel": obj.get("deviceModel"), + "browser": obj.get("browser"), + "browserVersion": obj.get("browserVersion"), + "os": obj.get("os"), + "osVersion": obj.get("osVersion"), + "source": obj.get("source"), + "sourceVersion": obj.get("sourceVersion"), + "userAgent": obj.get("userAgent"), + "browserAccept": obj.get("browserAccept"), + "browserColorDepth": obj.get("browserColorDepth"), + "browserScreenHeight": obj.get("browserScreenHeight"), + "browserScreenWidth": obj.get("browserScreenWidth"), + "browserTimezoneOffset": obj.get("browserTimezoneOffset"), + "userId": obj.get("userId"), + "userEmail": obj.get("userEmail") + }) + return _obj - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, PaymentTraceDetails): - return True - return self.to_dict() != other.to_dict() diff --git a/Monei/models/payment_transaction_type.py b/Monei/models/payment_transaction_type.py index 49d6425..ffd6404 100644 --- a/Monei/models/payment_transaction_type.py +++ b/Monei/models/payment_transaction_type.py @@ -3,100 +3,37 @@ """ MONEI API v1 -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

- The version of the OpenAPI document: 1.5.0 - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 + The version of the OpenAPI document: 1.5.1 + Generated by OpenAPI Generator (https://openapi-generator.tech) -import six + Do not edit the class manually. +""" # noqa: E501 -from Monei.configuration import Configuration +from __future__ import annotations +import json +from enum import Enum +from typing_extensions import Self -class PaymentTransactionType(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - Do not edit the class manually. +class PaymentTransactionType(str, Enum): """ - - """ - allowed enum values + Controls when the funds will be captured. - `SALE` - **Default**. MONEI automatically captures funds when the customer authorizes the payment. - `AUTH` - Place a hold on the funds when the customer authorizes the payment, but don't capture the funds until later. - `PAYOUT` - Send funds to the customer - `VERIF` - Verify the card without placing a hold or capturing funds. """ - SALE = "SALE" - AUTH = "AUTH" - PAYOUT = "PAYOUT" - VERIF = "VERIF" - - allowable_values = [SALE, AUTH, PAYOUT, VERIF] # noqa: E501 """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. + allowed enum values """ - openapi_types = { - } - - attribute_map = { - } - - def __init__(self, local_vars_configuration=None): # noqa: E501 - """PaymentTransactionType - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - self.discriminator = None - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, PaymentTransactionType): - return False + SALE = 'SALE' + AUTH = 'AUTH' + PAYOUT = 'PAYOUT' + VERIF = 'VERIF' - return self.to_dict() == other.to_dict() + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of PaymentTransactionType from a JSON string""" + return cls(json.loads(json_str)) - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, PaymentTransactionType): - return True - return self.to_dict() != other.to_dict() diff --git a/Monei/models/recurring_payment_request.py b/Monei/models/recurring_payment_request.py index 216322b..faeeca7 100644 --- a/Monei/models/recurring_payment_request.py +++ b/Monei/models/recurring_payment_request.py @@ -3,339 +3,114 @@ """ MONEI API v1 -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

- The version of the OpenAPI document: 1.5.0 - Generated by: https://openapi-generator.tech -""" + The version of the OpenAPI document: 1.5.1 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 +from __future__ import annotations import pprint import re # noqa: F401 - -import six - -from Monei.configuration import Configuration - - -class RecurringPaymentRequest(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from Monei.models.payment_billing_details import PaymentBillingDetails +from Monei.models.payment_customer import PaymentCustomer +from Monei.models.payment_shipping_details import PaymentShippingDetails +from Monei.models.payment_transaction_type import PaymentTransactionType +from typing import Optional, Set +from typing_extensions import Self + +class RecurringPaymentRequest(BaseModel): """ - openapi_types = { - 'order_id': 'str', - 'amount': 'int', - 'transaction_type': 'PaymentTransactionType', - 'description': 'str', - 'customer': 'PaymentCustomer', - 'billing_details': 'PaymentBillingDetails', - 'shipping_details': 'PaymentShippingDetails', - 'callback_url': 'str', - 'metadata': 'object' - } - - attribute_map = { - 'order_id': 'orderId', - 'amount': 'amount', - 'transaction_type': 'transactionType', - 'description': 'description', - 'customer': 'customer', - 'billing_details': 'billingDetails', - 'shipping_details': 'shippingDetails', - 'callback_url': 'callbackUrl', - 'metadata': 'metadata' - } - - def __init__(self, order_id=None, amount=None, transaction_type=None, description=None, customer=None, billing_details=None, shipping_details=None, callback_url=None, metadata=None, local_vars_configuration=None): # noqa: E501 - """RecurringPaymentRequest - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._order_id = None - self._amount = None - self._transaction_type = None - self._description = None - self._customer = None - self._billing_details = None - self._shipping_details = None - self._callback_url = None - self._metadata = None - self.discriminator = None - - self.order_id = order_id - if amount is not None: - self.amount = amount - if transaction_type is not None: - self.transaction_type = transaction_type - if description is not None: - self.description = description - if customer is not None: - self.customer = customer - if billing_details is not None: - self.billing_details = billing_details - if shipping_details is not None: - self.shipping_details = shipping_details - if callback_url is not None: - self.callback_url = callback_url - if metadata is not None: - self.metadata = metadata - - @property - def order_id(self): - """Gets the order_id of this RecurringPaymentRequest. # noqa: E501 - - An order ID from your system. A unique identifier that can be used to reconcile the payment with your internal system. # noqa: E501 - - :return: The order_id of this RecurringPaymentRequest. # noqa: E501 - :rtype: str - """ - return self._order_id - - @order_id.setter - def order_id(self, order_id): - """Sets the order_id of this RecurringPaymentRequest. - - An order ID from your system. A unique identifier that can be used to reconcile the payment with your internal system. # noqa: E501 - - :param order_id: The order_id of this RecurringPaymentRequest. # noqa: E501 - :type: str - """ - if self.local_vars_configuration.client_side_validation and order_id is None: # noqa: E501 - raise ValueError("Invalid value for `order_id`, must not be `None`") # noqa: E501 - - self._order_id = order_id - - @property - def amount(self): - """Gets the amount of this RecurringPaymentRequest. # noqa: E501 - - The amount to collected by this subsequent payment. A positive integer representing how much to charge in the smallest currency unit (e.g., 100 cents to charge 1.00 USD). # noqa: E501 - - :return: The amount of this RecurringPaymentRequest. # noqa: E501 - :rtype: int - """ - return self._amount - - @amount.setter - def amount(self, amount): - """Sets the amount of this RecurringPaymentRequest. - - The amount to collected by this subsequent payment. A positive integer representing how much to charge in the smallest currency unit (e.g., 100 cents to charge 1.00 USD). # noqa: E501 - - :param amount: The amount of this RecurringPaymentRequest. # noqa: E501 - :type: int - """ - - self._amount = amount - - @property - def transaction_type(self): - """Gets the transaction_type of this RecurringPaymentRequest. # noqa: E501 - - Same as the `transactionType` parameter from [create payment](https://docs.monei.com/api/#operation/payments_create). If not sent, it will default in the same transaction type used in the initial payment. # noqa: E501 - - :return: The transaction_type of this RecurringPaymentRequest. # noqa: E501 - :rtype: PaymentTransactionType - """ - return self._transaction_type - - @transaction_type.setter - def transaction_type(self, transaction_type): - """Sets the transaction_type of this RecurringPaymentRequest. - - Same as the `transactionType` parameter from [create payment](https://docs.monei.com/api/#operation/payments_create). If not sent, it will default in the same transaction type used in the initial payment. # noqa: E501 - - :param transaction_type: The transaction_type of this RecurringPaymentRequest. # noqa: E501 - :type: PaymentTransactionType - """ - - self._transaction_type = transaction_type - - @property - def description(self): - """Gets the description of this RecurringPaymentRequest. # noqa: E501 - - An arbitrary string attached to the payment. Often useful for displaying to users. # noqa: E501 - - :return: The description of this RecurringPaymentRequest. # noqa: E501 - :rtype: str - """ - return self._description - - @description.setter - def description(self, description): - """Sets the description of this RecurringPaymentRequest. - - An arbitrary string attached to the payment. Often useful for displaying to users. # noqa: E501 - - :param description: The description of this RecurringPaymentRequest. # noqa: E501 - :type: str - """ - - self._description = description - - @property - def customer(self): - """Gets the customer of this RecurringPaymentRequest. # noqa: E501 - - - :return: The customer of this RecurringPaymentRequest. # noqa: E501 - :rtype: PaymentCustomer - """ - return self._customer - - @customer.setter - def customer(self, customer): - """Sets the customer of this RecurringPaymentRequest. - - - :param customer: The customer of this RecurringPaymentRequest. # noqa: E501 - :type: PaymentCustomer - """ - - self._customer = customer - - @property - def billing_details(self): - """Gets the billing_details of this RecurringPaymentRequest. # noqa: E501 - - - :return: The billing_details of this RecurringPaymentRequest. # noqa: E501 - :rtype: PaymentBillingDetails - """ - return self._billing_details - - @billing_details.setter - def billing_details(self, billing_details): - """Sets the billing_details of this RecurringPaymentRequest. - - - :param billing_details: The billing_details of this RecurringPaymentRequest. # noqa: E501 - :type: PaymentBillingDetails - """ - - self._billing_details = billing_details - - @property - def shipping_details(self): - """Gets the shipping_details of this RecurringPaymentRequest. # noqa: E501 - - - :return: The shipping_details of this RecurringPaymentRequest. # noqa: E501 - :rtype: PaymentShippingDetails - """ - return self._shipping_details - - @shipping_details.setter - def shipping_details(self, shipping_details): - """Sets the shipping_details of this RecurringPaymentRequest. - - - :param shipping_details: The shipping_details of this RecurringPaymentRequest. # noqa: E501 - :type: PaymentShippingDetails - """ - - self._shipping_details = shipping_details - - @property - def callback_url(self): - """Gets the callback_url of this RecurringPaymentRequest. # noqa: E501 - - The URL to which a payment result should be sent asynchronously. # noqa: E501 - - :return: The callback_url of this RecurringPaymentRequest. # noqa: E501 - :rtype: str - """ - return self._callback_url - - @callback_url.setter - def callback_url(self, callback_url): - """Sets the callback_url of this RecurringPaymentRequest. - - The URL to which a payment result should be sent asynchronously. # noqa: E501 - - :param callback_url: The callback_url of this RecurringPaymentRequest. # noqa: E501 - :type: str - """ - - self._callback_url = callback_url - - @property - def metadata(self): - """Gets the metadata of this RecurringPaymentRequest. # noqa: E501 - - A set of key-value pairs that you can attach to a resource. This can be useful for storing additional information about the resource in a structured format. # noqa: E501 - - :return: The metadata of this RecurringPaymentRequest. # noqa: E501 - :rtype: object - """ - return self._metadata - - @metadata.setter - def metadata(self, metadata): - """Sets the metadata of this RecurringPaymentRequest. - - A set of key-value pairs that you can attach to a resource. This can be useful for storing additional information about the resource in a structured format. # noqa: E501 - - :param metadata: The metadata of this RecurringPaymentRequest. # noqa: E501 - :type: object - """ - - self._metadata = metadata - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, RecurringPaymentRequest): - return False - - return self.to_dict() == other.to_dict() + RecurringPaymentRequest + """ # noqa: E501 + order_id: StrictStr = Field(description="An order ID from your system. A unique identifier that can be used to reconcile the payment with your internal system. ", alias="orderId") + amount: Optional[StrictInt] = Field(default=None, description="The amount to collected by this subsequent payment. A positive integer representing how much to charge in the smallest currency unit (e.g., 100 cents to charge 1.00 USD). ") + transaction_type: Optional[PaymentTransactionType] = Field(default=None, description="Same as the `transactionType` parameter from [create payment](https://docs.monei.com/api/#operation/payments_create). If not sent, it will default in the same transaction type used in the initial payment. ", alias="transactionType") + description: Optional[StrictStr] = Field(default=None, description="An arbitrary string attached to the payment. Often useful for displaying to users. ") + customer: Optional[PaymentCustomer] = None + billing_details: Optional[PaymentBillingDetails] = Field(default=None, alias="billingDetails") + shipping_details: Optional[PaymentShippingDetails] = Field(default=None, alias="shippingDetails") + callback_url: Optional[StrictStr] = Field(default=None, description="The URL to which a payment result should be sent asynchronously. ", alias="callbackUrl") + metadata: Optional[Dict[str, Any]] = Field(default=None, description="A set of key-value pairs that you can attach to a resource. This can be useful for storing additional information about the resource in a structured format.") + __properties: ClassVar[List[str]] = ["orderId", "amount", "transactionType", "description", "customer", "billingDetails", "shippingDetails", "callbackUrl", "metadata"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of RecurringPaymentRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of customer + if self.customer: + _dict['customer'] = self.customer.to_dict() + # override the default output from pydantic by calling `to_dict()` of billing_details + if self.billing_details: + _dict['billingDetails'] = self.billing_details.to_dict() + # override the default output from pydantic by calling `to_dict()` of shipping_details + if self.shipping_details: + _dict['shippingDetails'] = self.shipping_details.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of RecurringPaymentRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "orderId": obj.get("orderId"), + "amount": obj.get("amount"), + "transactionType": obj.get("transactionType"), + "description": obj.get("description"), + "customer": PaymentCustomer.from_dict(obj["customer"]) if obj.get("customer") is not None else None, + "billingDetails": PaymentBillingDetails.from_dict(obj["billingDetails"]) if obj.get("billingDetails") is not None else None, + "shippingDetails": PaymentShippingDetails.from_dict(obj["shippingDetails"]) if obj.get("shippingDetails") is not None else None, + "callbackUrl": obj.get("callbackUrl"), + "metadata": obj.get("metadata") + }) + return _obj - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, RecurringPaymentRequest): - return True - return self.to_dict() != other.to_dict() diff --git a/Monei/models/refund_payment_request.py b/Monei/models/refund_payment_request.py index ddb45c8..e828532 100644 --- a/Monei/models/refund_payment_request.py +++ b/Monei/models/refund_payment_request.py @@ -3,146 +3,88 @@ """ MONEI API v1 -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

- The version of the OpenAPI document: 1.5.0 - Generated by: https://openapi-generator.tech -""" + The version of the OpenAPI document: 1.5.1 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 +from __future__ import annotations import pprint import re # noqa: F401 +import json -import six - -from Monei.configuration import Configuration - - -class RefundPaymentRequest(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ +from pydantic import BaseModel, ConfigDict, Field, StrictInt +from typing import Any, ClassVar, Dict, List, Optional +from Monei.models.payment_refund_reason import PaymentRefundReason +from typing import Optional, Set +from typing_extensions import Self +class RefundPaymentRequest(BaseModel): """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'amount': 'int', - 'refund_reason': 'PaymentRefundReason' - } - - attribute_map = { - 'amount': 'amount', - 'refund_reason': 'refundReason' - } - - def __init__(self, amount=None, refund_reason=None, local_vars_configuration=None): # noqa: E501 - """RefundPaymentRequest - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._amount = None - self._refund_reason = None - self.discriminator = None - - if amount is not None: - self.amount = amount - if refund_reason is not None: - self.refund_reason = refund_reason - - @property - def amount(self): - """Gets the amount of this RefundPaymentRequest. # noqa: E501 - - The amount to refund, which must be less than or equal to the original amount. # noqa: E501 - - :return: The amount of this RefundPaymentRequest. # noqa: E501 - :rtype: int + RefundPaymentRequest + """ # noqa: E501 + amount: Optional[StrictInt] = Field(default=None, description="The amount to refund, which must be less than or equal to the original amount. ") + refund_reason: Optional[PaymentRefundReason] = Field(default=None, alias="refundReason") + __properties: ClassVar[List[str]] = ["amount", "refundReason"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of RefundPaymentRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. """ - return self._amount - - @amount.setter - def amount(self, amount): - """Sets the amount of this RefundPaymentRequest. + excluded_fields: Set[str] = set([ + ]) - The amount to refund, which must be less than or equal to the original amount. # noqa: E501 + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict - :param amount: The amount of this RefundPaymentRequest. # noqa: E501 - :type: int - """ + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of RefundPaymentRequest from a dict""" + if obj is None: + return None - self._amount = amount + if not isinstance(obj, dict): + return cls.model_validate(obj) - @property - def refund_reason(self): - """Gets the refund_reason of this RefundPaymentRequest. # noqa: E501 + _obj = cls.model_validate({ + "amount": obj.get("amount"), + "refundReason": obj.get("refundReason") + }) + return _obj - :return: The refund_reason of this RefundPaymentRequest. # noqa: E501 - :rtype: PaymentRefundReason - """ - return self._refund_reason - - @refund_reason.setter - def refund_reason(self, refund_reason): - """Sets the refund_reason of this RefundPaymentRequest. - - - :param refund_reason: The refund_reason of this RefundPaymentRequest. # noqa: E501 - :type: PaymentRefundReason - """ - - self._refund_reason = refund_reason - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, RefundPaymentRequest): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, RefundPaymentRequest): - return True - - return self.to_dict() != other.to_dict() diff --git a/Monei/models/register_apple_pay_domain_request.py b/Monei/models/register_apple_pay_domain_request.py index cde861e..5e3ce43 100644 --- a/Monei/models/register_apple_pay_domain_request.py +++ b/Monei/models/register_apple_pay_domain_request.py @@ -3,121 +3,85 @@ """ MONEI API v1 -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

- The version of the OpenAPI document: 1.5.0 - Generated by: https://openapi-generator.tech -""" + The version of the OpenAPI document: 1.5.1 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 +from __future__ import annotations import pprint import re # noqa: F401 +import json -import six +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self -from Monei.configuration import Configuration +class RegisterApplePayDomainRequest(BaseModel): + """ + RegisterApplePayDomainRequest + """ # noqa: E501 + domain_name: StrictStr = Field(description="The domain name to register for Apple Pay.", alias="domainName") + __properties: ClassVar[List[str]] = ["domainName"] + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) -class RegisterApplePayDomainRequest(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - Do not edit the class manually. - """ + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'domain_name': 'str' - } + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) - attribute_map = { - 'domain_name': 'domainName' - } + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of RegisterApplePayDomainRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) - def __init__(self, domain_name=None, local_vars_configuration=None): # noqa: E501 - """RegisterApplePayDomainRequest - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. - self._domain_name = None - self.discriminator = None + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: - self.domain_name = domain_name + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) - @property - def domain_name(self): - """Gets the domain_name of this RegisterApplePayDomainRequest. # noqa: E501 + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict - The domain name to register for Apple Pay. # noqa: E501 + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of RegisterApplePayDomainRequest from a dict""" + if obj is None: + return None - :return: The domain_name of this RegisterApplePayDomainRequest. # noqa: E501 - :rtype: str - """ - return self._domain_name + if not isinstance(obj, dict): + return cls.model_validate(obj) - @domain_name.setter - def domain_name(self, domain_name): - """Sets the domain_name of this RegisterApplePayDomainRequest. + _obj = cls.model_validate({ + "domainName": obj.get("domainName") + }) + return _obj - The domain name to register for Apple Pay. # noqa: E501 - :param domain_name: The domain_name of this RegisterApplePayDomainRequest. # noqa: E501 - :type: str - """ - if self.local_vars_configuration.client_side_validation and domain_name is None: # noqa: E501 - raise ValueError("Invalid value for `domain_name`, must not be `None`") # noqa: E501 - - self._domain_name = domain_name - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, RegisterApplePayDomainRequest): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, RegisterApplePayDomainRequest): - return True - - return self.to_dict() != other.to_dict() diff --git a/Monei/models/register_domain_request.py b/Monei/models/register_domain_request.py deleted file mode 100644 index 324361b..0000000 --- a/Monei/models/register_domain_request.py +++ /dev/null @@ -1,123 +0,0 @@ -# coding: utf-8 - -""" - MONEI API v1 - -

The MONEI API is organized around REST. Our API has predictable resource-oriented URLs, accepts JSON-encoded request bodies, returns JSON-encoded responses, and uses standard HTTP response codes, authentication, and verbs.

Base URL:

https://api.monei.com/v1

Client libraries:

Important:

If you are not using our official SDKs, you need to provide a valid User-Agent header in each request, otherwise your requests will be rejected.

# noqa: E501 - - The version of the OpenAPI document: 1.4.6 - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from Monei.configuration import Configuration - - -class RegisterDomainRequest(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'domain_name': 'str' - } - - attribute_map = { - 'domain_name': 'domainName' - } - - def __init__(self, domain_name=None, local_vars_configuration=None): # noqa: E501 - """RegisterDomainRequest - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._domain_name = None - self.discriminator = None - - self.domain_name = domain_name - - @property - def domain_name(self): - """Gets the domain_name of this RegisterDomainRequest. # noqa: E501 - - The domain name to register for Apple Pay. # noqa: E501 - - :return: The domain_name of this RegisterDomainRequest. # noqa: E501 - :rtype: str - """ - return self._domain_name - - @domain_name.setter - def domain_name(self, domain_name): - """Sets the domain_name of this RegisterDomainRequest. - - The domain name to register for Apple Pay. # noqa: E501 - - :param domain_name: The domain_name of this RegisterDomainRequest. # noqa: E501 - :type: str - """ - if self.local_vars_configuration.client_side_validation and domain_name is None: # noqa: E501 - raise ValueError("Invalid value for `domain_name`, must not be `None`") # noqa: E501 - - self._domain_name = domain_name - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, RegisterDomainRequest): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, RegisterDomainRequest): - return True - - return self.to_dict() != other.to_dict() diff --git a/Monei/models/send_payment_link_request.py b/Monei/models/send_payment_link_request.py index 4036279..f7bc387 100644 --- a/Monei/models/send_payment_link_request.py +++ b/Monei/models/send_payment_link_request.py @@ -3,200 +3,93 @@ """ MONEI API v1 -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

- The version of the OpenAPI document: 1.5.0 - Generated by: https://openapi-generator.tech -""" + The version of the OpenAPI document: 1.5.1 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 +from __future__ import annotations import pprint import re # noqa: F401 +import json -import six - -from Monei.configuration import Configuration - +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from Monei.models.payment_message_channel import PaymentMessageChannel +from Monei.models.payment_message_language import PaymentMessageLanguage +from typing import Optional, Set +from typing_extensions import Self -class SendPaymentLinkRequest(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. +class SendPaymentLinkRequest(BaseModel): """ - openapi_types = { - 'customer_email': 'str', - 'customer_phone': 'str', - 'channel': 'PaymentMessageChannel', - 'language': 'PaymentMessageLanguage' - } - - attribute_map = { - 'customer_email': 'customerEmail', - 'customer_phone': 'customerPhone', - 'channel': 'channel', - 'language': 'language' - } - - def __init__(self, customer_email=None, customer_phone=None, channel=None, language=None, local_vars_configuration=None): # noqa: E501 - """SendPaymentLinkRequest - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._customer_email = None - self._customer_phone = None - self._channel = None - self._language = None - self.discriminator = None - - if customer_email is not None: - self.customer_email = customer_email - if customer_phone is not None: - self.customer_phone = customer_phone - if channel is not None: - self.channel = channel - if language is not None: - self.language = language - - @property - def customer_email(self): - """Gets the customer_email of this SendPaymentLinkRequest. # noqa: E501 - - The customer will receive payment link on this email address. # noqa: E501 - - :return: The customer_email of this SendPaymentLinkRequest. # noqa: E501 - :rtype: str - """ - return self._customer_email - - @customer_email.setter - def customer_email(self, customer_email): - """Sets the customer_email of this SendPaymentLinkRequest. - - The customer will receive payment link on this email address. # noqa: E501 - - :param customer_email: The customer_email of this SendPaymentLinkRequest. # noqa: E501 - :type: str - """ - - self._customer_email = customer_email - - @property - def customer_phone(self): - """Gets the customer_phone of this SendPaymentLinkRequest. # noqa: E501 - - Phone number in E.164 format. The customer will receive payment link on this phone number. # noqa: E501 - - :return: The customer_phone of this SendPaymentLinkRequest. # noqa: E501 - :rtype: str - """ - return self._customer_phone - - @customer_phone.setter - def customer_phone(self, customer_phone): - """Sets the customer_phone of this SendPaymentLinkRequest. - - Phone number in E.164 format. The customer will receive payment link on this phone number. # noqa: E501 - - :param customer_phone: The customer_phone of this SendPaymentLinkRequest. # noqa: E501 - :type: str - """ - - self._customer_phone = customer_phone - - @property - def channel(self): - """Gets the channel of this SendPaymentLinkRequest. # noqa: E501 - - - :return: The channel of this SendPaymentLinkRequest. # noqa: E501 - :rtype: PaymentMessageChannel - """ - return self._channel - - @channel.setter - def channel(self, channel): - """Sets the channel of this SendPaymentLinkRequest. - - - :param channel: The channel of this SendPaymentLinkRequest. # noqa: E501 - :type: PaymentMessageChannel - """ - - self._channel = channel - - @property - def language(self): - """Gets the language of this SendPaymentLinkRequest. # noqa: E501 - - - :return: The language of this SendPaymentLinkRequest. # noqa: E501 - :rtype: PaymentMessageLanguage + SendPaymentLinkRequest + """ # noqa: E501 + customer_email: Optional[StrictStr] = Field(default=None, description="The customer will receive payment link on this email address.", alias="customerEmail") + customer_phone: Optional[StrictStr] = Field(default=None, description="Phone number in E.164 format. The customer will receive payment link on this phone number.", alias="customerPhone") + channel: Optional[PaymentMessageChannel] = None + language: Optional[PaymentMessageLanguage] = None + __properties: ClassVar[List[str]] = ["customerEmail", "customerPhone", "channel", "language"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SendPaymentLinkRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. """ - return self._language - - @language.setter - def language(self, language): - """Sets the language of this SendPaymentLinkRequest. + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SendPaymentLinkRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "customerEmail": obj.get("customerEmail"), + "customerPhone": obj.get("customerPhone"), + "channel": obj.get("channel"), + "language": obj.get("language") + }) + return _obj - :param language: The language of this SendPaymentLinkRequest. # noqa: E501 - :type: PaymentMessageLanguage - """ - - self._language = language - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, SendPaymentLinkRequest): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, SendPaymentLinkRequest): - return True - - return self.to_dict() != other.to_dict() diff --git a/Monei/models/send_payment_receipt_request.py b/Monei/models/send_payment_receipt_request.py index ad19e8d..6837595 100644 --- a/Monei/models/send_payment_receipt_request.py +++ b/Monei/models/send_payment_receipt_request.py @@ -3,200 +3,93 @@ """ MONEI API v1 -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

- The version of the OpenAPI document: 1.5.0 - Generated by: https://openapi-generator.tech -""" + The version of the OpenAPI document: 1.5.1 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 +from __future__ import annotations import pprint import re # noqa: F401 +import json -import six - -from Monei.configuration import Configuration - +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from Monei.models.payment_message_channel import PaymentMessageChannel +from Monei.models.payment_message_language import PaymentMessageLanguage +from typing import Optional, Set +from typing_extensions import Self -class SendPaymentReceiptRequest(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. +class SendPaymentReceiptRequest(BaseModel): """ - openapi_types = { - 'customer_email': 'str', - 'customer_phone': 'str', - 'channel': 'PaymentMessageChannel', - 'language': 'PaymentMessageLanguage' - } - - attribute_map = { - 'customer_email': 'customerEmail', - 'customer_phone': 'customerPhone', - 'channel': 'channel', - 'language': 'language' - } - - def __init__(self, customer_email=None, customer_phone=None, channel=None, language=None, local_vars_configuration=None): # noqa: E501 - """SendPaymentReceiptRequest - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._customer_email = None - self._customer_phone = None - self._channel = None - self._language = None - self.discriminator = None - - if customer_email is not None: - self.customer_email = customer_email - if customer_phone is not None: - self.customer_phone = customer_phone - if channel is not None: - self.channel = channel - if language is not None: - self.language = language - - @property - def customer_email(self): - """Gets the customer_email of this SendPaymentReceiptRequest. # noqa: E501 - - The customer will receive payment receipt on this email address. # noqa: E501 - - :return: The customer_email of this SendPaymentReceiptRequest. # noqa: E501 - :rtype: str - """ - return self._customer_email - - @customer_email.setter - def customer_email(self, customer_email): - """Sets the customer_email of this SendPaymentReceiptRequest. - - The customer will receive payment receipt on this email address. # noqa: E501 - - :param customer_email: The customer_email of this SendPaymentReceiptRequest. # noqa: E501 - :type: str - """ - - self._customer_email = customer_email - - @property - def customer_phone(self): - """Gets the customer_phone of this SendPaymentReceiptRequest. # noqa: E501 - - Phone number in E.164 format. The customer will receive payment receipt link on this phone number. # noqa: E501 - - :return: The customer_phone of this SendPaymentReceiptRequest. # noqa: E501 - :rtype: str - """ - return self._customer_phone - - @customer_phone.setter - def customer_phone(self, customer_phone): - """Sets the customer_phone of this SendPaymentReceiptRequest. - - Phone number in E.164 format. The customer will receive payment receipt link on this phone number. # noqa: E501 - - :param customer_phone: The customer_phone of this SendPaymentReceiptRequest. # noqa: E501 - :type: str - """ - - self._customer_phone = customer_phone - - @property - def channel(self): - """Gets the channel of this SendPaymentReceiptRequest. # noqa: E501 - - - :return: The channel of this SendPaymentReceiptRequest. # noqa: E501 - :rtype: PaymentMessageChannel - """ - return self._channel - - @channel.setter - def channel(self, channel): - """Sets the channel of this SendPaymentReceiptRequest. - - - :param channel: The channel of this SendPaymentReceiptRequest. # noqa: E501 - :type: PaymentMessageChannel - """ - - self._channel = channel - - @property - def language(self): - """Gets the language of this SendPaymentReceiptRequest. # noqa: E501 - - - :return: The language of this SendPaymentReceiptRequest. # noqa: E501 - :rtype: PaymentMessageLanguage + SendPaymentReceiptRequest + """ # noqa: E501 + customer_email: Optional[StrictStr] = Field(default=None, description="The customer will receive payment receipt on this email address.", alias="customerEmail") + customer_phone: Optional[StrictStr] = Field(default=None, description="Phone number in E.164 format. The customer will receive payment receipt link on this phone number.", alias="customerPhone") + channel: Optional[PaymentMessageChannel] = None + language: Optional[PaymentMessageLanguage] = None + __properties: ClassVar[List[str]] = ["customerEmail", "customerPhone", "channel", "language"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SendPaymentReceiptRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. """ - return self._language - - @language.setter - def language(self, language): - """Sets the language of this SendPaymentReceiptRequest. + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SendPaymentReceiptRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "customerEmail": obj.get("customerEmail"), + "customerPhone": obj.get("customerPhone"), + "channel": obj.get("channel"), + "language": obj.get("language") + }) + return _obj - :param language: The language of this SendPaymentReceiptRequest. # noqa: E501 - :type: PaymentMessageLanguage - """ - - self._language = language - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, SendPaymentReceiptRequest): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, SendPaymentReceiptRequest): - return True - - return self.to_dict() != other.to_dict() diff --git a/Monei/models/send_payment_request.py b/Monei/models/send_payment_request.py deleted file mode 100644 index 2914e9f..0000000 --- a/Monei/models/send_payment_request.py +++ /dev/null @@ -1,149 +0,0 @@ -# coding: utf-8 - -""" - MONEI API v1 - -

The MONEI API is organized around REST. Our API has predictable resource-oriented URLs, accepts JSON-encoded request bodies, returns JSON-encoded responses, and uses standard HTTP response codes, authentication, and verbs.

Base URL:

https://api.monei.com/v1

Client libraries:

Important:

If you are not using our official SDKs, you need to provide a valid User-Agent header in each request, otherwise your requests will be rejected.

# noqa: E501 - - The version of the OpenAPI document: 1.4.6 - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from Monei.configuration import Configuration - - -class SendPaymentRequest(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'phone_number': 'str', - 'language': 'PaymentMessageLanguage' - } - - attribute_map = { - 'phone_number': 'phoneNumber', - 'language': 'language' - } - - def __init__(self, phone_number=None, language=None, local_vars_configuration=None): # noqa: E501 - """SendPaymentRequest - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._phone_number = None - self._language = None - self.discriminator = None - - self.phone_number = phone_number - if language is not None: - self.language = language - - @property - def phone_number(self): - """Gets the phone_number of this SendPaymentRequest. # noqa: E501 - - Phone number in E.164 format. The customer will receive payment link on this phone number. # noqa: E501 - - :return: The phone_number of this SendPaymentRequest. # noqa: E501 - :rtype: str - """ - return self._phone_number - - @phone_number.setter - def phone_number(self, phone_number): - """Sets the phone_number of this SendPaymentRequest. - - Phone number in E.164 format. The customer will receive payment link on this phone number. # noqa: E501 - - :param phone_number: The phone_number of this SendPaymentRequest. # noqa: E501 - :type: str - """ - if self.local_vars_configuration.client_side_validation and phone_number is None: # noqa: E501 - raise ValueError("Invalid value for `phone_number`, must not be `None`") # noqa: E501 - - self._phone_number = phone_number - - @property - def language(self): - """Gets the language of this SendPaymentRequest. # noqa: E501 - - - :return: The language of this SendPaymentRequest. # noqa: E501 - :rtype: PaymentMessageLanguage - """ - return self._language - - @language.setter - def language(self, language): - """Sets the language of this SendPaymentRequest. - - - :param language: The language of this SendPaymentRequest. # noqa: E501 - :type: PaymentMessageLanguage - """ - - self._language = language - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, SendPaymentRequest): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, SendPaymentRequest): - return True - - return self.to_dict() != other.to_dict() diff --git a/Monei/models/send_payment_request_request.py b/Monei/models/send_payment_request_request.py index e178fff..96257ae 100644 --- a/Monei/models/send_payment_request_request.py +++ b/Monei/models/send_payment_request_request.py @@ -3,147 +3,88 @@ """ MONEI API v1 -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

- The version of the OpenAPI document: 1.5.0 - Generated by: https://openapi-generator.tech -""" + The version of the OpenAPI document: 1.5.1 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 +from __future__ import annotations import pprint import re # noqa: F401 +import json -import six - -from Monei.configuration import Configuration - - -class SendPaymentRequestRequest(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from Monei.models.payment_message_language import PaymentMessageLanguage +from typing import Optional, Set +from typing_extensions import Self +class SendPaymentRequestRequest(BaseModel): """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'phone_number': 'str', - 'language': 'PaymentMessageLanguage' - } - - attribute_map = { - 'phone_number': 'phoneNumber', - 'language': 'language' - } - - def __init__(self, phone_number=None, language=None, local_vars_configuration=None): # noqa: E501 - """SendPaymentRequestRequest - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._phone_number = None - self._language = None - self.discriminator = None - - self.phone_number = phone_number - if language is not None: - self.language = language - - @property - def phone_number(self): - """Gets the phone_number of this SendPaymentRequestRequest. # noqa: E501 - - Phone number in E.164 format. The customer will receive payment link on this phone number. # noqa: E501 - - :return: The phone_number of this SendPaymentRequestRequest. # noqa: E501 - :rtype: str + SendPaymentRequestRequest + """ # noqa: E501 + phone_number: StrictStr = Field(description="Phone number in E.164 format. The customer will receive payment link on this phone number.", alias="phoneNumber") + language: Optional[PaymentMessageLanguage] = None + __properties: ClassVar[List[str]] = ["phoneNumber", "language"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SendPaymentRequestRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. """ - return self._phone_number - - @phone_number.setter - def phone_number(self, phone_number): - """Sets the phone_number of this SendPaymentRequestRequest. + excluded_fields: Set[str] = set([ + ]) - Phone number in E.164 format. The customer will receive payment link on this phone number. # noqa: E501 + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict - :param phone_number: The phone_number of this SendPaymentRequestRequest. # noqa: E501 - :type: str - """ - if self.local_vars_configuration.client_side_validation and phone_number is None: # noqa: E501 - raise ValueError("Invalid value for `phone_number`, must not be `None`") # noqa: E501 + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SendPaymentRequestRequest from a dict""" + if obj is None: + return None - self._phone_number = phone_number + if not isinstance(obj, dict): + return cls.model_validate(obj) - @property - def language(self): - """Gets the language of this SendPaymentRequestRequest. # noqa: E501 + _obj = cls.model_validate({ + "phoneNumber": obj.get("phoneNumber"), + "language": obj.get("language") + }) + return _obj - :return: The language of this SendPaymentRequestRequest. # noqa: E501 - :rtype: PaymentMessageLanguage - """ - return self._language - - @language.setter - def language(self, language): - """Sets the language of this SendPaymentRequestRequest. - - - :param language: The language of this SendPaymentRequestRequest. # noqa: E501 - :type: PaymentMessageLanguage - """ - - self._language = language - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, SendPaymentRequestRequest): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, SendPaymentRequestRequest): - return True - - return self.to_dict() != other.to_dict() diff --git a/Monei/models/send_subscription_link_request.py b/Monei/models/send_subscription_link_request.py index d88bb4c..518042f 100644 --- a/Monei/models/send_subscription_link_request.py +++ b/Monei/models/send_subscription_link_request.py @@ -3,210 +3,101 @@ """ MONEI API v1 -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

- The version of the OpenAPI document: 1.5.0 - Generated by: https://openapi-generator.tech -""" + The version of the OpenAPI document: 1.5.1 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 +from __future__ import annotations import pprint import re # noqa: F401 +import json -import six - -from Monei.configuration import Configuration - +from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self -class SendSubscriptionLinkRequest(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. +class SendSubscriptionLinkRequest(BaseModel): """ - openapi_types = { - 'customer_email': 'str', - 'customer_phone': 'str', - 'channel': 'str', - 'language': 'str' - } - - attribute_map = { - 'customer_email': 'customerEmail', - 'customer_phone': 'customerPhone', - 'channel': 'channel', - 'language': 'language' - } - - def __init__(self, customer_email=None, customer_phone=None, channel=None, language=None, local_vars_configuration=None): # noqa: E501 - """SendSubscriptionLinkRequest - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._customer_email = None - self._customer_phone = None - self._channel = None - self._language = None - self.discriminator = None - - if customer_email is not None: - self.customer_email = customer_email - if customer_phone is not None: - self.customer_phone = customer_phone - if channel is not None: - self.channel = channel - if language is not None: - self.language = language - - @property - def customer_email(self): - """Gets the customer_email of this SendSubscriptionLinkRequest. # noqa: E501 - - Customer email to send the subscription link to # noqa: E501 - - :return: The customer_email of this SendSubscriptionLinkRequest. # noqa: E501 - :rtype: str - """ - return self._customer_email - - @customer_email.setter - def customer_email(self, customer_email): - """Sets the customer_email of this SendSubscriptionLinkRequest. - - Customer email to send the subscription link to # noqa: E501 - - :param customer_email: The customer_email of this SendSubscriptionLinkRequest. # noqa: E501 - :type: str - """ - - self._customer_email = customer_email - - @property - def customer_phone(self): - """Gets the customer_phone of this SendSubscriptionLinkRequest. # noqa: E501 - - Customer phone number to send the subscription link to # noqa: E501 - - :return: The customer_phone of this SendSubscriptionLinkRequest. # noqa: E501 - :rtype: str - """ - return self._customer_phone - - @customer_phone.setter - def customer_phone(self, customer_phone): - """Sets the customer_phone of this SendSubscriptionLinkRequest. - - Customer phone number to send the subscription link to # noqa: E501 - - :param customer_phone: The customer_phone of this SendSubscriptionLinkRequest. # noqa: E501 - :type: str - """ - - self._customer_phone = customer_phone - - @property - def channel(self): - """Gets the channel of this SendSubscriptionLinkRequest. # noqa: E501 - - Channel to use for sending the subscription link # noqa: E501 - - :return: The channel of this SendSubscriptionLinkRequest. # noqa: E501 - :rtype: str - """ - return self._channel - - @channel.setter - def channel(self, channel): - """Sets the channel of this SendSubscriptionLinkRequest. - - Channel to use for sending the subscription link # noqa: E501 - - :param channel: The channel of this SendSubscriptionLinkRequest. # noqa: E501 - :type: str - """ - allowed_values = ["email", "sms"] # noqa: E501 - if self.local_vars_configuration.client_side_validation and channel not in allowed_values: # noqa: E501 - raise ValueError( - "Invalid value for `channel` ({0}), must be one of {1}" # noqa: E501 - .format(channel, allowed_values) - ) - - self._channel = channel - - @property - def language(self): - """Gets the language of this SendSubscriptionLinkRequest. # noqa: E501 - - Language to use for the subscription link message # noqa: E501 - - :return: The language of this SendSubscriptionLinkRequest. # noqa: E501 - :rtype: str + SendSubscriptionLinkRequest + """ # noqa: E501 + customer_email: Optional[StrictStr] = Field(default=None, description="Customer email to send the subscription link to", alias="customerEmail") + customer_phone: Optional[StrictStr] = Field(default=None, description="Customer phone number to send the subscription link to", alias="customerPhone") + channel: Optional[StrictStr] = Field(default=None, description="Channel to use for sending the subscription link") + language: Optional[StrictStr] = Field(default=None, description="Language to use for the subscription link message") + __properties: ClassVar[List[str]] = ["customerEmail", "customerPhone", "channel", "language"] + + @field_validator('channel') + def channel_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['email', 'sms']): + raise ValueError("must be one of enum values ('email', 'sms')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SendSubscriptionLinkRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. """ - return self._language - - @language.setter - def language(self, language): - """Sets the language of this SendSubscriptionLinkRequest. + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SendSubscriptionLinkRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "customerEmail": obj.get("customerEmail"), + "customerPhone": obj.get("customerPhone"), + "channel": obj.get("channel"), + "language": obj.get("language") + }) + return _obj - Language to use for the subscription link message # noqa: E501 - - :param language: The language of this SendSubscriptionLinkRequest. # noqa: E501 - :type: str - """ - self._language = language - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, SendSubscriptionLinkRequest): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, SendSubscriptionLinkRequest): - return True - - return self.to_dict() != other.to_dict() diff --git a/Monei/models/send_subscription_status_request.py b/Monei/models/send_subscription_status_request.py index 320a476..b7c10be 100644 --- a/Monei/models/send_subscription_status_request.py +++ b/Monei/models/send_subscription_status_request.py @@ -3,210 +3,101 @@ """ MONEI API v1 -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

- The version of the OpenAPI document: 1.5.0 - Generated by: https://openapi-generator.tech -""" + The version of the OpenAPI document: 1.5.1 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 +from __future__ import annotations import pprint import re # noqa: F401 +import json -import six - -from Monei.configuration import Configuration - +from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self -class SendSubscriptionStatusRequest(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. +class SendSubscriptionStatusRequest(BaseModel): """ - openapi_types = { - 'customer_email': 'str', - 'customer_phone': 'str', - 'channel': 'str', - 'language': 'str' - } - - attribute_map = { - 'customer_email': 'customerEmail', - 'customer_phone': 'customerPhone', - 'channel': 'channel', - 'language': 'language' - } - - def __init__(self, customer_email=None, customer_phone=None, channel=None, language=None, local_vars_configuration=None): # noqa: E501 - """SendSubscriptionStatusRequest - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._customer_email = None - self._customer_phone = None - self._channel = None - self._language = None - self.discriminator = None - - if customer_email is not None: - self.customer_email = customer_email - if customer_phone is not None: - self.customer_phone = customer_phone - if channel is not None: - self.channel = channel - if language is not None: - self.language = language - - @property - def customer_email(self): - """Gets the customer_email of this SendSubscriptionStatusRequest. # noqa: E501 - - Customer email to send the subscription status to # noqa: E501 - - :return: The customer_email of this SendSubscriptionStatusRequest. # noqa: E501 - :rtype: str - """ - return self._customer_email - - @customer_email.setter - def customer_email(self, customer_email): - """Sets the customer_email of this SendSubscriptionStatusRequest. - - Customer email to send the subscription status to # noqa: E501 - - :param customer_email: The customer_email of this SendSubscriptionStatusRequest. # noqa: E501 - :type: str - """ - - self._customer_email = customer_email - - @property - def customer_phone(self): - """Gets the customer_phone of this SendSubscriptionStatusRequest. # noqa: E501 - - Customer phone number to send the subscription status to # noqa: E501 - - :return: The customer_phone of this SendSubscriptionStatusRequest. # noqa: E501 - :rtype: str - """ - return self._customer_phone - - @customer_phone.setter - def customer_phone(self, customer_phone): - """Sets the customer_phone of this SendSubscriptionStatusRequest. - - Customer phone number to send the subscription status to # noqa: E501 - - :param customer_phone: The customer_phone of this SendSubscriptionStatusRequest. # noqa: E501 - :type: str - """ - - self._customer_phone = customer_phone - - @property - def channel(self): - """Gets the channel of this SendSubscriptionStatusRequest. # noqa: E501 - - Channel to use for sending the subscription status # noqa: E501 - - :return: The channel of this SendSubscriptionStatusRequest. # noqa: E501 - :rtype: str - """ - return self._channel - - @channel.setter - def channel(self, channel): - """Sets the channel of this SendSubscriptionStatusRequest. - - Channel to use for sending the subscription status # noqa: E501 - - :param channel: The channel of this SendSubscriptionStatusRequest. # noqa: E501 - :type: str - """ - allowed_values = ["email", "sms"] # noqa: E501 - if self.local_vars_configuration.client_side_validation and channel not in allowed_values: # noqa: E501 - raise ValueError( - "Invalid value for `channel` ({0}), must be one of {1}" # noqa: E501 - .format(channel, allowed_values) - ) - - self._channel = channel - - @property - def language(self): - """Gets the language of this SendSubscriptionStatusRequest. # noqa: E501 - - Language to use for the subscription status message # noqa: E501 - - :return: The language of this SendSubscriptionStatusRequest. # noqa: E501 - :rtype: str + SendSubscriptionStatusRequest + """ # noqa: E501 + customer_email: Optional[StrictStr] = Field(default=None, description="Customer email to send the subscription status to", alias="customerEmail") + customer_phone: Optional[StrictStr] = Field(default=None, description="Customer phone number to send the subscription status to", alias="customerPhone") + channel: Optional[StrictStr] = Field(default=None, description="Channel to use for sending the subscription status") + language: Optional[StrictStr] = Field(default=None, description="Language to use for the subscription status message") + __properties: ClassVar[List[str]] = ["customerEmail", "customerPhone", "channel", "language"] + + @field_validator('channel') + def channel_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['email', 'sms']): + raise ValueError("must be one of enum values ('email', 'sms')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SendSubscriptionStatusRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. """ - return self._language - - @language.setter - def language(self, language): - """Sets the language of this SendSubscriptionStatusRequest. + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SendSubscriptionStatusRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "customerEmail": obj.get("customerEmail"), + "customerPhone": obj.get("customerPhone"), + "channel": obj.get("channel"), + "language": obj.get("language") + }) + return _obj - Language to use for the subscription status message # noqa: E501 - - :param language: The language of this SendSubscriptionStatusRequest. # noqa: E501 - :type: str - """ - self._language = language - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, SendSubscriptionStatusRequest): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, SendSubscriptionStatusRequest): - return True - - return self.to_dict() != other.to_dict() diff --git a/Monei/models/subscription.py b/Monei/models/subscription.py index 9ffb3a8..c64d821 100644 --- a/Monei/models/subscription.py +++ b/Monei/models/subscription.py @@ -3,944 +3,179 @@ """ MONEI API v1 -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

- The version of the OpenAPI document: 1.5.0 - Generated by: https://openapi-generator.tech -""" + The version of the OpenAPI document: 1.5.1 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 +from __future__ import annotations import pprint import re # noqa: F401 - -import six - -from Monei.configuration import Configuration - - -class Subscription(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictFloat, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional, Union +from Monei.models.payment_billing_details import PaymentBillingDetails +from Monei.models.payment_customer import PaymentCustomer +from Monei.models.payment_shipping_details import PaymentShippingDetails +from Monei.models.payment_trace_details import PaymentTraceDetails +from Monei.models.subscription_interval import SubscriptionInterval +from Monei.models.subscription_last_payment import SubscriptionLastPayment +from Monei.models.subscription_payment_method import SubscriptionPaymentMethod +from Monei.models.subscription_retry_schedule_inner import SubscriptionRetryScheduleInner +from Monei.models.subscription_status import SubscriptionStatus +from typing import Optional, Set +from typing_extensions import Self + +class Subscription(BaseModel): """ + Subscription + """ # noqa: E501 + id: Optional[StrictStr] = Field(default=None, description="Unique identifier for the subscription.") + amount: Optional[StrictInt] = Field(default=None, description="Amount intended to be collected by this payment. A positive integer representing how much to charge in the smallest currency unit (e.g., 100 cents to charge 1.00 USD). ") + currency: Optional[StrictStr] = Field(default=None, description="Three-letter [ISO currency code](https://en.wikipedia.org/wiki/ISO_4217), in uppercase. Must be a supported currency. ") + description: Optional[StrictStr] = Field(default=None, description="An arbitrary string attached to the subscription. Often useful for displaying to users. ") + account_id: Optional[StrictStr] = Field(default=None, description="MONEI Account identifier.", alias="accountId") + livemode: Optional[StrictBool] = Field(default=None, description="Has the value `true` if the resource exists in live mode or the value `false` if the resource exists in test mode.") + status: Optional[SubscriptionStatus] = None + customer: Optional[PaymentCustomer] = None + billing_details: Optional[PaymentBillingDetails] = Field(default=None, alias="billingDetails") + shipping_details: Optional[PaymentShippingDetails] = Field(default=None, alias="shippingDetails") + interval: Optional[SubscriptionInterval] = None + interval_count: Optional[StrictInt] = Field(default=None, description="Number of intervals between subscription payments.", alias="intervalCount") + pause_interval_count: Optional[StrictInt] = Field(default=None, description="Number of intervals when subscription will be paused before it activates again.", alias="pauseIntervalCount") + last_order_id: Optional[StrictStr] = Field(default=None, description="An order ID from your system. A unique identifier that can be used to reconcile the payment with your internal system. ", alias="lastOrderId") + last_payment: Optional[SubscriptionLastPayment] = Field(default=None, alias="lastPayment") + payment_method: Optional[SubscriptionPaymentMethod] = Field(default=None, alias="paymentMethod") + current_period_start: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="The start date of the current subscription period. Measured in seconds since the Unix epoch.", alias="currentPeriodStart") + current_period_end: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="The end date of the current subscription period. Measured in seconds since the Unix epoch.", alias="currentPeriodEnd") + trial_period_end: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="The end date of the trial period. Measured in seconds since the Unix epoch.", alias="trialPeriodEnd") + next_payment_at: Optional[StrictInt] = Field(default=None, description="The date when the next payment will be made.", alias="nextPaymentAt") + retry_count: Optional[StrictInt] = Field(default=None, description="Number of retries left for the subscription.", alias="retryCount") + retry_schedule: Optional[List[SubscriptionRetryScheduleInner]] = Field(default=None, description="Defines a custom schedule for retrying failed subscription payments. Each entry in the array specifies how long to wait before attempting the next payment retry. If not specified, the system's default retry schedule will be used. ", alias="retrySchedule") + cancel_at_period_end: Optional[StrictBool] = Field(default=None, description="If true, the subscription will be canceled at the end of the current period. ", alias="cancelAtPeriodEnd") + pause_at_period_end: Optional[StrictBool] = Field(default=None, description="If true, the subscription will be paused at the end of the current period. ", alias="pauseAtPeriodEnd") + trace_details: Optional[PaymentTraceDetails] = Field(default=None, alias="traceDetails") + sequence_id: Optional[StrictStr] = Field(default=None, description="A permanent identifier that refers to the initial payment of a sequence of payments. This value needs to be sent in the path for `RECURRING` payments. ", alias="sequenceId") + callback_url: Optional[StrictStr] = Field(default=None, description="The URL will be called each time subscription status changes. You will receive a subscription object in the body of the request. ", alias="callbackUrl") + payment_callback_url: Optional[StrictStr] = Field(default=None, description="The URL will be called each time subscription creates a new payments. You will receive the payment object in the body of the request. ", alias="paymentCallbackUrl") + metadata: Optional[Dict[str, Any]] = Field(default=None, description="A set of key-value pairs that you can attach to a resource. This can be useful for storing additional information about the resource in a structured format.") + created_at: Optional[StrictInt] = Field(default=None, description="Time at which the resource was created. Measured in seconds since the Unix epoch.", alias="createdAt") + updated_at: Optional[StrictInt] = Field(default=None, description="Time at which the resource updated last time. Measured in seconds since the Unix epoch.", alias="updatedAt") + __properties: ClassVar[List[str]] = ["id", "amount", "currency", "description", "accountId", "livemode", "status", "customer", "billingDetails", "shippingDetails", "interval", "intervalCount", "pauseIntervalCount", "lastOrderId", "lastPayment", "paymentMethod", "currentPeriodStart", "currentPeriodEnd", "trialPeriodEnd", "nextPaymentAt", "retryCount", "retrySchedule", "cancelAtPeriodEnd", "pauseAtPeriodEnd", "traceDetails", "sequenceId", "callbackUrl", "paymentCallbackUrl", "metadata", "createdAt", "updatedAt"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of Subscription from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of customer + if self.customer: + _dict['customer'] = self.customer.to_dict() + # override the default output from pydantic by calling `to_dict()` of billing_details + if self.billing_details: + _dict['billingDetails'] = self.billing_details.to_dict() + # override the default output from pydantic by calling `to_dict()` of shipping_details + if self.shipping_details: + _dict['shippingDetails'] = self.shipping_details.to_dict() + # override the default output from pydantic by calling `to_dict()` of last_payment + if self.last_payment: + _dict['lastPayment'] = self.last_payment.to_dict() + # override the default output from pydantic by calling `to_dict()` of payment_method + if self.payment_method: + _dict['paymentMethod'] = self.payment_method.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in retry_schedule (list) + _items = [] + if self.retry_schedule: + for _item_retry_schedule in self.retry_schedule: + if _item_retry_schedule: + _items.append(_item_retry_schedule.to_dict()) + _dict['retrySchedule'] = _items + # override the default output from pydantic by calling `to_dict()` of trace_details + if self.trace_details: + _dict['traceDetails'] = self.trace_details.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of Subscription from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "amount": obj.get("amount"), + "currency": obj.get("currency"), + "description": obj.get("description"), + "accountId": obj.get("accountId"), + "livemode": obj.get("livemode"), + "status": obj.get("status"), + "customer": PaymentCustomer.from_dict(obj["customer"]) if obj.get("customer") is not None else None, + "billingDetails": PaymentBillingDetails.from_dict(obj["billingDetails"]) if obj.get("billingDetails") is not None else None, + "shippingDetails": PaymentShippingDetails.from_dict(obj["shippingDetails"]) if obj.get("shippingDetails") is not None else None, + "interval": obj.get("interval"), + "intervalCount": obj.get("intervalCount"), + "pauseIntervalCount": obj.get("pauseIntervalCount"), + "lastOrderId": obj.get("lastOrderId"), + "lastPayment": SubscriptionLastPayment.from_dict(obj["lastPayment"]) if obj.get("lastPayment") is not None else None, + "paymentMethod": SubscriptionPaymentMethod.from_dict(obj["paymentMethod"]) if obj.get("paymentMethod") is not None else None, + "currentPeriodStart": obj.get("currentPeriodStart"), + "currentPeriodEnd": obj.get("currentPeriodEnd"), + "trialPeriodEnd": obj.get("trialPeriodEnd"), + "nextPaymentAt": obj.get("nextPaymentAt"), + "retryCount": obj.get("retryCount"), + "retrySchedule": [SubscriptionRetryScheduleInner.from_dict(_item) for _item in obj["retrySchedule"]] if obj.get("retrySchedule") is not None else None, + "cancelAtPeriodEnd": obj.get("cancelAtPeriodEnd"), + "pauseAtPeriodEnd": obj.get("pauseAtPeriodEnd"), + "traceDetails": PaymentTraceDetails.from_dict(obj["traceDetails"]) if obj.get("traceDetails") is not None else None, + "sequenceId": obj.get("sequenceId"), + "callbackUrl": obj.get("callbackUrl"), + "paymentCallbackUrl": obj.get("paymentCallbackUrl"), + "metadata": obj.get("metadata"), + "createdAt": obj.get("createdAt"), + "updatedAt": obj.get("updatedAt") + }) + return _obj - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'id': 'str', - 'amount': 'int', - 'currency': 'str', - 'description': 'str', - 'account_id': 'str', - 'livemode': 'bool', - 'status': 'SubscriptionStatus', - 'customer': 'PaymentCustomer', - 'billing_details': 'PaymentBillingDetails', - 'shipping_details': 'PaymentShippingDetails', - 'interval': 'SubscriptionInterval', - 'interval_count': 'int', - 'pause_interval_count': 'int', - 'last_order_id': 'str', - 'last_payment': 'SubscriptionLastPayment', - 'payment_method': 'SubscriptionPaymentMethod', - 'current_period_start': 'float', - 'current_period_end': 'float', - 'trial_period_end': 'float', - 'next_payment_at': 'int', - 'retry_count': 'int', - 'retry_schedule': 'list[object]', - 'cancel_at_period_end': 'bool', - 'pause_at_period_end': 'bool', - 'trace_details': 'PaymentTraceDetails', - 'sequence_id': 'str', - 'callback_url': 'str', - 'payment_callback_url': 'str', - 'metadata': 'object', - 'created_at': 'int', - 'updated_at': 'int' - } - - attribute_map = { - 'id': 'id', - 'amount': 'amount', - 'currency': 'currency', - 'description': 'description', - 'account_id': 'accountId', - 'livemode': 'livemode', - 'status': 'status', - 'customer': 'customer', - 'billing_details': 'billingDetails', - 'shipping_details': 'shippingDetails', - 'interval': 'interval', - 'interval_count': 'intervalCount', - 'pause_interval_count': 'pauseIntervalCount', - 'last_order_id': 'lastOrderId', - 'last_payment': 'lastPayment', - 'payment_method': 'paymentMethod', - 'current_period_start': 'currentPeriodStart', - 'current_period_end': 'currentPeriodEnd', - 'trial_period_end': 'trialPeriodEnd', - 'next_payment_at': 'nextPaymentAt', - 'retry_count': 'retryCount', - 'retry_schedule': 'retrySchedule', - 'cancel_at_period_end': 'cancelAtPeriodEnd', - 'pause_at_period_end': 'pauseAtPeriodEnd', - 'trace_details': 'traceDetails', - 'sequence_id': 'sequenceId', - 'callback_url': 'callbackUrl', - 'payment_callback_url': 'paymentCallbackUrl', - 'metadata': 'metadata', - 'created_at': 'createdAt', - 'updated_at': 'updatedAt' - } - - def __init__(self, id=None, amount=None, currency=None, description=None, account_id=None, livemode=None, status=None, customer=None, billing_details=None, shipping_details=None, interval=None, interval_count=None, pause_interval_count=None, last_order_id=None, last_payment=None, payment_method=None, current_period_start=None, current_period_end=None, trial_period_end=None, next_payment_at=None, retry_count=None, retry_schedule=None, cancel_at_period_end=None, pause_at_period_end=None, trace_details=None, sequence_id=None, callback_url=None, payment_callback_url=None, metadata=None, created_at=None, updated_at=None, local_vars_configuration=None): # noqa: E501 - """Subscription - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._id = None - self._amount = None - self._currency = None - self._description = None - self._account_id = None - self._livemode = None - self._status = None - self._customer = None - self._billing_details = None - self._shipping_details = None - self._interval = None - self._interval_count = None - self._pause_interval_count = None - self._last_order_id = None - self._last_payment = None - self._payment_method = None - self._current_period_start = None - self._current_period_end = None - self._trial_period_end = None - self._next_payment_at = None - self._retry_count = None - self._retry_schedule = None - self._cancel_at_period_end = None - self._pause_at_period_end = None - self._trace_details = None - self._sequence_id = None - self._callback_url = None - self._payment_callback_url = None - self._metadata = None - self._created_at = None - self._updated_at = None - self.discriminator = None - - if id is not None: - self.id = id - if amount is not None: - self.amount = amount - if currency is not None: - self.currency = currency - if description is not None: - self.description = description - if account_id is not None: - self.account_id = account_id - if livemode is not None: - self.livemode = livemode - if status is not None: - self.status = status - if customer is not None: - self.customer = customer - if billing_details is not None: - self.billing_details = billing_details - if shipping_details is not None: - self.shipping_details = shipping_details - if interval is not None: - self.interval = interval - if interval_count is not None: - self.interval_count = interval_count - if pause_interval_count is not None: - self.pause_interval_count = pause_interval_count - if last_order_id is not None: - self.last_order_id = last_order_id - if last_payment is not None: - self.last_payment = last_payment - if payment_method is not None: - self.payment_method = payment_method - if current_period_start is not None: - self.current_period_start = current_period_start - if current_period_end is not None: - self.current_period_end = current_period_end - if trial_period_end is not None: - self.trial_period_end = trial_period_end - if next_payment_at is not None: - self.next_payment_at = next_payment_at - if retry_count is not None: - self.retry_count = retry_count - if retry_schedule is not None: - self.retry_schedule = retry_schedule - if cancel_at_period_end is not None: - self.cancel_at_period_end = cancel_at_period_end - if pause_at_period_end is not None: - self.pause_at_period_end = pause_at_period_end - if trace_details is not None: - self.trace_details = trace_details - if sequence_id is not None: - self.sequence_id = sequence_id - if callback_url is not None: - self.callback_url = callback_url - if payment_callback_url is not None: - self.payment_callback_url = payment_callback_url - if metadata is not None: - self.metadata = metadata - if created_at is not None: - self.created_at = created_at - if updated_at is not None: - self.updated_at = updated_at - - @property - def id(self): - """Gets the id of this Subscription. # noqa: E501 - - Unique identifier for the subscription. # noqa: E501 - - :return: The id of this Subscription. # noqa: E501 - :rtype: str - """ - return self._id - - @id.setter - def id(self, id): - """Sets the id of this Subscription. - - Unique identifier for the subscription. # noqa: E501 - - :param id: The id of this Subscription. # noqa: E501 - :type: str - """ - - self._id = id - - @property - def amount(self): - """Gets the amount of this Subscription. # noqa: E501 - - Amount intended to be collected by this payment. A positive integer representing how much to charge in the smallest currency unit (e.g., 100 cents to charge 1.00 USD). # noqa: E501 - - :return: The amount of this Subscription. # noqa: E501 - :rtype: int - """ - return self._amount - - @amount.setter - def amount(self, amount): - """Sets the amount of this Subscription. - - Amount intended to be collected by this payment. A positive integer representing how much to charge in the smallest currency unit (e.g., 100 cents to charge 1.00 USD). # noqa: E501 - - :param amount: The amount of this Subscription. # noqa: E501 - :type: int - """ - - self._amount = amount - - @property - def currency(self): - """Gets the currency of this Subscription. # noqa: E501 - - Three-letter [ISO currency code](https://en.wikipedia.org/wiki/ISO_4217), in uppercase. Must be a supported currency. # noqa: E501 - - :return: The currency of this Subscription. # noqa: E501 - :rtype: str - """ - return self._currency - - @currency.setter - def currency(self, currency): - """Sets the currency of this Subscription. - - Three-letter [ISO currency code](https://en.wikipedia.org/wiki/ISO_4217), in uppercase. Must be a supported currency. # noqa: E501 - - :param currency: The currency of this Subscription. # noqa: E501 - :type: str - """ - - self._currency = currency - - @property - def description(self): - """Gets the description of this Subscription. # noqa: E501 - - An arbitrary string attached to the subscription. Often useful for displaying to users. # noqa: E501 - - :return: The description of this Subscription. # noqa: E501 - :rtype: str - """ - return self._description - - @description.setter - def description(self, description): - """Sets the description of this Subscription. - - An arbitrary string attached to the subscription. Often useful for displaying to users. # noqa: E501 - - :param description: The description of this Subscription. # noqa: E501 - :type: str - """ - - self._description = description - - @property - def account_id(self): - """Gets the account_id of this Subscription. # noqa: E501 - - MONEI Account identifier. # noqa: E501 - - :return: The account_id of this Subscription. # noqa: E501 - :rtype: str - """ - return self._account_id - - @account_id.setter - def account_id(self, account_id): - """Sets the account_id of this Subscription. - - MONEI Account identifier. # noqa: E501 - - :param account_id: The account_id of this Subscription. # noqa: E501 - :type: str - """ - - self._account_id = account_id - - @property - def livemode(self): - """Gets the livemode of this Subscription. # noqa: E501 - - Has the value `true` if the resource exists in live mode or the value `false` if the resource exists in test mode. # noqa: E501 - - :return: The livemode of this Subscription. # noqa: E501 - :rtype: bool - """ - return self._livemode - - @livemode.setter - def livemode(self, livemode): - """Sets the livemode of this Subscription. - - Has the value `true` if the resource exists in live mode or the value `false` if the resource exists in test mode. # noqa: E501 - - :param livemode: The livemode of this Subscription. # noqa: E501 - :type: bool - """ - - self._livemode = livemode - - @property - def status(self): - """Gets the status of this Subscription. # noqa: E501 - - - :return: The status of this Subscription. # noqa: E501 - :rtype: SubscriptionStatus - """ - return self._status - - @status.setter - def status(self, status): - """Sets the status of this Subscription. - - - :param status: The status of this Subscription. # noqa: E501 - :type: SubscriptionStatus - """ - - self._status = status - - @property - def customer(self): - """Gets the customer of this Subscription. # noqa: E501 - - - :return: The customer of this Subscription. # noqa: E501 - :rtype: PaymentCustomer - """ - return self._customer - - @customer.setter - def customer(self, customer): - """Sets the customer of this Subscription. - - - :param customer: The customer of this Subscription. # noqa: E501 - :type: PaymentCustomer - """ - - self._customer = customer - - @property - def billing_details(self): - """Gets the billing_details of this Subscription. # noqa: E501 - - - :return: The billing_details of this Subscription. # noqa: E501 - :rtype: PaymentBillingDetails - """ - return self._billing_details - - @billing_details.setter - def billing_details(self, billing_details): - """Sets the billing_details of this Subscription. - - - :param billing_details: The billing_details of this Subscription. # noqa: E501 - :type: PaymentBillingDetails - """ - - self._billing_details = billing_details - - @property - def shipping_details(self): - """Gets the shipping_details of this Subscription. # noqa: E501 - - - :return: The shipping_details of this Subscription. # noqa: E501 - :rtype: PaymentShippingDetails - """ - return self._shipping_details - - @shipping_details.setter - def shipping_details(self, shipping_details): - """Sets the shipping_details of this Subscription. - - - :param shipping_details: The shipping_details of this Subscription. # noqa: E501 - :type: PaymentShippingDetails - """ - - self._shipping_details = shipping_details - - @property - def interval(self): - """Gets the interval of this Subscription. # noqa: E501 - - - :return: The interval of this Subscription. # noqa: E501 - :rtype: SubscriptionInterval - """ - return self._interval - - @interval.setter - def interval(self, interval): - """Sets the interval of this Subscription. - - - :param interval: The interval of this Subscription. # noqa: E501 - :type: SubscriptionInterval - """ - - self._interval = interval - - @property - def interval_count(self): - """Gets the interval_count of this Subscription. # noqa: E501 - - Number of intervals between subscription payments. # noqa: E501 - - :return: The interval_count of this Subscription. # noqa: E501 - :rtype: int - """ - return self._interval_count - - @interval_count.setter - def interval_count(self, interval_count): - """Sets the interval_count of this Subscription. - - Number of intervals between subscription payments. # noqa: E501 - - :param interval_count: The interval_count of this Subscription. # noqa: E501 - :type: int - """ - - self._interval_count = interval_count - - @property - def pause_interval_count(self): - """Gets the pause_interval_count of this Subscription. # noqa: E501 - - Number of intervals when subscription will be paused before it activates again. # noqa: E501 - - :return: The pause_interval_count of this Subscription. # noqa: E501 - :rtype: int - """ - return self._pause_interval_count - - @pause_interval_count.setter - def pause_interval_count(self, pause_interval_count): - """Sets the pause_interval_count of this Subscription. - - Number of intervals when subscription will be paused before it activates again. # noqa: E501 - - :param pause_interval_count: The pause_interval_count of this Subscription. # noqa: E501 - :type: int - """ - - self._pause_interval_count = pause_interval_count - - @property - def last_order_id(self): - """Gets the last_order_id of this Subscription. # noqa: E501 - - An order ID from your system. A unique identifier that can be used to reconcile the payment with your internal system. # noqa: E501 - - :return: The last_order_id of this Subscription. # noqa: E501 - :rtype: str - """ - return self._last_order_id - - @last_order_id.setter - def last_order_id(self, last_order_id): - """Sets the last_order_id of this Subscription. - - An order ID from your system. A unique identifier that can be used to reconcile the payment with your internal system. # noqa: E501 - - :param last_order_id: The last_order_id of this Subscription. # noqa: E501 - :type: str - """ - - self._last_order_id = last_order_id - - @property - def last_payment(self): - """Gets the last_payment of this Subscription. # noqa: E501 - - - :return: The last_payment of this Subscription. # noqa: E501 - :rtype: SubscriptionLastPayment - """ - return self._last_payment - - @last_payment.setter - def last_payment(self, last_payment): - """Sets the last_payment of this Subscription. - - - :param last_payment: The last_payment of this Subscription. # noqa: E501 - :type: SubscriptionLastPayment - """ - - self._last_payment = last_payment - - @property - def payment_method(self): - """Gets the payment_method of this Subscription. # noqa: E501 - - - :return: The payment_method of this Subscription. # noqa: E501 - :rtype: SubscriptionPaymentMethod - """ - return self._payment_method - - @payment_method.setter - def payment_method(self, payment_method): - """Sets the payment_method of this Subscription. - - - :param payment_method: The payment_method of this Subscription. # noqa: E501 - :type: SubscriptionPaymentMethod - """ - - self._payment_method = payment_method - - @property - def current_period_start(self): - """Gets the current_period_start of this Subscription. # noqa: E501 - - The start date of the current subscription period. Measured in seconds since the Unix epoch. # noqa: E501 - - :return: The current_period_start of this Subscription. # noqa: E501 - :rtype: float - """ - return self._current_period_start - - @current_period_start.setter - def current_period_start(self, current_period_start): - """Sets the current_period_start of this Subscription. - - The start date of the current subscription period. Measured in seconds since the Unix epoch. # noqa: E501 - - :param current_period_start: The current_period_start of this Subscription. # noqa: E501 - :type: float - """ - - self._current_period_start = current_period_start - - @property - def current_period_end(self): - """Gets the current_period_end of this Subscription. # noqa: E501 - - The end date of the current subscription period. Measured in seconds since the Unix epoch. # noqa: E501 - - :return: The current_period_end of this Subscription. # noqa: E501 - :rtype: float - """ - return self._current_period_end - - @current_period_end.setter - def current_period_end(self, current_period_end): - """Sets the current_period_end of this Subscription. - - The end date of the current subscription period. Measured in seconds since the Unix epoch. # noqa: E501 - - :param current_period_end: The current_period_end of this Subscription. # noqa: E501 - :type: float - """ - - self._current_period_end = current_period_end - - @property - def trial_period_end(self): - """Gets the trial_period_end of this Subscription. # noqa: E501 - - The end date of the trial period. Measured in seconds since the Unix epoch. # noqa: E501 - - :return: The trial_period_end of this Subscription. # noqa: E501 - :rtype: float - """ - return self._trial_period_end - - @trial_period_end.setter - def trial_period_end(self, trial_period_end): - """Sets the trial_period_end of this Subscription. - - The end date of the trial period. Measured in seconds since the Unix epoch. # noqa: E501 - - :param trial_period_end: The trial_period_end of this Subscription. # noqa: E501 - :type: float - """ - - self._trial_period_end = trial_period_end - - @property - def next_payment_at(self): - """Gets the next_payment_at of this Subscription. # noqa: E501 - - The date when the next payment will be made. # noqa: E501 - - :return: The next_payment_at of this Subscription. # noqa: E501 - :rtype: int - """ - return self._next_payment_at - - @next_payment_at.setter - def next_payment_at(self, next_payment_at): - """Sets the next_payment_at of this Subscription. - - The date when the next payment will be made. # noqa: E501 - - :param next_payment_at: The next_payment_at of this Subscription. # noqa: E501 - :type: int - """ - - self._next_payment_at = next_payment_at - - @property - def retry_count(self): - """Gets the retry_count of this Subscription. # noqa: E501 - - Number of retries left for the subscription. # noqa: E501 - - :return: The retry_count of this Subscription. # noqa: E501 - :rtype: int - """ - return self._retry_count - - @retry_count.setter - def retry_count(self, retry_count): - """Sets the retry_count of this Subscription. - - Number of retries left for the subscription. # noqa: E501 - - :param retry_count: The retry_count of this Subscription. # noqa: E501 - :type: int - """ - - self._retry_count = retry_count - - @property - def retry_schedule(self): - """Gets the retry_schedule of this Subscription. # noqa: E501 - - Defines a custom schedule for retrying failed subscription payments. Each entry in the array specifies how long to wait before attempting the next payment retry. If not specified, the system's default retry schedule will be used. # noqa: E501 - - :return: The retry_schedule of this Subscription. # noqa: E501 - :rtype: list[object] - """ - return self._retry_schedule - - @retry_schedule.setter - def retry_schedule(self, retry_schedule): - """Sets the retry_schedule of this Subscription. - - Defines a custom schedule for retrying failed subscription payments. Each entry in the array specifies how long to wait before attempting the next payment retry. If not specified, the system's default retry schedule will be used. # noqa: E501 - - :param retry_schedule: The retry_schedule of this Subscription. # noqa: E501 - :type: list[object] - """ - - self._retry_schedule = retry_schedule - - @property - def cancel_at_period_end(self): - """Gets the cancel_at_period_end of this Subscription. # noqa: E501 - - If true, the subscription will be canceled at the end of the current period. # noqa: E501 - - :return: The cancel_at_period_end of this Subscription. # noqa: E501 - :rtype: bool - """ - return self._cancel_at_period_end - - @cancel_at_period_end.setter - def cancel_at_period_end(self, cancel_at_period_end): - """Sets the cancel_at_period_end of this Subscription. - - If true, the subscription will be canceled at the end of the current period. # noqa: E501 - - :param cancel_at_period_end: The cancel_at_period_end of this Subscription. # noqa: E501 - :type: bool - """ - - self._cancel_at_period_end = cancel_at_period_end - - @property - def pause_at_period_end(self): - """Gets the pause_at_period_end of this Subscription. # noqa: E501 - - If true, the subscription will be paused at the end of the current period. # noqa: E501 - - :return: The pause_at_period_end of this Subscription. # noqa: E501 - :rtype: bool - """ - return self._pause_at_period_end - - @pause_at_period_end.setter - def pause_at_period_end(self, pause_at_period_end): - """Sets the pause_at_period_end of this Subscription. - - If true, the subscription will be paused at the end of the current period. # noqa: E501 - - :param pause_at_period_end: The pause_at_period_end of this Subscription. # noqa: E501 - :type: bool - """ - - self._pause_at_period_end = pause_at_period_end - - @property - def trace_details(self): - """Gets the trace_details of this Subscription. # noqa: E501 - - - :return: The trace_details of this Subscription. # noqa: E501 - :rtype: PaymentTraceDetails - """ - return self._trace_details - - @trace_details.setter - def trace_details(self, trace_details): - """Sets the trace_details of this Subscription. - - - :param trace_details: The trace_details of this Subscription. # noqa: E501 - :type: PaymentTraceDetails - """ - - self._trace_details = trace_details - - @property - def sequence_id(self): - """Gets the sequence_id of this Subscription. # noqa: E501 - - A permanent identifier that refers to the initial payment of a sequence of payments. This value needs to be sent in the path for `RECURRING` payments. # noqa: E501 - - :return: The sequence_id of this Subscription. # noqa: E501 - :rtype: str - """ - return self._sequence_id - - @sequence_id.setter - def sequence_id(self, sequence_id): - """Sets the sequence_id of this Subscription. - - A permanent identifier that refers to the initial payment of a sequence of payments. This value needs to be sent in the path for `RECURRING` payments. # noqa: E501 - - :param sequence_id: The sequence_id of this Subscription. # noqa: E501 - :type: str - """ - - self._sequence_id = sequence_id - - @property - def callback_url(self): - """Gets the callback_url of this Subscription. # noqa: E501 - - The URL will be called each time subscription status changes. You will receive a subscription object in the body of the request. # noqa: E501 - - :return: The callback_url of this Subscription. # noqa: E501 - :rtype: str - """ - return self._callback_url - - @callback_url.setter - def callback_url(self, callback_url): - """Sets the callback_url of this Subscription. - - The URL will be called each time subscription status changes. You will receive a subscription object in the body of the request. # noqa: E501 - - :param callback_url: The callback_url of this Subscription. # noqa: E501 - :type: str - """ - - self._callback_url = callback_url - - @property - def payment_callback_url(self): - """Gets the payment_callback_url of this Subscription. # noqa: E501 - - The URL will be called each time subscription creates a new payments. You will receive the payment object in the body of the request. # noqa: E501 - - :return: The payment_callback_url of this Subscription. # noqa: E501 - :rtype: str - """ - return self._payment_callback_url - - @payment_callback_url.setter - def payment_callback_url(self, payment_callback_url): - """Sets the payment_callback_url of this Subscription. - - The URL will be called each time subscription creates a new payments. You will receive the payment object in the body of the request. # noqa: E501 - - :param payment_callback_url: The payment_callback_url of this Subscription. # noqa: E501 - :type: str - """ - - self._payment_callback_url = payment_callback_url - - @property - def metadata(self): - """Gets the metadata of this Subscription. # noqa: E501 - - A set of key-value pairs that you can attach to a resource. This can be useful for storing additional information about the resource in a structured format. # noqa: E501 - - :return: The metadata of this Subscription. # noqa: E501 - :rtype: object - """ - return self._metadata - - @metadata.setter - def metadata(self, metadata): - """Sets the metadata of this Subscription. - - A set of key-value pairs that you can attach to a resource. This can be useful for storing additional information about the resource in a structured format. # noqa: E501 - - :param metadata: The metadata of this Subscription. # noqa: E501 - :type: object - """ - - self._metadata = metadata - - @property - def created_at(self): - """Gets the created_at of this Subscription. # noqa: E501 - - Time at which the resource was created. Measured in seconds since the Unix epoch. # noqa: E501 - - :return: The created_at of this Subscription. # noqa: E501 - :rtype: int - """ - return self._created_at - - @created_at.setter - def created_at(self, created_at): - """Sets the created_at of this Subscription. - - Time at which the resource was created. Measured in seconds since the Unix epoch. # noqa: E501 - - :param created_at: The created_at of this Subscription. # noqa: E501 - :type: int - """ - - self._created_at = created_at - - @property - def updated_at(self): - """Gets the updated_at of this Subscription. # noqa: E501 - - Time at which the resource updated last time. Measured in seconds since the Unix epoch. # noqa: E501 - - :return: The updated_at of this Subscription. # noqa: E501 - :rtype: int - """ - return self._updated_at - - @updated_at.setter - def updated_at(self, updated_at): - """Sets the updated_at of this Subscription. - - Time at which the resource updated last time. Measured in seconds since the Unix epoch. # noqa: E501 - - :param updated_at: The updated_at of this Subscription. # noqa: E501 - :type: int - """ - - self._updated_at = updated_at - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, Subscription): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, Subscription): - return True - return self.to_dict() != other.to_dict() diff --git a/Monei/models/subscription_interval.py b/Monei/models/subscription_interval.py index 6f73be5..c8c5ba8 100644 --- a/Monei/models/subscription_interval.py +++ b/Monei/models/subscription_interval.py @@ -3,100 +3,37 @@ """ MONEI API v1 -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

- The version of the OpenAPI document: 1.5.0 - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 + The version of the OpenAPI document: 1.5.1 + Generated by OpenAPI Generator (https://openapi-generator.tech) -import six + Do not edit the class manually. +""" # noqa: E501 -from Monei.configuration import Configuration +from __future__ import annotations +import json +from enum import Enum +from typing_extensions import Self -class SubscriptionInterval(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - Do not edit the class manually. +class SubscriptionInterval(str, Enum): """ - - """ - allowed enum values + Subscription interval. """ - DAY = "day" - WEEK = "week" - MONTH = "month" - YEAR = "year" - - allowable_values = [DAY, WEEK, MONTH, YEAR] # noqa: E501 """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. + allowed enum values """ - openapi_types = { - } - - attribute_map = { - } - - def __init__(self, local_vars_configuration=None): # noqa: E501 - """SubscriptionInterval - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - self.discriminator = None - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, SubscriptionInterval): - return False + DAY = 'day' + WEEK = 'week' + MONTH = 'month' + YEAR = 'year' - return self.to_dict() == other.to_dict() + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of SubscriptionInterval from a JSON string""" + return cls(json.loads(json_str)) - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, SubscriptionInterval): - return True - return self.to_dict() != other.to_dict() diff --git a/Monei/models/subscription_last_payment.py b/Monei/models/subscription_last_payment.py index 25f2517..8e02d4c 100644 --- a/Monei/models/subscription_last_payment.py +++ b/Monei/models/subscription_last_payment.py @@ -3,202 +3,92 @@ """ MONEI API v1 -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

- The version of the OpenAPI document: 1.5.0 - Generated by: https://openapi-generator.tech -""" + The version of the OpenAPI document: 1.5.1 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 +from __future__ import annotations import pprint import re # noqa: F401 +import json -import six - -from Monei.configuration import Configuration - +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from Monei.models.payment_status import PaymentStatus +from typing import Optional, Set +from typing_extensions import Self -class SubscriptionLastPayment(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. +class SubscriptionLastPayment(BaseModel): """ - openapi_types = { - 'id': 'str', - 'status': 'PaymentStatus', - 'status_code': 'str', - 'status_message': 'str' - } - - attribute_map = { - 'id': 'id', - 'status': 'status', - 'status_code': 'statusCode', - 'status_message': 'statusMessage' - } - - def __init__(self, id=None, status=None, status_code=None, status_message=None, local_vars_configuration=None): # noqa: E501 - """SubscriptionLastPayment - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._id = None - self._status = None - self._status_code = None - self._status_message = None - self.discriminator = None - - if id is not None: - self.id = id - if status is not None: - self.status = status - if status_code is not None: - self.status_code = status_code - if status_message is not None: - self.status_message = status_message - - @property - def id(self): - """Gets the id of this SubscriptionLastPayment. # noqa: E501 - - Unique identifier for the payment. # noqa: E501 - - :return: The id of this SubscriptionLastPayment. # noqa: E501 - :rtype: str - """ - return self._id - - @id.setter - def id(self, id): - """Sets the id of this SubscriptionLastPayment. - - Unique identifier for the payment. # noqa: E501 - - :param id: The id of this SubscriptionLastPayment. # noqa: E501 - :type: str - """ - - self._id = id - - @property - def status(self): - """Gets the status of this SubscriptionLastPayment. # noqa: E501 - - - :return: The status of this SubscriptionLastPayment. # noqa: E501 - :rtype: PaymentStatus - """ - return self._status - - @status.setter - def status(self, status): - """Sets the status of this SubscriptionLastPayment. - - - :param status: The status of this SubscriptionLastPayment. # noqa: E501 - :type: PaymentStatus - """ - - self._status = status - - @property - def status_code(self): - """Gets the status_code of this SubscriptionLastPayment. # noqa: E501 - - Payment status code. # noqa: E501 - - :return: The status_code of this SubscriptionLastPayment. # noqa: E501 - :rtype: str - """ - return self._status_code - - @status_code.setter - def status_code(self, status_code): - """Sets the status_code of this SubscriptionLastPayment. - - Payment status code. # noqa: E501 - - :param status_code: The status_code of this SubscriptionLastPayment. # noqa: E501 - :type: str - """ - - self._status_code = status_code - - @property - def status_message(self): - """Gets the status_message of this SubscriptionLastPayment. # noqa: E501 - - Human readable status message, can be displayed to a user. # noqa: E501 - - :return: The status_message of this SubscriptionLastPayment. # noqa: E501 - :rtype: str + SubscriptionLastPayment + """ # noqa: E501 + id: Optional[StrictStr] = Field(default=None, description="Unique identifier for the payment.") + status: Optional[PaymentStatus] = None + status_code: Optional[StrictStr] = Field(default=None, description="Payment status code. ", alias="statusCode") + status_message: Optional[StrictStr] = Field(default=None, description="Human readable status message, can be displayed to a user. ", alias="statusMessage") + __properties: ClassVar[List[str]] = ["id", "status", "statusCode", "statusMessage"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SubscriptionLastPayment from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. """ - return self._status_message - - @status_message.setter - def status_message(self, status_message): - """Sets the status_message of this SubscriptionLastPayment. + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SubscriptionLastPayment from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "status": obj.get("status"), + "statusCode": obj.get("statusCode"), + "statusMessage": obj.get("statusMessage") + }) + return _obj - Human readable status message, can be displayed to a user. # noqa: E501 - - :param status_message: The status_message of this SubscriptionLastPayment. # noqa: E501 - :type: str - """ - self._status_message = status_message - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, SubscriptionLastPayment): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, SubscriptionLastPayment): - return True - - return self.to_dict() != other.to_dict() diff --git a/Monei/models/subscription_payment_method.py b/Monei/models/subscription_payment_method.py index 23f392a..f83fba1 100644 --- a/Monei/models/subscription_payment_method.py +++ b/Monei/models/subscription_payment_method.py @@ -3,152 +3,101 @@ """ MONEI API v1 -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

- The version of the OpenAPI document: 1.5.0 - Generated by: https://openapi-generator.tech -""" + The version of the OpenAPI document: 1.5.1 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 +from __future__ import annotations import pprint import re # noqa: F401 +import json -import six - -from Monei.configuration import Configuration - - -class SubscriptionPaymentMethod(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ +from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from Monei.models.payment_payment_method_card import PaymentPaymentMethodCard +from typing import Optional, Set +from typing_extensions import Self +class SubscriptionPaymentMethod(BaseModel): """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'method': 'str', - 'card': 'PaymentPaymentMethodCard' - } - - attribute_map = { - 'method': 'method', - 'card': 'card' - } - - def __init__(self, method=None, card=None, local_vars_configuration=None): # noqa: E501 - """SubscriptionPaymentMethod - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._method = None - self._card = None - self.discriminator = None - - if method is not None: - self.method = method - if card is not None: - self.card = card - - @property - def method(self): - """Gets the method of this SubscriptionPaymentMethod. # noqa: E501 - - Subscription method type. # noqa: E501 - - :return: The method of this SubscriptionPaymentMethod. # noqa: E501 - :rtype: str - """ - return self._method - - @method.setter - def method(self, method): - """Sets the method of this SubscriptionPaymentMethod. - - Subscription method type. # noqa: E501 - - :param method: The method of this SubscriptionPaymentMethod. # noqa: E501 - :type: str + Details about the payment method at the time of the transaction. + """ # noqa: E501 + method: Optional[StrictStr] = Field(default=None, description="Subscription method type.") + card: Optional[PaymentPaymentMethodCard] = None + __properties: ClassVar[List[str]] = ["method", "card"] + + @field_validator('method') + def method_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['card']): + raise ValueError("must be one of enum values ('card')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SubscriptionPaymentMethod from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. """ - allowed_values = ["card"] # noqa: E501 - if self.local_vars_configuration.client_side_validation and method not in allowed_values: # noqa: E501 - raise ValueError( - "Invalid value for `method` ({0}), must be one of {1}" # noqa: E501 - .format(method, allowed_values) - ) - - self._method = method - - @property - def card(self): - """Gets the card of this SubscriptionPaymentMethod. # noqa: E501 - + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of card + if self.card: + _dict['card'] = self.card.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SubscriptionPaymentMethod from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "method": obj.get("method"), + "card": PaymentPaymentMethodCard.from_dict(obj["card"]) if obj.get("card") is not None else None + }) + return _obj - :return: The card of this SubscriptionPaymentMethod. # noqa: E501 - :rtype: PaymentPaymentMethodCard - """ - return self._card - - @card.setter - def card(self, card): - """Sets the card of this SubscriptionPaymentMethod. - - - :param card: The card of this SubscriptionPaymentMethod. # noqa: E501 - :type: PaymentPaymentMethodCard - """ - self._card = card - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, SubscriptionPaymentMethod): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, SubscriptionPaymentMethod): - return True - - return self.to_dict() != other.to_dict() diff --git a/Monei/models/subscription_payment_method_card.py b/Monei/models/subscription_payment_method_card.py index 73b4f67..de5ba78 100644 --- a/Monei/models/subscription_payment_method_card.py +++ b/Monei/models/subscription_payment_method_card.py @@ -3,300 +3,117 @@ """ MONEI API v1 -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

- The version of the OpenAPI document: 1.5.0 - Generated by: https://openapi-generator.tech -""" + The version of the OpenAPI document: 1.5.1 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 +from __future__ import annotations import pprint import re # noqa: F401 +import json -import six - -from Monei.configuration import Configuration - - -class SubscriptionPaymentMethodCard(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self +class SubscriptionPaymentMethodCard(BaseModel): """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'country': 'str', - 'brand': 'str', - 'type': 'str', - 'three_d_secure': 'bool', - 'three_d_secure_version': 'str', - 'expiration': 'int', - 'last4': 'str' - } - - attribute_map = { - 'country': 'country', - 'brand': 'brand', - 'type': 'type', - 'three_d_secure': 'threeDSecure', - 'three_d_secure_version': 'threeDSecureVersion', - 'expiration': 'expiration', - 'last4': 'last4' - } - - def __init__(self, country=None, brand=None, type=None, three_d_secure=None, three_d_secure_version=None, expiration=None, last4=None, local_vars_configuration=None): # noqa: E501 - """SubscriptionPaymentMethodCard - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._country = None - self._brand = None - self._type = None - self._three_d_secure = None - self._three_d_secure_version = None - self._expiration = None - self._last4 = None - self.discriminator = None - - if country is not None: - self.country = country - if brand is not None: - self.brand = brand - if type is not None: - self.type = type - if three_d_secure is not None: - self.three_d_secure = three_d_secure - if three_d_secure_version is not None: - self.three_d_secure_version = three_d_secure_version - if expiration is not None: - self.expiration = expiration - if last4 is not None: - self.last4 = last4 - - @property - def country(self): - """Gets the country of this SubscriptionPaymentMethodCard. # noqa: E501 - - Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). # noqa: E501 - - :return: The country of this SubscriptionPaymentMethodCard. # noqa: E501 - :rtype: str - """ - return self._country - - @country.setter - def country(self, country): - """Sets the country of this SubscriptionPaymentMethodCard. - - Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). # noqa: E501 - - :param country: The country of this SubscriptionPaymentMethodCard. # noqa: E501 - :type: str + Details about the card used as payment method at the time of the transaction. + """ # noqa: E501 + country: Optional[StrictStr] = Field(default=None, description="Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).") + brand: Optional[StrictStr] = Field(default=None, description="Card brand.") + type: Optional[StrictStr] = Field(default=None, description="Card type `debit` or `credit`.") + three_d_secure: Optional[StrictBool] = Field(default=None, description="Wether this transaction used 3D Secure authentication.", alias="threeDSecure") + three_d_secure_version: Optional[StrictStr] = Field(default=None, description="The protocol version of the 3DS challenge.", alias="threeDSecureVersion") + expiration: Optional[StrictInt] = Field(default=None, description="Time at which the card will expire. Measured in seconds since the Unix epoch. ") + last4: Optional[StrictStr] = Field(default=None, description="The last four digits of the card.") + __properties: ClassVar[List[str]] = ["country", "brand", "type", "threeDSecure", "threeDSecureVersion", "expiration", "last4"] + + @field_validator('brand') + def brand_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['visa', 'mastercard', 'diners', 'amex', 'jcb', 'unionpay', 'unknown']): + raise ValueError("must be one of enum values ('visa', 'mastercard', 'diners', 'amex', 'jcb', 'unionpay', 'unknown')") + return value + + @field_validator('type') + def type_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['debit', 'credit']): + raise ValueError("must be one of enum values ('debit', 'credit')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SubscriptionPaymentMethodCard from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SubscriptionPaymentMethodCard from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "country": obj.get("country"), + "brand": obj.get("brand"), + "type": obj.get("type"), + "threeDSecure": obj.get("threeDSecure"), + "threeDSecureVersion": obj.get("threeDSecureVersion"), + "expiration": obj.get("expiration"), + "last4": obj.get("last4") + }) + return _obj - self._country = country - - @property - def brand(self): - """Gets the brand of this SubscriptionPaymentMethodCard. # noqa: E501 - - Card brand. # noqa: E501 - - :return: The brand of this SubscriptionPaymentMethodCard. # noqa: E501 - :rtype: str - """ - return self._brand - - @brand.setter - def brand(self, brand): - """Sets the brand of this SubscriptionPaymentMethodCard. - - Card brand. # noqa: E501 - - :param brand: The brand of this SubscriptionPaymentMethodCard. # noqa: E501 - :type: str - """ - allowed_values = ["visa", "mastercard", "diners", "amex", "jcb", "unionpay", "unknown"] # noqa: E501 - if self.local_vars_configuration.client_side_validation and brand not in allowed_values: # noqa: E501 - raise ValueError( - "Invalid value for `brand` ({0}), must be one of {1}" # noqa: E501 - .format(brand, allowed_values) - ) - - self._brand = brand - - @property - def type(self): - """Gets the type of this SubscriptionPaymentMethodCard. # noqa: E501 - - Card type `debit` or `credit`. # noqa: E501 - - :return: The type of this SubscriptionPaymentMethodCard. # noqa: E501 - :rtype: str - """ - return self._type - - @type.setter - def type(self, type): - """Sets the type of this SubscriptionPaymentMethodCard. - - Card type `debit` or `credit`. # noqa: E501 - - :param type: The type of this SubscriptionPaymentMethodCard. # noqa: E501 - :type: str - """ - allowed_values = ["debit", "credit"] # noqa: E501 - if self.local_vars_configuration.client_side_validation and type not in allowed_values: # noqa: E501 - raise ValueError( - "Invalid value for `type` ({0}), must be one of {1}" # noqa: E501 - .format(type, allowed_values) - ) - - self._type = type - - @property - def three_d_secure(self): - """Gets the three_d_secure of this SubscriptionPaymentMethodCard. # noqa: E501 - - Wether this transaction used 3D Secure authentication. # noqa: E501 - - :return: The three_d_secure of this SubscriptionPaymentMethodCard. # noqa: E501 - :rtype: bool - """ - return self._three_d_secure - - @three_d_secure.setter - def three_d_secure(self, three_d_secure): - """Sets the three_d_secure of this SubscriptionPaymentMethodCard. - - Wether this transaction used 3D Secure authentication. # noqa: E501 - - :param three_d_secure: The three_d_secure of this SubscriptionPaymentMethodCard. # noqa: E501 - :type: bool - """ - - self._three_d_secure = three_d_secure - - @property - def three_d_secure_version(self): - """Gets the three_d_secure_version of this SubscriptionPaymentMethodCard. # noqa: E501 - - The protocol version of the 3DS challenge. # noqa: E501 - - :return: The three_d_secure_version of this SubscriptionPaymentMethodCard. # noqa: E501 - :rtype: str - """ - return self._three_d_secure_version - - @three_d_secure_version.setter - def three_d_secure_version(self, three_d_secure_version): - """Sets the three_d_secure_version of this SubscriptionPaymentMethodCard. - - The protocol version of the 3DS challenge. # noqa: E501 - - :param three_d_secure_version: The three_d_secure_version of this SubscriptionPaymentMethodCard. # noqa: E501 - :type: str - """ - - self._three_d_secure_version = three_d_secure_version - - @property - def expiration(self): - """Gets the expiration of this SubscriptionPaymentMethodCard. # noqa: E501 - - Time at which the card will expire. Measured in seconds since the Unix epoch. # noqa: E501 - - :return: The expiration of this SubscriptionPaymentMethodCard. # noqa: E501 - :rtype: int - """ - return self._expiration - - @expiration.setter - def expiration(self, expiration): - """Sets the expiration of this SubscriptionPaymentMethodCard. - - Time at which the card will expire. Measured in seconds since the Unix epoch. # noqa: E501 - - :param expiration: The expiration of this SubscriptionPaymentMethodCard. # noqa: E501 - :type: int - """ - - self._expiration = expiration - - @property - def last4(self): - """Gets the last4 of this SubscriptionPaymentMethodCard. # noqa: E501 - - The last four digits of the card. # noqa: E501 - - :return: The last4 of this SubscriptionPaymentMethodCard. # noqa: E501 - :rtype: str - """ - return self._last4 - - @last4.setter - def last4(self, last4): - """Sets the last4 of this SubscriptionPaymentMethodCard. - - The last four digits of the card. # noqa: E501 - - :param last4: The last4 of this SubscriptionPaymentMethodCard. # noqa: E501 - :type: str - """ - - self._last4 = last4 - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, SubscriptionPaymentMethodCard): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, SubscriptionPaymentMethodCard): - return True - return self.to_dict() != other.to_dict() diff --git a/Monei/models/subscription_retry_schedule_inner.py b/Monei/models/subscription_retry_schedule_inner.py new file mode 100644 index 0000000..cf64954 --- /dev/null +++ b/Monei/models/subscription_retry_schedule_inner.py @@ -0,0 +1,97 @@ +# coding: utf-8 + +""" + MONEI API v1 + +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

+ + The version of the OpenAPI document: 1.5.1 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self + +class SubscriptionRetryScheduleInner(BaseModel): + """ + SubscriptionRetryScheduleInner + """ # noqa: E501 + interval: StrictStr = Field(description="The unit of time to wait before the retry attempt.") + interval_count: Annotated[int, Field(le=31, strict=True, ge=1)] = Field(description="The number of intervals to wait before the retry attempt.", alias="intervalCount") + __properties: ClassVar[List[str]] = ["interval", "intervalCount"] + + @field_validator('interval') + def interval_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['day', 'week', 'month', 'year']): + raise ValueError("must be one of enum values ('day', 'week', 'month', 'year')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SubscriptionRetryScheduleInner from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SubscriptionRetryScheduleInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "interval": obj.get("interval"), + "intervalCount": obj.get("intervalCount") + }) + return _obj + + diff --git a/Monei/models/subscription_status.py b/Monei/models/subscription_status.py index 5febe4f..0eb51c7 100644 --- a/Monei/models/subscription_status.py +++ b/Monei/models/subscription_status.py @@ -3,103 +3,40 @@ """ MONEI API v1 -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

- The version of the OpenAPI document: 1.5.0 - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 + The version of the OpenAPI document: 1.5.1 + Generated by OpenAPI Generator (https://openapi-generator.tech) -import six + Do not edit the class manually. +""" # noqa: E501 -from Monei.configuration import Configuration +from __future__ import annotations +import json +from enum import Enum +from typing_extensions import Self -class SubscriptionStatus(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - Do not edit the class manually. +class SubscriptionStatus(str, Enum): """ - - """ - allowed enum values + The status of the subscription. """ - PENDING = "PENDING" - EXPIRED = "EXPIRED" - TRIALING = "TRIALING" - ACTIVE = "ACTIVE" - PAST_DUE = "PAST_DUE" - PAUSED = "PAUSED" - CANCELED = "CANCELED" - - allowable_values = [PENDING, EXPIRED, TRIALING, ACTIVE, PAST_DUE, PAUSED, CANCELED] # noqa: E501 """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. + allowed enum values """ - openapi_types = { - } - - attribute_map = { - } - - def __init__(self, local_vars_configuration=None): # noqa: E501 - """SubscriptionStatus - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - self.discriminator = None - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, SubscriptionStatus): - return False + PENDING = 'PENDING' + EXPIRED = 'EXPIRED' + TRIALING = 'TRIALING' + ACTIVE = 'ACTIVE' + PAST_DUE = 'PAST_DUE' + PAUSED = 'PAUSED' + CANCELED = 'CANCELED' - return self.to_dict() == other.to_dict() + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of SubscriptionStatus from a JSON string""" + return cls(json.loads(json_str)) - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, SubscriptionStatus): - return True - return self.to_dict() != other.to_dict() diff --git a/Monei/models/update_subscription_request.py b/Monei/models/update_subscription_request.py index d814e09..7cb1b07 100644 --- a/Monei/models/update_subscription_request.py +++ b/Monei/models/update_subscription_request.py @@ -3,504 +3,134 @@ """ MONEI API v1 -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

- The version of the OpenAPI document: 1.5.0 - Generated by: https://openapi-generator.tech -""" + The version of the OpenAPI document: 1.5.1 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 +from __future__ import annotations import pprint import re # noqa: F401 - -import six - -from Monei.configuration import Configuration - - -class UpdateSubscriptionRequest(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictFloat, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional, Union +from Monei.models.payment_billing_details import PaymentBillingDetails +from Monei.models.payment_customer import PaymentCustomer +from Monei.models.payment_shipping_details import PaymentShippingDetails +from Monei.models.subscription_interval import SubscriptionInterval +from Monei.models.subscription_retry_schedule_inner import SubscriptionRetryScheduleInner +from typing import Optional, Set +from typing_extensions import Self + +class UpdateSubscriptionRequest(BaseModel): """ - openapi_types = { - 'amount': 'int', - 'interval': 'SubscriptionInterval', - 'interval_count': 'int', - 'description': 'str', - 'customer': 'PaymentCustomer', - 'billing_details': 'PaymentBillingDetails', - 'shipping_details': 'PaymentShippingDetails', - 'trial_period_end': 'float', - 'callback_url': 'str', - 'payment_callback_url': 'str', - 'pause_at_period_end': 'bool', - 'cancel_at_period_end': 'bool', - 'pause_interval_count': 'int', - 'retry_schedule': 'list[object]', - 'metadata': 'object' - } - - attribute_map = { - 'amount': 'amount', - 'interval': 'interval', - 'interval_count': 'intervalCount', - 'description': 'description', - 'customer': 'customer', - 'billing_details': 'billingDetails', - 'shipping_details': 'shippingDetails', - 'trial_period_end': 'trialPeriodEnd', - 'callback_url': 'callbackUrl', - 'payment_callback_url': 'paymentCallbackUrl', - 'pause_at_period_end': 'pauseAtPeriodEnd', - 'cancel_at_period_end': 'cancelAtPeriodEnd', - 'pause_interval_count': 'pauseIntervalCount', - 'retry_schedule': 'retrySchedule', - 'metadata': 'metadata' - } - - def __init__(self, amount=None, interval=None, interval_count=None, description=None, customer=None, billing_details=None, shipping_details=None, trial_period_end=None, callback_url=None, payment_callback_url=None, pause_at_period_end=None, cancel_at_period_end=None, pause_interval_count=None, retry_schedule=None, metadata=None, local_vars_configuration=None): # noqa: E501 - """UpdateSubscriptionRequest - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._amount = None - self._interval = None - self._interval_count = None - self._description = None - self._customer = None - self._billing_details = None - self._shipping_details = None - self._trial_period_end = None - self._callback_url = None - self._payment_callback_url = None - self._pause_at_period_end = None - self._cancel_at_period_end = None - self._pause_interval_count = None - self._retry_schedule = None - self._metadata = None - self.discriminator = None - - if amount is not None: - self.amount = amount - if interval is not None: - self.interval = interval - if interval_count is not None: - self.interval_count = interval_count - if description is not None: - self.description = description - if customer is not None: - self.customer = customer - if billing_details is not None: - self.billing_details = billing_details - if shipping_details is not None: - self.shipping_details = shipping_details - if trial_period_end is not None: - self.trial_period_end = trial_period_end - if callback_url is not None: - self.callback_url = callback_url - if payment_callback_url is not None: - self.payment_callback_url = payment_callback_url - if pause_at_period_end is not None: - self.pause_at_period_end = pause_at_period_end - if cancel_at_period_end is not None: - self.cancel_at_period_end = cancel_at_period_end - if pause_interval_count is not None: - self.pause_interval_count = pause_interval_count - if retry_schedule is not None: - self.retry_schedule = retry_schedule - if metadata is not None: - self.metadata = metadata - - @property - def amount(self): - """Gets the amount of this UpdateSubscriptionRequest. # noqa: E501 - - Amount intended to be collected by this payment. A positive integer representing how much to charge in the smallest currency unit (e.g., 100 cents to charge 1.00 USD). # noqa: E501 - - :return: The amount of this UpdateSubscriptionRequest. # noqa: E501 - :rtype: int - """ - return self._amount - - @amount.setter - def amount(self, amount): - """Sets the amount of this UpdateSubscriptionRequest. - - Amount intended to be collected by this payment. A positive integer representing how much to charge in the smallest currency unit (e.g., 100 cents to charge 1.00 USD). # noqa: E501 - - :param amount: The amount of this UpdateSubscriptionRequest. # noqa: E501 - :type: int - """ - - self._amount = amount - - @property - def interval(self): - """Gets the interval of this UpdateSubscriptionRequest. # noqa: E501 - - - :return: The interval of this UpdateSubscriptionRequest. # noqa: E501 - :rtype: SubscriptionInterval - """ - return self._interval - - @interval.setter - def interval(self, interval): - """Sets the interval of this UpdateSubscriptionRequest. - - - :param interval: The interval of this UpdateSubscriptionRequest. # noqa: E501 - :type: SubscriptionInterval - """ - - self._interval = interval - - @property - def interval_count(self): - """Gets the interval_count of this UpdateSubscriptionRequest. # noqa: E501 - - Number of intervals between subscription payments. # noqa: E501 - - :return: The interval_count of this UpdateSubscriptionRequest. # noqa: E501 - :rtype: int - """ - return self._interval_count - - @interval_count.setter - def interval_count(self, interval_count): - """Sets the interval_count of this UpdateSubscriptionRequest. - - Number of intervals between subscription payments. # noqa: E501 - - :param interval_count: The interval_count of this UpdateSubscriptionRequest. # noqa: E501 - :type: int - """ - - self._interval_count = interval_count - - @property - def description(self): - """Gets the description of this UpdateSubscriptionRequest. # noqa: E501 - - An arbitrary string attached to the subscription. Often useful for displaying to users. # noqa: E501 - - :return: The description of this UpdateSubscriptionRequest. # noqa: E501 - :rtype: str - """ - return self._description - - @description.setter - def description(self, description): - """Sets the description of this UpdateSubscriptionRequest. - - An arbitrary string attached to the subscription. Often useful for displaying to users. # noqa: E501 - - :param description: The description of this UpdateSubscriptionRequest. # noqa: E501 - :type: str - """ - - self._description = description - - @property - def customer(self): - """Gets the customer of this UpdateSubscriptionRequest. # noqa: E501 - - - :return: The customer of this UpdateSubscriptionRequest. # noqa: E501 - :rtype: PaymentCustomer - """ - return self._customer - - @customer.setter - def customer(self, customer): - """Sets the customer of this UpdateSubscriptionRequest. - - - :param customer: The customer of this UpdateSubscriptionRequest. # noqa: E501 - :type: PaymentCustomer - """ - - self._customer = customer - - @property - def billing_details(self): - """Gets the billing_details of this UpdateSubscriptionRequest. # noqa: E501 - - - :return: The billing_details of this UpdateSubscriptionRequest. # noqa: E501 - :rtype: PaymentBillingDetails - """ - return self._billing_details - - @billing_details.setter - def billing_details(self, billing_details): - """Sets the billing_details of this UpdateSubscriptionRequest. - - - :param billing_details: The billing_details of this UpdateSubscriptionRequest. # noqa: E501 - :type: PaymentBillingDetails - """ - - self._billing_details = billing_details - - @property - def shipping_details(self): - """Gets the shipping_details of this UpdateSubscriptionRequest. # noqa: E501 - - - :return: The shipping_details of this UpdateSubscriptionRequest. # noqa: E501 - :rtype: PaymentShippingDetails - """ - return self._shipping_details - - @shipping_details.setter - def shipping_details(self, shipping_details): - """Sets the shipping_details of this UpdateSubscriptionRequest. - - - :param shipping_details: The shipping_details of this UpdateSubscriptionRequest. # noqa: E501 - :type: PaymentShippingDetails - """ - - self._shipping_details = shipping_details - - @property - def trial_period_end(self): - """Gets the trial_period_end of this UpdateSubscriptionRequest. # noqa: E501 - - The end date of the trial period. Measured in seconds since the Unix epoch. # noqa: E501 - - :return: The trial_period_end of this UpdateSubscriptionRequest. # noqa: E501 - :rtype: float - """ - return self._trial_period_end - - @trial_period_end.setter - def trial_period_end(self, trial_period_end): - """Sets the trial_period_end of this UpdateSubscriptionRequest. - - The end date of the trial period. Measured in seconds since the Unix epoch. # noqa: E501 - - :param trial_period_end: The trial_period_end of this UpdateSubscriptionRequest. # noqa: E501 - :type: float - """ - - self._trial_period_end = trial_period_end - - @property - def callback_url(self): - """Gets the callback_url of this UpdateSubscriptionRequest. # noqa: E501 - - The URL will be called each time subscription status changes. You will receive a subscription object in the body of the request. # noqa: E501 - - :return: The callback_url of this UpdateSubscriptionRequest. # noqa: E501 - :rtype: str - """ - return self._callback_url - - @callback_url.setter - def callback_url(self, callback_url): - """Sets the callback_url of this UpdateSubscriptionRequest. - - The URL will be called each time subscription status changes. You will receive a subscription object in the body of the request. # noqa: E501 - - :param callback_url: The callback_url of this UpdateSubscriptionRequest. # noqa: E501 - :type: str - """ - - self._callback_url = callback_url - - @property - def payment_callback_url(self): - """Gets the payment_callback_url of this UpdateSubscriptionRequest. # noqa: E501 - - The URL will be called each time subscription creates a new payments. You will receive the payment object in the body of the request. # noqa: E501 - - :return: The payment_callback_url of this UpdateSubscriptionRequest. # noqa: E501 - :rtype: str - """ - return self._payment_callback_url - - @payment_callback_url.setter - def payment_callback_url(self, payment_callback_url): - """Sets the payment_callback_url of this UpdateSubscriptionRequest. - - The URL will be called each time subscription creates a new payments. You will receive the payment object in the body of the request. # noqa: E501 - - :param payment_callback_url: The payment_callback_url of this UpdateSubscriptionRequest. # noqa: E501 - :type: str - """ - - self._payment_callback_url = payment_callback_url - - @property - def pause_at_period_end(self): - """Gets the pause_at_period_end of this UpdateSubscriptionRequest. # noqa: E501 - - If true, the subscription will be paused at the end of the current period. # noqa: E501 - - :return: The pause_at_period_end of this UpdateSubscriptionRequest. # noqa: E501 - :rtype: bool - """ - return self._pause_at_period_end - - @pause_at_period_end.setter - def pause_at_period_end(self, pause_at_period_end): - """Sets the pause_at_period_end of this UpdateSubscriptionRequest. - - If true, the subscription will be paused at the end of the current period. # noqa: E501 - - :param pause_at_period_end: The pause_at_period_end of this UpdateSubscriptionRequest. # noqa: E501 - :type: bool - """ - - self._pause_at_period_end = pause_at_period_end - - @property - def cancel_at_period_end(self): - """Gets the cancel_at_period_end of this UpdateSubscriptionRequest. # noqa: E501 - - If true, the subscription will be canceled at the end of the current period. # noqa: E501 - - :return: The cancel_at_period_end of this UpdateSubscriptionRequest. # noqa: E501 - :rtype: bool - """ - return self._cancel_at_period_end - - @cancel_at_period_end.setter - def cancel_at_period_end(self, cancel_at_period_end): - """Sets the cancel_at_period_end of this UpdateSubscriptionRequest. - - If true, the subscription will be canceled at the end of the current period. # noqa: E501 - - :param cancel_at_period_end: The cancel_at_period_end of this UpdateSubscriptionRequest. # noqa: E501 - :type: bool - """ - - self._cancel_at_period_end = cancel_at_period_end - - @property - def pause_interval_count(self): - """Gets the pause_interval_count of this UpdateSubscriptionRequest. # noqa: E501 - - Number of intervals when subscription will be paused before it activates again. # noqa: E501 - - :return: The pause_interval_count of this UpdateSubscriptionRequest. # noqa: E501 - :rtype: int - """ - return self._pause_interval_count - - @pause_interval_count.setter - def pause_interval_count(self, pause_interval_count): - """Sets the pause_interval_count of this UpdateSubscriptionRequest. - - Number of intervals when subscription will be paused before it activates again. # noqa: E501 - - :param pause_interval_count: The pause_interval_count of this UpdateSubscriptionRequest. # noqa: E501 - :type: int - """ - - self._pause_interval_count = pause_interval_count - - @property - def retry_schedule(self): - """Gets the retry_schedule of this UpdateSubscriptionRequest. # noqa: E501 - - Defines a custom schedule for retrying failed subscription payments. Each entry in the array specifies how long to wait before attempting the next payment retry. If not specified, the system's default retry schedule will be used. # noqa: E501 - - :return: The retry_schedule of this UpdateSubscriptionRequest. # noqa: E501 - :rtype: list[object] - """ - return self._retry_schedule - - @retry_schedule.setter - def retry_schedule(self, retry_schedule): - """Sets the retry_schedule of this UpdateSubscriptionRequest. - - Defines a custom schedule for retrying failed subscription payments. Each entry in the array specifies how long to wait before attempting the next payment retry. If not specified, the system's default retry schedule will be used. # noqa: E501 - - :param retry_schedule: The retry_schedule of this UpdateSubscriptionRequest. # noqa: E501 - :type: list[object] - """ - - self._retry_schedule = retry_schedule - - @property - def metadata(self): - """Gets the metadata of this UpdateSubscriptionRequest. # noqa: E501 - - A set of key-value pairs that you can attach to a resource. This can be useful for storing additional information about the resource in a structured format. # noqa: E501 - - :return: The metadata of this UpdateSubscriptionRequest. # noqa: E501 - :rtype: object - """ - return self._metadata - - @metadata.setter - def metadata(self, metadata): - """Sets the metadata of this UpdateSubscriptionRequest. - - A set of key-value pairs that you can attach to a resource. This can be useful for storing additional information about the resource in a structured format. # noqa: E501 - - :param metadata: The metadata of this UpdateSubscriptionRequest. # noqa: E501 - :type: object - """ - - self._metadata = metadata - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, UpdateSubscriptionRequest): - return False - - return self.to_dict() == other.to_dict() + UpdateSubscriptionRequest + """ # noqa: E501 + amount: Optional[StrictInt] = Field(default=None, description="Amount intended to be collected by this payment. A positive integer representing how much to charge in the smallest currency unit (e.g., 100 cents to charge 1.00 USD). ") + interval: Optional[SubscriptionInterval] = None + interval_count: Optional[StrictInt] = Field(default=None, description="Number of intervals between subscription payments.", alias="intervalCount") + description: Optional[StrictStr] = Field(default=None, description="An arbitrary string attached to the subscription. Often useful for displaying to users. ") + customer: Optional[PaymentCustomer] = None + billing_details: Optional[PaymentBillingDetails] = Field(default=None, alias="billingDetails") + shipping_details: Optional[PaymentShippingDetails] = Field(default=None, alias="shippingDetails") + trial_period_end: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="The end date of the trial period. Measured in seconds since the Unix epoch.", alias="trialPeriodEnd") + callback_url: Optional[StrictStr] = Field(default=None, description="The URL will be called each time subscription status changes. You will receive a subscription object in the body of the request. ", alias="callbackUrl") + payment_callback_url: Optional[StrictStr] = Field(default=None, description="The URL will be called each time subscription creates a new payments. You will receive the payment object in the body of the request. ", alias="paymentCallbackUrl") + pause_at_period_end: Optional[StrictBool] = Field(default=None, description="If true, the subscription will be paused at the end of the current period. ", alias="pauseAtPeriodEnd") + cancel_at_period_end: Optional[StrictBool] = Field(default=None, description="If true, the subscription will be canceled at the end of the current period. ", alias="cancelAtPeriodEnd") + pause_interval_count: Optional[StrictInt] = Field(default=None, description="Number of intervals when subscription will be paused before it activates again.", alias="pauseIntervalCount") + retry_schedule: Optional[List[SubscriptionRetryScheduleInner]] = Field(default=None, description="Defines a custom schedule for retrying failed subscription payments. Each entry in the array specifies how long to wait before attempting the next payment retry. If not specified, the system's default retry schedule will be used. ", alias="retrySchedule") + metadata: Optional[Dict[str, Any]] = Field(default=None, description="A set of key-value pairs that you can attach to a resource. This can be useful for storing additional information about the resource in a structured format.") + __properties: ClassVar[List[str]] = ["amount", "interval", "intervalCount", "description", "customer", "billingDetails", "shippingDetails", "trialPeriodEnd", "callbackUrl", "paymentCallbackUrl", "pauseAtPeriodEnd", "cancelAtPeriodEnd", "pauseIntervalCount", "retrySchedule", "metadata"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of UpdateSubscriptionRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of customer + if self.customer: + _dict['customer'] = self.customer.to_dict() + # override the default output from pydantic by calling `to_dict()` of billing_details + if self.billing_details: + _dict['billingDetails'] = self.billing_details.to_dict() + # override the default output from pydantic by calling `to_dict()` of shipping_details + if self.shipping_details: + _dict['shippingDetails'] = self.shipping_details.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in retry_schedule (list) + _items = [] + if self.retry_schedule: + for _item_retry_schedule in self.retry_schedule: + if _item_retry_schedule: + _items.append(_item_retry_schedule.to_dict()) + _dict['retrySchedule'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of UpdateSubscriptionRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "amount": obj.get("amount"), + "interval": obj.get("interval"), + "intervalCount": obj.get("intervalCount"), + "description": obj.get("description"), + "customer": PaymentCustomer.from_dict(obj["customer"]) if obj.get("customer") is not None else None, + "billingDetails": PaymentBillingDetails.from_dict(obj["billingDetails"]) if obj.get("billingDetails") is not None else None, + "shippingDetails": PaymentShippingDetails.from_dict(obj["shippingDetails"]) if obj.get("shippingDetails") is not None else None, + "trialPeriodEnd": obj.get("trialPeriodEnd"), + "callbackUrl": obj.get("callbackUrl"), + "paymentCallbackUrl": obj.get("paymentCallbackUrl"), + "pauseAtPeriodEnd": obj.get("pauseAtPeriodEnd"), + "cancelAtPeriodEnd": obj.get("cancelAtPeriodEnd"), + "pauseIntervalCount": obj.get("pauseIntervalCount"), + "retrySchedule": [SubscriptionRetryScheduleInner.from_dict(_item) for _item in obj["retrySchedule"]] if obj.get("retrySchedule") is not None else None, + "metadata": obj.get("metadata") + }) + return _obj - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, UpdateSubscriptionRequest): - return True - return self.to_dict() != other.to_dict() diff --git a/Monei/models/validate_bizum_phone_request.py b/Monei/models/validate_bizum_phone_request.py index d456b82..59771c6 100644 --- a/Monei/models/validate_bizum_phone_request.py +++ b/Monei/models/validate_bizum_phone_request.py @@ -3,178 +3,89 @@ """ MONEI API v1 -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

- The version of the OpenAPI document: 1.5.0 - Generated by: https://openapi-generator.tech -""" + The version of the OpenAPI document: 1.5.1 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 +from __future__ import annotations import pprint import re # noqa: F401 +import json -import six - -from Monei.configuration import Configuration +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self - -class ValidateBizumPhoneRequest(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. +class ValidateBizumPhoneRequest(BaseModel): """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'account_id': 'str', - 'payment_id': 'str', - 'phone_number': 'str' - } - - attribute_map = { - 'account_id': 'accountId', - 'payment_id': 'paymentId', - 'phone_number': 'phoneNumber' - } - - def __init__(self, account_id=None, payment_id=None, phone_number=None, local_vars_configuration=None): # noqa: E501 - """ValidateBizumPhoneRequest - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._account_id = None - self._payment_id = None - self._phone_number = None - self.discriminator = None - - self.account_id = account_id - if payment_id is not None: - self.payment_id = payment_id - self.phone_number = phone_number - - @property - def account_id(self): - """Gets the account_id of this ValidateBizumPhoneRequest. # noqa: E501 - - MONEI Account identifier. # noqa: E501 - - :return: The account_id of this ValidateBizumPhoneRequest. # noqa: E501 - :rtype: str - """ - return self._account_id - - @account_id.setter - def account_id(self, account_id): - """Sets the account_id of this ValidateBizumPhoneRequest. - - MONEI Account identifier. # noqa: E501 - - :param account_id: The account_id of this ValidateBizumPhoneRequest. # noqa: E501 - :type: str + ValidateBizumPhoneRequest + """ # noqa: E501 + account_id: StrictStr = Field(description="MONEI Account identifier.", alias="accountId") + payment_id: Optional[StrictStr] = Field(default=None, description="Unique identifier for the payment.", alias="paymentId") + phone_number: StrictStr = Field(description="Phone number in E.164 format.", alias="phoneNumber") + __properties: ClassVar[List[str]] = ["accountId", "paymentId", "phoneNumber"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ValidateBizumPhoneRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. """ - if self.local_vars_configuration.client_side_validation and account_id is None: # noqa: E501 - raise ValueError("Invalid value for `account_id`, must not be `None`") # noqa: E501 - - self._account_id = account_id + excluded_fields: Set[str] = set([ + ]) - @property - def payment_id(self): - """Gets the payment_id of this ValidateBizumPhoneRequest. # noqa: E501 + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict - Unique identifier for the payment. # noqa: E501 - - :return: The payment_id of this ValidateBizumPhoneRequest. # noqa: E501 - :rtype: str - """ - return self._payment_id + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ValidateBizumPhoneRequest from a dict""" + if obj is None: + return None - @payment_id.setter - def payment_id(self, payment_id): - """Sets the payment_id of this ValidateBizumPhoneRequest. - - Unique identifier for the payment. # noqa: E501 - - :param payment_id: The payment_id of this ValidateBizumPhoneRequest. # noqa: E501 - :type: str - """ + if not isinstance(obj, dict): + return cls.model_validate(obj) - self._payment_id = payment_id + _obj = cls.model_validate({ + "accountId": obj.get("accountId"), + "paymentId": obj.get("paymentId"), + "phoneNumber": obj.get("phoneNumber") + }) + return _obj - @property - def phone_number(self): - """Gets the phone_number of this ValidateBizumPhoneRequest. # noqa: E501 - Phone number in E.164 format. # noqa: E501 - - :return: The phone_number of this ValidateBizumPhoneRequest. # noqa: E501 - :rtype: str - """ - return self._phone_number - - @phone_number.setter - def phone_number(self, phone_number): - """Sets the phone_number of this ValidateBizumPhoneRequest. - - Phone number in E.164 format. # noqa: E501 - - :param phone_number: The phone_number of this ValidateBizumPhoneRequest. # noqa: E501 - :type: str - """ - if self.local_vars_configuration.client_side_validation and phone_number is None: # noqa: E501 - raise ValueError("Invalid value for `phone_number`, must not be `None`") # noqa: E501 - - self._phone_number = phone_number - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, ValidateBizumPhoneRequest): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, ValidateBizumPhoneRequest): - return True - - return self.to_dict() != other.to_dict() diff --git a/Monei/monei_client.py b/Monei/monei_client.py index d7289e5..b136648 100644 --- a/Monei/monei_client.py +++ b/Monei/monei_client.py @@ -3,12 +3,14 @@ import hashlib # Import specific modules instead of importing from Monei +from Monei.api.payment_methods_api import PaymentMethodsApi from Monei.configuration import Configuration from Monei.api_client import ApiClient from Monei.exceptions import ApiException from Monei.api.payments_api import PaymentsApi from Monei.api.subscriptions_api import SubscriptionsApi from Monei.api.apple_pay_domain_api import ApplePayDomainApi +from Monei.api.bizum_api import BizumApi import Monei @@ -51,11 +53,20 @@ def __init__(self, api_key=None, config=None, account_id=None, user_agent=None): # Initialize API instances self.Payments = PaymentsApi(api_client) + self.PaymentMethods = PaymentMethodsApi(api_client) self.Subscriptions = SubscriptionsApi(api_client) self.ApplePayDomain = ApplePayDomainApi(api_client) + self.Bizum = BizumApi(api_client) # Store the api_client for later use self._api_client = api_client + + # aliases + self.payments = self.Payments + self.payment_methods = self.PaymentMethods + self.subscriptions = self.Subscriptions + self.apple_pay_domain = self.ApplePayDomain + self.bizum = self.Bizum # aliases self.payments = self.Payments diff --git a/Monei/py.typed b/Monei/py.typed new file mode 100644 index 0000000..e69de29 diff --git a/Monei/rest.py b/Monei/rest.py index 506bc2e..0b93d45 100644 --- a/Monei/rest.py +++ b/Monei/rest.py @@ -1,54 +1,68 @@ +# coding: utf-8 + """ MONEI API v1 -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

- The version of the OpenAPI document: 1.5.0 - Generated by: https://openapi-generator.tech -""" + The version of the OpenAPI document: 1.5.1 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 import io import json -import logging import re import ssl -from urllib.parse import urlencode -from urllib.parse import urlparse -from urllib.request import proxy_bypass_environment + import urllib3 -import ipaddress -from Monei.exceptions import ApiException, UnauthorizedException, ForbiddenException, NotFoundException, ServiceException, ApiValueError +from Monei.exceptions import ApiException, ApiValueError +SUPPORTED_SOCKS_PROXIES = {"socks5", "socks5h", "socks4", "socks4a"} +RESTResponseType = urllib3.HTTPResponse -logger = logging.getLogger(__name__) + +def is_socks_proxy_url(url): + if url is None: + return False + split_section = url.split("://") + if len(split_section) < 2: + return False + else: + return split_section[0].lower() in SUPPORTED_SOCKS_PROXIES class RESTResponse(io.IOBase): - def __init__(self, resp): - self.urllib3_response = resp + def __init__(self, resp) -> None: + self.response = resp self.status = resp.status self.reason = resp.reason - self.data = resp.data + self.data = None + + def read(self): + if self.data is None: + self.data = self.response.data + return self.data def getheaders(self): """Returns a dictionary of the response headers.""" - return self.urllib3_response.getheaders() + return self.response.headers def getheader(self, name, default=None): """Returns a given response header.""" - return self.urllib3_response.getheader(name, default) + return self.response.headers.get(name, default) -class RESTClientObject(object): +class RESTClientObject: - def __init__(self, configuration, pools_size=4, maxsize=None): + def __init__(self, configuration) -> None: # urllib3.PoolManager will pass all kw parameters to connectionpool # https://github.com/shazow/urllib3/blob/f9409436f83aeb79fbaf090181cd81b784f1b8ce/urllib3/poolmanager.py#L75 # noqa: E501 # https://github.com/shazow/urllib3/blob/f9409436f83aeb79fbaf090181cd81b784f1b8ce/urllib3/connectionpool.py#L680 # noqa: E501 - # maxsize is the number of requests to host that are allowed in parallel # noqa: E501 # Custom SSL certificates and client certificates: http://urllib3.readthedocs.io/en/latest/advanced-usage.html # noqa: E501 # cert_reqs @@ -57,71 +71,80 @@ def __init__(self, configuration, pools_size=4, maxsize=None): else: cert_reqs = ssl.CERT_NONE - addition_pool_args = {} + pool_args = { + "cert_reqs": cert_reqs, + "ca_certs": configuration.ssl_ca_cert, + "cert_file": configuration.cert_file, + "key_file": configuration.key_file, + "ca_cert_data": configuration.ca_cert_data, + } if configuration.assert_hostname is not None: - addition_pool_args['assert_hostname'] = configuration.assert_hostname # noqa: E501 + pool_args['assert_hostname'] = ( + configuration.assert_hostname + ) if configuration.retries is not None: - addition_pool_args['retries'] = configuration.retries + pool_args['retries'] = configuration.retries + + if configuration.tls_server_name: + pool_args['server_hostname'] = configuration.tls_server_name + if configuration.socket_options is not None: - addition_pool_args['socket_options'] = configuration.socket_options + pool_args['socket_options'] = configuration.socket_options - if maxsize is None: - if configuration.connection_pool_maxsize is not None: - maxsize = configuration.connection_pool_maxsize - else: - maxsize = 4 + if configuration.connection_pool_maxsize is not None: + pool_args['maxsize'] = configuration.connection_pool_maxsize # https pool manager - if configuration.proxy and not should_bypass_proxies( - configuration.host, no_proxy=configuration.no_proxy or ''): - self.pool_manager = urllib3.ProxyManager( - num_pools=pools_size, - maxsize=maxsize, - cert_reqs=cert_reqs, - ca_certs=configuration.ssl_ca_cert, - cert_file=configuration.cert_file, - key_file=configuration.key_file, - proxy_url=configuration.proxy, - proxy_headers=configuration.proxy_headers, - **addition_pool_args - ) + self.pool_manager: urllib3.PoolManager + + if configuration.proxy: + if is_socks_proxy_url(configuration.proxy): + from urllib3.contrib.socks import SOCKSProxyManager + pool_args["proxy_url"] = configuration.proxy + pool_args["headers"] = configuration.proxy_headers + self.pool_manager = SOCKSProxyManager(**pool_args) + else: + pool_args["proxy_url"] = configuration.proxy + pool_args["proxy_headers"] = configuration.proxy_headers + self.pool_manager = urllib3.ProxyManager(**pool_args) else: - self.pool_manager = urllib3.PoolManager( - num_pools=pools_size, - maxsize=maxsize, - cert_reqs=cert_reqs, - ca_certs=configuration.ssl_ca_cert, - cert_file=configuration.cert_file, - key_file=configuration.key_file, - **addition_pool_args - ) - - def request(self, method, url, query_params=None, headers=None, - body=None, post_params=None, _preload_content=True, - _request_timeout=None): + self.pool_manager = urllib3.PoolManager(**pool_args) + + def request( + self, + method, + url, + headers=None, + body=None, + post_params=None, + _request_timeout=None + ): """Perform requests. :param method: http request method :param url: http request url - :param query_params: query parameters in the url :param headers: http request headers :param body: request json body, for `application/json` :param post_params: request post parameters, `application/x-www-form-urlencoded` and `multipart/form-data` - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. """ method = method.upper() - assert method in ['GET', 'HEAD', 'DELETE', 'POST', 'PUT', - 'PATCH', 'OPTIONS'] + assert method in [ + 'GET', + 'HEAD', + 'DELETE', + 'POST', + 'PUT', + 'PATCH', + 'OPTIONS' + ] if post_params and body: raise ApiValueError( @@ -133,61 +156,83 @@ def request(self, method, url, query_params=None, headers=None, timeout = None if _request_timeout: - if isinstance(_request_timeout, (int, float)): # noqa: E501,F821 + if isinstance(_request_timeout, (int, float)): timeout = urllib3.Timeout(total=_request_timeout) - elif (isinstance(_request_timeout, tuple) and - len(_request_timeout) == 2): + elif ( + isinstance(_request_timeout, tuple) + and len(_request_timeout) == 2 + ): timeout = urllib3.Timeout( - connect=_request_timeout[0], read=_request_timeout[1]) + connect=_request_timeout[0], + read=_request_timeout[1] + ) try: # For `POST`, `PUT`, `PATCH`, `OPTIONS`, `DELETE` if method in ['POST', 'PUT', 'PATCH', 'OPTIONS', 'DELETE']: - # Only set a default Content-Type for POST, PUT, PATCH and OPTIONS requests - if (method != 'DELETE') and ('Content-Type' not in headers): - headers['Content-Type'] = 'application/json' - if query_params: - url += '?' + urlencode(query_params) - if ('Content-Type' not in headers) or (re.search('json', - headers['Content-Type'], re.IGNORECASE)): + + # no content type provided or payload is json + content_type = headers.get('Content-Type') + if ( + not content_type + or re.search('json', content_type, re.IGNORECASE) + ): request_body = None if body is not None: request_body = json.dumps(body) r = self.pool_manager.request( - method, url, + method, + url, body=request_body, - preload_content=_preload_content, timeout=timeout, - headers=headers) - elif headers['Content-Type'] == 'application/x-www-form-urlencoded': # noqa: E501 + headers=headers, + preload_content=False + ) + elif content_type == 'application/x-www-form-urlencoded': r = self.pool_manager.request( - method, url, + method, + url, fields=post_params, encode_multipart=False, - preload_content=_preload_content, timeout=timeout, - headers=headers) - elif headers['Content-Type'] == 'multipart/form-data': + headers=headers, + preload_content=False + ) + elif content_type == 'multipart/form-data': # must del headers['Content-Type'], or the correct # Content-Type which generated by urllib3 will be # overwritten. del headers['Content-Type'] + # Ensures that dict objects are serialized + post_params = [(a, json.dumps(b)) if isinstance(b, dict) else (a,b) for a, b in post_params] r = self.pool_manager.request( - method, url, + method, + url, fields=post_params, encode_multipart=True, - preload_content=_preload_content, timeout=timeout, - headers=headers) + headers=headers, + preload_content=False + ) # Pass a `string` parameter directly in the body to support - # other content types than Json when `body` argument is - # provided in serialized form + # other content types than JSON when `body` argument is + # provided in serialized form. elif isinstance(body, str) or isinstance(body, bytes): - request_body = body r = self.pool_manager.request( - method, url, + method, + url, + body=body, + timeout=timeout, + headers=headers, + preload_content=False + ) + elif headers['Content-Type'].startswith('text/') and isinstance(body, bool): + request_body = "true" if body else "false" + r = self.pool_manager.request( + method, + url, body=request_body, - preload_content=_preload_content, + preload_content=False, timeout=timeout, headers=headers) else: @@ -198,155 +243,16 @@ def request(self, method, url, query_params=None, headers=None, raise ApiException(status=0, reason=msg) # For `GET`, `HEAD` else: - r = self.pool_manager.request(method, url, - fields=query_params, - preload_content=_preload_content, - timeout=timeout, - headers=headers) + r = self.pool_manager.request( + method, + url, + fields={}, + timeout=timeout, + headers=headers, + preload_content=False + ) except urllib3.exceptions.SSLError as e: - msg = "{0}\n{1}".format(type(e).__name__, str(e)) + msg = "\n".join([type(e).__name__, str(e)]) raise ApiException(status=0, reason=msg) - if _preload_content: - r = RESTResponse(r) - - # log response body - 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) - - return r - - def GET(self, url, headers=None, query_params=None, _preload_content=True, - _request_timeout=None): - return self.request("GET", url, - headers=headers, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - query_params=query_params) - - def HEAD(self, url, headers=None, query_params=None, _preload_content=True, - _request_timeout=None): - return self.request("HEAD", url, - headers=headers, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - query_params=query_params) - - def OPTIONS(self, url, headers=None, query_params=None, post_params=None, - body=None, _preload_content=True, _request_timeout=None): - return self.request("OPTIONS", url, - headers=headers, - query_params=query_params, - post_params=post_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - body=body) - - def DELETE(self, url, headers=None, query_params=None, body=None, - _preload_content=True, _request_timeout=None): - return self.request("DELETE", url, - headers=headers, - query_params=query_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - body=body) - - def POST(self, url, headers=None, query_params=None, post_params=None, - body=None, _preload_content=True, _request_timeout=None): - return self.request("POST", url, - headers=headers, - query_params=query_params, - post_params=post_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - body=body) - - def PUT(self, url, headers=None, query_params=None, post_params=None, - body=None, _preload_content=True, _request_timeout=None): - return self.request("PUT", url, - headers=headers, - query_params=query_params, - post_params=post_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - body=body) - - def PATCH(self, url, headers=None, query_params=None, post_params=None, - body=None, _preload_content=True, _request_timeout=None): - return self.request("PATCH", url, - headers=headers, - query_params=query_params, - post_params=post_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - body=body) - -# end of class RESTClientObject - - -def is_ipv4(target): - """ Test if IPv4 address or not - """ - try: - chk = ipaddress.IPv4Address(target) - return True - except ipaddress.AddressValueError: - return False - - -def in_ipv4net(target, net): - """ Test if target belongs to given IPv4 network - """ - try: - nw = ipaddress.IPv4Network(net) - ip = ipaddress.IPv4Address(target) - if ip in nw: - return True - return False - except ipaddress.AddressValueError: - return False - except ipaddress.NetmaskValueError: - return False - - -def should_bypass_proxies(url, no_proxy=None): - """ Yet another requests.should_bypass_proxies - Test if proxies should not be used for a particular url. - """ - - parsed = urlparse(url) - - # special cases - if parsed.hostname in [None, '']: - return True - - # special cases - if no_proxy in [None, '']: - return False - if no_proxy == '*': - return True - - no_proxy = no_proxy.lower().replace(' ', ''); - entries = ( - host for host in no_proxy.split(',') if host - ) - - if is_ipv4(parsed.hostname): - for item in entries: - if in_ipv4net(parsed.hostname, item): - return True - return proxy_bypass_environment(parsed.hostname, {'no': no_proxy}) + return RESTResponse(r) diff --git a/config.json b/config.json index e60143a..b5a6c83 100644 --- a/config.json +++ b/config.json @@ -4,5 +4,8 @@ "gitHost": "github.com", "gitUserId": "monei", "gitRepoId": "monei-python-sdk", - "version": "1.2.6" + "version": "1.2.6", + "generatorName": "python", + "outputDir": "./", + "removeOperationIdPrefix": true } diff --git a/main.py b/main.py deleted file mode 100644 index 6e154dd..0000000 --- a/main.py +++ /dev/null @@ -1,38 +0,0 @@ -from Monei import MoneiClient, ApiException - - -def main(): - print("Hello from monei-python-sdk!") - - # Example of using the SDK with accountId and user agent - try: - # Initialize the client with API key only - client = MoneiClient(api_key="YOUR_API_KEY") - print(f"Initialized client with default user agent: {client.user_agent}") - - # Set a custom user agent - client.set_user_agent("YourApp/1.0.0 (contact@example.com)") - print(f"Updated user agent: {client.user_agent}") - - # Set an account ID to act on behalf of a merchant - client.set_account_id("MERCHANT_ACCOUNT_ID") - print(f"Set account ID: {client.account_id}") - - # Now all API calls will be made on behalf of the merchant - # For example: - # payment = client.payments.create({ - # 'amount': 1250, - # 'currency': 'EUR', - # 'description': 'Order from platform', - # }) - - # Remove the account ID to make calls as the platform again - client.set_account_id(None) - print("Removed account ID") - - except ApiException as e: - print(f"Error: {e}") - - -if __name__ == "__main__": - main() diff --git a/openapitools.json b/openapitools.json index 061a772..f0bd502 100644 --- a/openapitools.json +++ b/openapitools.json @@ -2,6 +2,26 @@ "$schema": "./node_modules/@openapitools/openapi-generator-cli/config.schema.json", "spaces": 2, "generator-cli": { - "version": "6.0.1" + "version": "7.12.0", + "generators": { + "monei-python": { + "generatorName": "python", + "inputSpec": "https://js.monei.com/api/v1/openapi.json", + "output": "./", + "removeOperationIdPrefix": true, + "additionalProperties": { + "configFile": "./config.json" + } + }, + "monei-python-local": { + "generatorName": "python", + "inputSpec": "./openapi.json", + "output": "./", + "removeOperationIdPrefix": true, + "additionalProperties": { + "configFile": "./config.json" + } + } + } } } diff --git a/package.json b/package.json index efd5387..442c339 100644 --- a/package.json +++ b/package.json @@ -4,9 +4,9 @@ "description": "MONEI PYTHON SDK", "author": "monei", "scripts": { - "build": "openapi-generator-cli generate -i https://js.monei.com/api/v1/openapi.json -g python --remove-operation-id-prefix -c ./config.json -o ../ && ./post-build.sh", - "build:local": "openapi-generator-cli generate -i ./openapi.json -g python --remove-operation-id-prefix -c ./config.json -o ../ && ./post-build.sh", - "publish": "./release.sh", + "build": "./scripts/build.sh", + "build:local": "./scripts/build.sh local", + "publish": "./scripts/release.sh", "release": "release-it", "prepare": "yarn run build" }, diff --git a/post-build.sh b/post-build.sh deleted file mode 100755 index 713be50..0000000 --- a/post-build.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/bash -echo '# import custom MoneiClient' >> ../Monei/__init__.py -echo 'from Monei.monei_client import MoneiClient' >> ../Monei/__init__.py diff --git a/pyproject.toml b/pyproject.toml index 5de91ed..88402a2 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,54 +1,89 @@ -[project] -name = "monei-python-sdk" -version = "0.1.0" -description = "MONEI Python SDK" +[tool.poetry] +name = "Monei" +version = "1.2.6" +description = "MONEI API v1" +authors = ["OpenAPI Generator Community "] +license = "NoLicense" readme = "README.md" -requires-python = ">=3.12" -license = { text = "MIT" } -authors = [{ name = "MONEI", email = "hi@monei.com" }] -maintainers = [{ name = "MONEI", email = "support@monei.com" }] -keywords = [ - "monei", - "monei pay", - "pay", - "payments", - "payment gateway", - "python", - "sdk", - "rest", - "api", -] -dependencies = [ - "urllib3>=1.25.3", - "python_dateutil>=2.5.3", - "setuptools>=21.0.0", - "six>=1.10", - "certifi", -] -classifiers = [ - "Development Status :: 5 - Production/Stable", - "Intended Audience :: Developers", - "License :: OSI Approved :: MIT License", - "Operating System :: OS Independent", - "Topic :: Software Development :: Libraries :: Python Modules", - "Programming Language :: Python :: 3.12", -] +repository = "https://github.com/monei/monei-python-sdk" +keywords = ["OpenAPI", "OpenAPI-Generator", "MONEI API v1"] +include = ["Monei/py.typed"] + +[tool.poetry.dependencies] +python = "^3.8" + +urllib3 = ">= 1.25.3, < 3.0.0" +python-dateutil = ">= 2.8.2" +pydantic = ">= 2" +typing-extensions = ">= 4.7.1" + +[tool.poetry.dev-dependencies] +pytest = ">= 7.2.1" +pytest-cov = ">= 2.8.1" +tox = ">= 3.9.0" +flake8 = ">= 4.0.0" +types-python-dateutil = ">= 2.8.19.14" +mypy = ">= 1.5" + [build-system] -requires = ["hatchling"] -build-backend = "hatchling.build" +requires = ["setuptools"] +build-backend = "setuptools.build_meta" -[tool.hatch.build.targets.wheel] -packages = ["Monei"] +[tool.pylint.'MESSAGES CONTROL'] +extension-pkg-whitelist = "pydantic" -[project.optional-dependencies] -test = ["pytest>=7.0.0", "pytest-cov>=4.0.0"] -lint = ["ruff>=0.1.0", "black>=23.0.0"] +[tool.mypy] +files = [ + "Monei", + #"test", # auto-generated tests + "tests", # hand-written tests +] +# TODO: enable "strict" once all these individual checks are passing +# strict = true + +# List from: https://mypy.readthedocs.io/en/stable/existing_code.html#introduce-stricter-options +warn_unused_configs = true +warn_redundant_casts = true +warn_unused_ignores = true + +## Getting these passing should be easy +strict_equality = true +extra_checks = true -[tool.ruff] -line-length = 100 -target-version = "py312" +## Strongly recommend enabling this one as soon as you can +check_untyped_defs = true -[tool.black] -line-length = 100 -target-version = ["py312"] +## These shouldn't be too much additional work, but may be tricky to +## get passing if you use a lot of untyped libraries +disallow_subclassing_any = true +disallow_untyped_decorators = true +disallow_any_generics = true + +### These next few are various gradations of forcing use of type annotations +#disallow_untyped_calls = true +#disallow_incomplete_defs = true +#disallow_untyped_defs = true +# +### This one isn't too hard to get passing, but return on investment is lower +#no_implicit_reexport = true +# +### This one can be tricky to get passing if you use a lot of untyped libraries +#warn_return_any = true + +[[tool.mypy.overrides]] +module = [ + "Monei.configuration", +] +warn_unused_ignores = true +strict_equality = true +extra_checks = true +check_untyped_defs = true +disallow_subclassing_any = true +disallow_untyped_decorators = true +disallow_any_generics = true +disallow_untyped_calls = true +disallow_incomplete_defs = true +disallow_untyped_defs = true +no_implicit_reexport = true +warn_return_any = true diff --git a/pytest.ini b/pytest.ini index 54abd12..412a10e 100644 --- a/pytest.ini +++ b/pytest.ini @@ -9,4 +9,9 @@ markers = integration: Integration tests api: API tests slow: Slow running tests - e2e: End-to-end tests \ No newline at end of file + e2e: End-to-end tests + generated: Tests auto-generated by OpenAPI Generator + requires_api: Tests that require real API access +filterwarnings = + ignore::DeprecationWarning:Monei.*: + ignore::DeprecationWarning:urllib3.*: \ No newline at end of file diff --git a/requirements.txt b/requirements.txt index 96947f6..67f7f68 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,3 +1,4 @@ -python_dateutil >= 2.5.3 -setuptools >= 21.0.0 -urllib3 >= 1.25.3 +urllib3 >= 1.25.3, < 3.0.0 +python_dateutil >= 2.8.2 +pydantic >= 2 +typing-extensions >= 4.7.1 diff --git a/scripts/build.sh b/scripts/build.sh new file mode 100755 index 0000000..192ace2 --- /dev/null +++ b/scripts/build.sh @@ -0,0 +1,14 @@ +#!/bin/bash + +# Build script for MONEI Python SDK + +if [ "$1" == "local" ]; then + # Build using local OpenAPI spec + openapi-generator-cli generate -i ./openapi.json -c ./config.json +else + # Build using remote OpenAPI spec + openapi-generator-cli generate -i https://js.monei.com/api/v1/openapi.json -c ./config.json +fi + +# Run post-build script +./scripts/post-build.sh \ No newline at end of file diff --git a/scripts/post-build.sh b/scripts/post-build.sh new file mode 100755 index 0000000..0696207 --- /dev/null +++ b/scripts/post-build.sh @@ -0,0 +1,3 @@ +#!/bin/bash +echo '# import custom MoneiClient' >> ./Monei/__init__.py +echo 'from Monei.monei_client import MoneiClient' >> ./Monei/__init__.py diff --git a/release.sh b/scripts/release.sh similarity index 100% rename from release.sh rename to scripts/release.sh diff --git a/test-requirements.txt b/test-requirements.txt index ba4bd9d..e98555c 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -1,3 +1,6 @@ -pytest>=7.0.0 -pytest-cov>=4.0.0 -pytest-mock>=3.10.0 +pytest >= 7.2.1 +pytest-cov >= 2.8.1 +tox >= 3.9.0 +flake8 >= 4.0.0 +types-python-dateutil >= 2.8.19.14 +mypy >= 1.5 diff --git a/test/conftest.py b/test/conftest.py index 2bdaf30..1ca8533 100644 --- a/test/conftest.py +++ b/test/conftest.py @@ -1,64 +1,77 @@ -""" -Pytest configuration file with fixtures for testing the MONEI Python SDK. -""" - import pytest -from unittest.mock import MagicMock, patch +import os +from unittest.mock import patch, MagicMock +import json +import datetime + +# Constants for testing +TEST_API_KEY = "test_api_key" +TEST_ACCOUNT_ID = "acc_123456789" @pytest.fixture -def api_key(): - """Return a test API key.""" - return "test_api_key_12345" +def api_client(): + """Fixture for creating a mock API client.""" + from Monei.api_client import ApiClient + + # Create a mock API client that doesn't make real API calls + with patch.object(ApiClient, "call_api", return_value=(None, 0, {})): + client = ApiClient() + client.configuration.api_key["apiKey"] = TEST_API_KEY + yield client @pytest.fixture -def monei_client(api_key): - """Return a MONEI client instance with a test API key.""" - # Import here to avoid circular imports - from Monei import MoneiClient - return MoneiClient(api_key=api_key) +def api_instance(api_client): + """Fixture for creating API instances with the mock client.""" + + def _get_api_instance(api_class): + return api_class(api_client=api_client) + + return _get_api_instance @pytest.fixture def mock_response(): - """Return a mock response object.""" - mock = MagicMock() - mock.status_code = 200 - mock.json.return_value = {"success": True} - return mock + """Fixture for creating mock API responses.""" + def _create_mock_response(status=200, data=None, headers=None): + mock_resp = MagicMock() + mock_resp.status = status + mock_resp.data = json.dumps(data or {}).encode("utf-8") + mock_resp.headers = headers or {} + return mock_resp -@pytest.fixture -def mock_payment_response(): - """Return a mock payment response.""" - return { - "id": "pay_test123456789", - "amount": 1250, - "currency": "EUR", - "status": "COMPLETED", - "orderId": "order_123", - "description": "Test payment", - "customer": {"email": "test@example.com", "name": "Test Customer"}, - "createdAt": "2023-01-01T12:00:00.000Z", - "updatedAt": "2023-01-01T12:01:00.000Z", - } + return _create_mock_response -@pytest.fixture -def mock_error_response(): - """Return a mock error response.""" - return { - "error": { - "code": "invalid_request", - "message": "Invalid request parameters", - "param": "amount", - } - } +# Helper to convert datetime objects to strings in JSON serialization +def json_serial(obj): + if isinstance(obj, (datetime.datetime, datetime.date)): + return obj.isoformat() + raise TypeError(f"Type {type(obj)} not serializable") -@pytest.fixture -def mock_http_client(): - """Return a mock HTTP client.""" - with patch("Monei.api_client.ApiClient.request") as mock_request: - yield mock_request +# Skip tests that require real API calls in CI environments +def pytest_configure(config): + """Configure pytest markers.""" + config.addinivalue_line( + "markers", "generated: mark test as auto-generated by OpenAPI Generator" + ) + config.addinivalue_line("markers", "requires_api: mark test as requiring real API access") + + +def pytest_collection_modifyitems(config, items): + """Skip auto-generated tests that make real API calls unless explicitly enabled.""" + skip_generated = pytest.mark.skip(reason="Auto-generated test that makes real API calls") + + # Check if we're running in CI or if SKIP_GENERATED_TESTS is set + if os.environ.get("CI") or os.environ.get("SKIP_GENERATED_TESTS"): + for item in items: + if "test_" in item.name and not item.get_closest_marker("requires_api"): + # Mark all auto-generated tests with the 'generated' marker + item.add_marker(pytest.mark.generated) + + # Skip tests that would make real API calls + if not any(marker.name == "requires_api" for marker in item.iter_markers()): + item.add_marker(skip_generated) diff --git a/test/test_account_id.py b/test/test_account_id.py deleted file mode 100644 index 37e7ebd..0000000 --- a/test/test_account_id.py +++ /dev/null @@ -1,59 +0,0 @@ -import unittest -import pytest -from Monei import MoneiClient, ApiException - - -class TestAccountId(unittest.TestCase): - """Test case for accountId and user agent functionality""" - - def test_init_with_account_id_no_user_agent(self): - """Test initialization with account_id but no custom user_agent""" - with pytest.raises(ApiException) as excinfo: - MoneiClient(api_key="test_key", account_id="test_account_id") - assert "User-Agent must be provided when using Account ID" in str(excinfo.value) - - def test_init_with_account_id_and_user_agent(self): - """Test initialization with account_id and custom user_agent""" - client = MoneiClient( - api_key="test_key", account_id="test_account_id", user_agent="TestApp/1.0.0" - ) - assert client.account_id == "test_account_id" - assert client.user_agent == "TestApp/1.0.0" - assert client._api_client.default_headers["User-Agent"] == "TestApp/1.0.0" - assert client._api_client.default_headers["MONEI-Account-ID"] == "test_account_id" - - def test_set_account_id_no_user_agent(self): - """Test setting account_id without custom user_agent""" - client = MoneiClient(api_key="test_key") - with pytest.raises(ApiException) as excinfo: - client.set_account_id("test_account_id") - assert "User-Agent must be set before using Account ID" in str(excinfo.value) - - def test_set_account_id_with_user_agent(self): - """Test setting account_id with custom user_agent""" - client = MoneiClient(api_key="test_key", user_agent="TestApp/1.0.0") - client.set_account_id("test_account_id") - assert client.account_id == "test_account_id" - assert client._api_client.default_headers["MONEI-Account-ID"] == "test_account_id" - - def test_set_user_agent(self): - """Test setting user_agent""" - client = MoneiClient(api_key="test_key") - client.set_user_agent("TestApp/1.0.0") - assert client.user_agent == "TestApp/1.0.0" - assert client._api_client.default_headers["User-Agent"] == "TestApp/1.0.0" - - def test_remove_account_id(self): - """Test removing account_id""" - client = MoneiClient( - api_key="test_key", account_id="test_account_id", user_agent="TestApp/1.0.0" - ) - assert "MONEI-Account-ID" in client._api_client.default_headers - - client.set_account_id(None) - assert client.account_id is None - assert "MONEI-Account-ID" not in client._api_client.default_headers - - -if __name__ == "__main__": - unittest.main() diff --git a/test/test_activate_subscription_request.py b/test/test_activate_subscription_request.py index 021ce04..8cda841 100644 --- a/test/test_activate_subscription_request.py +++ b/test/test_activate_subscription_request.py @@ -3,21 +3,18 @@ """ MONEI API v1 - The MONEI API is organized around [REST](https://en.wikipedia.org/wiki/Representational_State_Transfer). Our API has predictable resource-oriented URLs, accepts JSON-encoded request bodies, returns JSON-encoded responses, and uses standard HTTP response codes, authentication, and verbs.

**Base URL:** https://api.monei.com/v1

**Client libraries:** # noqa: E501 +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

- The version of the OpenAPI document: 1.1.0 - Generated by: https://openapi-generator.tech -""" + The version of the OpenAPI document: 1.5.1 + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest -import datetime -import Monei -from Monei.models.activate_subscription_request import ActivateSubscriptionRequest # noqa: E501 -from Monei.rest import ApiException +from Monei.models.activate_subscription_request import ActivateSubscriptionRequest class TestActivateSubscriptionRequest(unittest.TestCase): """ActivateSubscriptionRequest unit test stubs""" @@ -28,31 +25,34 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional): + def make_instance(self, include_optional) -> ActivateSubscriptionRequest: """Test ActivateSubscriptionRequest - include_option is a boolean, when False only required + include_optional is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = Monei.models.activate_subscription_request.ActivateSubscriptionRequest() # noqa: E501 - if include_optional : + # uncomment below to create an instance of `ActivateSubscriptionRequest` + """ + model = ActivateSubscriptionRequest() + if include_optional: return ActivateSubscriptionRequest( - payment_token = null, - session_id = '39603551437913', - add_amount = null, - sequence_id = '62b23b9f3627cc38b08ff471ccd313ad', - complete_url = 'https://example.com/checkout/complete', - fail_url = 'https://example.com/checkout/fail', - cancel_url = 'https://example.com/checkout/cancel' + payment_token = '7cc38b08ff471ccd313ad62b23b9f362b107560b', + session_id = '39603551437913', + add_amount = 110, + sequence_id = '62b23b9f3627cc38b08ff471ccd313ad', + complete_url = 'https://example.com/checkout/complete', + fail_url = 'https://example.com/checkout/fail', + cancel_url = 'https://example.com/checkout/cancel', + metadata = {"systemId":"12345"} ) - else : + else: return ActivateSubscriptionRequest( ) + """ def testActivateSubscriptionRequest(self): """Test ActivateSubscriptionRequest""" - inst_req_only = self.make_instance(include_optional=False) - inst_req_and_optional = self.make_instance(include_optional=True) - + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/test/test_address.py b/test/test_address.py index 5f93ca0..6df39d3 100644 --- a/test/test_address.py +++ b/test/test_address.py @@ -3,21 +3,18 @@ """ MONEI API v1 - The MONEI API is organized around [REST](https://en.wikipedia.org/wiki/Representational_State_Transfer). Our API has predictable resource-oriented URLs, accepts JSON-encoded request bodies, returns JSON-encoded responses, and uses standard HTTP response codes, authentication, and verbs. # noqa: E501 +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

- The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" + The version of the OpenAPI document: 1.5.1 + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest -import datetime -import MONEI PYTHON SDK -from MONEI PYTHON SDK.models.address import Address # noqa: E501 -from MONEI PYTHON SDK.rest import ApiException +from Monei.models.address import Address class TestAddress(unittest.TestCase): """Address unit test stubs""" @@ -28,30 +25,32 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional): + def make_instance(self, include_optional) -> Address: """Test Address - include_option is a boolean, when False only required + include_optional is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = MONEI PYTHON SDK.models.address.Address() # noqa: E501 - if include_optional : + # uncomment below to create an instance of `Address` + """ + model = Address() + if include_optional: return Address( - country = 'ES', - city = 'Málaga', - line1 = 'Fake Street 123', - line2 = '0', - zip = '1234', + country = 'ES', + city = 'Málaga', + line1 = 'Fake Street 123', + line2 = '', + zip = '1234', state = 'Málaga' ) - else : + else: return Address( ) + """ def testAddress(self): """Test Address""" - inst_req_only = self.make_instance(include_optional=False) - inst_req_and_optional = self.make_instance(include_optional=True) - + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/test/test_api_client_integration.py b/test/test_api_client_integration.py new file mode 100644 index 0000000..da7b44b --- /dev/null +++ b/test/test_api_client_integration.py @@ -0,0 +1,160 @@ +import pytest +from unittest.mock import patch, MagicMock +import json + +from Monei.api_client import ApiClient +from Monei.configuration import Configuration +from Monei.exceptions import ApiException +from Monei.rest import RESTResponse + + +@pytest.mark.unit +class TestApiClientIntegration: + """Integration tests for the API client with mocked responses""" + + @pytest.fixture + def mock_api_client(self): + """Fixture for creating a mock API client""" + config = Configuration() + config.api_key["Authorization"] = "test_api_key" + return ApiClient(configuration=config) + + @pytest.fixture + def mock_response(self): + """Fixture for creating a mock response""" + mock_resp = MagicMock(spec=RESTResponse) + mock_resp.getheaders.return_value = {"Content-Type": "application/json"} + mock_resp.status = 200 + return mock_resp + + def test_deserialize_json_response(self, mock_api_client, mock_response): + """Test deserializing a JSON response""" + payment_data = { + "id": "pay_123456789", + "amount": 1000, + "currency": "EUR", + "status": "PENDING", + } + mock_response.data = json.dumps(payment_data).encode("utf-8") + + result = mock_api_client.deserialize(mock_response, "Payment") + + assert result == payment_data + + def test_deserialize_empty_response(self, mock_api_client, mock_response): + """Test deserializing an empty response""" + mock_response.data = b"" + + result = mock_api_client.deserialize(mock_response, "Payment") + + assert result is None + + def test_deserialize_non_json_response(self, mock_api_client, mock_response): + """Test deserializing a non-JSON response""" + mock_response.getheaders.return_value = {"Content-Type": "text/plain"} + mock_response.data = b"Not a JSON response" + + with pytest.raises(ApiException) as excinfo: + mock_api_client.deserialize(mock_response, "Payment") + + assert "Content type 'text/plain' is not supported" in str(excinfo.value) + + @patch.object(ApiClient, "request") + def test_call_api_success(self, mock_request, mock_api_client, mock_response): + """Test successful API call""" + payment_data = { + "id": "pay_123456789", + "amount": 1000, + "currency": "EUR", + "status": "PENDING", + } + mock_response.data = json.dumps(payment_data).encode("utf-8") + mock_request.return_value = mock_response + + data, status, headers = mock_api_client.call_api( + "/payments", + "POST", + path_params={}, + query_params={}, + header_params={}, + body={"amount": 1000, "currency": "EUR"}, + post_params=[], + files={}, + response_type="Payment", + auth_settings=["apiKey"], + async_req=False, + _return_http_data_only=True, + _preload_content=True, + _request_timeout=None, + collection_formats={}, + ) + + assert data == payment_data + assert status == 200 + assert headers == {"Content-Type": "application/json"} + + @patch.object(ApiClient, "request") + def test_call_api_error(self, mock_request, mock_api_client): + """Test API call with error response""" + error_response = {"statusCode": 400, "error": "Bad Request", "message": "Invalid amount"} + + mock_resp = MagicMock(spec=RESTResponse) + mock_resp.getheaders.return_value = {"Content-Type": "application/json"} + mock_resp.status = 400 + mock_resp.data = json.dumps(error_response).encode("utf-8") + mock_request.return_value = mock_resp + + with pytest.raises(ApiException) as excinfo: + mock_api_client.call_api( + "/payments", + "POST", + path_params={}, + query_params={}, + header_params={}, + body={"amount": -1000, "currency": "EUR"}, + post_params=[], + files={}, + response_type="Payment", + auth_settings=["apiKey"], + async_req=False, + _return_http_data_only=True, + _preload_content=True, + _request_timeout=None, + collection_formats={}, + ) + + assert excinfo.value.status == 400 + assert "Invalid amount" in str(excinfo.value) + + def test_set_default_header(self, mock_api_client): + """Test setting a default header""" + mock_api_client.set_default_header("User-Agent", "CustomApp/1.0") + + assert "User-Agent" in mock_api_client.default_headers + assert mock_api_client.default_headers["User-Agent"] == "CustomApp/1.0" + + # Test overwriting an existing header + mock_api_client.set_default_header("User-Agent", "AnotherApp/2.0") + assert mock_api_client.default_headers["User-Agent"] == "AnotherApp/2.0" + + def test_select_header_accept(self, mock_api_client): + """Test selecting the Accept header""" + # Test with supported content types + accept = mock_api_client.select_header_accept(["application/json", "application/xml"]) + assert accept == "application/json, application/xml" + + # Test with no content types + accept = mock_api_client.select_header_accept([]) + assert accept is None + + def test_select_header_content_type(self, mock_api_client): + """Test selecting the Content-Type header""" + # Test with supported content types + content_type = mock_api_client.select_header_content_type( + ["application/json", "application/xml"] + ) + assert content_type == "application/json" + + # Test with no content types + content_type = mock_api_client.select_header_content_type([]) + assert content_type == "application/json" diff --git a/test/test_apple_pay_domain_api.py b/test/test_apple_pay_domain_api.py index 45d275a..74cd315 100644 --- a/test/test_apple_pay_domain_api.py +++ b/test/test_apple_pay_domain_api.py @@ -3,35 +3,33 @@ """ MONEI API v1 - The MONEI API is organized around [REST](https://en.wikipedia.org/wiki/Representational_State_Transfer). Our API has predictable resource-oriented URLs, accepts JSON-encoded request bodies, returns JSON-encoded responses, and uses standard HTTP response codes, authentication, and verbs.

**Base URL:** https://api.monei.com/v1

**Client libraries:** # noqa: E501 +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

- The version of the OpenAPI document: 1.1.0 - Generated by: https://openapi-generator.tech -""" + The version of the OpenAPI document: 1.5.1 + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest -import Monei -from Monei.api.apple_pay_domain_api import ApplePayDomainApi # noqa: E501 -from Monei.rest import ApiException +from Monei.api.apple_pay_domain_api import ApplePayDomainApi class TestApplePayDomainApi(unittest.TestCase): """ApplePayDomainApi unit test stubs""" - def setUp(self): - self.api = Monei.api.apple_pay_domain_api.ApplePayDomainApi() # noqa: E501 + def setUp(self) -> None: + self.api = ApplePayDomainApi() - def tearDown(self): + def tearDown(self) -> None: pass - def test_register(self): + def test_register(self) -> None: """Test case for register - Register # noqa: E501 + Register Domain """ pass diff --git a/test/test_apple_pay_domain_api_integration.py b/test/test_apple_pay_domain_api_integration.py new file mode 100644 index 0000000..15f1436 --- /dev/null +++ b/test/test_apple_pay_domain_api_integration.py @@ -0,0 +1,75 @@ +import pytest +from unittest.mock import patch, MagicMock + +from Monei.monei_client import MoneiClient +from Monei.api.apple_pay_domain_api import ApplePayDomainApi +from Monei.model.register_apple_pay_domain_request import RegisterApplePayDomainRequest + + +@pytest.mark.unit +class TestApplePayDomainApiIntegration: + """Integration tests for the Apple Pay Domain API with mocked responses""" + + @pytest.fixture + def mock_client(self): + """Fixture for creating a mock client""" + return MoneiClient(api_key="test_api_key") + + @patch.object(ApplePayDomainApi, 'register') + def test_register_apple_pay_domain(self, mock_register, mock_client): + """Test registering an Apple Pay domain""" + success_response = { + "success": True, + "domain": "example.com" + } + mock_register.return_value = success_response + + register_request = RegisterApplePayDomainRequest( + domain="example.com" + ) + + result = mock_client.ApplePayDomain.register(register_apple_pay_domain_request=register_request) + + assert result["success"] is True + assert result["domain"] == "example.com" + mock_register.assert_called_once_with(register_apple_pay_domain_request=register_request) + + @patch.object(ApplePayDomainApi, 'list') + def test_list_apple_pay_domains(self, mock_list, mock_client): + """Test listing Apple Pay domains""" + domains_response = { + "data": [ + {"domain": "example.com", "created": "2023-01-01T12:00:00Z"}, + {"domain": "shop.example.com", "created": "2023-01-02T12:00:00Z"} + ], + "hasMore": False, + "totalCount": 2 + } + mock_list.return_value = domains_response + + result = mock_client.ApplePayDomain.list() + + assert "data" in result + assert len(result["data"]) == 2 + assert result["data"][0]["domain"] == "example.com" + assert result["data"][1]["domain"] == "shop.example.com" + assert result["hasMore"] is False + assert result["totalCount"] == 2 + mock_list.assert_called_once() + + @patch.object(ApplePayDomainApi, 'delete') + def test_delete_apple_pay_domain(self, mock_delete, mock_client): + """Test deleting an Apple Pay domain""" + success_response = { + "success": True, + "domain": "example.com", + "deleted": True + } + mock_delete.return_value = success_response + + result = mock_client.ApplePayDomain.delete(domain="example.com") + + assert result["success"] is True + assert result["domain"] == "example.com" + assert result["deleted"] is True + mock_delete.assert_called_once_with(domain="example.com") \ No newline at end of file diff --git a/test/test_apple_pay_domain_register200_response.py b/test/test_apple_pay_domain_register200_response.py index 5a5308a..8537db5 100644 --- a/test/test_apple_pay_domain_register200_response.py +++ b/test/test_apple_pay_domain_register200_response.py @@ -1,19 +1,20 @@ +# coding: utf-8 + """ MONEI API v1 -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

- The version of the OpenAPI document: 1.5.0 - Generated by: https://openapi-generator.tech -""" + The version of the OpenAPI document: 1.5.1 + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -import sys -import unittest -import Monei -from Monei.model.apple_pay_domain_register200_response import ApplePayDomainRegister200Response +import unittest +from Monei.models.apple_pay_domain_register200_response import ApplePayDomainRegister200Response class TestApplePayDomainRegister200Response(unittest.TestCase): """ApplePayDomainRegister200Response unit test stubs""" @@ -24,12 +25,27 @@ def setUp(self): def tearDown(self): pass + def make_instance(self, include_optional) -> ApplePayDomainRegister200Response: + """Test ApplePayDomainRegister200Response + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ApplePayDomainRegister200Response` + """ + model = ApplePayDomainRegister200Response() + if include_optional: + return ApplePayDomainRegister200Response( + success = True + ) + else: + return ApplePayDomainRegister200Response( + ) + """ + def testApplePayDomainRegister200Response(self): """Test ApplePayDomainRegister200Response""" - # FIXME: construct object with mandatory attributes with example values - # model = ApplePayDomainRegister200Response() # noqa: E501 - pass - + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/test/test_apple_pay_domain_register400_response.py b/test/test_apple_pay_domain_register400_response.py deleted file mode 100644 index af0cab7..0000000 --- a/test/test_apple_pay_domain_register400_response.py +++ /dev/null @@ -1,37 +0,0 @@ -""" - MONEI API v1 - -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - - The version of the OpenAPI document: 1.5.0 - Generated by: https://openapi-generator.tech -""" - - -import sys -import unittest - -import Monei -from Monei.model.error import Error -globals()['Error'] = Error -from Monei.model.apple_pay_domain_register400_response import ApplePayDomainRegister400Response - - -class TestApplePayDomainRegister400Response(unittest.TestCase): - """ApplePayDomainRegister400Response unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testApplePayDomainRegister400Response(self): - """Test ApplePayDomainRegister400Response""" - # FIXME: construct object with mandatory attributes with example values - # model = ApplePayDomainRegister400Response() # noqa: E501 - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_apple_pay_domain_register401_response.py b/test/test_apple_pay_domain_register401_response.py deleted file mode 100644 index e79db25..0000000 --- a/test/test_apple_pay_domain_register401_response.py +++ /dev/null @@ -1,37 +0,0 @@ -""" - MONEI API v1 - -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - - The version of the OpenAPI document: 1.5.0 - Generated by: https://openapi-generator.tech -""" - - -import sys -import unittest - -import Monei -from Monei.model.error import Error -globals()['Error'] = Error -from Monei.model.apple_pay_domain_register401_response import ApplePayDomainRegister401Response - - -class TestApplePayDomainRegister401Response(unittest.TestCase): - """ApplePayDomainRegister401Response unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testApplePayDomainRegister401Response(self): - """Test ApplePayDomainRegister401Response""" - # FIXME: construct object with mandatory attributes with example values - # model = ApplePayDomainRegister401Response() # noqa: E501 - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_apple_pay_domain_register404_response.py b/test/test_apple_pay_domain_register404_response.py deleted file mode 100644 index 7551c39..0000000 --- a/test/test_apple_pay_domain_register404_response.py +++ /dev/null @@ -1,37 +0,0 @@ -""" - MONEI API v1 - -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - - The version of the OpenAPI document: 1.5.0 - Generated by: https://openapi-generator.tech -""" - - -import sys -import unittest - -import Monei -from Monei.model.error import Error -globals()['Error'] = Error -from Monei.model.apple_pay_domain_register404_response import ApplePayDomainRegister404Response - - -class TestApplePayDomainRegister404Response(unittest.TestCase): - """ApplePayDomainRegister404Response unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testApplePayDomainRegister404Response(self): - """Test ApplePayDomainRegister404Response""" - # FIXME: construct object with mandatory attributes with example values - # model = ApplePayDomainRegister404Response() # noqa: E501 - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_apple_pay_domain_register422_response.py b/test/test_apple_pay_domain_register422_response.py deleted file mode 100644 index 7c61cd6..0000000 --- a/test/test_apple_pay_domain_register422_response.py +++ /dev/null @@ -1,37 +0,0 @@ -""" - MONEI API v1 - -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - - The version of the OpenAPI document: 1.5.0 - Generated by: https://openapi-generator.tech -""" - - -import sys -import unittest - -import Monei -from Monei.model.error import Error -globals()['Error'] = Error -from Monei.model.apple_pay_domain_register422_response import ApplePayDomainRegister422Response - - -class TestApplePayDomainRegister422Response(unittest.TestCase): - """ApplePayDomainRegister422Response unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testApplePayDomainRegister422Response(self): - """Test ApplePayDomainRegister422Response""" - # FIXME: construct object with mandatory attributes with example values - # model = ApplePayDomainRegister422Response() # noqa: E501 - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_apple_pay_domain_register500_response.py b/test/test_apple_pay_domain_register500_response.py deleted file mode 100644 index 667e048..0000000 --- a/test/test_apple_pay_domain_register500_response.py +++ /dev/null @@ -1,37 +0,0 @@ -""" - MONEI API v1 - -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - - The version of the OpenAPI document: 1.5.0 - Generated by: https://openapi-generator.tech -""" - - -import sys -import unittest - -import Monei -from Monei.model.error import Error -globals()['Error'] = Error -from Monei.model.apple_pay_domain_register500_response import ApplePayDomainRegister500Response - - -class TestApplePayDomainRegister500Response(unittest.TestCase): - """ApplePayDomainRegister500Response unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testApplePayDomainRegister500Response(self): - """Test ApplePayDomainRegister500Response""" - # FIXME: construct object with mandatory attributes with example values - # model = ApplePayDomainRegister500Response() # noqa: E501 - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_apple_pay_domain_register503_response.py b/test/test_apple_pay_domain_register503_response.py deleted file mode 100644 index 47d7c08..0000000 --- a/test/test_apple_pay_domain_register503_response.py +++ /dev/null @@ -1,37 +0,0 @@ -""" - MONEI API v1 - -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - - The version of the OpenAPI document: 1.5.0 - Generated by: https://openapi-generator.tech -""" - - -import sys -import unittest - -import Monei -from Monei.model.error import Error -globals()['Error'] = Error -from Monei.model.apple_pay_domain_register503_response import ApplePayDomainRegister503Response - - -class TestApplePayDomainRegister503Response(unittest.TestCase): - """ApplePayDomainRegister503Response unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testApplePayDomainRegister503Response(self): - """Test ApplePayDomainRegister503Response""" - # FIXME: construct object with mandatory attributes with example values - # model = ApplePayDomainRegister503Response() # noqa: E501 - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_bizum_api.py b/test/test_bizum_api.py index 2003e4c..b429ff2 100644 --- a/test/test_bizum_api.py +++ b/test/test_bizum_api.py @@ -3,35 +3,33 @@ """ MONEI API v1 -

The MONEI API is organized around REST. Our API has predictable resource-oriented URLs, accepts JSON-encoded request bodies, returns JSON-encoded responses, and uses standard HTTP response codes, authentication, and verbs.

Base URL:

https://api.monei.com/v1

Client libraries:

Important:

If you are not using our official SDKs, you need to provide a valid User-Agent header in each request, otherwise your requests will be rejected.

# noqa: E501 +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

- The version of the OpenAPI document: 1.4.2 - Generated by: https://openapi-generator.tech -""" + The version of the OpenAPI document: 1.5.1 + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest -import Monei -from Monei.api.bizum_api import BizumApi # noqa: E501 -from Monei.rest import ApiException +from Monei.api.bizum_api import BizumApi class TestBizumApi(unittest.TestCase): """BizumApi unit test stubs""" - def setUp(self): - self.api = Monei.api.bizum_api.BizumApi() # noqa: E501 + def setUp(self) -> None: + self.api = BizumApi() - def tearDown(self): + def tearDown(self) -> None: pass - def test_validate_phone(self): + def test_validate_phone(self) -> None: """Test case for validate_phone - Validate Phone # noqa: E501 + Validate Phone """ pass diff --git a/test/test_bizum_api_integration.py b/test/test_bizum_api_integration.py new file mode 100644 index 0000000..27bc0c3 --- /dev/null +++ b/test/test_bizum_api_integration.py @@ -0,0 +1,60 @@ +import pytest +from unittest.mock import patch, MagicMock + +from Monei.monei_client import MoneiClient +from Monei.api.bizum_api import BizumApi +from Monei.model.validate_bizum_phone_request import ValidateBizumPhoneRequest + + +@pytest.mark.unit +class TestBizumApiIntegration: + """Integration tests for the Bizum API with mocked responses""" + + @pytest.fixture + def mock_client(self): + """Fixture for creating a mock client""" + return MoneiClient(api_key="test_api_key") + + @patch.object(BizumApi, 'validate_phone') + def test_validate_bizum_phone(self, mock_validate_phone, mock_client): + """Test validating a Bizum phone number""" + success_response = { + "valid": True, + "phone": "+34600000000" + } + mock_validate_phone.return_value = success_response + + validate_request = ValidateBizumPhoneRequest( + phone="+34600000000" + ) + + result = mock_client.Bizum.validate_phone(validate_bizum_phone_request=validate_request) + + assert result["valid"] is True + assert result["phone"] == "+34600000000" + mock_validate_phone.assert_called_once_with(validate_bizum_phone_request=validate_request) + + @patch.object(BizumApi, 'validate_phone') + def test_validate_invalid_bizum_phone(self, mock_validate_phone, mock_client): + """Test validating an invalid Bizum phone number""" + invalid_response = { + "valid": False, + "phone": "+34600000000", + "error": { + "code": "invalid_phone", + "message": "The phone number is not registered with Bizum" + } + } + mock_validate_phone.return_value = invalid_response + + validate_request = ValidateBizumPhoneRequest( + phone="+34600000000" + ) + + result = mock_client.Bizum.validate_phone(validate_bizum_phone_request=validate_request) + + assert result["valid"] is False + assert result["phone"] == "+34600000000" + assert "error" in result + assert result["error"]["code"] == "invalid_phone" + mock_validate_phone.assert_called_once_with(validate_bizum_phone_request=validate_request) \ No newline at end of file diff --git a/test/test_bizum_validate_phone200_response.py b/test/test_bizum_validate_phone200_response.py index 8665b2c..2a3a502 100644 --- a/test/test_bizum_validate_phone200_response.py +++ b/test/test_bizum_validate_phone200_response.py @@ -1,19 +1,20 @@ +# coding: utf-8 + """ MONEI API v1 -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

- The version of the OpenAPI document: 1.5.0 - Generated by: https://openapi-generator.tech -""" + The version of the OpenAPI document: 1.5.1 + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -import sys -import unittest -import Monei -from Monei.model.bizum_validate_phone200_response import BizumValidatePhone200Response +import unittest +from Monei.models.bizum_validate_phone200_response import BizumValidatePhone200Response class TestBizumValidatePhone200Response(unittest.TestCase): """BizumValidatePhone200Response unit test stubs""" @@ -24,12 +25,27 @@ def setUp(self): def tearDown(self): pass + def make_instance(self, include_optional) -> BizumValidatePhone200Response: + """Test BizumValidatePhone200Response + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `BizumValidatePhone200Response` + """ + model = BizumValidatePhone200Response() + if include_optional: + return BizumValidatePhone200Response( + is_valid = True + ) + else: + return BizumValidatePhone200Response( + ) + """ + def testBizumValidatePhone200Response(self): """Test BizumValidatePhone200Response""" - # FIXME: construct object with mandatory attributes with example values - # model = BizumValidatePhone200Response() # noqa: E501 - pass - + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/test/test_cancel_payment_request.py b/test/test_cancel_payment_request.py index d917a3b..bd8b3ee 100644 --- a/test/test_cancel_payment_request.py +++ b/test/test_cancel_payment_request.py @@ -3,21 +3,18 @@ """ MONEI API v1 - The MONEI API is organized around [REST](https://en.wikipedia.org/wiki/Representational_State_Transfer). Our API has predictable resource-oriented URLs, accepts JSON-encoded request bodies, returns JSON-encoded responses, and uses standard HTTP response codes, authentication, and verbs. # noqa: E501 +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

- The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" + The version of the OpenAPI document: 1.5.1 + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest -import datetime -import MONEI PYTHON SDK -from MONEI PYTHON SDK.models.cancel_payment_request import CancelPaymentRequest # noqa: E501 -from MONEI PYTHON SDK.rest import ApiException +from Monei.models.cancel_payment_request import CancelPaymentRequest class TestCancelPaymentRequest(unittest.TestCase): """CancelPaymentRequest unit test stubs""" @@ -28,25 +25,27 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional): + def make_instance(self, include_optional) -> CancelPaymentRequest: """Test CancelPaymentRequest - include_option is a boolean, when False only required + include_optional is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = MONEI PYTHON SDK.models.cancel_payment_request.CancelPaymentRequest() # noqa: E501 - if include_optional : + # uncomment below to create an instance of `CancelPaymentRequest` + """ + model = CancelPaymentRequest() + if include_optional: return CancelPaymentRequest( cancellation_reason = 'duplicated' ) - else : + else: return CancelPaymentRequest( ) + """ def testCancelPaymentRequest(self): """Test CancelPaymentRequest""" - inst_req_only = self.make_instance(include_optional=False) - inst_req_and_optional = self.make_instance(include_optional=True) - + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/test/test_cancel_subscription_request.py b/test/test_cancel_subscription_request.py index dc733ed..a92fb22 100644 --- a/test/test_cancel_subscription_request.py +++ b/test/test_cancel_subscription_request.py @@ -3,21 +3,18 @@ """ MONEI API v1 - The MONEI API is organized around [REST](https://en.wikipedia.org/wiki/Representational_State_Transfer). Our API has predictable resource-oriented URLs, accepts JSON-encoded request bodies, returns JSON-encoded responses, and uses standard HTTP response codes, authentication, and verbs.

**Base URL:** https://api.monei.com/v1

**Client libraries:** # noqa: E501 +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

- The version of the OpenAPI document: 1.1.0 - Generated by: https://openapi-generator.tech -""" + The version of the OpenAPI document: 1.5.1 + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest -import datetime -import Monei -from Monei.models.cancel_subscription_request import CancelSubscriptionRequest # noqa: E501 -from Monei.rest import ApiException +from Monei.models.cancel_subscription_request import CancelSubscriptionRequest class TestCancelSubscriptionRequest(unittest.TestCase): """CancelSubscriptionRequest unit test stubs""" @@ -28,25 +25,27 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional): + def make_instance(self, include_optional) -> CancelSubscriptionRequest: """Test CancelSubscriptionRequest - include_option is a boolean, when False only required + include_optional is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = Monei.models.cancel_subscription_request.CancelSubscriptionRequest() # noqa: E501 - if include_optional : + # uncomment below to create an instance of `CancelSubscriptionRequest` + """ + model = CancelSubscriptionRequest() + if include_optional: return CancelSubscriptionRequest( cancel_at_period_end = False ) - else : + else: return CancelSubscriptionRequest( ) + """ def testCancelSubscriptionRequest(self): """Test CancelSubscriptionRequest""" - inst_req_only = self.make_instance(include_optional=False) - inst_req_and_optional = self.make_instance(include_optional=True) - + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/test/test_capture_payment_request.py b/test/test_capture_payment_request.py index c4de3a8..6a4c3f8 100644 --- a/test/test_capture_payment_request.py +++ b/test/test_capture_payment_request.py @@ -3,21 +3,18 @@ """ MONEI API v1 - The MONEI API is organized around [REST](https://en.wikipedia.org/wiki/Representational_State_Transfer). Our API has predictable resource-oriented URLs, accepts JSON-encoded request bodies, returns JSON-encoded responses, and uses standard HTTP response codes, authentication, and verbs. # noqa: E501 +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

- The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" + The version of the OpenAPI document: 1.5.1 + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest -import datetime -import MONEI PYTHON SDK -from MONEI PYTHON SDK.models.capture_payment_request import CapturePaymentRequest # noqa: E501 -from MONEI PYTHON SDK.rest import ApiException +from Monei.models.capture_payment_request import CapturePaymentRequest class TestCapturePaymentRequest(unittest.TestCase): """CapturePaymentRequest unit test stubs""" @@ -28,25 +25,27 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional): + def make_instance(self, include_optional) -> CapturePaymentRequest: """Test CapturePaymentRequest - include_option is a boolean, when False only required + include_optional is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = MONEI PYTHON SDK.models.capture_payment_request.CapturePaymentRequest() # noqa: E501 - if include_optional : + # uncomment below to create an instance of `CapturePaymentRequest` + """ + model = CapturePaymentRequest() + if include_optional: return CapturePaymentRequest( - amount = null + amount = 110 ) - else : + else: return CapturePaymentRequest( ) + """ def testCapturePaymentRequest(self): """Test CapturePaymentRequest""" - inst_req_only = self.make_instance(include_optional=False) - inst_req_and_optional = self.make_instance(include_optional=True) - + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/test/test_card.py b/test/test_card.py deleted file mode 100644 index e806b7e..0000000 --- a/test/test_card.py +++ /dev/null @@ -1,55 +0,0 @@ -# coding: utf-8 - -""" - MONEI API v1 - - The MONEI API is organized around [REST](https://en.wikipedia.org/wiki/Representational_State_Transfer). Our API has predictable resource-oriented URLs, accepts JSON-encoded request bodies, returns JSON-encoded responses, and uses standard HTTP response codes, authentication, and verbs. # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - - -from __future__ import absolute_import - -import unittest -import datetime - -import MONEI PYTHON SDK -from MONEI PYTHON SDK.models.card import Card # noqa: E501 -from MONEI PYTHON SDK.rest import ApiException - -class TestCard(unittest.TestCase): - """Card unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional): - """Test Card - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # model = MONEI PYTHON SDK.models.card.Card() # noqa: E501 - if include_optional : - return Card( - number = '0', - cvc = '0', - exp_month = '0', - exp_year = '0' - ) - else : - return Card( - ) - - def testCard(self): - """Test Card""" - inst_req_only = self.make_instance(include_optional=False) - inst_req_and_optional = self.make_instance(include_optional=True) - - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_client.py b/test/test_client.py deleted file mode 100644 index 9fd1976..0000000 --- a/test/test_client.py +++ /dev/null @@ -1,44 +0,0 @@ -""" -Unit tests for the MONEI client. -""" - -import pytest -from unittest.mock import patch - - -class TestMoneiClient: - """Tests for the MoneiClient class.""" - - def test_client_initialization(self, api_key): - """Test that the client is initialized with the correct API key.""" - # Import here to avoid circular imports - from Monei import MoneiClient - client = MoneiClient(api_key=api_key) - assert client.api_key == api_key - assert client.api_client is not None - - def test_client_initialization_without_api_key(self): - """Test that an error is raised when no API key is provided.""" - # Import here to avoid circular imports - from Monei import MoneiClient - with pytest.raises(ValueError, match="API key is required"): - MoneiClient(api_key=None) - - @patch("Monei.api_client.ApiClient") - def test_client_with_custom_configuration(self, mock_api_client, api_key): - """Test that the client can be initialized with a custom configuration.""" - # Import here to avoid circular imports - from Monei import MoneiClient - MoneiClient( - api_key=api_key, - host="https://custom-api.monei.com", - ssl_ca_cert="/path/to/cert", - verify_ssl=False, - ) - - # Check that the configuration was passed to the API client - mock_api_client.assert_called_once() - config = mock_api_client.call_args[0][0] - assert config.host == "https://custom-api.monei.com" - assert config.ssl_ca_cert == "/path/to/cert" - assert config.verify_ssl is False \ No newline at end of file diff --git a/test/test_confirm_payment_request.py b/test/test_confirm_payment_request.py index 6830398..c249508 100644 --- a/test/test_confirm_payment_request.py +++ b/test/test_confirm_payment_request.py @@ -3,21 +3,18 @@ """ MONEI API v1 - The MONEI API is organized around [REST](https://en.wikipedia.org/wiki/Representational_State_Transfer). Our API has predictable resource-oriented URLs, accepts JSON-encoded request bodies, returns JSON-encoded responses, and uses standard HTTP response codes, authentication, and verbs. # noqa: E501 +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

- The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" + The version of the OpenAPI document: 1.5.1 + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest -import datetime -import MONEI PYTHON SDK -from MONEI PYTHON SDK.models.confirm_payment_request import ConfirmPaymentRequest # noqa: E501 -from MONEI PYTHON SDK.rest import ApiException +from Monei.models.confirm_payment_request import ConfirmPaymentRequest class TestConfirmPaymentRequest(unittest.TestCase): """ConfirmPaymentRequest unit test stubs""" @@ -28,55 +25,64 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional): + def make_instance(self, include_optional) -> ConfirmPaymentRequest: """Test ConfirmPaymentRequest - include_option is a boolean, when False only required + include_optional is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = MONEI PYTHON SDK.models.confirm_payment_request.ConfirmPaymentRequest() # noqa: E501 - if include_optional : + # uncomment below to create an instance of `ConfirmPaymentRequest` + """ + model = ConfirmPaymentRequest() + if include_optional: return ConfirmPaymentRequest( - payment_token = null, - generate_payment_token = False, - customer = MONEI PYTHON SDK.models.payment_customer.Payment-Customer( - email = 'john.doe@microapps.com', + payment_token = '7cc38b08ff471ccd313ad62b23b9f362b107560b', + payment_method = Monei.models.confirm_payment_request_payment_method.ConfirmPaymentRequest_paymentMethod( + card = Monei.models.confirm_payment_request_payment_method_card.ConfirmPaymentRequest_paymentMethod_card( + cardholder_name = 'John Doe', + cardholder_email = 'john.doe@monei.com', ), ), + generate_payment_token = False, + customer = Monei.models.payment_customer.Payment-Customer( + email = 'john.doe@example.com', name = 'John Doe', - phone = '0', ), - billing_details = MONEI PYTHON SDK.models.payment_billing_details.Payment-BillingDetails( + phone = '', ), + billing_details = Monei.models.payment_billing_details.Payment-BillingDetails( name = 'John Doe', - email = 'john.doe@microapps.com', - phone = '0', - company = '0', - address = MONEI PYTHON SDK.models.address.Address( + email = 'john.doe@example.com', + phone = '', + company = '', + tax_id = '', + address = Monei.models.address.Address( country = 'ES', city = 'Málaga', line1 = 'Fake Street 123', - line2 = '0', + line2 = '', zip = '1234', - state = 'Málaga', ), ), - shipping_details = MONEI PYTHON SDK.models.payment_shipping_details.Payment-ShippingDetails( + state = 'Málaga', ), ), + shipping_details = Monei.models.payment_shipping_details.Payment-ShippingDetails( name = 'John Doe', - email = 'john.doe@microapps.com', - phone = '0', - company = '0', - address = MONEI PYTHON SDK.models.address.Address( + email = 'john.doe@example.com', + phone = '', + company = '', + tax_id = '', + address = Monei.models.address.Address( country = 'ES', city = 'Málaga', line1 = 'Fake Street 123', - line2 = '0', + line2 = '', zip = '1234', - state = 'Málaga', ), ) + state = 'Málaga', ), ), + metadata = {"systemId":"12345"} ) - else : + else: return ConfirmPaymentRequest( - payment_token = null, + payment_token = '7cc38b08ff471ccd313ad62b23b9f362b107560b', ) + """ def testConfirmPaymentRequest(self): """Test ConfirmPaymentRequest""" - inst_req_only = self.make_instance(include_optional=False) - inst_req_and_optional = self.make_instance(include_optional=True) - + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/test/test_confirm_payment_request_payment_method.py b/test/test_confirm_payment_request_payment_method.py index d779cb6..e288686 100644 --- a/test/test_confirm_payment_request_payment_method.py +++ b/test/test_confirm_payment_request_payment_method.py @@ -3,21 +3,18 @@ """ MONEI API v1 - The MONEI API is organized around [REST](https://en.wikipedia.org/wiki/Representational_State_Transfer). Our API has predictable resource-oriented URLs, accepts JSON-encoded request bodies, returns JSON-encoded responses, and uses standard HTTP response codes, authentication, and verbs.

**Base URL:** https://api.monei.com/v1

**Client libraries:** # noqa: E501 +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

- The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" + The version of the OpenAPI document: 1.5.1 + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest -import datetime -import Monei -from Monei.models.confirm_payment_request_payment_method import ConfirmPaymentRequestPaymentMethod # noqa: E501 -from Monei.rest import ApiException +from Monei.models.confirm_payment_request_payment_method import ConfirmPaymentRequestPaymentMethod class TestConfirmPaymentRequestPaymentMethod(unittest.TestCase): """ConfirmPaymentRequestPaymentMethod unit test stubs""" @@ -28,27 +25,29 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional): + def make_instance(self, include_optional) -> ConfirmPaymentRequestPaymentMethod: """Test ConfirmPaymentRequestPaymentMethod - include_option is a boolean, when False only required + include_optional is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = Monei.models.confirm_payment_request_payment_method.ConfirmPaymentRequestPaymentMethod() # noqa: E501 - if include_optional : + # uncomment below to create an instance of `ConfirmPaymentRequestPaymentMethod` + """ + model = ConfirmPaymentRequestPaymentMethod() + if include_optional: return ConfirmPaymentRequestPaymentMethod( card = Monei.models.confirm_payment_request_payment_method_card.ConfirmPaymentRequest_paymentMethod_card( cardholder_name = 'John Doe', cardholder_email = 'john.doe@monei.com', ) ) - else : + else: return ConfirmPaymentRequestPaymentMethod( ) + """ def testConfirmPaymentRequestPaymentMethod(self): """Test ConfirmPaymentRequestPaymentMethod""" - inst_req_only = self.make_instance(include_optional=False) - inst_req_and_optional = self.make_instance(include_optional=True) - + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/test/test_confirm_payment_request_payment_method_card.py b/test/test_confirm_payment_request_payment_method_card.py index 83552f8..7ebc4ba 100644 --- a/test/test_confirm_payment_request_payment_method_card.py +++ b/test/test_confirm_payment_request_payment_method_card.py @@ -3,21 +3,18 @@ """ MONEI API v1 - The MONEI API is organized around [REST](https://en.wikipedia.org/wiki/Representational_State_Transfer). Our API has predictable resource-oriented URLs, accepts JSON-encoded request bodies, returns JSON-encoded responses, and uses standard HTTP response codes, authentication, and verbs.

**Base URL:** https://api.monei.com/v1

**Client libraries:** # noqa: E501 +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

- The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" + The version of the OpenAPI document: 1.5.1 + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest -import datetime -import Monei -from Monei.models.confirm_payment_request_payment_method_card import ConfirmPaymentRequestPaymentMethodCard # noqa: E501 -from Monei.rest import ApiException +from Monei.models.confirm_payment_request_payment_method_card import ConfirmPaymentRequestPaymentMethodCard class TestConfirmPaymentRequestPaymentMethodCard(unittest.TestCase): """ConfirmPaymentRequestPaymentMethodCard unit test stubs""" @@ -28,26 +25,28 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional): + def make_instance(self, include_optional) -> ConfirmPaymentRequestPaymentMethodCard: """Test ConfirmPaymentRequestPaymentMethodCard - include_option is a boolean, when False only required + include_optional is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = Monei.models.confirm_payment_request_payment_method_card.ConfirmPaymentRequestPaymentMethodCard() # noqa: E501 - if include_optional : + # uncomment below to create an instance of `ConfirmPaymentRequestPaymentMethodCard` + """ + model = ConfirmPaymentRequestPaymentMethodCard() + if include_optional: return ConfirmPaymentRequestPaymentMethodCard( - cardholder_name = 'John Doe', + cardholder_name = 'John Doe', cardholder_email = 'john.doe@monei.com' ) - else : + else: return ConfirmPaymentRequestPaymentMethodCard( ) + """ def testConfirmPaymentRequestPaymentMethodCard(self): """Test ConfirmPaymentRequestPaymentMethodCard""" - inst_req_only = self.make_instance(include_optional=False) - inst_req_and_optional = self.make_instance(include_optional=True) - + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/test/test_create_payment_request.py b/test/test_create_payment_request.py index ae5bea5..e1bc590 100644 --- a/test/test_create_payment_request.py +++ b/test/test_create_payment_request.py @@ -3,21 +3,18 @@ """ MONEI API v1 - The MONEI API is organized around [REST](https://en.wikipedia.org/wiki/Representational_State_Transfer). Our API has predictable resource-oriented URLs, accepts JSON-encoded request bodies, returns JSON-encoded responses, and uses standard HTTP response codes, authentication, and verbs. # noqa: E501 +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

- The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" + The version of the OpenAPI document: 1.5.1 + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest -import datetime -import MONEI PYTHON SDK -from MONEI PYTHON SDK.models.create_payment_request import CreatePaymentRequest # noqa: E501 -from MONEI PYTHON SDK.rest import ApiException +from Monei.models.create_payment_request import CreatePaymentRequest class TestCreatePaymentRequest(unittest.TestCase): """CreatePaymentRequest unit test stubs""" @@ -28,94 +25,111 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional): + def make_instance(self, include_optional) -> CreatePaymentRequest: """Test CreatePaymentRequest - include_option is a boolean, when False only required + include_optional is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = MONEI PYTHON SDK.models.create_payment_request.CreatePaymentRequest() # noqa: E501 - if include_optional : + # uncomment below to create an instance of `CreatePaymentRequest` + """ + model = CreatePaymentRequest() + if include_optional: return CreatePaymentRequest( - amount = 110, - currency = 'EUR', - order_id = '14379133960355', - callback_url = 'https://example.com/checkout/callback', - complete_url = 'https://example.com/checkout/complete', - fail_url = 'https://example.com/checkout/fail', - cancel_url = 'https://example.com/checkout/cancel', - payment_token = null, - session_id = '39603551437913', - generate_payment_token = False, - payment_method = MONEI PYTHON SDK.models.payment_payment_method_input.Payment-PaymentMethodInput( - card = MONEI PYTHON SDK.models.card.Card( - number = '0', - cvc = '0', - exp_month = '0', - exp_year = '0', ), ), - allowed_payment_methods = ["card","bizum","paypal"], - transaction_type = 'SALE', - sequence = MONEI PYTHON SDK.models.payment_sequence.Payment-Sequence( + amount = 110, + currency = 'EUR', + order_id = '14379133960355', + callback_url = 'https://example.com/checkout/callback', + complete_url = 'https://example.com/checkout/complete', + fail_url = 'https://example.com/checkout/fail', + cancel_url = 'https://example.com/checkout/cancel', + payment_token = '7cc38b08ff471ccd313ad62b23b9f362b107560b', + session_id = '39603551437913', + generate_payment_token = False, + payment_method = Monei.models.payment_payment_method_input.Payment-PaymentMethodInput( + card = Monei.models.payment_payment_method_card_input.Payment-PaymentMethodCardInput( + number = '', + cvc = '', + exp_month = '', + exp_year = '', + cardholder_name = 'John Doe', + cardholder_email = 'john.doe@monei.com', ), + bizum = Monei.models.payment_payment_method_bizum_input.Payment-PaymentMethodBizumInput( + phone_number = '', ), ), + allowed_payment_methods = ["card","bizum","paypal"], + transaction_type = 'SALE', + sequence = Monei.models.payment_sequence.Payment-Sequence( type = 'recurring', - recurring = MONEI PYTHON SDK.models.payment_sequence_recurring.Payment-SequenceRecurring( + recurring = Monei.models.payment_sequence_recurring.Payment-SequenceRecurring( expiry = '*(The payment method or card expiration)*', - frequency = 30, ), ), - description = 'Test Shop - #84370745531439', - customer = MONEI PYTHON SDK.models.payment_customer.Payment-Customer( - email = 'john.doe@microapps.com', + frequency = 30, ), ), + store_id = 'e5f28150d9e8974c58ab5ec9c4a880f8734dcf05', + point_of_sale_id = 'fb269cccfa0cc021f5d0b8eb1421646c696213e1', + subscription_id = '575bcd84-09fc-4a6e-8c4c-f88b8eb90bfa', + auto_recover = False, + description = 'Test Shop - #84370745531439', + customer = Monei.models.payment_customer.Payment-Customer( + email = 'john.doe@example.com', name = 'John Doe', - phone = '0', ), - billing_details = MONEI PYTHON SDK.models.payment_billing_details.Payment-BillingDetails( + phone = '', ), + billing_details = Monei.models.payment_billing_details.Payment-BillingDetails( name = 'John Doe', - email = 'john.doe@microapps.com', - phone = '0', - company = '0', - address = MONEI PYTHON SDK.models.address.Address( + email = 'john.doe@example.com', + phone = '', + company = '', + tax_id = '', + address = Monei.models.address.Address( country = 'ES', city = 'Málaga', line1 = 'Fake Street 123', - line2 = '0', + line2 = '', zip = '1234', - state = 'Málaga', ), ), - shipping_details = MONEI PYTHON SDK.models.payment_shipping_details.Payment-ShippingDetails( + state = 'Málaga', ), ), + shipping_details = Monei.models.payment_shipping_details.Payment-ShippingDetails( name = 'John Doe', - email = 'john.doe@microapps.com', - phone = '0', - company = '0', - address = MONEI PYTHON SDK.models.address.Address( + email = 'john.doe@example.com', + phone = '', + company = '', + tax_id = '', + address = Monei.models.address.Address( country = 'ES', city = 'Málaga', line1 = 'Fake Street 123', - line2 = '0', + line2 = '', zip = '1234', - state = 'Málaga', ), ), - session_details = MONEI PYTHON SDK.models.payment_session_details.Payment-SessionDetails( + state = 'Málaga', ), ), + session_details = Monei.models.payment_session_details.Payment-SessionDetails( ip = '100.100.200.100', country_code = 'ES', lang = 'es', device_type = 'desktop', - device_model = '0', + device_model = '', browser = 'Chrome', browser_version = '83.0.4103.116', os = 'Mac OS', os_version = '10.15.4', source = 'MONEI/PHP', source_version = '0.1.2', - user_agent = 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) ...', ) + user_agent = 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) ...', + browser_accept = 'text/html,application/xhtml+xml,application/json', + browser_color_depth = 24, + browser_screen_height = 1152, + browser_screen_width = 2048, + browser_timezone_offset = 'string', ), + expire_at = 1663581391, + metadata = {"systemId":"12345"} ) - else : + else: return CreatePaymentRequest( amount = 110, currency = 'EUR', order_id = '14379133960355', - callback_url = 'https://example.com/checkout/callback', - complete_url = 'https://example.com/checkout/complete', ) + """ def testCreatePaymentRequest(self): """Test CreatePaymentRequest""" - inst_req_only = self.make_instance(include_optional=False) - inst_req_and_optional = self.make_instance(include_optional=True) - + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/test/test_create_subscription_request.py b/test/test_create_subscription_request.py index c260d71..bf503c2 100644 --- a/test/test_create_subscription_request.py +++ b/test/test_create_subscription_request.py @@ -3,21 +3,18 @@ """ MONEI API v1 - The MONEI API is organized around [REST](https://en.wikipedia.org/wiki/Representational_State_Transfer). Our API has predictable resource-oriented URLs, accepts JSON-encoded request bodies, returns JSON-encoded responses, and uses standard HTTP response codes, authentication, and verbs.

**Base URL:** https://api.monei.com/v1

**Client libraries:** # noqa: E501 +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

- The version of the OpenAPI document: 1.1.0 - Generated by: https://openapi-generator.tech -""" + The version of the OpenAPI document: 1.5.1 + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest -import datetime -import Monei -from Monei.models.create_subscription_request import CreateSubscriptionRequest # noqa: E501 -from Monei.rest import ApiException +from Monei.models.create_subscription_request import CreateSubscriptionRequest class TestCreateSubscriptionRequest(unittest.TestCase): """CreateSubscriptionRequest unit test stubs""" @@ -28,67 +25,70 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional): + def make_instance(self, include_optional) -> CreateSubscriptionRequest: """Test CreateSubscriptionRequest - include_option is a boolean, when False only required + include_optional is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = Monei.models.create_subscription_request.CreateSubscriptionRequest() # noqa: E501 - if include_optional : + # uncomment below to create an instance of `CreateSubscriptionRequest` + """ + model = CreateSubscriptionRequest() + if include_optional: return CreateSubscriptionRequest( - amount = 110, - currency = 'EUR', - interval = 'month', - interval_count = 1, - description = 'MoonMail Monthly Lite', + amount = 110, + currency = 'EUR', + interval = 'month', + interval_count = 1, + description = 'MoonMail Monthly Lite', customer = Monei.models.payment_customer.Payment-Customer( email = 'john.doe@example.com', name = 'John Doe', - phone = '0', ), + phone = '', ), billing_details = Monei.models.payment_billing_details.Payment-BillingDetails( name = 'John Doe', email = 'john.doe@example.com', - phone = '0', - company = '0', + phone = '', + company = '', + tax_id = '', address = Monei.models.address.Address( country = 'ES', city = 'Málaga', line1 = 'Fake Street 123', - line2 = '0', + line2 = '', zip = '1234', - state = 'Málaga', ), ), + state = 'Málaga', ), ), shipping_details = Monei.models.payment_shipping_details.Payment-ShippingDetails( name = 'John Doe', email = 'john.doe@example.com', - phone = '0', - company = '0', + phone = '', + company = '', + tax_id = '', address = Monei.models.address.Address( country = 'ES', city = 'Málaga', line1 = 'Fake Street 123', - line2 = '0', + line2 = '', zip = '1234', - state = 'Málaga', ), ), - trial_period_end = 1636366897, - trial_period_days = 7, - callback_url = 'https://example.com/subscriptions/callback', - payment_callback_url = 'https://example.com/payments/callback' + state = 'Málaga', ), ), + trial_period_end = 1636366897, + trial_period_days = 7, + retry_schedule = [{"interval":"day","intervalCount":1},{"interval":"day","intervalCount":3},{"interval":"week","intervalCount":1}], + callback_url = 'https://example.com/subscriptions/callback', + payment_callback_url = 'https://example.com/payments/callback', + metadata = {"systemId":"12345"} ) - else : + else: return CreateSubscriptionRequest( amount = 110, currency = 'EUR', interval = 'month', - interval_count = 1, - callback_url = 'https://example.com/subscriptions/callback', - payment_callback_url = 'https://example.com/payments/callback', ) + """ def testCreateSubscriptionRequest(self): """Test CreateSubscriptionRequest""" - inst_req_only = self.make_instance(include_optional=False) - inst_req_and_optional = self.make_instance(include_optional=True) - + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/test/test_domain_register200_response.py b/test/test_domain_register200_response.py deleted file mode 100644 index 7a625f1..0000000 --- a/test/test_domain_register200_response.py +++ /dev/null @@ -1,35 +0,0 @@ -""" - MONEI API v1 - -

The MONEI API is organized around REST. Our API has predictable resource-oriented URLs, accepts JSON-encoded request bodies, returns JSON-encoded responses, and uses standard HTTP response codes, authentication, and verbs.

Base URL:

https://api.monei.com/v1

Client libraries:

Important:

If you are not using our official SDKs, you need to provide a valid User-Agent header in each request, otherwise your requests will be rejected.

# noqa: E501 - - The version of the OpenAPI document: 1.2.2 - Generated by: https://openapi-generator.tech -""" - - -import sys -import unittest - -import Monei -from Monei.model.domain_register200_response import DomainRegister200Response - - -class TestDomainRegister200Response(unittest.TestCase): - """DomainRegister200Response unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testDomainRegister200Response(self): - """Test DomainRegister200Response""" - # FIXME: construct object with mandatory attributes with example values - # model = DomainRegister200Response() # noqa: E501 - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_error.py b/test/test_error.py index e9a20c9..060473f 100644 --- a/test/test_error.py +++ b/test/test_error.py @@ -3,21 +3,18 @@ """ MONEI API v1 - The MONEI API is organized around [REST](https://en.wikipedia.org/wiki/Representational_State_Transfer). Our API has predictable resource-oriented URLs, accepts JSON-encoded request bodies, returns JSON-encoded responses, and uses standard HTTP response codes, authentication, and verbs. # noqa: E501 +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

- The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" + The version of the OpenAPI document: 1.5.1 + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest -import datetime -import MONEI PYTHON SDK -from MONEI PYTHON SDK.models.error import Error # noqa: E501 -from MONEI PYTHON SDK.rest import ApiException +from Monei.models.error import Error class TestError(unittest.TestCase): """Error unit test stubs""" @@ -28,27 +25,36 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional): + def make_instance(self, include_optional) -> Error: """Test Error - include_option is a boolean, when False only required + include_optional is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = MONEI PYTHON SDK.models.error.Error() # noqa: E501 - if include_optional : + # uncomment below to create an instance of `Error` + """ + model = Error() + if include_optional: return Error( - message = '0', - code = 56 + status = 'NotFoundError', + status_code = 404, + message = 'Resource not found', + request_id = 'df011689-bd3e-4953-95ca-c7bbdacaf6f8', + request_time = '2025-03-05T10:25:52Z' ) - else : + else: return Error( - message = '0', + status = 'NotFoundError', + status_code = 404, + message = 'Resource not found', + request_id = 'df011689-bd3e-4953-95ca-c7bbdacaf6f8', + request_time = '2025-03-05T10:25:52Z', ) + """ def testError(self): """Test Error""" - inst_req_only = self.make_instance(include_optional=False) - inst_req_and_optional = self.make_instance(include_optional=True) - + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/test/test_inline_object.py b/test/test_inline_object.py deleted file mode 100644 index 9b1145f..0000000 --- a/test/test_inline_object.py +++ /dev/null @@ -1,52 +0,0 @@ -# coding: utf-8 - -""" - MONEI API v1 - - The MONEI API is organized around [REST](https://en.wikipedia.org/wiki/Representational_State_Transfer). Our API has predictable resource-oriented URLs, accepts JSON-encoded request bodies, returns JSON-encoded responses, and uses standard HTTP response codes, authentication, and verbs.

**Base URL:** https://api.monei.com/v1

**Client libraries:** # noqa: E501 - - The version of the OpenAPI document: 1.1.0 - Generated by: https://openapi-generator.tech -""" - - -from __future__ import absolute_import - -import unittest -import datetime - -import Monei -from Monei.models.inline_object import InlineObject # noqa: E501 -from Monei.rest import ApiException - -class TestInlineObject(unittest.TestCase): - """InlineObject unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional): - """Test InlineObject - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # model = Monei.models.inline_object.InlineObject() # noqa: E501 - if include_optional : - return InlineObject( - domain_name = 'example.com' - ) - else : - return InlineObject( - ) - - def testInlineObject(self): - """Test InlineObject""" - inst_req_only = self.make_instance(include_optional=False) - inst_req_and_optional = self.make_instance(include_optional=True) - - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_inline_response200.py b/test/test_inline_response200.py deleted file mode 100644 index c2e3ff8..0000000 --- a/test/test_inline_response200.py +++ /dev/null @@ -1,52 +0,0 @@ -# coding: utf-8 - -""" - MONEI API v1 - - The MONEI API is organized around [REST](https://en.wikipedia.org/wiki/Representational_State_Transfer). Our API has predictable resource-oriented URLs, accepts JSON-encoded request bodies, returns JSON-encoded responses, and uses standard HTTP response codes, authentication, and verbs.

**Base URL:** https://api.monei.com/v1

**Client libraries:** # noqa: E501 - - The version of the OpenAPI document: 1.1.0 - Generated by: https://openapi-generator.tech -""" - - -from __future__ import absolute_import - -import unittest -import datetime - -import Monei -from Monei.models.inline_response200 import InlineResponse200 # noqa: E501 -from Monei.rest import ApiException - -class TestInlineResponse200(unittest.TestCase): - """InlineResponse200 unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional): - """Test InlineResponse200 - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # model = Monei.models.inline_response200.InlineResponse200() # noqa: E501 - if include_optional : - return InlineResponse200( - success = True - ) - else : - return InlineResponse200( - ) - - def testInlineResponse200(self): - """Test InlineResponse200""" - inst_req_only = self.make_instance(include_optional=False) - inst_req_and_optional = self.make_instance(include_optional=True) - - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_inline_response2001.py b/test/test_inline_response2001.py deleted file mode 100644 index 5459746..0000000 --- a/test/test_inline_response2001.py +++ /dev/null @@ -1,52 +0,0 @@ -# coding: utf-8 - -""" - MONEI API v1 - -

The MONEI API is organized around REST. Our API has predictable resource-oriented URLs, accepts JSON-encoded request bodies, returns JSON-encoded responses, and uses standard HTTP response codes, authentication, and verbs.

Base URL:

https://api.monei.com/v1

Client libraries:

Important:

If you are not using our official SDKs, you need to provide a valid User-Agent header in each request, otherwise your requests will be rejected.

# noqa: E501 - - The version of the OpenAPI document: 1.4.2 - Generated by: https://openapi-generator.tech -""" - - -from __future__ import absolute_import - -import unittest -import datetime - -import Monei -from Monei.models.inline_response2001 import InlineResponse2001 # noqa: E501 -from Monei.rest import ApiException - -class TestInlineResponse2001(unittest.TestCase): - """InlineResponse2001 unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional): - """Test InlineResponse2001 - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # model = Monei.models.inline_response2001.InlineResponse2001() # noqa: E501 - if include_optional : - return InlineResponse2001( - is_valid = True - ) - else : - return InlineResponse2001( - ) - - def testInlineResponse2001(self): - """Test InlineResponse2001""" - inst_req_only = self.make_instance(include_optional=False) - inst_req_and_optional = self.make_instance(include_optional=True) - - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_main.py b/test/test_main.py deleted file mode 100644 index fe583c8..0000000 --- a/test/test_main.py +++ /dev/null @@ -1,39 +0,0 @@ -""" -Unit tests for the main.py file. -""" - -import io -import sys -from unittest.mock import patch - -from main import main - - -class TestMain: - """Tests for the main function.""" - - @patch("sys.stdout", new_callable=io.StringIO) - def test_main_output(self, mock_stdout): - """Test that the main function prints the expected output.""" - main() - assert mock_stdout.getvalue() == "Hello from monei-python-sdk!\n" - - @patch("main.main") - def test_main_is_called_when_script_is_run_directly(self, mock_main): - """Test that main() is called when the script is run directly.""" - # Store the original value of __name__ - original_name = sys.modules["main"].__name__ - - try: - # Set __name__ to "__main__" to simulate running the script directly - sys.modules["main"].__name__ = "__main__" - - # Re-execute the if block from main.py - if sys.modules["main"].__name__ == "__main__": - mock_main() - - # Check that main() was called - mock_main.assert_called_once() - finally: - # Restore the original value - sys.modules["main"].__name__ = original_name \ No newline at end of file diff --git a/test/test_monei_client.py b/test/test_monei_client.py new file mode 100644 index 0000000..ab91d21 --- /dev/null +++ b/test/test_monei_client.py @@ -0,0 +1,113 @@ +import pytest +import hmac +import hashlib +import json +from unittest.mock import patch, MagicMock + +from Monei.monei_client import MoneiClient +from Monei.exceptions import ApiException +from Monei.api.payments_api import PaymentsApi +from Monei.api.payment_methods_api import PaymentMethodsApi +from Monei.api.subscriptions_api import SubscriptionsApi +from Monei.api.apple_pay_domain_api import ApplePayDomainApi +from Monei.api.bizum_api import BizumApi + + +@pytest.mark.unit +class TestMoneiClient: + """Tests for the MoneiClient class""" + + def test_init_with_api_key(self): + """Test initializing the client with an API key""" + client = MoneiClient(api_key="test_api_key") + assert client.api_key == "test_api_key" + assert client.account_id is None + assert "MONEI/Python" in client.user_agent + assert isinstance(client.Payments, PaymentsApi) + assert isinstance(client.PaymentMethods, PaymentMethodsApi) + assert isinstance(client.Subscriptions, SubscriptionsApi) + assert isinstance(client.ApplePayDomain, ApplePayDomainApi) + assert isinstance(client.Bizum, BizumApi) + # Test alias + assert client.payments is client.Payments + + def test_init_with_account_id_and_user_agent(self): + """Test initializing the client with an account ID and custom user agent""" + client = MoneiClient( + api_key="test_api_key", + account_id="acc_123456789", + user_agent="CustomApp/1.0" + ) + assert client.api_key == "test_api_key" + assert client.account_id == "acc_123456789" + assert client.user_agent == "CustomApp/1.0" + assert "MONEI-Account-ID" in client._api_client.default_headers + assert client._api_client.default_headers["MONEI-Account-ID"] == "acc_123456789" + + def test_init_with_account_id_without_user_agent_raises_exception(self): + """Test that initializing with account_id but no user_agent raises an exception""" + with pytest.raises(ApiException) as excinfo: + MoneiClient(api_key="test_api_key", account_id="acc_123456789") + assert "User-Agent must be provided" in str(excinfo.value) + + def test_set_account_id_with_user_agent(self): + """Test setting account ID after initialization with custom user agent""" + client = MoneiClient(api_key="test_api_key", user_agent="CustomApp/1.0") + client.set_account_id("acc_123456789") + assert client.account_id == "acc_123456789" + # Check that the header was set in the API client + assert client._api_client.default_headers.get("MONEI-Account-ID") == "acc_123456789" + + def test_set_account_id_without_user_agent_raises_exception(self): + """Test that setting account_id without a custom user_agent raises an exception""" + client = MoneiClient(api_key="test_api_key") + with pytest.raises(ApiException) as excinfo: + client.set_account_id("acc_123456789") + assert "User-Agent must be set" in str(excinfo.value) + + def test_set_user_agent(self): + """Test setting a custom user agent""" + client = MoneiClient(api_key="test_api_key") + client.set_user_agent("CustomApp/1.0") + assert client.user_agent == "CustomApp/1.0" + assert client._api_client.user_agent == "CustomApp/1.0" + + def test_verify_signature_valid(self): + """Test verifying a valid signature""" + client = MoneiClient(api_key="test_api_key") + body = '{"event":"payment.created","data":{"id":"pay_123"}}' + + # Calculate a valid signature + timestamp = "1620000000000" + calculated_hmac = hmac.new( + bytes("test_api_key", "utf-8"), + msg=bytes(f"{timestamp}.{body}", "utf-8"), + digestmod=hashlib.sha256 + ).hexdigest() + + signature = f"t={timestamp},v1={calculated_hmac}" + + # Verify the signature + result = client.verify_signature(body, signature) + assert result == {"event": "payment.created", "data": {"id": "pay_123"}} + + def test_verify_signature_invalid(self): + """Test verifying an invalid signature""" + client = MoneiClient(api_key="test_api_key") + body = '{"event":"payment.created","data":{"id":"pay_123"}}' + signature = "t=1620000000000,v1=invalid_signature" + + with pytest.raises(ApiException) as excinfo: + client.verify_signature(body, signature) + assert "Signature verification failed" in str(excinfo.value) + + def test_remove_account_id(self): + """Test removing the account ID""" + client = MoneiClient(api_key="test_api_key", user_agent="CustomApp/1.0", account_id="acc_123456789") + assert client.account_id == "acc_123456789" + assert "MONEI-Account-ID" in client._api_client.default_headers + + # Remove account ID + client.set_account_id(None) + assert client.account_id is None + assert "MONEI-Account-ID" not in client._api_client.default_headers \ No newline at end of file diff --git a/test/test_pause_subscription_request.py b/test/test_pause_subscription_request.py index f4bb832..a7cff73 100644 --- a/test/test_pause_subscription_request.py +++ b/test/test_pause_subscription_request.py @@ -3,21 +3,18 @@ """ MONEI API v1 - The MONEI API is organized around [REST](https://en.wikipedia.org/wiki/Representational_State_Transfer). Our API has predictable resource-oriented URLs, accepts JSON-encoded request bodies, returns JSON-encoded responses, and uses standard HTTP response codes, authentication, and verbs.

**Base URL:** https://api.monei.com/v1

**Client libraries:** # noqa: E501 +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

- The version of the OpenAPI document: 1.1.0 - Generated by: https://openapi-generator.tech -""" + The version of the OpenAPI document: 1.5.1 + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest -import datetime -import Monei -from Monei.models.pause_subscription_request import PauseSubscriptionRequest # noqa: E501 -from Monei.rest import ApiException +from Monei.models.pause_subscription_request import PauseSubscriptionRequest class TestPauseSubscriptionRequest(unittest.TestCase): """PauseSubscriptionRequest unit test stubs""" @@ -28,26 +25,28 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional): + def make_instance(self, include_optional) -> PauseSubscriptionRequest: """Test PauseSubscriptionRequest - include_option is a boolean, when False only required + include_optional is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = Monei.models.pause_subscription_request.PauseSubscriptionRequest() # noqa: E501 - if include_optional : + # uncomment below to create an instance of `PauseSubscriptionRequest` + """ + model = PauseSubscriptionRequest() + if include_optional: return PauseSubscriptionRequest( - pause_at_period_end = False, + pause_at_period_end = False, pause_interval_count = 1 ) - else : + else: return PauseSubscriptionRequest( ) + """ def testPauseSubscriptionRequest(self): """Test PauseSubscriptionRequest""" - inst_req_only = self.make_instance(include_optional=False) - inst_req_and_optional = self.make_instance(include_optional=True) - + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/test/test_payment.py b/test/test_payment.py index 9ba201f..c9733bc 100644 --- a/test/test_payment.py +++ b/test/test_payment.py @@ -3,21 +3,18 @@ """ MONEI API v1 - The MONEI API is organized around [REST](https://en.wikipedia.org/wiki/Representational_State_Transfer). Our API has predictable resource-oriented URLs, accepts JSON-encoded request bodies, returns JSON-encoded responses, and uses standard HTTP response codes, authentication, and verbs. # noqa: E501 +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

- The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" + The version of the OpenAPI document: 1.5.1 + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest -import datetime -import MONEI PYTHON SDK -from MONEI PYTHON SDK.models.payment import Payment # noqa: E501 -from MONEI PYTHON SDK.rest import ApiException +from Monei.models.payment import Payment class TestPayment(unittest.TestCase): """Payment unit test stubs""" @@ -28,13 +25,15 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional): + def make_instance(self, include_optional) -> Payment: """Test Payment - include_option is a boolean, when False only required + include_optional is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = MONEI PYTHON SDK.models.payment.Payment() # noqa: E501 - if include_optional : + # uncomment below to create an instance of `Payment` + """ + model = Payment() + if include_optional: return Payment( id = 'af6029f80f5fc73a8ad2753eea0b1be0', amount = 110, @@ -45,101 +44,148 @@ def make_instance(self, include_optional): authorization_code = '475816', livemode = False, status = 'PENDING', - status_code = '0', - status_message = '0', - customer = MONEI PYTHON SDK.models.payment_customer.Payment-Customer( - email = 'john.doe@microapps.com', - name = 'John Doe', - phone = '0', ), - payment_token = '7cc38b08ff471ccd313ad62b23b9f362b107560b', - payment_method = MONEI PYTHON SDK.models.payment_payment_method.Payment-PaymentMethod( - method = 'card', - card = MONEI PYTHON SDK.models.payment_payment_method_card.Payment-PaymentMethodCard( - country = 'ES', - brand = 'visa', - type = 'credit', - three_d_secure = False, - three_d_secure_version = '2.1.0', - last4 = '0004', ), - bizum = MONEI PYTHON SDK.models.payment_payment_method_bizum.Payment-PaymentMethodBizum( - phone_number = '0', ), - paypal = MONEI PYTHON SDK.models.payment_payment_method_paypal.Payment-PaymentMethodPaypal( - order_id = '0', ), ), - shop = MONEI PYTHON SDK.models.payment_shop.Payment-Shop( - name = 'Test Shop', + status_code = '', + status_message = '', + customer = Monei.models.payment_customer.Payment-Customer( + email = 'john.doe@example.com', + name = 'John Doe', + phone = '', ), + shop = Monei.models.payment_shop.Payment-Shop( + name = 'Test Shop', country = 'ES', ), - billing_details = MONEI PYTHON SDK.models.payment_billing_details.Payment-BillingDetails( - name = 'John Doe', - email = 'john.doe@microapps.com', - phone = '0', - company = '0', - address = MONEI PYTHON SDK.models.address.Address( - country = 'ES', - city = 'Málaga', - line1 = 'Fake Street 123', - line2 = '0', - zip = '1234', + billing_details = Monei.models.payment_billing_details.Payment-BillingDetails( + name = 'John Doe', + email = 'john.doe@example.com', + phone = '', + company = '', + tax_id = '', + address = Monei.models.address.Address( + country = 'ES', + city = 'Málaga', + line1 = 'Fake Street 123', + line2 = '', + zip = '1234', state = 'Málaga', ), ), - shipping_details = MONEI PYTHON SDK.models.payment_shipping_details.Payment-ShippingDetails( - name = 'John Doe', - email = 'john.doe@microapps.com', - phone = '0', - company = '0', - address = MONEI PYTHON SDK.models.address.Address( - country = 'ES', - city = 'Málaga', - line1 = 'Fake Street 123', - line2 = '0', - zip = '1234', + shipping_details = Monei.models.payment_shipping_details.Payment-ShippingDetails( + name = 'John Doe', + email = 'john.doe@example.com', + phone = '', + company = '', + tax_id = '', + address = Monei.models.address.Address( + country = 'ES', + city = 'Málaga', + line1 = 'Fake Street 123', + line2 = '', + zip = '1234', state = 'Málaga', ), ), refunded_amount = 56, last_refund_amount = 56, last_refund_reason = 'duplicated', cancellation_reason = 'duplicated', - session_details = MONEI PYTHON SDK.models.payment_session_details.Payment-SessionDetails( - ip = '100.100.200.100', - country_code = 'ES', - lang = 'es', - device_type = 'desktop', - device_model = '0', - browser = 'Chrome', - browser_version = '83.0.4103.116', - os = 'Mac OS', - os_version = '10.15.4', - source = 'MONEI/PHP', - source_version = '0.1.2', - user_agent = 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) ...', ), - trace_details = MONEI PYTHON SDK.models.payment_trace_details.Payment-TraceDetails( - ip = '100.100.200.100', - country_code = 'ES', - lang = 'es', - device_type = 'desktop', - device_model = '0', - browser = 'Chrome', - browser_version = '83.0.4103.116', - os = 'Mac OS', - os_version = '10.15.4', - source = 'MONEI/PHP', - source_version = '0.1.2', - user_agent = 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) ...', - user_id = '0', + session_details = Monei.models.payment_session_details.Payment-SessionDetails( + ip = '100.100.200.100', + country_code = 'ES', + lang = 'es', + device_type = 'desktop', + device_model = '', + browser = 'Chrome', + browser_version = '83.0.4103.116', + os = 'Mac OS', + os_version = '10.15.4', + source = 'MONEI/PHP', + source_version = '0.1.2', + user_agent = 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) ...', + browser_accept = 'text/html,application/xhtml+xml,application/json', + browser_color_depth = 24, + browser_screen_height = 1152, + browser_screen_width = 2048, + browser_timezone_offset = 'string', ), + trace_details = Monei.models.payment_trace_details.Payment-TraceDetails( + ip = '100.100.200.100', + country_code = 'ES', + lang = 'es', + device_type = 'desktop', + device_model = '', + browser = 'Chrome', + browser_version = '83.0.4103.116', + os = 'Mac OS', + os_version = '10.15.4', + source = 'MONEI/PHP', + source_version = '0.1.2', + user_agent = 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) ...', + browser_accept = 'text/html,application/xhtml+xml,application/json', + browser_color_depth = 24, + browser_screen_height = 1152, + browser_screen_width = 2048, + browser_timezone_offset = 'string', + user_id = '', user_email = 'user@example.com', ), - next_action = MONEI PYTHON SDK.models.payment_next_action.Payment-NextAction( - type = 'CONFIRM', - must_redirect = False, + payment_token = '7cc38b08ff471ccd313ad62b23b9f362b107560b', + payment_method = Monei.models.payment_payment_method.Payment-PaymentMethod( + method = 'card', + card = Monei.models.payment_payment_method_card.Payment-PaymentMethodCard( + country = 'ES', + brand = 'visa', + type = 'credit', + three_d_secure = False, + three_d_secure_version = '2.1.0', + three_d_secure_flow = 'CHALLENGE', + expiration = 2048544000, + last4 = '0004', + tokenization_method = 'applePay', + cardholder_name = 'John Doe', + cardholder_email = 'email@example.com', ), + bizum = Monei.models.payment_payment_method_bizum.Payment-PaymentMethodBizum( + phone_number = '', ), + paypal = Monei.models.payment_payment_method_paypal.Payment-PaymentMethodPaypal( + order_id = '', ), + cofidis = Monei.models.payment_payment_method_cofidis.Payment-PaymentMethodCofidis( + order_id = '', ), + cofidis_loan = Monei.models.payment_payment_method_cofidis.Payment-PaymentMethodCofidis( + order_id = '', ), + mbway = Monei.models.payment_payment_method_mbway.Payment-PaymentMethodMbway( + phone_number = '', ), + trustly = Monei.models.payment_payment_method_trustly.Payment-PaymentMethodTrustly( + customer_id = '', ), + sepa = Monei.models.payment_payment_method_sepa.Payment-PaymentMethodSepa( + accountholder_address = '', + accountholder_email = '', + accountholder_name = '', + country_code = '', + bank_address = '', + bank_code = '', + bank_name = '', + bic = '', + last4 = '', ), + klarna = Monei.models.payment_payment_method_klarna.Payment-PaymentMethodKlarna( + billing_category = 'PAY_LATER', + auth_payment_method = 'card', ), ), + sequence = Monei.models.payment_sequence.Payment-Sequence( + type = 'recurring', + recurring = Monei.models.payment_sequence_recurring.Payment-SequenceRecurring( + expiry = '*(The payment method or card expiration)*', + frequency = 30, ), ), + sequence_id = '62b23b9f3627cc38b08ff471ccd313ad', + store_id = 'e5f28150d9e8974c58ab5ec9c4a880f8734dcf05', + point_of_sale_id = 'fb269cccfa0cc021f5d0b8eb1421646c696213e1', + metadata = {"systemId":"12345"}, + next_action = Monei.models.payment_next_action.Payment-NextAction( + type = 'CONFIRM', + must_redirect = False, redirect_url = 'https://secure.monei.com/payments/af6029f80f5fc73a8ad2753eea0b1be0', ), - created_at = 56, - updated_at = 56 + created_at = 1636366897, + updated_at = 1636366897 ) - else : + else: return Payment( ) + """ def testPayment(self): """Test Payment""" - inst_req_only = self.make_instance(include_optional=False) - inst_req_and_optional = self.make_instance(include_optional=True) - + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/test/test_payment_billing_details.py b/test/test_payment_billing_details.py index 9865327..497eaa8 100644 --- a/test/test_payment_billing_details.py +++ b/test/test_payment_billing_details.py @@ -3,21 +3,18 @@ """ MONEI API v1 - The MONEI API is organized around [REST](https://en.wikipedia.org/wiki/Representational_State_Transfer). Our API has predictable resource-oriented URLs, accepts JSON-encoded request bodies, returns JSON-encoded responses, and uses standard HTTP response codes, authentication, and verbs. # noqa: E501 +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

- The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" + The version of the OpenAPI document: 1.5.1 + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest -import datetime -import MONEI PYTHON SDK -from MONEI PYTHON SDK.models.payment_billing_details import PaymentBillingDetails # noqa: E501 -from MONEI PYTHON SDK.rest import ApiException +from Monei.models.payment_billing_details import PaymentBillingDetails class TestPaymentBillingDetails(unittest.TestCase): """PaymentBillingDetails unit test stubs""" @@ -28,35 +25,38 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional): + def make_instance(self, include_optional) -> PaymentBillingDetails: """Test PaymentBillingDetails - include_option is a boolean, when False only required + include_optional is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = MONEI PYTHON SDK.models.payment_billing_details.PaymentBillingDetails() # noqa: E501 - if include_optional : + # uncomment below to create an instance of `PaymentBillingDetails` + """ + model = PaymentBillingDetails() + if include_optional: return PaymentBillingDetails( - name = 'John Doe', - email = 'john.doe@microapps.com', - phone = '0', - company = '0', - address = MONEI PYTHON SDK.models.address.Address( + name = 'John Doe', + email = 'john.doe@example.com', + phone = '', + company = '', + tax_id = '', + address = Monei.models.address.Address( country = 'ES', city = 'Málaga', line1 = 'Fake Street 123', - line2 = '0', + line2 = '', zip = '1234', state = 'Málaga', ) ) - else : + else: return PaymentBillingDetails( ) + """ def testPaymentBillingDetails(self): """Test PaymentBillingDetails""" - inst_req_only = self.make_instance(include_optional=False) - inst_req_and_optional = self.make_instance(include_optional=True) - + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/test/test_payment_cancellation_reason.py b/test/test_payment_cancellation_reason.py index 195f0db..38e6697 100644 --- a/test/test_payment_cancellation_reason.py +++ b/test/test_payment_cancellation_reason.py @@ -3,21 +3,18 @@ """ MONEI API v1 - The MONEI API is organized around [REST](https://en.wikipedia.org/wiki/Representational_State_Transfer). Our API has predictable resource-oriented URLs, accepts JSON-encoded request bodies, returns JSON-encoded responses, and uses standard HTTP response codes, authentication, and verbs. # noqa: E501 +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

- The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" + The version of the OpenAPI document: 1.5.1 + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest -import datetime -import MONEI PYTHON SDK -from MONEI PYTHON SDK.models.payment_cancellation_reason import PaymentCancellationReason # noqa: E501 -from MONEI PYTHON SDK.rest import ApiException +from Monei.models.payment_cancellation_reason import PaymentCancellationReason class TestPaymentCancellationReason(unittest.TestCase): """PaymentCancellationReason unit test stubs""" @@ -28,24 +25,9 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional): - """Test PaymentCancellationReason - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # model = MONEI PYTHON SDK.models.payment_cancellation_reason.PaymentCancellationReason() # noqa: E501 - if include_optional : - return PaymentCancellationReason( - ) - else : - return PaymentCancellationReason( - ) - def testPaymentCancellationReason(self): """Test PaymentCancellationReason""" - inst_req_only = self.make_instance(include_optional=False) - inst_req_and_optional = self.make_instance(include_optional=True) - + # inst = PaymentCancellationReason() if __name__ == '__main__': unittest.main() diff --git a/test/test_payment_customer.py b/test/test_payment_customer.py index d18fd1e..3edbef7 100644 --- a/test/test_payment_customer.py +++ b/test/test_payment_customer.py @@ -3,21 +3,18 @@ """ MONEI API v1 - The MONEI API is organized around [REST](https://en.wikipedia.org/wiki/Representational_State_Transfer). Our API has predictable resource-oriented URLs, accepts JSON-encoded request bodies, returns JSON-encoded responses, and uses standard HTTP response codes, authentication, and verbs. # noqa: E501 +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

- The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" + The version of the OpenAPI document: 1.5.1 + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest -import datetime -import MONEI PYTHON SDK -from MONEI PYTHON SDK.models.payment_customer import PaymentCustomer # noqa: E501 -from MONEI PYTHON SDK.rest import ApiException +from Monei.models.payment_customer import PaymentCustomer class TestPaymentCustomer(unittest.TestCase): """PaymentCustomer unit test stubs""" @@ -28,27 +25,29 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional): + def make_instance(self, include_optional) -> PaymentCustomer: """Test PaymentCustomer - include_option is a boolean, when False only required + include_optional is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = MONEI PYTHON SDK.models.payment_customer.PaymentCustomer() # noqa: E501 - if include_optional : + # uncomment below to create an instance of `PaymentCustomer` + """ + model = PaymentCustomer() + if include_optional: return PaymentCustomer( - email = 'john.doe@microapps.com', - name = 'John Doe', - phone = '0' + email = 'john.doe@example.com', + name = 'John Doe', + phone = '' ) - else : + else: return PaymentCustomer( ) + """ def testPaymentCustomer(self): """Test PaymentCustomer""" - inst_req_only = self.make_instance(include_optional=False) - inst_req_and_optional = self.make_instance(include_optional=True) - + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/test/test_payment_last_refund_reason.py b/test/test_payment_last_refund_reason.py index 16607f9..ea0346b 100644 --- a/test/test_payment_last_refund_reason.py +++ b/test/test_payment_last_refund_reason.py @@ -3,21 +3,18 @@ """ MONEI API v1 - The MONEI API is organized around [REST](https://en.wikipedia.org/wiki/Representational_State_Transfer). Our API has predictable resource-oriented URLs, accepts JSON-encoded request bodies, returns JSON-encoded responses, and uses standard HTTP response codes, authentication, and verbs. # noqa: E501 +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

- The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" + The version of the OpenAPI document: 1.5.1 + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest -import datetime -import MONEI PYTHON SDK -from MONEI PYTHON SDK.models.payment_last_refund_reason import PaymentLastRefundReason # noqa: E501 -from MONEI PYTHON SDK.rest import ApiException +from Monei.models.payment_last_refund_reason import PaymentLastRefundReason class TestPaymentLastRefundReason(unittest.TestCase): """PaymentLastRefundReason unit test stubs""" @@ -28,24 +25,9 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional): - """Test PaymentLastRefundReason - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # model = MONEI PYTHON SDK.models.payment_last_refund_reason.PaymentLastRefundReason() # noqa: E501 - if include_optional : - return PaymentLastRefundReason( - ) - else : - return PaymentLastRefundReason( - ) - def testPaymentLastRefundReason(self): """Test PaymentLastRefundReason""" - inst_req_only = self.make_instance(include_optional=False) - inst_req_and_optional = self.make_instance(include_optional=True) - + # inst = PaymentLastRefundReason() if __name__ == '__main__': unittest.main() diff --git a/test/test_payment_message_channel.py b/test/test_payment_message_channel.py index 73748bc..e424538 100644 --- a/test/test_payment_message_channel.py +++ b/test/test_payment_message_channel.py @@ -3,21 +3,18 @@ """ MONEI API v1 -

The MONEI API is organized around REST. Our API has predictable resource-oriented URLs, accepts JSON-encoded request bodies, returns JSON-encoded responses, and uses standard HTTP response codes, authentication, and verbs.

Base URL:

https://api.monei.com/v1

Client libraries:

Important:

If you are not using our official SDKs, you need to provide a valid User-Agent header in each request, otherwise your requests will be rejected.

# noqa: E501 +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

- The version of the OpenAPI document: 1.2.1 - Generated by: https://openapi-generator.tech -""" + The version of the OpenAPI document: 1.5.1 + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest -import datetime -import Monei -from Monei.models.payment_message_channel import PaymentMessageChannel # noqa: E501 -from Monei.rest import ApiException +from Monei.models.payment_message_channel import PaymentMessageChannel class TestPaymentMessageChannel(unittest.TestCase): """PaymentMessageChannel unit test stubs""" @@ -28,24 +25,9 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional): - """Test PaymentMessageChannel - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # model = Monei.models.payment_message_channel.PaymentMessageChannel() # noqa: E501 - if include_optional : - return PaymentMessageChannel( - ) - else : - return PaymentMessageChannel( - ) - def testPaymentMessageChannel(self): """Test PaymentMessageChannel""" - inst_req_only = self.make_instance(include_optional=False) - inst_req_and_optional = self.make_instance(include_optional=True) - + # inst = PaymentMessageChannel() if __name__ == '__main__': unittest.main() diff --git a/test/test_payment_message_language.py b/test/test_payment_message_language.py index eed9096..7554b22 100644 --- a/test/test_payment_message_language.py +++ b/test/test_payment_message_language.py @@ -3,21 +3,18 @@ """ MONEI API v1 -

The MONEI API is organized around REST. Our API has predictable resource-oriented URLs, accepts JSON-encoded request bodies, returns JSON-encoded responses, and uses standard HTTP response codes, authentication, and verbs.

Base URL:

https://api.monei.com/v1

Client libraries:

Important:

If you are not using our official SDKs, you need to provide a valid User-Agent header in each request, otherwise your requests will be rejected.

# noqa: E501 +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

- The version of the OpenAPI document: 1.2.1 - Generated by: https://openapi-generator.tech -""" + The version of the OpenAPI document: 1.5.1 + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest -import datetime -import Monei -from Monei.models.payment_message_language import PaymentMessageLanguage # noqa: E501 -from Monei.rest import ApiException +from Monei.models.payment_message_language import PaymentMessageLanguage class TestPaymentMessageLanguage(unittest.TestCase): """PaymentMessageLanguage unit test stubs""" @@ -28,24 +25,9 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional): - """Test PaymentMessageLanguage - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # model = Monei.models.payment_message_language.PaymentMessageLanguage() # noqa: E501 - if include_optional : - return PaymentMessageLanguage( - ) - else : - return PaymentMessageLanguage( - ) - def testPaymentMessageLanguage(self): """Test PaymentMessageLanguage""" - inst_req_only = self.make_instance(include_optional=False) - inst_req_and_optional = self.make_instance(include_optional=True) - + # inst = PaymentMessageLanguage() if __name__ == '__main__': unittest.main() diff --git a/test/test_payment_methods.py b/test/test_payment_methods.py index 29357c2..4f6dcfa 100644 --- a/test/test_payment_methods.py +++ b/test/test_payment_methods.py @@ -3,21 +3,18 @@ """ MONEI API v1 -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

- The version of the OpenAPI document: 1.4.8 - Generated by: https://openapi-generator.tech -""" + The version of the OpenAPI document: 1.5.1 + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest -import datetime -import Monei -from Monei.models.payment_methods import PaymentMethods # noqa: E501 -from Monei.rest import ApiException +from Monei.models.payment_methods import PaymentMethods class TestPaymentMethods(unittest.TestCase): """PaymentMethods unit test stubs""" @@ -28,16 +25,18 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional): + def make_instance(self, include_optional) -> PaymentMethods: """Test PaymentMethods - include_option is a boolean, when False only required + include_optional is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = Monei.models.payment_methods.PaymentMethods() # noqa: E501 - if include_optional : + # uncomment below to create an instance of `PaymentMethods` + """ + model = PaymentMethods() + if include_optional: return PaymentMethods( - livemode = False, - payment_methods = ["bizum","applePay","googlePay","alipay","bancontact","blik","cofidis","cofidisLoan","eps","iDeal","mbway","multibanco","sofort","trustly","sepa","klarna","giropay","card"], + livemode = False, + payment_methods = ["bizum","applePay","googlePay","alipay","bancontact","blik","cofidis","cofidisLoan","eps","iDeal","mbway","multibanco","sofort","trustly","sepa","klarna","giropay","card"], metadata = Monei.models.payment_methods_metadata.PaymentMethods-Metadata( alipay = Monei.models.payment_methods_metadata_alipay.PaymentMethods_Metadata_alipay( countries = ["CN"], ), @@ -83,23 +82,23 @@ def make_instance(self, include_optional): src_initiator_id = 'a0eebc99-9c0b-4ef8-bb6d-6bb9bd380a11', ), discover = Monei.models.payment_methods_metadata_click_to_pay_discover.PaymentMethods_Metadata_clickToPay_discover( srci_dpa_id = '71f0c4d5-9947-4d1c-9cb3-d6a3f7c4e701', - src_initiator_id = 'c2d06c25-9ddb-4a5e-9d5a-3ff1c8d98467', ), ), ), - merchant_name = 'MONEI', - merchant_url = 'https://monei.com/', - country_code = 'ES', - account_id = 'aa9333ba-82de-400c-9ae7-087b9f8d2242', - amount = 10, + src_initiator_id = 'c2d06c25-9ddb-4a5e-9d5a-3ff1c8d98467', ), ), ), + merchant_name = 'MONEI', + merchant_url = 'https://monei.com/', + country_code = 'ES', + account_id = 'aa9333ba-82de-400c-9ae7-087b9f8d2242', + amount = 10, currency = 'EUR' ) - else : + else: return PaymentMethods( ) + """ def testPaymentMethods(self): """Test PaymentMethods""" - inst_req_only = self.make_instance(include_optional=False) - inst_req_and_optional = self.make_instance(include_optional=True) - + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/test/test_payment_methods_api.py b/test/test_payment_methods_api.py index 08b4375..e8c4e0d 100644 --- a/test/test_payment_methods_api.py +++ b/test/test_payment_methods_api.py @@ -3,35 +3,33 @@ """ MONEI API v1 -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

- The version of the OpenAPI document: 1.4.8 - Generated by: https://openapi-generator.tech -""" + The version of the OpenAPI document: 1.5.1 + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest -import Monei -from Monei.api.payment_methods_api import PaymentMethodsApi # noqa: E501 -from Monei.rest import ApiException +from Monei.api.payment_methods_api import PaymentMethodsApi class TestPaymentMethodsApi(unittest.TestCase): """PaymentMethodsApi unit test stubs""" - def setUp(self): - self.api = Monei.api.payment_methods_api.PaymentMethodsApi() # noqa: E501 + def setUp(self) -> None: + self.api = PaymentMethodsApi() - def tearDown(self): + def tearDown(self) -> None: pass - def test_get(self): + def test_get(self) -> None: """Test case for get - Get Payment Methods # noqa: E501 + Get Payment Methods """ pass diff --git a/test/test_payment_methods_api_integration.py b/test/test_payment_methods_api_integration.py new file mode 100644 index 0000000..5009659 --- /dev/null +++ b/test/test_payment_methods_api_integration.py @@ -0,0 +1,133 @@ +import pytest +from unittest.mock import patch, MagicMock + +from Monei.monei_client import MoneiClient +from Monei.api.payment_methods_api import PaymentMethodsApi + + +@pytest.mark.unit +class TestPaymentMethodsApiIntegration: + """Integration tests for the Payment Methods API with mocked responses""" + + @pytest.fixture + def mock_payment_method(self): + """Fixture for a mock payment method response""" + return { + "id": "pm_123456789", + "type": "card", + "card": { + "brand": "visa", + "last4": "4242", + "expMonth": 12, + "expYear": 2025 + }, + "created": "2023-01-01T12:00:00Z" + } + + @pytest.fixture + def mock_client(self): + """Fixture for creating a mock client""" + return MoneiClient(api_key="test_api_key") + + @patch.object(PaymentMethodsApi, 'list') + def test_list_payment_methods(self, mock_list, mock_client, mock_payment_method): + """Test listing payment methods""" + mock_list.return_value = { + "data": [ + mock_payment_method, + { + "id": "pm_987654321", + "type": "sepa", + "sepa": { + "iban": "DE89370400440532013000", + "last4": "3000" + }, + "created": "2023-01-02T12:00:00Z" + } + ], + "hasMore": False, + "totalCount": 2 + } + + result = mock_client.PaymentMethods.list() + + assert "data" in result + assert len(result["data"]) == 2 + assert result["data"][0]["id"] == "pm_123456789" + assert result["data"][0]["type"] == "card" + assert result["data"][1]["id"] == "pm_987654321" + assert result["data"][1]["type"] == "sepa" + assert result["hasMore"] is False + assert result["totalCount"] == 2 + mock_list.assert_called_once() + + @patch.object(PaymentMethodsApi, 'get') + def test_get_payment_method(self, mock_get, mock_client, mock_payment_method): + """Test retrieving a payment method""" + mock_get.return_value = mock_payment_method + + result = mock_client.PaymentMethods.get(payment_method_id="pm_123456789") + + assert result["id"] == "pm_123456789" + assert result["type"] == "card" + assert result["card"]["brand"] == "visa" + assert result["card"]["last4"] == "4242" + mock_get.assert_called_once_with(payment_method_id="pm_123456789") + + @patch.object(PaymentMethodsApi, 'delete') + def test_delete_payment_method(self, mock_delete, mock_client): + """Test deleting a payment method""" + mock_delete.return_value = { + "id": "pm_123456789", + "deleted": True + } + + result = mock_client.PaymentMethods.delete(payment_method_id="pm_123456789") + + assert result["id"] == "pm_123456789" + assert result["deleted"] is True + mock_delete.assert_called_once_with(payment_method_id="pm_123456789") + + @patch.object(PaymentMethodsApi, 'list') + def test_list_payment_methods_with_params(self, mock_list, mock_client, mock_payment_method): + """Test listing payment methods with parameters""" + mock_list.return_value = { + "data": [mock_payment_method], + "hasMore": False, + "totalCount": 1 + } + + # Test with customer_id parameter + result = mock_client.PaymentMethods.list(customer_id="cus_123456789") + + assert len(result["data"]) == 1 + assert result["data"][0]["id"] == "pm_123456789" + mock_list.assert_called_with(customer_id="cus_123456789") + + # Test with type parameter + mock_list.reset_mock() + mock_list.return_value = { + "data": [mock_payment_method], + "hasMore": False, + "totalCount": 1 + } + + result = mock_client.PaymentMethods.list(type="card") + + assert len(result["data"]) == 1 + assert result["data"][0]["type"] == "card" + mock_list.assert_called_with(type="card") + + # Test with limit and starting_after parameters + mock_list.reset_mock() + mock_list.return_value = { + "data": [mock_payment_method], + "hasMore": True, + "totalCount": 10 + } + + result = mock_client.PaymentMethods.list(limit=1, starting_after="pm_000000000") + + assert len(result["data"]) == 1 + assert result["hasMore"] is True + mock_list.assert_called_with(limit=1, starting_after="pm_000000000") \ No newline at end of file diff --git a/test/test_payment_methods_metadata.py b/test/test_payment_methods_metadata.py index 2e116d9..260f0ea 100644 --- a/test/test_payment_methods_metadata.py +++ b/test/test_payment_methods_metadata.py @@ -3,21 +3,18 @@ """ MONEI API v1 -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

- The version of the OpenAPI document: 1.4.8 - Generated by: https://openapi-generator.tech -""" + The version of the OpenAPI document: 1.5.1 + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest -import datetime -import Monei -from Monei.models.payment_methods_metadata import PaymentMethodsMetadata # noqa: E501 -from Monei.rest import ApiException +from Monei.models.payment_methods_metadata import PaymentMethodsMetadata class TestPaymentMethodsMetadata(unittest.TestCase): """PaymentMethodsMetadata unit test stubs""" @@ -28,47 +25,49 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional): + def make_instance(self, include_optional) -> PaymentMethodsMetadata: """Test PaymentMethodsMetadata - include_option is a boolean, when False only required + include_optional is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = Monei.models.payment_methods_metadata.PaymentMethodsMetadata() # noqa: E501 - if include_optional : + # uncomment below to create an instance of `PaymentMethodsMetadata` + """ + model = PaymentMethodsMetadata() + if include_optional: return PaymentMethodsMetadata( alipay = Monei.models.payment_methods_metadata_alipay.PaymentMethods_Metadata_alipay( - countries = ["CN"], ), + countries = ["CN"], ), bancontact = Monei.models.payment_methods_metadata_bancontact.PaymentMethods_Metadata_bancontact( - countries = ["BE"], ), + countries = ["BE"], ), bizum = Monei.models.payment_methods_metadata_bizum.PaymentMethods_Metadata_bizum( - countries = ["ES"], ), + countries = ["ES"], ), blik = Monei.models.payment_methods_metadata_blik.PaymentMethods_Metadata_blik( - countries = ["PL"], ), + countries = ["PL"], ), card = Monei.models.payment_methods_metadata_card.PaymentMethods_Metadata_card( - brands = ["visa","mastercard"], ), + brands = ["visa","mastercard"], ), eps = Monei.models.payment_methods_metadata_eps.PaymentMethods_Metadata_eps( - countries = ["AT"], ), + countries = ["AT"], ), i_deal = Monei.models.payment_methods_metadata_i_deal.PaymentMethods_Metadata_iDeal( - countries = ["NL"], ), + countries = ["NL"], ), mbway = Monei.models.payment_methods_metadata_mbway.PaymentMethods_Metadata_mbway( - countries = ["PT"], ), + countries = ["PT"], ), multibanco = Monei.models.payment_methods_metadata_mbway.PaymentMethods_Metadata_mbway( - countries = ["PT"], ), + countries = ["PT"], ), sofort = Monei.models.payment_methods_metadata_sofort.PaymentMethods_Metadata_sofort( - countries = ["AT","BE","DE","ES","IT","NL","CH","PL"], ), + countries = ["AT","BE","DE","ES","IT","NL","CH","PL"], ), trustly = Monei.models.payment_methods_metadata_trustly.PaymentMethods_Metadata_trustly( - countries = ["DE","DK","EE","ES","FI","GB","LT","LV","NL","NO","PL","SE","SK"], ), + countries = ["DE","DK","EE","ES","FI","GB","LT","LV","NL","NO","PL","SE","SK"], ), sepa = Monei.models.payment_methods_metadata_sepa.PaymentMethods_Metadata_sepa( - countries = ["AT","BE","BG","HR","CY","CZ","DK","EE","FI","FR","DE","GR","HU","IE","IT","LV","LT","LU","MT","NL","PL","PT","RO","SK","SI","ES","SE","IS","LI","NO","AD","SM","MC","VA","PF","TF","GI","GG","IM","JE","BL","PM","CH","GB","WF"], ), + countries = ["AT","BE","BG","HR","CY","CZ","DK","EE","FI","FR","DE","GR","HU","IE","IT","LV","LT","LU","MT","NL","PL","PT","RO","SK","SI","ES","SE","IS","LI","NO","AD","SM","MC","VA","PF","TF","GI","GG","IM","JE","BL","PM","CH","GB","WF"], ), klarna = Monei.models.payment_methods_metadata_klarna.PaymentMethods_Metadata_klarna( - countries = ["AT","BE","CH","DE","DK","ES","FI","FR","GB","IT","NL","NO","SE"], ), + countries = ["AT","BE","CH","DE","DK","ES","FI","FR","GB","IT","NL","NO","SE"], ), giropay = Monei.models.payment_methods_metadata_giropay.PaymentMethods_Metadata_giropay( - countries = ["DE"], ), + countries = ["DE"], ), google_pay = Monei.models.payment_methods_metadata_google_pay.PaymentMethods_Metadata_googlePay( merchant_id = '12345678901234567890', - cvc_required = False, ), + cvc_required = False, ), apple_pay = Monei.models.payment_methods_metadata_apple_pay.PaymentMethods_Metadata_applePay( - merchant_id = 'merchant.com.monei', ), + merchant_id = 'merchant.com.monei', ), click_to_pay = Monei.models.payment_methods_metadata_click_to_pay.PaymentMethods_Metadata_clickToPay( token_support = True, preselected = False, @@ -82,15 +81,15 @@ def make_instance(self, include_optional): srci_dpa_id = '71f0c4d5-9947-4d1c-9cb3-d6a3f7c4e701', src_initiator_id = 'c2d06c25-9ddb-4a5e-9d5a-3ff1c8d98467', ), ) ) - else : + else: return PaymentMethodsMetadata( ) + """ def testPaymentMethodsMetadata(self): """Test PaymentMethodsMetadata""" - inst_req_only = self.make_instance(include_optional=False) - inst_req_and_optional = self.make_instance(include_optional=True) - + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/test/test_payment_methods_metadata_alipay.py b/test/test_payment_methods_metadata_alipay.py index 780285b..9cd4066 100644 --- a/test/test_payment_methods_metadata_alipay.py +++ b/test/test_payment_methods_metadata_alipay.py @@ -3,21 +3,18 @@ """ MONEI API v1 -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

- The version of the OpenAPI document: 1.4.8 - Generated by: https://openapi-generator.tech -""" + The version of the OpenAPI document: 1.5.1 + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest -import datetime -import Monei -from Monei.models.payment_methods_metadata_alipay import PaymentMethodsMetadataAlipay # noqa: E501 -from Monei.rest import ApiException +from Monei.models.payment_methods_metadata_alipay import PaymentMethodsMetadataAlipay class TestPaymentMethodsMetadataAlipay(unittest.TestCase): """PaymentMethodsMetadataAlipay unit test stubs""" @@ -28,25 +25,27 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional): + def make_instance(self, include_optional) -> PaymentMethodsMetadataAlipay: """Test PaymentMethodsMetadataAlipay - include_option is a boolean, when False only required + include_optional is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = Monei.models.payment_methods_metadata_alipay.PaymentMethodsMetadataAlipay() # noqa: E501 - if include_optional : + # uncomment below to create an instance of `PaymentMethodsMetadataAlipay` + """ + model = PaymentMethodsMetadataAlipay() + if include_optional: return PaymentMethodsMetadataAlipay( countries = ["CN"] ) - else : + else: return PaymentMethodsMetadataAlipay( ) + """ def testPaymentMethodsMetadataAlipay(self): """Test PaymentMethodsMetadataAlipay""" - inst_req_only = self.make_instance(include_optional=False) - inst_req_and_optional = self.make_instance(include_optional=True) - + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/test/test_payment_methods_metadata_apple_pay.py b/test/test_payment_methods_metadata_apple_pay.py index 24c1d64..abbe6a1 100644 --- a/test/test_payment_methods_metadata_apple_pay.py +++ b/test/test_payment_methods_metadata_apple_pay.py @@ -3,21 +3,18 @@ """ MONEI API v1 -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

- The version of the OpenAPI document: 1.4.8 - Generated by: https://openapi-generator.tech -""" + The version of the OpenAPI document: 1.5.1 + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest -import datetime -import Monei -from Monei.models.payment_methods_metadata_apple_pay import PaymentMethodsMetadataApplePay # noqa: E501 -from Monei.rest import ApiException +from Monei.models.payment_methods_metadata_apple_pay import PaymentMethodsMetadataApplePay class TestPaymentMethodsMetadataApplePay(unittest.TestCase): """PaymentMethodsMetadataApplePay unit test stubs""" @@ -28,25 +25,27 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional): + def make_instance(self, include_optional) -> PaymentMethodsMetadataApplePay: """Test PaymentMethodsMetadataApplePay - include_option is a boolean, when False only required + include_optional is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = Monei.models.payment_methods_metadata_apple_pay.PaymentMethodsMetadataApplePay() # noqa: E501 - if include_optional : + # uncomment below to create an instance of `PaymentMethodsMetadataApplePay` + """ + model = PaymentMethodsMetadataApplePay() + if include_optional: return PaymentMethodsMetadataApplePay( merchant_id = 'merchant.com.monei' ) - else : + else: return PaymentMethodsMetadataApplePay( ) + """ def testPaymentMethodsMetadataApplePay(self): """Test PaymentMethodsMetadataApplePay""" - inst_req_only = self.make_instance(include_optional=False) - inst_req_and_optional = self.make_instance(include_optional=True) - + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/test/test_payment_methods_metadata_bancontact.py b/test/test_payment_methods_metadata_bancontact.py index ebfe974..0ac608c 100644 --- a/test/test_payment_methods_metadata_bancontact.py +++ b/test/test_payment_methods_metadata_bancontact.py @@ -3,21 +3,18 @@ """ MONEI API v1 -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

- The version of the OpenAPI document: 1.4.8 - Generated by: https://openapi-generator.tech -""" + The version of the OpenAPI document: 1.5.1 + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest -import datetime -import Monei -from Monei.models.payment_methods_metadata_bancontact import PaymentMethodsMetadataBancontact # noqa: E501 -from Monei.rest import ApiException +from Monei.models.payment_methods_metadata_bancontact import PaymentMethodsMetadataBancontact class TestPaymentMethodsMetadataBancontact(unittest.TestCase): """PaymentMethodsMetadataBancontact unit test stubs""" @@ -28,25 +25,27 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional): + def make_instance(self, include_optional) -> PaymentMethodsMetadataBancontact: """Test PaymentMethodsMetadataBancontact - include_option is a boolean, when False only required + include_optional is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = Monei.models.payment_methods_metadata_bancontact.PaymentMethodsMetadataBancontact() # noqa: E501 - if include_optional : + # uncomment below to create an instance of `PaymentMethodsMetadataBancontact` + """ + model = PaymentMethodsMetadataBancontact() + if include_optional: return PaymentMethodsMetadataBancontact( countries = ["BE"] ) - else : + else: return PaymentMethodsMetadataBancontact( ) + """ def testPaymentMethodsMetadataBancontact(self): """Test PaymentMethodsMetadataBancontact""" - inst_req_only = self.make_instance(include_optional=False) - inst_req_and_optional = self.make_instance(include_optional=True) - + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/test/test_payment_methods_metadata_bizum.py b/test/test_payment_methods_metadata_bizum.py index cee8182..fa21bbc 100644 --- a/test/test_payment_methods_metadata_bizum.py +++ b/test/test_payment_methods_metadata_bizum.py @@ -3,21 +3,18 @@ """ MONEI API v1 -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

- The version of the OpenAPI document: 1.4.8 - Generated by: https://openapi-generator.tech -""" + The version of the OpenAPI document: 1.5.1 + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest -import datetime -import Monei -from Monei.models.payment_methods_metadata_bizum import PaymentMethodsMetadataBizum # noqa: E501 -from Monei.rest import ApiException +from Monei.models.payment_methods_metadata_bizum import PaymentMethodsMetadataBizum class TestPaymentMethodsMetadataBizum(unittest.TestCase): """PaymentMethodsMetadataBizum unit test stubs""" @@ -28,25 +25,27 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional): + def make_instance(self, include_optional) -> PaymentMethodsMetadataBizum: """Test PaymentMethodsMetadataBizum - include_option is a boolean, when False only required + include_optional is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = Monei.models.payment_methods_metadata_bizum.PaymentMethodsMetadataBizum() # noqa: E501 - if include_optional : + # uncomment below to create an instance of `PaymentMethodsMetadataBizum` + """ + model = PaymentMethodsMetadataBizum() + if include_optional: return PaymentMethodsMetadataBizum( countries = ["ES"] ) - else : + else: return PaymentMethodsMetadataBizum( ) + """ def testPaymentMethodsMetadataBizum(self): """Test PaymentMethodsMetadataBizum""" - inst_req_only = self.make_instance(include_optional=False) - inst_req_and_optional = self.make_instance(include_optional=True) - + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/test/test_payment_methods_metadata_blik.py b/test/test_payment_methods_metadata_blik.py index 524bc08..a73f382 100644 --- a/test/test_payment_methods_metadata_blik.py +++ b/test/test_payment_methods_metadata_blik.py @@ -3,21 +3,18 @@ """ MONEI API v1 -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

- The version of the OpenAPI document: 1.4.8 - Generated by: https://openapi-generator.tech -""" + The version of the OpenAPI document: 1.5.1 + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest -import datetime -import Monei -from Monei.models.payment_methods_metadata_blik import PaymentMethodsMetadataBlik # noqa: E501 -from Monei.rest import ApiException +from Monei.models.payment_methods_metadata_blik import PaymentMethodsMetadataBlik class TestPaymentMethodsMetadataBlik(unittest.TestCase): """PaymentMethodsMetadataBlik unit test stubs""" @@ -28,25 +25,27 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional): + def make_instance(self, include_optional) -> PaymentMethodsMetadataBlik: """Test PaymentMethodsMetadataBlik - include_option is a boolean, when False only required + include_optional is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = Monei.models.payment_methods_metadata_blik.PaymentMethodsMetadataBlik() # noqa: E501 - if include_optional : + # uncomment below to create an instance of `PaymentMethodsMetadataBlik` + """ + model = PaymentMethodsMetadataBlik() + if include_optional: return PaymentMethodsMetadataBlik( countries = ["PL"] ) - else : + else: return PaymentMethodsMetadataBlik( ) + """ def testPaymentMethodsMetadataBlik(self): """Test PaymentMethodsMetadataBlik""" - inst_req_only = self.make_instance(include_optional=False) - inst_req_and_optional = self.make_instance(include_optional=True) - + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/test/test_payment_methods_metadata_card.py b/test/test_payment_methods_metadata_card.py index 268b2ce..25e0bc6 100644 --- a/test/test_payment_methods_metadata_card.py +++ b/test/test_payment_methods_metadata_card.py @@ -3,21 +3,18 @@ """ MONEI API v1 -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

- The version of the OpenAPI document: 1.4.8 - Generated by: https://openapi-generator.tech -""" + The version of the OpenAPI document: 1.5.1 + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest -import datetime -import Monei -from Monei.models.payment_methods_metadata_card import PaymentMethodsMetadataCard # noqa: E501 -from Monei.rest import ApiException +from Monei.models.payment_methods_metadata_card import PaymentMethodsMetadataCard class TestPaymentMethodsMetadataCard(unittest.TestCase): """PaymentMethodsMetadataCard unit test stubs""" @@ -28,25 +25,27 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional): + def make_instance(self, include_optional) -> PaymentMethodsMetadataCard: """Test PaymentMethodsMetadataCard - include_option is a boolean, when False only required + include_optional is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = Monei.models.payment_methods_metadata_card.PaymentMethodsMetadataCard() # noqa: E501 - if include_optional : + # uncomment below to create an instance of `PaymentMethodsMetadataCard` + """ + model = PaymentMethodsMetadataCard() + if include_optional: return PaymentMethodsMetadataCard( brands = ["visa","mastercard"] ) - else : + else: return PaymentMethodsMetadataCard( ) + """ def testPaymentMethodsMetadataCard(self): """Test PaymentMethodsMetadataCard""" - inst_req_only = self.make_instance(include_optional=False) - inst_req_and_optional = self.make_instance(include_optional=True) - + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/test/test_payment_methods_metadata_click_to_pay.py b/test/test_payment_methods_metadata_click_to_pay.py index 99035be..fcb3b64 100644 --- a/test/test_payment_methods_metadata_click_to_pay.py +++ b/test/test_payment_methods_metadata_click_to_pay.py @@ -3,21 +3,18 @@ """ MONEI API v1 -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

- The version of the OpenAPI document: 1.4.8 - Generated by: https://openapi-generator.tech -""" + The version of the OpenAPI document: 1.5.1 + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest -import datetime -import Monei -from Monei.models.payment_methods_metadata_click_to_pay import PaymentMethodsMetadataClickToPay # noqa: E501 -from Monei.rest import ApiException +from Monei.models.payment_methods_metadata_click_to_pay import PaymentMethodsMetadataClickToPay class TestPaymentMethodsMetadataClickToPay(unittest.TestCase): """PaymentMethodsMetadataClickToPay unit test stubs""" @@ -28,35 +25,37 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional): + def make_instance(self, include_optional) -> PaymentMethodsMetadataClickToPay: """Test PaymentMethodsMetadataClickToPay - include_option is a boolean, when False only required + include_optional is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = Monei.models.payment_methods_metadata_click_to_pay.PaymentMethodsMetadataClickToPay() # noqa: E501 - if include_optional : + # uncomment below to create an instance of `PaymentMethodsMetadataClickToPay` + """ + model = PaymentMethodsMetadataClickToPay() + if include_optional: return PaymentMethodsMetadataClickToPay( - token_support = True, - preselected = False, + token_support = True, + preselected = False, visa = Monei.models.payment_methods_metadata_click_to_pay_visa.PaymentMethods_Metadata_clickToPay_visa( srci_dpa_id = 'f47ac10b-58cc-4372-a567-0e02b2c3d479', - src_initiator_id = '550e8400-e29b-41d4-a716-446655440000', ), + src_initiator_id = '550e8400-e29b-41d4-a716-446655440000', ), mastercard = Monei.models.payment_methods_metadata_click_to_pay_mastercard.PaymentMethods_Metadata_clickToPay_mastercard( srci_dpa_id = '6ba7b810-9dad-11d1-80b4-00c04fd430c8', - src_initiator_id = 'a0eebc99-9c0b-4ef8-bb6d-6bb9bd380a11', ), + src_initiator_id = 'a0eebc99-9c0b-4ef8-bb6d-6bb9bd380a11', ), discover = Monei.models.payment_methods_metadata_click_to_pay_discover.PaymentMethods_Metadata_clickToPay_discover( srci_dpa_id = '71f0c4d5-9947-4d1c-9cb3-d6a3f7c4e701', src_initiator_id = 'c2d06c25-9ddb-4a5e-9d5a-3ff1c8d98467', ) ) - else : + else: return PaymentMethodsMetadataClickToPay( ) + """ def testPaymentMethodsMetadataClickToPay(self): """Test PaymentMethodsMetadataClickToPay""" - inst_req_only = self.make_instance(include_optional=False) - inst_req_and_optional = self.make_instance(include_optional=True) - + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/test/test_payment_methods_metadata_click_to_pay_discover.py b/test/test_payment_methods_metadata_click_to_pay_discover.py index a0897c4..cd36b12 100644 --- a/test/test_payment_methods_metadata_click_to_pay_discover.py +++ b/test/test_payment_methods_metadata_click_to_pay_discover.py @@ -3,21 +3,18 @@ """ MONEI API v1 -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

- The version of the OpenAPI document: 1.4.8 - Generated by: https://openapi-generator.tech -""" + The version of the OpenAPI document: 1.5.1 + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest -import datetime -import Monei -from Monei.models.payment_methods_metadata_click_to_pay_discover import PaymentMethodsMetadataClickToPayDiscover # noqa: E501 -from Monei.rest import ApiException +from Monei.models.payment_methods_metadata_click_to_pay_discover import PaymentMethodsMetadataClickToPayDiscover class TestPaymentMethodsMetadataClickToPayDiscover(unittest.TestCase): """PaymentMethodsMetadataClickToPayDiscover unit test stubs""" @@ -28,26 +25,28 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional): + def make_instance(self, include_optional) -> PaymentMethodsMetadataClickToPayDiscover: """Test PaymentMethodsMetadataClickToPayDiscover - include_option is a boolean, when False only required + include_optional is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = Monei.models.payment_methods_metadata_click_to_pay_discover.PaymentMethodsMetadataClickToPayDiscover() # noqa: E501 - if include_optional : + # uncomment below to create an instance of `PaymentMethodsMetadataClickToPayDiscover` + """ + model = PaymentMethodsMetadataClickToPayDiscover() + if include_optional: return PaymentMethodsMetadataClickToPayDiscover( - srci_dpa_id = '71f0c4d5-9947-4d1c-9cb3-d6a3f7c4e701', + srci_dpa_id = '71f0c4d5-9947-4d1c-9cb3-d6a3f7c4e701', src_initiator_id = 'c2d06c25-9ddb-4a5e-9d5a-3ff1c8d98467' ) - else : + else: return PaymentMethodsMetadataClickToPayDiscover( ) + """ def testPaymentMethodsMetadataClickToPayDiscover(self): """Test PaymentMethodsMetadataClickToPayDiscover""" - inst_req_only = self.make_instance(include_optional=False) - inst_req_and_optional = self.make_instance(include_optional=True) - + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/test/test_payment_methods_metadata_click_to_pay_mastercard.py b/test/test_payment_methods_metadata_click_to_pay_mastercard.py index b188955..552f856 100644 --- a/test/test_payment_methods_metadata_click_to_pay_mastercard.py +++ b/test/test_payment_methods_metadata_click_to_pay_mastercard.py @@ -3,21 +3,18 @@ """ MONEI API v1 -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

- The version of the OpenAPI document: 1.4.8 - Generated by: https://openapi-generator.tech -""" + The version of the OpenAPI document: 1.5.1 + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest -import datetime -import Monei -from Monei.models.payment_methods_metadata_click_to_pay_mastercard import PaymentMethodsMetadataClickToPayMastercard # noqa: E501 -from Monei.rest import ApiException +from Monei.models.payment_methods_metadata_click_to_pay_mastercard import PaymentMethodsMetadataClickToPayMastercard class TestPaymentMethodsMetadataClickToPayMastercard(unittest.TestCase): """PaymentMethodsMetadataClickToPayMastercard unit test stubs""" @@ -28,26 +25,28 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional): + def make_instance(self, include_optional) -> PaymentMethodsMetadataClickToPayMastercard: """Test PaymentMethodsMetadataClickToPayMastercard - include_option is a boolean, when False only required + include_optional is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = Monei.models.payment_methods_metadata_click_to_pay_mastercard.PaymentMethodsMetadataClickToPayMastercard() # noqa: E501 - if include_optional : + # uncomment below to create an instance of `PaymentMethodsMetadataClickToPayMastercard` + """ + model = PaymentMethodsMetadataClickToPayMastercard() + if include_optional: return PaymentMethodsMetadataClickToPayMastercard( - srci_dpa_id = '6ba7b810-9dad-11d1-80b4-00c04fd430c8', + srci_dpa_id = '6ba7b810-9dad-11d1-80b4-00c04fd430c8', src_initiator_id = 'a0eebc99-9c0b-4ef8-bb6d-6bb9bd380a11' ) - else : + else: return PaymentMethodsMetadataClickToPayMastercard( ) + """ def testPaymentMethodsMetadataClickToPayMastercard(self): """Test PaymentMethodsMetadataClickToPayMastercard""" - inst_req_only = self.make_instance(include_optional=False) - inst_req_and_optional = self.make_instance(include_optional=True) - + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/test/test_payment_methods_metadata_click_to_pay_visa.py b/test/test_payment_methods_metadata_click_to_pay_visa.py index 4cb670b..580ca65 100644 --- a/test/test_payment_methods_metadata_click_to_pay_visa.py +++ b/test/test_payment_methods_metadata_click_to_pay_visa.py @@ -3,21 +3,18 @@ """ MONEI API v1 -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

- The version of the OpenAPI document: 1.4.8 - Generated by: https://openapi-generator.tech -""" + The version of the OpenAPI document: 1.5.1 + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest -import datetime -import Monei -from Monei.models.payment_methods_metadata_click_to_pay_visa import PaymentMethodsMetadataClickToPayVisa # noqa: E501 -from Monei.rest import ApiException +from Monei.models.payment_methods_metadata_click_to_pay_visa import PaymentMethodsMetadataClickToPayVisa class TestPaymentMethodsMetadataClickToPayVisa(unittest.TestCase): """PaymentMethodsMetadataClickToPayVisa unit test stubs""" @@ -28,26 +25,28 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional): + def make_instance(self, include_optional) -> PaymentMethodsMetadataClickToPayVisa: """Test PaymentMethodsMetadataClickToPayVisa - include_option is a boolean, when False only required + include_optional is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = Monei.models.payment_methods_metadata_click_to_pay_visa.PaymentMethodsMetadataClickToPayVisa() # noqa: E501 - if include_optional : + # uncomment below to create an instance of `PaymentMethodsMetadataClickToPayVisa` + """ + model = PaymentMethodsMetadataClickToPayVisa() + if include_optional: return PaymentMethodsMetadataClickToPayVisa( - srci_dpa_id = 'f47ac10b-58cc-4372-a567-0e02b2c3d479', + srci_dpa_id = 'f47ac10b-58cc-4372-a567-0e02b2c3d479', src_initiator_id = '550e8400-e29b-41d4-a716-446655440000' ) - else : + else: return PaymentMethodsMetadataClickToPayVisa( ) + """ def testPaymentMethodsMetadataClickToPayVisa(self): """Test PaymentMethodsMetadataClickToPayVisa""" - inst_req_only = self.make_instance(include_optional=False) - inst_req_and_optional = self.make_instance(include_optional=True) - + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/test/test_payment_methods_metadata_eps.py b/test/test_payment_methods_metadata_eps.py index 9c0e8fb..46f2ea8 100644 --- a/test/test_payment_methods_metadata_eps.py +++ b/test/test_payment_methods_metadata_eps.py @@ -3,21 +3,18 @@ """ MONEI API v1 -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

- The version of the OpenAPI document: 1.4.8 - Generated by: https://openapi-generator.tech -""" + The version of the OpenAPI document: 1.5.1 + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest -import datetime -import Monei -from Monei.models.payment_methods_metadata_eps import PaymentMethodsMetadataEps # noqa: E501 -from Monei.rest import ApiException +from Monei.models.payment_methods_metadata_eps import PaymentMethodsMetadataEps class TestPaymentMethodsMetadataEps(unittest.TestCase): """PaymentMethodsMetadataEps unit test stubs""" @@ -28,25 +25,27 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional): + def make_instance(self, include_optional) -> PaymentMethodsMetadataEps: """Test PaymentMethodsMetadataEps - include_option is a boolean, when False only required + include_optional is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = Monei.models.payment_methods_metadata_eps.PaymentMethodsMetadataEps() # noqa: E501 - if include_optional : + # uncomment below to create an instance of `PaymentMethodsMetadataEps` + """ + model = PaymentMethodsMetadataEps() + if include_optional: return PaymentMethodsMetadataEps( countries = ["AT"] ) - else : + else: return PaymentMethodsMetadataEps( ) + """ def testPaymentMethodsMetadataEps(self): """Test PaymentMethodsMetadataEps""" - inst_req_only = self.make_instance(include_optional=False) - inst_req_and_optional = self.make_instance(include_optional=True) - + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/test/test_payment_methods_metadata_giropay.py b/test/test_payment_methods_metadata_giropay.py index ed1b96f..b8d5aff 100644 --- a/test/test_payment_methods_metadata_giropay.py +++ b/test/test_payment_methods_metadata_giropay.py @@ -3,21 +3,18 @@ """ MONEI API v1 -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

- The version of the OpenAPI document: 1.4.8 - Generated by: https://openapi-generator.tech -""" + The version of the OpenAPI document: 1.5.1 + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest -import datetime -import Monei -from Monei.models.payment_methods_metadata_giropay import PaymentMethodsMetadataGiropay # noqa: E501 -from Monei.rest import ApiException +from Monei.models.payment_methods_metadata_giropay import PaymentMethodsMetadataGiropay class TestPaymentMethodsMetadataGiropay(unittest.TestCase): """PaymentMethodsMetadataGiropay unit test stubs""" @@ -28,25 +25,27 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional): + def make_instance(self, include_optional) -> PaymentMethodsMetadataGiropay: """Test PaymentMethodsMetadataGiropay - include_option is a boolean, when False only required + include_optional is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = Monei.models.payment_methods_metadata_giropay.PaymentMethodsMetadataGiropay() # noqa: E501 - if include_optional : + # uncomment below to create an instance of `PaymentMethodsMetadataGiropay` + """ + model = PaymentMethodsMetadataGiropay() + if include_optional: return PaymentMethodsMetadataGiropay( countries = ["DE"] ) - else : + else: return PaymentMethodsMetadataGiropay( ) + """ def testPaymentMethodsMetadataGiropay(self): """Test PaymentMethodsMetadataGiropay""" - inst_req_only = self.make_instance(include_optional=False) - inst_req_and_optional = self.make_instance(include_optional=True) - + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/test/test_payment_methods_metadata_google_pay.py b/test/test_payment_methods_metadata_google_pay.py index 36e2f23..7f7f91b 100644 --- a/test/test_payment_methods_metadata_google_pay.py +++ b/test/test_payment_methods_metadata_google_pay.py @@ -3,21 +3,18 @@ """ MONEI API v1 -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

- The version of the OpenAPI document: 1.4.8 - Generated by: https://openapi-generator.tech -""" + The version of the OpenAPI document: 1.5.1 + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest -import datetime -import Monei -from Monei.models.payment_methods_metadata_google_pay import PaymentMethodsMetadataGooglePay # noqa: E501 -from Monei.rest import ApiException +from Monei.models.payment_methods_metadata_google_pay import PaymentMethodsMetadataGooglePay class TestPaymentMethodsMetadataGooglePay(unittest.TestCase): """PaymentMethodsMetadataGooglePay unit test stubs""" @@ -28,26 +25,28 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional): + def make_instance(self, include_optional) -> PaymentMethodsMetadataGooglePay: """Test PaymentMethodsMetadataGooglePay - include_option is a boolean, when False only required + include_optional is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = Monei.models.payment_methods_metadata_google_pay.PaymentMethodsMetadataGooglePay() # noqa: E501 - if include_optional : + # uncomment below to create an instance of `PaymentMethodsMetadataGooglePay` + """ + model = PaymentMethodsMetadataGooglePay() + if include_optional: return PaymentMethodsMetadataGooglePay( - merchant_id = '12345678901234567890', + merchant_id = '12345678901234567890', cvc_required = False ) - else : + else: return PaymentMethodsMetadataGooglePay( ) + """ def testPaymentMethodsMetadataGooglePay(self): """Test PaymentMethodsMetadataGooglePay""" - inst_req_only = self.make_instance(include_optional=False) - inst_req_and_optional = self.make_instance(include_optional=True) - + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/test/test_payment_methods_metadata_i_deal.py b/test/test_payment_methods_metadata_i_deal.py index 8e5ef2d..4bfad7e 100644 --- a/test/test_payment_methods_metadata_i_deal.py +++ b/test/test_payment_methods_metadata_i_deal.py @@ -3,21 +3,18 @@ """ MONEI API v1 -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

- The version of the OpenAPI document: 1.4.8 - Generated by: https://openapi-generator.tech -""" + The version of the OpenAPI document: 1.5.1 + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest -import datetime -import Monei -from Monei.models.payment_methods_metadata_i_deal import PaymentMethodsMetadataIDeal # noqa: E501 -from Monei.rest import ApiException +from Monei.models.payment_methods_metadata_i_deal import PaymentMethodsMetadataIDeal class TestPaymentMethodsMetadataIDeal(unittest.TestCase): """PaymentMethodsMetadataIDeal unit test stubs""" @@ -28,25 +25,27 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional): + def make_instance(self, include_optional) -> PaymentMethodsMetadataIDeal: """Test PaymentMethodsMetadataIDeal - include_option is a boolean, when False only required + include_optional is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = Monei.models.payment_methods_metadata_i_deal.PaymentMethodsMetadataIDeal() # noqa: E501 - if include_optional : + # uncomment below to create an instance of `PaymentMethodsMetadataIDeal` + """ + model = PaymentMethodsMetadataIDeal() + if include_optional: return PaymentMethodsMetadataIDeal( countries = ["NL"] ) - else : + else: return PaymentMethodsMetadataIDeal( ) + """ def testPaymentMethodsMetadataIDeal(self): """Test PaymentMethodsMetadataIDeal""" - inst_req_only = self.make_instance(include_optional=False) - inst_req_and_optional = self.make_instance(include_optional=True) - + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/test/test_payment_methods_metadata_klarna.py b/test/test_payment_methods_metadata_klarna.py index 4ddeccc..c2e25bc 100644 --- a/test/test_payment_methods_metadata_klarna.py +++ b/test/test_payment_methods_metadata_klarna.py @@ -3,21 +3,18 @@ """ MONEI API v1 -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

- The version of the OpenAPI document: 1.4.8 - Generated by: https://openapi-generator.tech -""" + The version of the OpenAPI document: 1.5.1 + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest -import datetime -import Monei -from Monei.models.payment_methods_metadata_klarna import PaymentMethodsMetadataKlarna # noqa: E501 -from Monei.rest import ApiException +from Monei.models.payment_methods_metadata_klarna import PaymentMethodsMetadataKlarna class TestPaymentMethodsMetadataKlarna(unittest.TestCase): """PaymentMethodsMetadataKlarna unit test stubs""" @@ -28,25 +25,27 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional): + def make_instance(self, include_optional) -> PaymentMethodsMetadataKlarna: """Test PaymentMethodsMetadataKlarna - include_option is a boolean, when False only required + include_optional is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = Monei.models.payment_methods_metadata_klarna.PaymentMethodsMetadataKlarna() # noqa: E501 - if include_optional : + # uncomment below to create an instance of `PaymentMethodsMetadataKlarna` + """ + model = PaymentMethodsMetadataKlarna() + if include_optional: return PaymentMethodsMetadataKlarna( countries = ["AT","BE","CH","DE","DK","ES","FI","FR","GB","IT","NL","NO","SE"] ) - else : + else: return PaymentMethodsMetadataKlarna( ) + """ def testPaymentMethodsMetadataKlarna(self): """Test PaymentMethodsMetadataKlarna""" - inst_req_only = self.make_instance(include_optional=False) - inst_req_and_optional = self.make_instance(include_optional=True) - + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/test/test_payment_methods_metadata_mbway.py b/test/test_payment_methods_metadata_mbway.py index 292b9d5..69b6864 100644 --- a/test/test_payment_methods_metadata_mbway.py +++ b/test/test_payment_methods_metadata_mbway.py @@ -3,21 +3,18 @@ """ MONEI API v1 -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

- The version of the OpenAPI document: 1.4.8 - Generated by: https://openapi-generator.tech -""" + The version of the OpenAPI document: 1.5.1 + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest -import datetime -import Monei -from Monei.models.payment_methods_metadata_mbway import PaymentMethodsMetadataMbway # noqa: E501 -from Monei.rest import ApiException +from Monei.models.payment_methods_metadata_mbway import PaymentMethodsMetadataMbway class TestPaymentMethodsMetadataMbway(unittest.TestCase): """PaymentMethodsMetadataMbway unit test stubs""" @@ -28,25 +25,27 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional): + def make_instance(self, include_optional) -> PaymentMethodsMetadataMbway: """Test PaymentMethodsMetadataMbway - include_option is a boolean, when False only required + include_optional is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = Monei.models.payment_methods_metadata_mbway.PaymentMethodsMetadataMbway() # noqa: E501 - if include_optional : + # uncomment below to create an instance of `PaymentMethodsMetadataMbway` + """ + model = PaymentMethodsMetadataMbway() + if include_optional: return PaymentMethodsMetadataMbway( countries = ["PT"] ) - else : + else: return PaymentMethodsMetadataMbway( ) + """ def testPaymentMethodsMetadataMbway(self): """Test PaymentMethodsMetadataMbway""" - inst_req_only = self.make_instance(include_optional=False) - inst_req_and_optional = self.make_instance(include_optional=True) - + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/test/test_payment_methods_metadata_sepa.py b/test/test_payment_methods_metadata_sepa.py index a4db481..9426b7f 100644 --- a/test/test_payment_methods_metadata_sepa.py +++ b/test/test_payment_methods_metadata_sepa.py @@ -3,21 +3,18 @@ """ MONEI API v1 -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

- The version of the OpenAPI document: 1.4.8 - Generated by: https://openapi-generator.tech -""" + The version of the OpenAPI document: 1.5.1 + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest -import datetime -import Monei -from Monei.models.payment_methods_metadata_sepa import PaymentMethodsMetadataSepa # noqa: E501 -from Monei.rest import ApiException +from Monei.models.payment_methods_metadata_sepa import PaymentMethodsMetadataSepa class TestPaymentMethodsMetadataSepa(unittest.TestCase): """PaymentMethodsMetadataSepa unit test stubs""" @@ -28,25 +25,27 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional): + def make_instance(self, include_optional) -> PaymentMethodsMetadataSepa: """Test PaymentMethodsMetadataSepa - include_option is a boolean, when False only required + include_optional is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = Monei.models.payment_methods_metadata_sepa.PaymentMethodsMetadataSepa() # noqa: E501 - if include_optional : + # uncomment below to create an instance of `PaymentMethodsMetadataSepa` + """ + model = PaymentMethodsMetadataSepa() + if include_optional: return PaymentMethodsMetadataSepa( countries = ["AT","BE","BG","HR","CY","CZ","DK","EE","FI","FR","DE","GR","HU","IE","IT","LV","LT","LU","MT","NL","PL","PT","RO","SK","SI","ES","SE","IS","LI","NO","AD","SM","MC","VA","PF","TF","GI","GG","IM","JE","BL","PM","CH","GB","WF"] ) - else : + else: return PaymentMethodsMetadataSepa( ) + """ def testPaymentMethodsMetadataSepa(self): """Test PaymentMethodsMetadataSepa""" - inst_req_only = self.make_instance(include_optional=False) - inst_req_and_optional = self.make_instance(include_optional=True) - + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/test/test_payment_methods_metadata_sofort.py b/test/test_payment_methods_metadata_sofort.py index a27a102..25dabf2 100644 --- a/test/test_payment_methods_metadata_sofort.py +++ b/test/test_payment_methods_metadata_sofort.py @@ -3,21 +3,18 @@ """ MONEI API v1 -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

- The version of the OpenAPI document: 1.4.8 - Generated by: https://openapi-generator.tech -""" + The version of the OpenAPI document: 1.5.1 + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest -import datetime -import Monei -from Monei.models.payment_methods_metadata_sofort import PaymentMethodsMetadataSofort # noqa: E501 -from Monei.rest import ApiException +from Monei.models.payment_methods_metadata_sofort import PaymentMethodsMetadataSofort class TestPaymentMethodsMetadataSofort(unittest.TestCase): """PaymentMethodsMetadataSofort unit test stubs""" @@ -28,25 +25,27 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional): + def make_instance(self, include_optional) -> PaymentMethodsMetadataSofort: """Test PaymentMethodsMetadataSofort - include_option is a boolean, when False only required + include_optional is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = Monei.models.payment_methods_metadata_sofort.PaymentMethodsMetadataSofort() # noqa: E501 - if include_optional : + # uncomment below to create an instance of `PaymentMethodsMetadataSofort` + """ + model = PaymentMethodsMetadataSofort() + if include_optional: return PaymentMethodsMetadataSofort( countries = ["AT","BE","DE","ES","IT","NL","CH","PL"] ) - else : + else: return PaymentMethodsMetadataSofort( ) + """ def testPaymentMethodsMetadataSofort(self): """Test PaymentMethodsMetadataSofort""" - inst_req_only = self.make_instance(include_optional=False) - inst_req_and_optional = self.make_instance(include_optional=True) - + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/test/test_payment_methods_metadata_trustly.py b/test/test_payment_methods_metadata_trustly.py index 4caed0a..7d25549 100644 --- a/test/test_payment_methods_metadata_trustly.py +++ b/test/test_payment_methods_metadata_trustly.py @@ -3,21 +3,18 @@ """ MONEI API v1 -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

- The version of the OpenAPI document: 1.4.8 - Generated by: https://openapi-generator.tech -""" + The version of the OpenAPI document: 1.5.1 + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest -import datetime -import Monei -from Monei.models.payment_methods_metadata_trustly import PaymentMethodsMetadataTrustly # noqa: E501 -from Monei.rest import ApiException +from Monei.models.payment_methods_metadata_trustly import PaymentMethodsMetadataTrustly class TestPaymentMethodsMetadataTrustly(unittest.TestCase): """PaymentMethodsMetadataTrustly unit test stubs""" @@ -28,25 +25,27 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional): + def make_instance(self, include_optional) -> PaymentMethodsMetadataTrustly: """Test PaymentMethodsMetadataTrustly - include_option is a boolean, when False only required + include_optional is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = Monei.models.payment_methods_metadata_trustly.PaymentMethodsMetadataTrustly() # noqa: E501 - if include_optional : + # uncomment below to create an instance of `PaymentMethodsMetadataTrustly` + """ + model = PaymentMethodsMetadataTrustly() + if include_optional: return PaymentMethodsMetadataTrustly( countries = ["DE","DK","EE","ES","FI","GB","LT","LV","NL","NO","PL","SE","SK"] ) - else : + else: return PaymentMethodsMetadataTrustly( ) + """ def testPaymentMethodsMetadataTrustly(self): """Test PaymentMethodsMetadataTrustly""" - inst_req_only = self.make_instance(include_optional=False) - inst_req_and_optional = self.make_instance(include_optional=True) - + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/test/test_payment_methods_methods.py b/test/test_payment_methods_methods.py deleted file mode 100644 index 3d78dca..0000000 --- a/test/test_payment_methods_methods.py +++ /dev/null @@ -1,35 +0,0 @@ -""" - MONEI API v1 - -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - - The version of the OpenAPI document: 1.5.0 - Generated by: https://openapi-generator.tech -""" - - -import sys -import unittest - -import Monei -from Monei.model.payment_methods_methods import PaymentMethodsMethods - - -class TestPaymentMethodsMethods(unittest.TestCase): - """PaymentMethodsMethods unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testPaymentMethodsMethods(self): - """Test PaymentMethodsMethods""" - # FIXME: construct object with mandatory attributes with example values - # model = PaymentMethodsMethods() # noqa: E501 - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_payment_next_action.py b/test/test_payment_next_action.py index 84f4700..2f2459d 100644 --- a/test/test_payment_next_action.py +++ b/test/test_payment_next_action.py @@ -3,21 +3,18 @@ """ MONEI API v1 - The MONEI API is organized around [REST](https://en.wikipedia.org/wiki/Representational_State_Transfer). Our API has predictable resource-oriented URLs, accepts JSON-encoded request bodies, returns JSON-encoded responses, and uses standard HTTP response codes, authentication, and verbs. # noqa: E501 +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

- The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" + The version of the OpenAPI document: 1.5.1 + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest -import datetime -import MONEI PYTHON SDK -from MONEI PYTHON SDK.models.payment_next_action import PaymentNextAction # noqa: E501 -from MONEI PYTHON SDK.rest import ApiException +from Monei.models.payment_next_action import PaymentNextAction class TestPaymentNextAction(unittest.TestCase): """PaymentNextAction unit test stubs""" @@ -28,27 +25,29 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional): + def make_instance(self, include_optional) -> PaymentNextAction: """Test PaymentNextAction - include_option is a boolean, when False only required + include_optional is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = MONEI PYTHON SDK.models.payment_next_action.PaymentNextAction() # noqa: E501 - if include_optional : + # uncomment below to create an instance of `PaymentNextAction` + """ + model = PaymentNextAction() + if include_optional: return PaymentNextAction( type = 'CONFIRM', must_redirect = False, redirect_url = 'https://secure.monei.com/payments/af6029f80f5fc73a8ad2753eea0b1be0' ) - else : + else: return PaymentNextAction( ) + """ def testPaymentNextAction(self): """Test PaymentNextAction""" - inst_req_only = self.make_instance(include_optional=False) - inst_req_and_optional = self.make_instance(include_optional=True) - + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/test/test_payment_payment_method.py b/test/test_payment_payment_method.py index eb00a76..3491903 100644 --- a/test/test_payment_payment_method.py +++ b/test/test_payment_payment_method.py @@ -3,21 +3,18 @@ """ MONEI API v1 - The MONEI API is organized around [REST](https://en.wikipedia.org/wiki/Representational_State_Transfer). Our API has predictable resource-oriented URLs, accepts JSON-encoded request bodies, returns JSON-encoded responses, and uses standard HTTP response codes, authentication, and verbs. # noqa: E501 +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

- The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" + The version of the OpenAPI document: 1.5.1 + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest -import datetime -import MONEI PYTHON SDK -from MONEI PYTHON SDK.models.payment_payment_method import PaymentPaymentMethod # noqa: E501 -from MONEI PYTHON SDK.rest import ApiException +from Monei.models.payment_payment_method import PaymentPaymentMethod class TestPaymentPaymentMethod(unittest.TestCase): """PaymentPaymentMethod unit test stubs""" @@ -28,36 +25,64 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional): + def make_instance(self, include_optional) -> PaymentPaymentMethod: """Test PaymentPaymentMethod - include_option is a boolean, when False only required + include_optional is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = MONEI PYTHON SDK.models.payment_payment_method.PaymentPaymentMethod() # noqa: E501 - if include_optional : + # uncomment below to create an instance of `PaymentPaymentMethod` + """ + model = PaymentPaymentMethod() + if include_optional: return PaymentPaymentMethod( - method = 'card', - card = MONEI PYTHON SDK.models.payment_payment_method_card.Payment-PaymentMethodCard( + method = 'card', + card = Monei.models.payment_payment_method_card.Payment-PaymentMethodCard( country = 'ES', brand = 'visa', type = 'credit', three_d_secure = False, three_d_secure_version = '2.1.0', - last4 = '0004', ), - bizum = MONEI PYTHON SDK.models.payment_payment_method_bizum.Payment-PaymentMethodBizum( - phone_number = '0', ), - paypal = MONEI PYTHON SDK.models.payment_payment_method_paypal.Payment-PaymentMethodPaypal( - order_id = '0', ) + three_d_secure_flow = 'CHALLENGE', + expiration = 2048544000, + last4 = '0004', + tokenization_method = 'applePay', + cardholder_name = 'John Doe', + cardholder_email = 'email@example.com', ), + bizum = Monei.models.payment_payment_method_bizum.Payment-PaymentMethodBizum( + phone_number = '', ), + paypal = Monei.models.payment_payment_method_paypal.Payment-PaymentMethodPaypal( + order_id = '', ), + cofidis = Monei.models.payment_payment_method_cofidis.Payment-PaymentMethodCofidis( + order_id = '', ), + cofidis_loan = Monei.models.payment_payment_method_cofidis.Payment-PaymentMethodCofidis( + order_id = '', ), + mbway = Monei.models.payment_payment_method_mbway.Payment-PaymentMethodMbway( + phone_number = '', ), + trustly = Monei.models.payment_payment_method_trustly.Payment-PaymentMethodTrustly( + customer_id = '', ), + sepa = Monei.models.payment_payment_method_sepa.Payment-PaymentMethodSepa( + accountholder_address = '', + accountholder_email = '', + accountholder_name = '', + country_code = '', + bank_address = '', + bank_code = '', + bank_name = '', + bic = '', + last4 = '', ), + klarna = Monei.models.payment_payment_method_klarna.Payment-PaymentMethodKlarna( + billing_category = 'PAY_LATER', + auth_payment_method = 'card', ) ) - else : + else: return PaymentPaymentMethod( ) + """ def testPaymentPaymentMethod(self): """Test PaymentPaymentMethod""" - inst_req_only = self.make_instance(include_optional=False) - inst_req_and_optional = self.make_instance(include_optional=True) - + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/test/test_payment_payment_method_bizum.py b/test/test_payment_payment_method_bizum.py index 4909cfb..3af754c 100644 --- a/test/test_payment_payment_method_bizum.py +++ b/test/test_payment_payment_method_bizum.py @@ -3,21 +3,18 @@ """ MONEI API v1 - The MONEI API is organized around [REST](https://en.wikipedia.org/wiki/Representational_State_Transfer). Our API has predictable resource-oriented URLs, accepts JSON-encoded request bodies, returns JSON-encoded responses, and uses standard HTTP response codes, authentication, and verbs. # noqa: E501 +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

- The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" + The version of the OpenAPI document: 1.5.1 + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest -import datetime -import MONEI PYTHON SDK -from MONEI PYTHON SDK.models.payment_payment_method_bizum import PaymentPaymentMethodBizum # noqa: E501 -from MONEI PYTHON SDK.rest import ApiException +from Monei.models.payment_payment_method_bizum import PaymentPaymentMethodBizum class TestPaymentPaymentMethodBizum(unittest.TestCase): """PaymentPaymentMethodBizum unit test stubs""" @@ -28,25 +25,27 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional): + def make_instance(self, include_optional) -> PaymentPaymentMethodBizum: """Test PaymentPaymentMethodBizum - include_option is a boolean, when False only required + include_optional is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = MONEI PYTHON SDK.models.payment_payment_method_bizum.PaymentPaymentMethodBizum() # noqa: E501 - if include_optional : + # uncomment below to create an instance of `PaymentPaymentMethodBizum` + """ + model = PaymentPaymentMethodBizum() + if include_optional: return PaymentPaymentMethodBizum( - phone_number = '0' + phone_number = '' ) - else : + else: return PaymentPaymentMethodBizum( ) + """ def testPaymentPaymentMethodBizum(self): """Test PaymentPaymentMethodBizum""" - inst_req_only = self.make_instance(include_optional=False) - inst_req_and_optional = self.make_instance(include_optional=True) - + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/test/test_payment_payment_method_bizum_input.py b/test/test_payment_payment_method_bizum_input.py index 69fa3e1..6b4e877 100644 --- a/test/test_payment_payment_method_bizum_input.py +++ b/test/test_payment_payment_method_bizum_input.py @@ -3,21 +3,18 @@ """ MONEI API v1 -

The MONEI API is organized around REST. Our API has predictable resource-oriented URLs, accepts JSON-encoded request bodies, returns JSON-encoded responses, and uses standard HTTP response codes, authentication, and verbs.

Base URL:

https://api.monei.com/v1

Client libraries:

Important:

If you are not using our official SDKs, you need to provide a valid User-Agent header in each request, otherwise your requests will be rejected.

# noqa: E501 +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

- The version of the OpenAPI document: 1.3.1 - Generated by: https://openapi-generator.tech -""" + The version of the OpenAPI document: 1.5.1 + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest -import datetime -import Monei -from Monei.models.payment_payment_method_bizum_input import PaymentPaymentMethodBizumInput # noqa: E501 -from Monei.rest import ApiException +from Monei.models.payment_payment_method_bizum_input import PaymentPaymentMethodBizumInput class TestPaymentPaymentMethodBizumInput(unittest.TestCase): """PaymentPaymentMethodBizumInput unit test stubs""" @@ -28,25 +25,27 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional): + def make_instance(self, include_optional) -> PaymentPaymentMethodBizumInput: """Test PaymentPaymentMethodBizumInput - include_option is a boolean, when False only required + include_optional is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = Monei.models.payment_payment_method_bizum_input.PaymentPaymentMethodBizumInput() # noqa: E501 - if include_optional : + # uncomment below to create an instance of `PaymentPaymentMethodBizumInput` + """ + model = PaymentPaymentMethodBizumInput() + if include_optional: return PaymentPaymentMethodBizumInput( - phone_number = '0' + phone_number = '' ) - else : + else: return PaymentPaymentMethodBizumInput( ) + """ def testPaymentPaymentMethodBizumInput(self): """Test PaymentPaymentMethodBizumInput""" - inst_req_only = self.make_instance(include_optional=False) - inst_req_and_optional = self.make_instance(include_optional=True) - + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/test/test_payment_payment_method_card.py b/test/test_payment_payment_method_card.py index 6836109..81ad484 100644 --- a/test/test_payment_payment_method_card.py +++ b/test/test_payment_payment_method_card.py @@ -3,21 +3,18 @@ """ MONEI API v1 - The MONEI API is organized around [REST](https://en.wikipedia.org/wiki/Representational_State_Transfer). Our API has predictable resource-oriented URLs, accepts JSON-encoded request bodies, returns JSON-encoded responses, and uses standard HTTP response codes, authentication, and verbs. # noqa: E501 +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

- The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" + The version of the OpenAPI document: 1.5.1 + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest -import datetime -import MONEI PYTHON SDK -from MONEI PYTHON SDK.models.payment_payment_method_card import PaymentPaymentMethodCard # noqa: E501 -from MONEI PYTHON SDK.rest import ApiException +from Monei.models.payment_payment_method_card import PaymentPaymentMethodCard class TestPaymentPaymentMethodCard(unittest.TestCase): """PaymentPaymentMethodCard unit test stubs""" @@ -28,30 +25,37 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional): + def make_instance(self, include_optional) -> PaymentPaymentMethodCard: """Test PaymentPaymentMethodCard - include_option is a boolean, when False only required + include_optional is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = MONEI PYTHON SDK.models.payment_payment_method_card.PaymentPaymentMethodCard() # noqa: E501 - if include_optional : + # uncomment below to create an instance of `PaymentPaymentMethodCard` + """ + model = PaymentPaymentMethodCard() + if include_optional: return PaymentPaymentMethodCard( - country = 'ES', - brand = 'visa', - type = 'credit', - three_d_secure = False, - three_d_secure_version = '2.1.0', - last4 = '0004' + country = 'ES', + brand = 'visa', + type = 'credit', + three_d_secure = False, + three_d_secure_version = '2.1.0', + three_d_secure_flow = 'CHALLENGE', + expiration = 2048544000, + last4 = '0004', + tokenization_method = 'applePay', + cardholder_name = 'John Doe', + cardholder_email = 'email@example.com' ) - else : + else: return PaymentPaymentMethodCard( ) + """ def testPaymentPaymentMethodCard(self): """Test PaymentPaymentMethodCard""" - inst_req_only = self.make_instance(include_optional=False) - inst_req_and_optional = self.make_instance(include_optional=True) - + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/test/test_payment_payment_method_card_input.py b/test/test_payment_payment_method_card_input.py index 79fd018..3c44074 100644 --- a/test/test_payment_payment_method_card_input.py +++ b/test/test_payment_payment_method_card_input.py @@ -3,21 +3,18 @@ """ MONEI API v1 -

The MONEI API is organized around REST. Our API has predictable resource-oriented URLs, accepts JSON-encoded request bodies, returns JSON-encoded responses, and uses standard HTTP response codes, authentication, and verbs.

Base URL:

https://api.monei.com/v1

Client libraries:

Important:

If you are not using our official SDKs, you need to provide a valid User-Agent header in each request, otherwise your requests will be rejected.

# noqa: E501 +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

- The version of the OpenAPI document: 1.3.1 - Generated by: https://openapi-generator.tech -""" + The version of the OpenAPI document: 1.5.1 + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest -import datetime -import Monei -from Monei.models.payment_payment_method_card_input import PaymentPaymentMethodCardInput # noqa: E501 -from Monei.rest import ApiException +from Monei.models.payment_payment_method_card_input import PaymentPaymentMethodCardInput class TestPaymentPaymentMethodCardInput(unittest.TestCase): """PaymentPaymentMethodCardInput unit test stubs""" @@ -28,30 +25,32 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional): + def make_instance(self, include_optional) -> PaymentPaymentMethodCardInput: """Test PaymentPaymentMethodCardInput - include_option is a boolean, when False only required + include_optional is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = Monei.models.payment_payment_method_card_input.PaymentPaymentMethodCardInput() # noqa: E501 - if include_optional : + # uncomment below to create an instance of `PaymentPaymentMethodCardInput` + """ + model = PaymentPaymentMethodCardInput() + if include_optional: return PaymentPaymentMethodCardInput( - number = '0', - cvc = '0', - exp_month = '0', - exp_year = '0', - cardholder_name = 'John Doe', + number = '', + cvc = '', + exp_month = '', + exp_year = '', + cardholder_name = 'John Doe', cardholder_email = 'john.doe@monei.com' ) - else : + else: return PaymentPaymentMethodCardInput( ) + """ def testPaymentPaymentMethodCardInput(self): """Test PaymentPaymentMethodCardInput""" - inst_req_only = self.make_instance(include_optional=False) - inst_req_and_optional = self.make_instance(include_optional=True) - + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/test/test_payment_payment_method_cofidis.py b/test/test_payment_payment_method_cofidis.py index ab71381..b821f89 100644 --- a/test/test_payment_payment_method_cofidis.py +++ b/test/test_payment_payment_method_cofidis.py @@ -3,21 +3,18 @@ """ MONEI API v1 - The MONEI API is organized around [REST](https://en.wikipedia.org/wiki/Representational_State_Transfer). Our API has predictable resource-oriented URLs, accepts JSON-encoded request bodies, returns JSON-encoded responses, and uses standard HTTP response codes, authentication, and verbs.

**Base URL:** https://api.monei.com/v1

**Client libraries:** # noqa: E501 +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

- The version of the OpenAPI document: 1.1.0 - Generated by: https://openapi-generator.tech -""" + The version of the OpenAPI document: 1.5.1 + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest -import datetime -import Monei -from Monei.models.payment_payment_method_cofidis import PaymentPaymentMethodCofidis # noqa: E501 -from Monei.rest import ApiException +from Monei.models.payment_payment_method_cofidis import PaymentPaymentMethodCofidis class TestPaymentPaymentMethodCofidis(unittest.TestCase): """PaymentPaymentMethodCofidis unit test stubs""" @@ -28,25 +25,27 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional): + def make_instance(self, include_optional) -> PaymentPaymentMethodCofidis: """Test PaymentPaymentMethodCofidis - include_option is a boolean, when False only required + include_optional is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = Monei.models.payment_payment_method_cofidis.PaymentPaymentMethodCofidis() # noqa: E501 - if include_optional : + # uncomment below to create an instance of `PaymentPaymentMethodCofidis` + """ + model = PaymentPaymentMethodCofidis() + if include_optional: return PaymentPaymentMethodCofidis( - order_id = '0' + order_id = '' ) - else : + else: return PaymentPaymentMethodCofidis( ) + """ def testPaymentPaymentMethodCofidis(self): """Test PaymentPaymentMethodCofidis""" - inst_req_only = self.make_instance(include_optional=False) - inst_req_and_optional = self.make_instance(include_optional=True) - + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/test/test_payment_payment_method_input.py b/test/test_payment_payment_method_input.py index 9a4b7b5..392b7a4 100644 --- a/test/test_payment_payment_method_input.py +++ b/test/test_payment_payment_method_input.py @@ -3,21 +3,18 @@ """ MONEI API v1 - The MONEI API is organized around [REST](https://en.wikipedia.org/wiki/Representational_State_Transfer). Our API has predictable resource-oriented URLs, accepts JSON-encoded request bodies, returns JSON-encoded responses, and uses standard HTTP response codes, authentication, and verbs. # noqa: E501 +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

- The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" + The version of the OpenAPI document: 1.5.1 + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest -import datetime -import MONEI PYTHON SDK -from MONEI PYTHON SDK.models.payment_payment_method_input import PaymentPaymentMethodInput # noqa: E501 -from MONEI PYTHON SDK.rest import ApiException +from Monei.models.payment_payment_method_input import PaymentPaymentMethodInput class TestPaymentPaymentMethodInput(unittest.TestCase): """PaymentPaymentMethodInput unit test stubs""" @@ -28,29 +25,35 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional): + def make_instance(self, include_optional) -> PaymentPaymentMethodInput: """Test PaymentPaymentMethodInput - include_option is a boolean, when False only required + include_optional is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = MONEI PYTHON SDK.models.payment_payment_method_input.PaymentPaymentMethodInput() # noqa: E501 - if include_optional : + # uncomment below to create an instance of `PaymentPaymentMethodInput` + """ + model = PaymentPaymentMethodInput() + if include_optional: return PaymentPaymentMethodInput( - card = MONEI PYTHON SDK.models.card.Card( - number = '0', - cvc = '0', - exp_month = '0', - exp_year = '0', ) + card = Monei.models.payment_payment_method_card_input.Payment-PaymentMethodCardInput( + number = '', + cvc = '', + exp_month = '', + exp_year = '', + cardholder_name = 'John Doe', + cardholder_email = 'john.doe@monei.com', ), + bizum = Monei.models.payment_payment_method_bizum_input.Payment-PaymentMethodBizumInput( + phone_number = '', ) ) - else : + else: return PaymentPaymentMethodInput( ) + """ def testPaymentPaymentMethodInput(self): """Test PaymentPaymentMethodInput""" - inst_req_only = self.make_instance(include_optional=False) - inst_req_and_optional = self.make_instance(include_optional=True) - + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/test/test_payment_payment_method_klarna.py b/test/test_payment_payment_method_klarna.py index c92d5c3..cdbfcf2 100644 --- a/test/test_payment_payment_method_klarna.py +++ b/test/test_payment_payment_method_klarna.py @@ -3,21 +3,18 @@ """ MONEI API v1 -

The MONEI API is organized around REST. Our API has predictable resource-oriented URLs, accepts JSON-encoded request bodies, returns JSON-encoded responses, and uses standard HTTP response codes, authentication, and verbs.

Base URL:

https://api.monei.com/v1

Client libraries:

Important:

If you are not using our official SDKs, you need to provide a valid User-Agent header in each request, otherwise your requests will be rejected.

# noqa: E501 +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

- The version of the OpenAPI document: 1.4.2 - Generated by: https://openapi-generator.tech -""" + The version of the OpenAPI document: 1.5.1 + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest -import datetime -import Monei -from Monei.models.payment_payment_method_klarna import PaymentPaymentMethodKlarna # noqa: E501 -from Monei.rest import ApiException +from Monei.models.payment_payment_method_klarna import PaymentPaymentMethodKlarna class TestPaymentPaymentMethodKlarna(unittest.TestCase): """PaymentPaymentMethodKlarna unit test stubs""" @@ -28,26 +25,28 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional): + def make_instance(self, include_optional) -> PaymentPaymentMethodKlarna: """Test PaymentPaymentMethodKlarna - include_option is a boolean, when False only required + include_optional is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = Monei.models.payment_payment_method_klarna.PaymentPaymentMethodKlarna() # noqa: E501 - if include_optional : + # uncomment below to create an instance of `PaymentPaymentMethodKlarna` + """ + model = PaymentPaymentMethodKlarna() + if include_optional: return PaymentPaymentMethodKlarna( - billing_category = PAY_LATER, - auth_payment_method = card + billing_category = 'PAY_LATER', + auth_payment_method = 'card' ) - else : + else: return PaymentPaymentMethodKlarna( ) + """ def testPaymentPaymentMethodKlarna(self): """Test PaymentPaymentMethodKlarna""" - inst_req_only = self.make_instance(include_optional=False) - inst_req_and_optional = self.make_instance(include_optional=True) - + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/test/test_payment_payment_method_mbway.py b/test/test_payment_payment_method_mbway.py index 316afe5..bd3f3a1 100644 --- a/test/test_payment_payment_method_mbway.py +++ b/test/test_payment_payment_method_mbway.py @@ -3,21 +3,18 @@ """ MONEI API v1 -

The MONEI API is organized around REST. Our API has predictable resource-oriented URLs, accepts JSON-encoded request bodies, returns JSON-encoded responses, and uses standard HTTP response codes, authentication, and verbs.

Base URL:

https://api.monei.com/v1

Client libraries:

Important:

If you are not using our official SDKs, you need to provide a valid User-Agent header in each request, otherwise your requests will be rejected.

# noqa: E501 +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

- The version of the OpenAPI document: 1.4.2 - Generated by: https://openapi-generator.tech -""" + The version of the OpenAPI document: 1.5.1 + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest -import datetime -import Monei -from Monei.models.payment_payment_method_mbway import PaymentPaymentMethodMbway # noqa: E501 -from Monei.rest import ApiException +from Monei.models.payment_payment_method_mbway import PaymentPaymentMethodMbway class TestPaymentPaymentMethodMbway(unittest.TestCase): """PaymentPaymentMethodMbway unit test stubs""" @@ -28,25 +25,27 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional): + def make_instance(self, include_optional) -> PaymentPaymentMethodMbway: """Test PaymentPaymentMethodMbway - include_option is a boolean, when False only required + include_optional is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = Monei.models.payment_payment_method_mbway.PaymentPaymentMethodMbway() # noqa: E501 - if include_optional : + # uncomment below to create an instance of `PaymentPaymentMethodMbway` + """ + model = PaymentPaymentMethodMbway() + if include_optional: return PaymentPaymentMethodMbway( - phone_number = '0' + phone_number = '' ) - else : + else: return PaymentPaymentMethodMbway( ) + """ def testPaymentPaymentMethodMbway(self): """Test PaymentPaymentMethodMbway""" - inst_req_only = self.make_instance(include_optional=False) - inst_req_and_optional = self.make_instance(include_optional=True) - + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/test/test_payment_payment_method_paypal.py b/test/test_payment_payment_method_paypal.py index 61fa40d..758902c 100644 --- a/test/test_payment_payment_method_paypal.py +++ b/test/test_payment_payment_method_paypal.py @@ -3,21 +3,18 @@ """ MONEI API v1 - The MONEI API is organized around [REST](https://en.wikipedia.org/wiki/Representational_State_Transfer). Our API has predictable resource-oriented URLs, accepts JSON-encoded request bodies, returns JSON-encoded responses, and uses standard HTTP response codes, authentication, and verbs. # noqa: E501 +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

- The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" + The version of the OpenAPI document: 1.5.1 + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest -import datetime -import MONEI PYTHON SDK -from MONEI PYTHON SDK.models.payment_payment_method_paypal import PaymentPaymentMethodPaypal # noqa: E501 -from MONEI PYTHON SDK.rest import ApiException +from Monei.models.payment_payment_method_paypal import PaymentPaymentMethodPaypal class TestPaymentPaymentMethodPaypal(unittest.TestCase): """PaymentPaymentMethodPaypal unit test stubs""" @@ -28,25 +25,27 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional): + def make_instance(self, include_optional) -> PaymentPaymentMethodPaypal: """Test PaymentPaymentMethodPaypal - include_option is a boolean, when False only required + include_optional is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = MONEI PYTHON SDK.models.payment_payment_method_paypal.PaymentPaymentMethodPaypal() # noqa: E501 - if include_optional : + # uncomment below to create an instance of `PaymentPaymentMethodPaypal` + """ + model = PaymentPaymentMethodPaypal() + if include_optional: return PaymentPaymentMethodPaypal( - order_id = '0' + order_id = '' ) - else : + else: return PaymentPaymentMethodPaypal( ) + """ def testPaymentPaymentMethodPaypal(self): """Test PaymentPaymentMethodPaypal""" - inst_req_only = self.make_instance(include_optional=False) - inst_req_and_optional = self.make_instance(include_optional=True) - + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/test/test_payment_payment_method_sepa.py b/test/test_payment_payment_method_sepa.py index 74803f8..bfe6799 100644 --- a/test/test_payment_payment_method_sepa.py +++ b/test/test_payment_payment_method_sepa.py @@ -3,21 +3,18 @@ """ MONEI API v1 -

The MONEI API is organized around REST. Our API has predictable resource-oriented URLs, accepts JSON-encoded request bodies, returns JSON-encoded responses, and uses standard HTTP response codes, authentication, and verbs.

Base URL:

https://api.monei.com/v1

Client libraries:

Important:

If you are not using our official SDKs, you need to provide a valid User-Agent header in each request, otherwise your requests will be rejected.

# noqa: E501 +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

- The version of the OpenAPI document: 1.4.2 - Generated by: https://openapi-generator.tech -""" + The version of the OpenAPI document: 1.5.1 + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest -import datetime -import Monei -from Monei.models.payment_payment_method_sepa import PaymentPaymentMethodSepa # noqa: E501 -from Monei.rest import ApiException +from Monei.models.payment_payment_method_sepa import PaymentPaymentMethodSepa class TestPaymentPaymentMethodSepa(unittest.TestCase): """PaymentPaymentMethodSepa unit test stubs""" @@ -28,33 +25,35 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional): + def make_instance(self, include_optional) -> PaymentPaymentMethodSepa: """Test PaymentPaymentMethodSepa - include_option is a boolean, when False only required + include_optional is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = Monei.models.payment_payment_method_sepa.PaymentPaymentMethodSepa() # noqa: E501 - if include_optional : + # uncomment below to create an instance of `PaymentPaymentMethodSepa` + """ + model = PaymentPaymentMethodSepa() + if include_optional: return PaymentPaymentMethodSepa( - accountholder_address = '0', - accountholder_email = '0', - accountholder_name = '0', - country_code = '0', - bank_address = '0', - bank_code = '0', - bank_name = '0', - bic = '0', - last4 = '0' + accountholder_address = '', + accountholder_email = '', + accountholder_name = '', + country_code = '', + bank_address = '', + bank_code = '', + bank_name = '', + bic = '', + last4 = '' ) - else : + else: return PaymentPaymentMethodSepa( ) + """ def testPaymentPaymentMethodSepa(self): """Test PaymentPaymentMethodSepa""" - inst_req_only = self.make_instance(include_optional=False) - inst_req_and_optional = self.make_instance(include_optional=True) - + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/test/test_payment_payment_method_trustly.py b/test/test_payment_payment_method_trustly.py index 4209831..078702d 100644 --- a/test/test_payment_payment_method_trustly.py +++ b/test/test_payment_payment_method_trustly.py @@ -3,21 +3,18 @@ """ MONEI API v1 -

The MONEI API is organized around REST. Our API has predictable resource-oriented URLs, accepts JSON-encoded request bodies, returns JSON-encoded responses, and uses standard HTTP response codes, authentication, and verbs.

Base URL:

https://api.monei.com/v1

Client libraries:

Important:

If you are not using our official SDKs, you need to provide a valid User-Agent header in each request, otherwise your requests will be rejected.

# noqa: E501 +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

- The version of the OpenAPI document: 1.4.2 - Generated by: https://openapi-generator.tech -""" + The version of the OpenAPI document: 1.5.1 + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest -import datetime -import Monei -from Monei.models.payment_payment_method_trustly import PaymentPaymentMethodTrustly # noqa: E501 -from Monei.rest import ApiException +from Monei.models.payment_payment_method_trustly import PaymentPaymentMethodTrustly class TestPaymentPaymentMethodTrustly(unittest.TestCase): """PaymentPaymentMethodTrustly unit test stubs""" @@ -28,25 +25,27 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional): + def make_instance(self, include_optional) -> PaymentPaymentMethodTrustly: """Test PaymentPaymentMethodTrustly - include_option is a boolean, when False only required + include_optional is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = Monei.models.payment_payment_method_trustly.PaymentPaymentMethodTrustly() # noqa: E501 - if include_optional : + # uncomment below to create an instance of `PaymentPaymentMethodTrustly` + """ + model = PaymentPaymentMethodTrustly() + if include_optional: return PaymentPaymentMethodTrustly( - customer_id = '0' + customer_id = '' ) - else : + else: return PaymentPaymentMethodTrustly( ) + """ def testPaymentPaymentMethodTrustly(self): """Test PaymentPaymentMethodTrustly""" - inst_req_only = self.make_instance(include_optional=False) - inst_req_and_optional = self.make_instance(include_optional=True) - + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/test/test_payment_payment_methods.py b/test/test_payment_payment_methods.py deleted file mode 100644 index 88937e9..0000000 --- a/test/test_payment_payment_methods.py +++ /dev/null @@ -1,35 +0,0 @@ -""" - MONEI API v1 - -

The MONEI API is organized around REST. Our API has predictable resource-oriented URLs, accepts JSON-encoded request bodies, returns JSON-encoded responses, and uses standard HTTP response codes, authentication, and verbs.

Base URL:

https://api.monei.com/v1

Client libraries:

Important:

If you are not using our official SDKs, you need to provide a valid User-Agent header in each request, otherwise your requests will be rejected.

# noqa: E501 - - The version of the OpenAPI document: 1.2.2 - Generated by: https://openapi-generator.tech -""" - - -import sys -import unittest - -import Monei -from Monei.model.payment_payment_methods import PaymentPaymentMethods - - -class TestPaymentPaymentMethods(unittest.TestCase): - """PaymentPaymentMethods unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testPaymentPaymentMethods(self): - """Test PaymentPaymentMethods""" - # FIXME: construct object with mandatory attributes with example values - # model = PaymentPaymentMethods() # noqa: E501 - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_payment_refund_reason.py b/test/test_payment_refund_reason.py index 22ce65f..ae60611 100644 --- a/test/test_payment_refund_reason.py +++ b/test/test_payment_refund_reason.py @@ -3,21 +3,18 @@ """ MONEI API v1 - The MONEI API is organized around [REST](https://en.wikipedia.org/wiki/Representational_State_Transfer). Our API has predictable resource-oriented URLs, accepts JSON-encoded request bodies, returns JSON-encoded responses, and uses standard HTTP response codes, authentication, and verbs. # noqa: E501 +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

- The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" + The version of the OpenAPI document: 1.5.1 + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest -import datetime -import MONEI PYTHON SDK -from MONEI PYTHON SDK.models.payment_refund_reason import PaymentRefundReason # noqa: E501 -from MONEI PYTHON SDK.rest import ApiException +from Monei.models.payment_refund_reason import PaymentRefundReason class TestPaymentRefundReason(unittest.TestCase): """PaymentRefundReason unit test stubs""" @@ -28,24 +25,9 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional): - """Test PaymentRefundReason - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # model = MONEI PYTHON SDK.models.payment_refund_reason.PaymentRefundReason() # noqa: E501 - if include_optional : - return PaymentRefundReason( - ) - else : - return PaymentRefundReason( - ) - def testPaymentRefundReason(self): """Test PaymentRefundReason""" - inst_req_only = self.make_instance(include_optional=False) - inst_req_and_optional = self.make_instance(include_optional=True) - + # inst = PaymentRefundReason() if __name__ == '__main__': unittest.main() diff --git a/test/test_payment_sequence.py b/test/test_payment_sequence.py index 69d3118..8bce7e3 100644 --- a/test/test_payment_sequence.py +++ b/test/test_payment_sequence.py @@ -3,21 +3,18 @@ """ MONEI API v1 - The MONEI API is organized around [REST](https://en.wikipedia.org/wiki/Representational_State_Transfer). Our API has predictable resource-oriented URLs, accepts JSON-encoded request bodies, returns JSON-encoded responses, and uses standard HTTP response codes, authentication, and verbs. # noqa: E501 +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

- The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" + The version of the OpenAPI document: 1.5.1 + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest -import datetime -import MONEI PYTHON SDK -from MONEI PYTHON SDK.models.payment_sequence import PaymentSequence # noqa: E501 -from MONEI PYTHON SDK.rest import ApiException +from Monei.models.payment_sequence import PaymentSequence class TestPaymentSequence(unittest.TestCase): """PaymentSequence unit test stubs""" @@ -28,29 +25,31 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional): + def make_instance(self, include_optional) -> PaymentSequence: """Test PaymentSequence - include_option is a boolean, when False only required + include_optional is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = MONEI PYTHON SDK.models.payment_sequence.PaymentSequence() # noqa: E501 - if include_optional : + # uncomment below to create an instance of `PaymentSequence` + """ + model = PaymentSequence() + if include_optional: return PaymentSequence( - type = 'recurring', - recurring = MONEI PYTHON SDK.models.payment_sequence_recurring.Payment-SequenceRecurring( + type = 'recurring', + recurring = Monei.models.payment_sequence_recurring.Payment-SequenceRecurring( expiry = '*(The payment method or card expiration)*', frequency = 30, ) ) - else : + else: return PaymentSequence( type = 'recurring', ) + """ def testPaymentSequence(self): """Test PaymentSequence""" - inst_req_only = self.make_instance(include_optional=False) - inst_req_and_optional = self.make_instance(include_optional=True) - + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/test/test_payment_sequence_recurring.py b/test/test_payment_sequence_recurring.py index f1679fc..10c8977 100644 --- a/test/test_payment_sequence_recurring.py +++ b/test/test_payment_sequence_recurring.py @@ -3,21 +3,18 @@ """ MONEI API v1 - The MONEI API is organized around [REST](https://en.wikipedia.org/wiki/Representational_State_Transfer). Our API has predictable resource-oriented URLs, accepts JSON-encoded request bodies, returns JSON-encoded responses, and uses standard HTTP response codes, authentication, and verbs. # noqa: E501 +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

- The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" + The version of the OpenAPI document: 1.5.1 + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest -import datetime -import MONEI PYTHON SDK -from MONEI PYTHON SDK.models.payment_sequence_recurring import PaymentSequenceRecurring # noqa: E501 -from MONEI PYTHON SDK.rest import ApiException +from Monei.models.payment_sequence_recurring import PaymentSequenceRecurring class TestPaymentSequenceRecurring(unittest.TestCase): """PaymentSequenceRecurring unit test stubs""" @@ -28,26 +25,28 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional): + def make_instance(self, include_optional) -> PaymentSequenceRecurring: """Test PaymentSequenceRecurring - include_option is a boolean, when False only required + include_optional is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = MONEI PYTHON SDK.models.payment_sequence_recurring.PaymentSequenceRecurring() # noqa: E501 - if include_optional : + # uncomment below to create an instance of `PaymentSequenceRecurring` + """ + model = PaymentSequenceRecurring() + if include_optional: return PaymentSequenceRecurring( - expiry = '*(The payment method or card expiration)*', + expiry = '*(The payment method or card expiration)*', frequency = 30 ) - else : + else: return PaymentSequenceRecurring( ) + """ def testPaymentSequenceRecurring(self): """Test PaymentSequenceRecurring""" - inst_req_only = self.make_instance(include_optional=False) - inst_req_and_optional = self.make_instance(include_optional=True) - + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/test/test_payment_session_details.py b/test/test_payment_session_details.py index 06f7e12..29e3049 100644 --- a/test/test_payment_session_details.py +++ b/test/test_payment_session_details.py @@ -3,21 +3,18 @@ """ MONEI API v1 - The MONEI API is organized around [REST](https://en.wikipedia.org/wiki/Representational_State_Transfer). Our API has predictable resource-oriented URLs, accepts JSON-encoded request bodies, returns JSON-encoded responses, and uses standard HTTP response codes, authentication, and verbs. # noqa: E501 +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

- The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" + The version of the OpenAPI document: 1.5.1 + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest -import datetime -import MONEI PYTHON SDK -from MONEI PYTHON SDK.models.payment_session_details import PaymentSessionDetails # noqa: E501 -from MONEI PYTHON SDK.rest import ApiException +from Monei.models.payment_session_details import PaymentSessionDetails class TestPaymentSessionDetails(unittest.TestCase): """PaymentSessionDetails unit test stubs""" @@ -28,36 +25,43 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional): + def make_instance(self, include_optional) -> PaymentSessionDetails: """Test PaymentSessionDetails - include_option is a boolean, when False only required + include_optional is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = MONEI PYTHON SDK.models.payment_session_details.PaymentSessionDetails() # noqa: E501 - if include_optional : + # uncomment below to create an instance of `PaymentSessionDetails` + """ + model = PaymentSessionDetails() + if include_optional: return PaymentSessionDetails( - ip = '100.100.200.100', - country_code = 'ES', - lang = 'es', - device_type = 'desktop', - device_model = '0', - browser = 'Chrome', - browser_version = '83.0.4103.116', - os = 'Mac OS', - os_version = '10.15.4', - source = 'MONEI/PHP', - source_version = '0.1.2', - user_agent = 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) ...' + ip = '100.100.200.100', + country_code = 'ES', + lang = 'es', + device_type = 'desktop', + device_model = '', + browser = 'Chrome', + browser_version = '83.0.4103.116', + os = 'Mac OS', + os_version = '10.15.4', + source = 'MONEI/PHP', + source_version = '0.1.2', + user_agent = 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) ...', + browser_accept = 'text/html,application/xhtml+xml,application/json', + browser_color_depth = 24, + browser_screen_height = 1152, + browser_screen_width = 2048, + browser_timezone_offset = 'string' ) - else : + else: return PaymentSessionDetails( ) + """ def testPaymentSessionDetails(self): """Test PaymentSessionDetails""" - inst_req_only = self.make_instance(include_optional=False) - inst_req_and_optional = self.make_instance(include_optional=True) - + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/test/test_payment_shipping_details.py b/test/test_payment_shipping_details.py index 3da689d..fb97dbb 100644 --- a/test/test_payment_shipping_details.py +++ b/test/test_payment_shipping_details.py @@ -3,21 +3,18 @@ """ MONEI API v1 - The MONEI API is organized around [REST](https://en.wikipedia.org/wiki/Representational_State_Transfer). Our API has predictable resource-oriented URLs, accepts JSON-encoded request bodies, returns JSON-encoded responses, and uses standard HTTP response codes, authentication, and verbs. # noqa: E501 +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

- The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" + The version of the OpenAPI document: 1.5.1 + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest -import datetime -import MONEI PYTHON SDK -from MONEI PYTHON SDK.models.payment_shipping_details import PaymentShippingDetails # noqa: E501 -from MONEI PYTHON SDK.rest import ApiException +from Monei.models.payment_shipping_details import PaymentShippingDetails class TestPaymentShippingDetails(unittest.TestCase): """PaymentShippingDetails unit test stubs""" @@ -28,35 +25,38 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional): + def make_instance(self, include_optional) -> PaymentShippingDetails: """Test PaymentShippingDetails - include_option is a boolean, when False only required + include_optional is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = MONEI PYTHON SDK.models.payment_shipping_details.PaymentShippingDetails() # noqa: E501 - if include_optional : + # uncomment below to create an instance of `PaymentShippingDetails` + """ + model = PaymentShippingDetails() + if include_optional: return PaymentShippingDetails( - name = 'John Doe', - email = 'john.doe@microapps.com', - phone = '0', - company = '0', - address = MONEI PYTHON SDK.models.address.Address( + name = 'John Doe', + email = 'john.doe@example.com', + phone = '', + company = '', + tax_id = '', + address = Monei.models.address.Address( country = 'ES', city = 'Málaga', line1 = 'Fake Street 123', - line2 = '0', + line2 = '', zip = '1234', state = 'Málaga', ) ) - else : + else: return PaymentShippingDetails( ) + """ def testPaymentShippingDetails(self): """Test PaymentShippingDetails""" - inst_req_only = self.make_instance(include_optional=False) - inst_req_and_optional = self.make_instance(include_optional=True) - + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/test/test_payment_shop.py b/test/test_payment_shop.py index 6c2ed38..d380589 100644 --- a/test/test_payment_shop.py +++ b/test/test_payment_shop.py @@ -3,21 +3,18 @@ """ MONEI API v1 - The MONEI API is organized around [REST](https://en.wikipedia.org/wiki/Representational_State_Transfer). Our API has predictable resource-oriented URLs, accepts JSON-encoded request bodies, returns JSON-encoded responses, and uses standard HTTP response codes, authentication, and verbs. # noqa: E501 +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

- The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" + The version of the OpenAPI document: 1.5.1 + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest -import datetime -import MONEI PYTHON SDK -from MONEI PYTHON SDK.models.payment_shop import PaymentShop # noqa: E501 -from MONEI PYTHON SDK.rest import ApiException +from Monei.models.payment_shop import PaymentShop class TestPaymentShop(unittest.TestCase): """PaymentShop unit test stubs""" @@ -28,26 +25,28 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional): + def make_instance(self, include_optional) -> PaymentShop: """Test PaymentShop - include_option is a boolean, when False only required + include_optional is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = MONEI PYTHON SDK.models.payment_shop.PaymentShop() # noqa: E501 - if include_optional : + # uncomment below to create an instance of `PaymentShop` + """ + model = PaymentShop() + if include_optional: return PaymentShop( - name = 'Test Shop', + name = 'Test Shop', country = 'ES' ) - else : + else: return PaymentShop( ) + """ def testPaymentShop(self): """Test PaymentShop""" - inst_req_only = self.make_instance(include_optional=False) - inst_req_and_optional = self.make_instance(include_optional=True) - + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/test/test_payment_status.py b/test/test_payment_status.py index 9e96838..652a7a8 100644 --- a/test/test_payment_status.py +++ b/test/test_payment_status.py @@ -3,21 +3,18 @@ """ MONEI API v1 - The MONEI API is organized around [REST](https://en.wikipedia.org/wiki/Representational_State_Transfer). Our API has predictable resource-oriented URLs, accepts JSON-encoded request bodies, returns JSON-encoded responses, and uses standard HTTP response codes, authentication, and verbs. # noqa: E501 +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

- The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" + The version of the OpenAPI document: 1.5.1 + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest -import datetime -import MONEI PYTHON SDK -from MONEI PYTHON SDK.models.payment_status import PaymentStatus # noqa: E501 -from MONEI PYTHON SDK.rest import ApiException +from Monei.models.payment_status import PaymentStatus class TestPaymentStatus(unittest.TestCase): """PaymentStatus unit test stubs""" @@ -28,24 +25,9 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional): - """Test PaymentStatus - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # model = MONEI PYTHON SDK.models.payment_status.PaymentStatus() # noqa: E501 - if include_optional : - return PaymentStatus( - ) - else : - return PaymentStatus( - ) - def testPaymentStatus(self): """Test PaymentStatus""" - inst_req_only = self.make_instance(include_optional=False) - inst_req_and_optional = self.make_instance(include_optional=True) - + # inst = PaymentStatus() if __name__ == '__main__': unittest.main() diff --git a/test/test_payment_trace_details.py b/test/test_payment_trace_details.py index c103d8b..ba1519f 100644 --- a/test/test_payment_trace_details.py +++ b/test/test_payment_trace_details.py @@ -3,21 +3,18 @@ """ MONEI API v1 - The MONEI API is organized around [REST](https://en.wikipedia.org/wiki/Representational_State_Transfer). Our API has predictable resource-oriented URLs, accepts JSON-encoded request bodies, returns JSON-encoded responses, and uses standard HTTP response codes, authentication, and verbs. # noqa: E501 +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

- The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" + The version of the OpenAPI document: 1.5.1 + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest -import datetime -import MONEI PYTHON SDK -from MONEI PYTHON SDK.models.payment_trace_details import PaymentTraceDetails # noqa: E501 -from MONEI PYTHON SDK.rest import ApiException +from Monei.models.payment_trace_details import PaymentTraceDetails class TestPaymentTraceDetails(unittest.TestCase): """PaymentTraceDetails unit test stubs""" @@ -28,38 +25,45 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional): + def make_instance(self, include_optional) -> PaymentTraceDetails: """Test PaymentTraceDetails - include_option is a boolean, when False only required + include_optional is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = MONEI PYTHON SDK.models.payment_trace_details.PaymentTraceDetails() # noqa: E501 - if include_optional : + # uncomment below to create an instance of `PaymentTraceDetails` + """ + model = PaymentTraceDetails() + if include_optional: return PaymentTraceDetails( - ip = '100.100.200.100', - country_code = 'ES', - lang = 'es', - device_type = 'desktop', - device_model = '0', - browser = 'Chrome', - browser_version = '83.0.4103.116', - os = 'Mac OS', - os_version = '10.15.4', - source = 'MONEI/PHP', - source_version = '0.1.2', - user_agent = 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) ...', - user_id = '0', + ip = '100.100.200.100', + country_code = 'ES', + lang = 'es', + device_type = 'desktop', + device_model = '', + browser = 'Chrome', + browser_version = '83.0.4103.116', + os = 'Mac OS', + os_version = '10.15.4', + source = 'MONEI/PHP', + source_version = '0.1.2', + user_agent = 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) ...', + browser_accept = 'text/html,application/xhtml+xml,application/json', + browser_color_depth = 24, + browser_screen_height = 1152, + browser_screen_width = 2048, + browser_timezone_offset = 'string', + user_id = '', user_email = 'user@example.com' ) - else : + else: return PaymentTraceDetails( ) + """ def testPaymentTraceDetails(self): """Test PaymentTraceDetails""" - inst_req_only = self.make_instance(include_optional=False) - inst_req_and_optional = self.make_instance(include_optional=True) - + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/test/test_payment_transaction_type.py b/test/test_payment_transaction_type.py index 9930d30..83a98d5 100644 --- a/test/test_payment_transaction_type.py +++ b/test/test_payment_transaction_type.py @@ -3,21 +3,18 @@ """ MONEI API v1 - The MONEI API is organized around [REST](https://en.wikipedia.org/wiki/Representational_State_Transfer). Our API has predictable resource-oriented URLs, accepts JSON-encoded request bodies, returns JSON-encoded responses, and uses standard HTTP response codes, authentication, and verbs. # noqa: E501 +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

- The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" + The version of the OpenAPI document: 1.5.1 + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest -import datetime -import MONEI PYTHON SDK -from MONEI PYTHON SDK.models.payment_transaction_type import PaymentTransactionType # noqa: E501 -from MONEI PYTHON SDK.rest import ApiException +from Monei.models.payment_transaction_type import PaymentTransactionType class TestPaymentTransactionType(unittest.TestCase): """PaymentTransactionType unit test stubs""" @@ -28,24 +25,9 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional): - """Test PaymentTransactionType - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # model = MONEI PYTHON SDK.models.payment_transaction_type.PaymentTransactionType() # noqa: E501 - if include_optional : - return PaymentTransactionType( - ) - else : - return PaymentTransactionType( - ) - def testPaymentTransactionType(self): """Test PaymentTransactionType""" - inst_req_only = self.make_instance(include_optional=False) - inst_req_and_optional = self.make_instance(include_optional=True) - + # inst = PaymentTransactionType() if __name__ == '__main__': unittest.main() diff --git a/test/test_payments.py b/test/test_payments.py deleted file mode 100644 index a0ae9e4..0000000 --- a/test/test_payments.py +++ /dev/null @@ -1,33 +0,0 @@ -""" -Unit tests for the payments API. -""" - -from unittest.mock import MagicMock - - -class TestPaymentsApi: - """Tests for the payments API.""" - - def test_create_payment(self, monei_client, mock_payment_response, mock_http_client): - """Test creating a payment.""" - # Configure the mock to return a successful response - mock_response = MagicMock() - mock_response.data = mock_payment_response - mock_http_client.return_value = mock_response - - # Create a payment - payment_data = { - "amount": 1250, - "orderId": "100200000001", - "currency": "EUR", - "description": "Test payment", - "customer": {"email": "john.doe@monei.com", "name": "John Doe"}, - } - result = monei_client.payments.create(payment_data) - - # Check that the request was made correctly - mock_http_client.assert_called_once() - assert result == mock_payment_response - assert result["amount"] == 1250 - assert result["currency"] == "EUR" - assert result["status"] == "COMPLETED" \ No newline at end of file diff --git a/test/test_payments_api.py b/test/test_payments_api.py index e808592..3334270 100644 --- a/test/test_payments_api.py +++ b/test/test_payments_api.py @@ -3,77 +3,96 @@ """ MONEI API v1 - The MONEI API is organized around [REST](https://en.wikipedia.org/wiki/Representational_State_Transfer). Our API has predictable resource-oriented URLs, accepts JSON-encoded request bodies, returns JSON-encoded responses, and uses standard HTTP response codes, authentication, and verbs. # noqa: E501 +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

- The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" + The version of the OpenAPI document: 1.5.1 + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest -import MONEI PYTHON SDK -from MONEI PYTHON SDK.api.payments_api import PaymentsApi # noqa: E501 -from MONEI PYTHON SDK.rest import ApiException +from Monei.api.payments_api import PaymentsApi class TestPaymentsApi(unittest.TestCase): """PaymentsApi unit test stubs""" - def setUp(self): - self.api = MONEI PYTHON SDK.api.payments_api.PaymentsApi() # noqa: E501 + def setUp(self) -> None: + self.api = PaymentsApi() - def tearDown(self): + def tearDown(self) -> None: pass - def test_cancel(self): + def test_cancel(self) -> None: """Test case for cancel - Cancel Payment # noqa: E501 + Cancel Payment """ pass - def test_capture(self): + def test_capture(self) -> None: """Test case for capture - Capture Payment # noqa: E501 + Capture Payment """ pass - def test_confirm(self): + def test_confirm(self) -> None: """Test case for confirm - Confirm Payment # noqa: E501 + Confirm Payment """ pass - def test_create(self): + def test_create(self) -> None: """Test case for create - Create Payment # noqa: E501 + Create Payment """ pass - def test_get(self): + def test_get(self) -> None: """Test case for get - Get Payment # noqa: E501 + Get Payment """ pass - def test_recurring(self): + def test_recurring(self) -> None: """Test case for recurring - Recurring Payment # noqa: E501 + Recurring Payment """ pass - def test_refund(self): + def test_refund(self) -> None: """Test case for refund - Refund Payment # noqa: E501 + Refund Payment + """ + pass + + def test_send_link(self) -> None: + """Test case for send_link + + Send Payment Link + """ + pass + + def test_send_receipt(self) -> None: + """Test case for send_receipt + + Send Payment Receipt + """ + pass + + def test_send_request(self) -> None: + """Test case for send_request + + Send Payment Request """ pass diff --git a/test/test_payments_api_example.py b/test/test_payments_api_example.py new file mode 100644 index 0000000..65c5f77 --- /dev/null +++ b/test/test_payments_api_example.py @@ -0,0 +1,15 @@ +import pytest + + +@pytest.mark.unit +def test_mock_example(): + """A simple test example that doesn't rely on problematic models.""" + # This is just a placeholder test to demonstrate the test setup + assert True + + +@pytest.mark.requires_api +def test_skip_example(): + """This test will be skipped when SKIP_GENERATED_TESTS is set.""" + # This test would be skipped in CI or when SKIP_GENERATED_TESTS is set + assert True diff --git a/test/test_payments_api_integration.py b/test/test_payments_api_integration.py new file mode 100644 index 0000000..20f3e94 --- /dev/null +++ b/test/test_payments_api_integration.py @@ -0,0 +1,232 @@ +import pytest +from unittest.mock import patch, MagicMock + +from Monei.monei_client import MoneiClient +from Monei.api.payments_api import PaymentsApi +from Monei.model.create_payment_request import CreatePaymentRequest +from Monei.model.confirm_payment_request import ConfirmPaymentRequest +from Monei.model.capture_payment_request import CapturePaymentRequest +from Monei.model.refund_payment_request import RefundPaymentRequest +from Monei.model.cancel_payment_request import CancelPaymentRequest +from Monei.model.recurring_payment_request import RecurringPaymentRequest +from Monei.model.send_payment_link_request import SendPaymentLinkRequest +from Monei.model.send_payment_receipt_request import SendPaymentReceiptRequest +from Monei.model.send_payment_request_request import SendPaymentRequestRequest +from Monei.model.payment_status import PaymentStatus +from Monei.model.payment import Payment + + +@pytest.mark.unit +class TestPaymentsApiIntegration: + """Integration tests for the Payments API with mocked responses""" + + @pytest.fixture + def mock_payment_response(self): + """Fixture for a mock payment response""" + return { + "id": "pay_123456789", + "amount": 1000, + "currency": "EUR", + "status": PaymentStatus("PENDING"), + "description": "Test payment", + "created": "2023-01-01T12:00:00Z", + "updated": "2023-01-01T12:00:00Z", + } + + @pytest.fixture + def mock_client(self): + """Fixture for creating a mock client""" + return MoneiClient(api_key="test_api_key") + + @patch.object(PaymentsApi, "create") + def test_create_payment(self, mock_create, mock_client, mock_payment_response): + """Test creating a payment""" + mock_create.return_value = mock_payment_response + + payment_request = CreatePaymentRequest( + amount=1000, currency="EUR", description="Test payment" # 10.00 in cents + ) + + result = mock_client.Payments.create(create_payment_request=payment_request) + + assert result["id"] == "pay_123456789" + assert result["amount"] == 1000 + assert result["currency"] == "EUR" + assert result["status"] == PaymentStatus("PENDING") + mock_create.assert_called_once_with(create_payment_request=payment_request) + + @patch.object(PaymentsApi, "get") + def test_get_payment(self, mock_get, mock_client, mock_payment_response): + """Test retrieving a payment""" + mock_get.return_value = mock_payment_response + + result = mock_client.Payments.get(payment_id="pay_123456789") + + assert result["id"] == "pay_123456789" + assert result["status"] == PaymentStatus("PENDING") + mock_get.assert_called_once_with(payment_id="pay_123456789") + + @patch.object(PaymentsApi, "confirm") + def test_confirm_payment(self, mock_confirm, mock_client): + """Test confirming a payment""" + confirmed_payment = { + "id": "pay_123456789", + "amount": 1000, + "currency": "EUR", + "status": PaymentStatus("CONFIRMED"), + "description": "Test payment", + "created": "2023-01-01T12:00:00Z", + "updated": "2023-01-01T12:01:00Z", + } + mock_confirm.return_value = confirmed_payment + + confirm_request = ConfirmPaymentRequest() + result = mock_client.Payments.confirm( + payment_id="pay_123456789", confirm_payment_request=confirm_request + ) + + assert result["id"] == "pay_123456789" + assert result["status"] == PaymentStatus("CONFIRMED") + mock_confirm.assert_called_once_with( + payment_id="pay_123456789", confirm_payment_request=confirm_request + ) + + @patch.object(PaymentsApi, "capture") + def test_capture_payment(self, mock_capture, mock_client): + """Test capturing a payment""" + captured_payment = { + "id": "pay_123456789", + "amount": 1000, + "currency": "EUR", + "status": PaymentStatus("COMPLETED"), + "description": "Test payment", + "created": "2023-01-01T12:00:00Z", + "updated": "2023-01-01T12:02:00Z", + } + mock_capture.return_value = captured_payment + + capture_request = CapturePaymentRequest(amount=1000) + result = mock_client.Payments.capture( + payment_id="pay_123456789", capture_payment_request=capture_request + ) + + assert result["id"] == "pay_123456789" + assert result["status"] == PaymentStatus("COMPLETED") + mock_capture.assert_called_once_with( + payment_id="pay_123456789", capture_payment_request=capture_request + ) + + @patch.object(PaymentsApi, "refund") + def test_refund_payment(self, mock_refund, mock_client): + """Test refunding a payment""" + refunded_payment = { + "id": "pay_123456789", + "amount": 1000, + "currency": "EUR", + "status": PaymentStatus("REFUNDED"), + "description": "Test payment", + "created": "2023-01-01T12:00:00Z", + "updated": "2023-01-01T12:03:00Z", + } + mock_refund.return_value = refunded_payment + + refund_request = RefundPaymentRequest(amount=1000) + result = mock_client.Payments.refund( + payment_id="pay_123456789", refund_payment_request=refund_request + ) + + assert result["id"] == "pay_123456789" + assert result["status"] == PaymentStatus("REFUNDED") + mock_refund.assert_called_once_with( + payment_id="pay_123456789", refund_payment_request=refund_request + ) + + @patch.object(PaymentsApi, "cancel") + def test_cancel_payment(self, mock_cancel, mock_client): + """Test canceling a payment""" + canceled_payment = { + "id": "pay_123456789", + "amount": 1000, + "currency": "EUR", + "status": PaymentStatus("CANCELED"), + "description": "Test payment", + "created": "2023-01-01T12:00:00Z", + "updated": "2023-01-01T12:04:00Z", + } + mock_cancel.return_value = canceled_payment + + cancel_request = CancelPaymentRequest() + result = mock_client.Payments.cancel( + payment_id="pay_123456789", cancel_payment_request=cancel_request + ) + + assert result["id"] == "pay_123456789" + assert result["status"] == PaymentStatus("CANCELED") + mock_cancel.assert_called_once_with( + payment_id="pay_123456789", cancel_payment_request=cancel_request + ) + + @patch.object(PaymentsApi, "recurring") + def test_recurring_payment(self, mock_recurring, mock_client): + """Test creating a recurring payment""" + recurring_payment = { + "id": "pay_987654321", + "amount": 1000, + "currency": "EUR", + "status": PaymentStatus("PENDING"), + "description": "Recurring payment", + "created": "2023-01-02T12:00:00Z", + "updated": "2023-01-02T12:00:00Z", + } + mock_recurring.return_value = recurring_payment + + recurring_request = RecurringPaymentRequest( + amount=1000, currency="EUR", description="Recurring payment", payment_id="pay_123456789" + ) + result = mock_client.Payments.recurring(recurring_payment_request=recurring_request) + + assert result["id"] == "pay_987654321" + assert result["description"] == "Recurring payment" + mock_recurring.assert_called_once_with(recurring_payment_request=recurring_request) + + @patch.object(PaymentsApi, "send_link") + def test_send_payment_link(self, mock_send_link, mock_client): + """Test sending a payment link""" + success_response = {"success": True} + mock_send_link.return_value = success_response + + link_request = SendPaymentLinkRequest( + payment_id="pay_123456789", email="customer@example.com" + ) + result = mock_client.Payments.send_link(send_payment_link_request=link_request) + + assert result["success"] is True + mock_send_link.assert_called_once_with(send_payment_link_request=link_request) + + @patch.object(PaymentsApi, "send_receipt") + def test_send_payment_receipt(self, mock_send_receipt, mock_client): + """Test sending a payment receipt""" + success_response = {"success": True} + mock_send_receipt.return_value = success_response + + receipt_request = SendPaymentReceiptRequest( + payment_id="pay_123456789", email="customer@example.com" + ) + result = mock_client.Payments.send_receipt(send_payment_receipt_request=receipt_request) + + assert result["success"] is True + mock_send_receipt.assert_called_once_with(send_payment_receipt_request=receipt_request) + + @patch.object(PaymentsApi, "send_request") + def test_send_payment_request(self, mock_send_request, mock_client): + """Test sending a payment request""" + success_response = {"success": True} + mock_send_request.return_value = success_response + + request_request = SendPaymentRequestRequest( + payment_id="pay_123456789", email="customer@example.com" + ) + result = mock_client.Payments.send_request(send_payment_request_request=request_request) + + assert result["success"] is True + mock_send_request.assert_called_once_with(send_payment_request_request=request_request) diff --git a/test/test_recurring_payment_request.py b/test/test_recurring_payment_request.py index 6232ea7..7576695 100644 --- a/test/test_recurring_payment_request.py +++ b/test/test_recurring_payment_request.py @@ -3,21 +3,18 @@ """ MONEI API v1 - The MONEI API is organized around [REST](https://en.wikipedia.org/wiki/Representational_State_Transfer). Our API has predictable resource-oriented URLs, accepts JSON-encoded request bodies, returns JSON-encoded responses, and uses standard HTTP response codes, authentication, and verbs. # noqa: E501 +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

- The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" + The version of the OpenAPI document: 1.5.1 + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest -import datetime -import MONEI PYTHON SDK -from MONEI PYTHON SDK.models.recurring_payment_request import RecurringPaymentRequest # noqa: E501 -from MONEI PYTHON SDK.rest import ApiException +from Monei.models.recurring_payment_request import RecurringPaymentRequest class TestRecurringPaymentRequest(unittest.TestCase): """RecurringPaymentRequest unit test stubs""" @@ -28,58 +25,63 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional): + def make_instance(self, include_optional) -> RecurringPaymentRequest: """Test RecurringPaymentRequest - include_option is a boolean, when False only required + include_optional is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = MONEI PYTHON SDK.models.recurring_payment_request.RecurringPaymentRequest() # noqa: E501 - if include_optional : + # uncomment below to create an instance of `RecurringPaymentRequest` + """ + model = RecurringPaymentRequest() + if include_optional: return RecurringPaymentRequest( - order_id = '14379133960355', - amount = null, - transaction_type = null, - description = 'Test Shop - #84370745531439', - customer = MONEI PYTHON SDK.models.payment_customer.Payment-Customer( - email = 'john.doe@microapps.com', + order_id = '14379133960355', + amount = 110, + transaction_type = 'SALE', + description = 'Test Shop - #84370745531439', + customer = Monei.models.payment_customer.Payment-Customer( + email = 'john.doe@example.com', name = 'John Doe', - phone = '0', ), - billing_details = MONEI PYTHON SDK.models.payment_billing_details.Payment-BillingDetails( + phone = '', ), + billing_details = Monei.models.payment_billing_details.Payment-BillingDetails( name = 'John Doe', - email = 'john.doe@microapps.com', - phone = '0', - company = '0', - address = MONEI PYTHON SDK.models.address.Address( + email = 'john.doe@example.com', + phone = '', + company = '', + tax_id = '', + address = Monei.models.address.Address( country = 'ES', city = 'Málaga', line1 = 'Fake Street 123', - line2 = '0', + line2 = '', zip = '1234', - state = 'Málaga', ), ), - shipping_details = MONEI PYTHON SDK.models.payment_shipping_details.Payment-ShippingDetails( + state = 'Málaga', ), ), + shipping_details = Monei.models.payment_shipping_details.Payment-ShippingDetails( name = 'John Doe', - email = 'john.doe@microapps.com', - phone = '0', - company = '0', - address = MONEI PYTHON SDK.models.address.Address( + email = 'john.doe@example.com', + phone = '', + company = '', + tax_id = '', + address = Monei.models.address.Address( country = 'ES', city = 'Málaga', line1 = 'Fake Street 123', - line2 = '0', + line2 = '', zip = '1234', - state = 'Málaga', ), ), - callback_url = 'https://example.com/checkout/callback' + state = 'Málaga', ), ), + callback_url = 'https://example.com/checkout/callback', + metadata = {"systemId":"12345"} ) - else : + else: return RecurringPaymentRequest( order_id = '14379133960355', ) + """ def testRecurringPaymentRequest(self): """Test RecurringPaymentRequest""" - inst_req_only = self.make_instance(include_optional=False) - inst_req_and_optional = self.make_instance(include_optional=True) - + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/test/test_refund_payment_request.py b/test/test_refund_payment_request.py index 0c529c6..1db0922 100644 --- a/test/test_refund_payment_request.py +++ b/test/test_refund_payment_request.py @@ -3,21 +3,18 @@ """ MONEI API v1 - The MONEI API is organized around [REST](https://en.wikipedia.org/wiki/Representational_State_Transfer). Our API has predictable resource-oriented URLs, accepts JSON-encoded request bodies, returns JSON-encoded responses, and uses standard HTTP response codes, authentication, and verbs. # noqa: E501 +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

- The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" + The version of the OpenAPI document: 1.5.1 + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest -import datetime -import MONEI PYTHON SDK -from MONEI PYTHON SDK.models.refund_payment_request import RefundPaymentRequest # noqa: E501 -from MONEI PYTHON SDK.rest import ApiException +from Monei.models.refund_payment_request import RefundPaymentRequest class TestRefundPaymentRequest(unittest.TestCase): """RefundPaymentRequest unit test stubs""" @@ -28,26 +25,28 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional): + def make_instance(self, include_optional) -> RefundPaymentRequest: """Test RefundPaymentRequest - include_option is a boolean, when False only required + include_optional is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = MONEI PYTHON SDK.models.refund_payment_request.RefundPaymentRequest() # noqa: E501 - if include_optional : + # uncomment below to create an instance of `RefundPaymentRequest` + """ + model = RefundPaymentRequest() + if include_optional: return RefundPaymentRequest( - amount = null, + amount = 110, refund_reason = 'duplicated' ) - else : + else: return RefundPaymentRequest( ) + """ def testRefundPaymentRequest(self): """Test RefundPaymentRequest""" - inst_req_only = self.make_instance(include_optional=False) - inst_req_and_optional = self.make_instance(include_optional=True) - + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/test/test_register_apple_pay_domain_request.py b/test/test_register_apple_pay_domain_request.py index 10619bb..0a6f8ec 100644 --- a/test/test_register_apple_pay_domain_request.py +++ b/test/test_register_apple_pay_domain_request.py @@ -3,21 +3,18 @@ """ MONEI API v1 -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

- The version of the OpenAPI document: 1.4.8 - Generated by: https://openapi-generator.tech -""" + The version of the OpenAPI document: 1.5.1 + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest -import datetime -import Monei -from Monei.models.register_apple_pay_domain_request import RegisterApplePayDomainRequest # noqa: E501 -from Monei.rest import ApiException +from Monei.models.register_apple_pay_domain_request import RegisterApplePayDomainRequest class TestRegisterApplePayDomainRequest(unittest.TestCase): """RegisterApplePayDomainRequest unit test stubs""" @@ -28,26 +25,28 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional): + def make_instance(self, include_optional) -> RegisterApplePayDomainRequest: """Test RegisterApplePayDomainRequest - include_option is a boolean, when False only required + include_optional is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = Monei.models.register_apple_pay_domain_request.RegisterApplePayDomainRequest() # noqa: E501 - if include_optional : + # uncomment below to create an instance of `RegisterApplePayDomainRequest` + """ + model = RegisterApplePayDomainRequest() + if include_optional: return RegisterApplePayDomainRequest( domain_name = 'example.com' ) - else : + else: return RegisterApplePayDomainRequest( domain_name = 'example.com', ) + """ def testRegisterApplePayDomainRequest(self): """Test RegisterApplePayDomainRequest""" - inst_req_only = self.make_instance(include_optional=False) - inst_req_and_optional = self.make_instance(include_optional=True) - + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/test/test_register_domain_request.py b/test/test_register_domain_request.py deleted file mode 100644 index 99aa69c..0000000 --- a/test/test_register_domain_request.py +++ /dev/null @@ -1,53 +0,0 @@ -# coding: utf-8 - -""" - MONEI API v1 - -

The MONEI API is organized around REST. Our API has predictable resource-oriented URLs, accepts JSON-encoded request bodies, returns JSON-encoded responses, and uses standard HTTP response codes, authentication, and verbs.

Base URL:

https://api.monei.com/v1

Client libraries:

# noqa: E501 - - The version of the OpenAPI document: 1.1.0 - Generated by: https://openapi-generator.tech -""" - - -from __future__ import absolute_import - -import unittest -import datetime - -import Monei -from Monei.models.register_domain_request import RegisterDomainRequest # noqa: E501 -from Monei.rest import ApiException - -class TestRegisterDomainRequest(unittest.TestCase): - """RegisterDomainRequest unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional): - """Test RegisterDomainRequest - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # model = Monei.models.register_domain_request.RegisterDomainRequest() # noqa: E501 - if include_optional : - return RegisterDomainRequest( - domain_name = 'example.com' - ) - else : - return RegisterDomainRequest( - domain_name = 'example.com', - ) - - def testRegisterDomainRequest(self): - """Test RegisterDomainRequest""" - inst_req_only = self.make_instance(include_optional=False) - inst_req_and_optional = self.make_instance(include_optional=True) - - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_send_payment_link_request.py b/test/test_send_payment_link_request.py index 78c6a1c..0ccb7c5 100644 --- a/test/test_send_payment_link_request.py +++ b/test/test_send_payment_link_request.py @@ -3,21 +3,18 @@ """ MONEI API v1 -

The MONEI API is organized around REST. Our API has predictable resource-oriented URLs, accepts JSON-encoded request bodies, returns JSON-encoded responses, and uses standard HTTP response codes, authentication, and verbs.

Base URL:

https://api.monei.com/v1

Client libraries:

# noqa: E501 +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

- The version of the OpenAPI document: 1.2.0 - Generated by: https://openapi-generator.tech -""" + The version of the OpenAPI document: 1.5.1 + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest -import datetime -import Monei -from Monei.models.send_payment_link_request import SendPaymentLinkRequest # noqa: E501 -from Monei.rest import ApiException +from Monei.models.send_payment_link_request import SendPaymentLinkRequest class TestSendPaymentLinkRequest(unittest.TestCase): """SendPaymentLinkRequest unit test stubs""" @@ -28,26 +25,30 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional): + def make_instance(self, include_optional) -> SendPaymentLinkRequest: """Test SendPaymentLinkRequest - include_option is a boolean, when False only required + include_optional is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = Monei.models.send_payment_link_request.SendPaymentLinkRequest() # noqa: E501 - if include_optional : + # uncomment below to create an instance of `SendPaymentLinkRequest` + """ + model = SendPaymentLinkRequest() + if include_optional: return SendPaymentLinkRequest( - customer_email = 'john.doe@example.com', + customer_email = 'john.doe@example.com', + customer_phone = '+34500000000', + channel = 'EMAIL', language = 'en' ) - else : + else: return SendPaymentLinkRequest( ) + """ def testSendPaymentLinkRequest(self): """Test SendPaymentLinkRequest""" - inst_req_only = self.make_instance(include_optional=False) - inst_req_and_optional = self.make_instance(include_optional=True) - + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/test/test_send_payment_receipt_request.py b/test/test_send_payment_receipt_request.py index 293430d..fafc9cd 100644 --- a/test/test_send_payment_receipt_request.py +++ b/test/test_send_payment_receipt_request.py @@ -3,21 +3,18 @@ """ MONEI API v1 -

The MONEI API is organized around REST. Our API has predictable resource-oriented URLs, accepts JSON-encoded request bodies, returns JSON-encoded responses, and uses standard HTTP response codes, authentication, and verbs.

Base URL:

https://api.monei.com/v1

Client libraries:

# noqa: E501 +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

- The version of the OpenAPI document: 1.2.0 - Generated by: https://openapi-generator.tech -""" + The version of the OpenAPI document: 1.5.1 + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest -import datetime -import Monei -from Monei.models.send_payment_receipt_request import SendPaymentReceiptRequest # noqa: E501 -from Monei.rest import ApiException +from Monei.models.send_payment_receipt_request import SendPaymentReceiptRequest class TestSendPaymentReceiptRequest(unittest.TestCase): """SendPaymentReceiptRequest unit test stubs""" @@ -28,26 +25,30 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional): + def make_instance(self, include_optional) -> SendPaymentReceiptRequest: """Test SendPaymentReceiptRequest - include_option is a boolean, when False only required + include_optional is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = Monei.models.send_payment_receipt_request.SendPaymentReceiptRequest() # noqa: E501 - if include_optional : + # uncomment below to create an instance of `SendPaymentReceiptRequest` + """ + model = SendPaymentReceiptRequest() + if include_optional: return SendPaymentReceiptRequest( - customer_email = 'john.doe@example.com', + customer_email = 'john.doe@example.com', + customer_phone = '+34500000000', + channel = 'EMAIL', language = 'en' ) - else : + else: return SendPaymentReceiptRequest( ) + """ def testSendPaymentReceiptRequest(self): """Test SendPaymentReceiptRequest""" - inst_req_only = self.make_instance(include_optional=False) - inst_req_and_optional = self.make_instance(include_optional=True) - + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/test/test_send_payment_request.py b/test/test_send_payment_request.py deleted file mode 100644 index ac8c5c7..0000000 --- a/test/test_send_payment_request.py +++ /dev/null @@ -1,53 +0,0 @@ -# coding: utf-8 - -""" - MONEI API v1 - -

The MONEI API is organized around REST. Our API has predictable resource-oriented URLs, accepts JSON-encoded request bodies, returns JSON-encoded responses, and uses standard HTTP response codes, authentication, and verbs.

Base URL:

https://api.monei.com/v1

Client libraries:

Important:

If you are not using our official SDKs, you need to provide a valid User-Agent header in each request, otherwise your requests will be rejected.

# noqa: E501 - - The version of the OpenAPI document: 1.4.0 - Generated by: https://openapi-generator.tech -""" - - -from __future__ import absolute_import - -import unittest -import datetime - -import Monei -from Monei.models.send_payment_request import SendPaymentRequest # noqa: E501 -from Monei.rest import ApiException - -class TestSendPaymentRequest(unittest.TestCase): - """SendPaymentRequest unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional): - """Test SendPaymentRequest - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # model = Monei.models.send_payment_request.SendPaymentRequest() # noqa: E501 - if include_optional : - return SendPaymentRequest( - phone_number = '+34500000000', - language = 'en' - ) - else : - return SendPaymentRequest( - ) - - def testSendPaymentRequest(self): - """Test SendPaymentRequest""" - inst_req_only = self.make_instance(include_optional=False) - inst_req_and_optional = self.make_instance(include_optional=True) - - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_send_payment_request_request.py b/test/test_send_payment_request_request.py index fbbd8ed..c0306a5 100644 --- a/test/test_send_payment_request_request.py +++ b/test/test_send_payment_request_request.py @@ -3,21 +3,18 @@ """ MONEI API v1 -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

- The version of the OpenAPI document: 1.4.8 - Generated by: https://openapi-generator.tech -""" + The version of the OpenAPI document: 1.5.1 + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest -import datetime -import Monei -from Monei.models.send_payment_request_request import SendPaymentRequestRequest # noqa: E501 -from Monei.rest import ApiException +from Monei.models.send_payment_request_request import SendPaymentRequestRequest class TestSendPaymentRequestRequest(unittest.TestCase): """SendPaymentRequestRequest unit test stubs""" @@ -28,27 +25,29 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional): + def make_instance(self, include_optional) -> SendPaymentRequestRequest: """Test SendPaymentRequestRequest - include_option is a boolean, when False only required + include_optional is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = Monei.models.send_payment_request_request.SendPaymentRequestRequest() # noqa: E501 - if include_optional : + # uncomment below to create an instance of `SendPaymentRequestRequest` + """ + model = SendPaymentRequestRequest() + if include_optional: return SendPaymentRequestRequest( - phone_number = '+34500000000', + phone_number = '+34500000000', language = 'en' ) - else : + else: return SendPaymentRequestRequest( phone_number = '+34500000000', ) + """ def testSendPaymentRequestRequest(self): """Test SendPaymentRequestRequest""" - inst_req_only = self.make_instance(include_optional=False) - inst_req_and_optional = self.make_instance(include_optional=True) - + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/test/test_send_subscription_link_request.py b/test/test_send_subscription_link_request.py index 1bcdb61..9797a1e 100644 --- a/test/test_send_subscription_link_request.py +++ b/test/test_send_subscription_link_request.py @@ -3,21 +3,18 @@ """ MONEI API v1 -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

- The version of the OpenAPI document: 1.4.8 - Generated by: https://openapi-generator.tech -""" + The version of the OpenAPI document: 1.5.1 + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest -import datetime -import Monei -from Monei.models.send_subscription_link_request import SendSubscriptionLinkRequest # noqa: E501 -from Monei.rest import ApiException +from Monei.models.send_subscription_link_request import SendSubscriptionLinkRequest class TestSendSubscriptionLinkRequest(unittest.TestCase): """SendSubscriptionLinkRequest unit test stubs""" @@ -28,28 +25,30 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional): + def make_instance(self, include_optional) -> SendSubscriptionLinkRequest: """Test SendSubscriptionLinkRequest - include_option is a boolean, when False only required + include_optional is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = Monei.models.send_subscription_link_request.SendSubscriptionLinkRequest() # noqa: E501 - if include_optional : + # uncomment below to create an instance of `SendSubscriptionLinkRequest` + """ + model = SendSubscriptionLinkRequest() + if include_optional: return SendSubscriptionLinkRequest( - customer_email = '0', - customer_phone = '0', - channel = 'email', - language = '0' + customer_email = '', + customer_phone = '', + channel = 'email', + language = '' ) - else : + else: return SendSubscriptionLinkRequest( ) + """ def testSendSubscriptionLinkRequest(self): """Test SendSubscriptionLinkRequest""" - inst_req_only = self.make_instance(include_optional=False) - inst_req_and_optional = self.make_instance(include_optional=True) - + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/test/test_send_subscription_status_request.py b/test/test_send_subscription_status_request.py index c271e51..00cfe13 100644 --- a/test/test_send_subscription_status_request.py +++ b/test/test_send_subscription_status_request.py @@ -3,21 +3,18 @@ """ MONEI API v1 -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

- The version of the OpenAPI document: 1.4.8 - Generated by: https://openapi-generator.tech -""" + The version of the OpenAPI document: 1.5.1 + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest -import datetime -import Monei -from Monei.models.send_subscription_status_request import SendSubscriptionStatusRequest # noqa: E501 -from Monei.rest import ApiException +from Monei.models.send_subscription_status_request import SendSubscriptionStatusRequest class TestSendSubscriptionStatusRequest(unittest.TestCase): """SendSubscriptionStatusRequest unit test stubs""" @@ -28,28 +25,30 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional): + def make_instance(self, include_optional) -> SendSubscriptionStatusRequest: """Test SendSubscriptionStatusRequest - include_option is a boolean, when False only required + include_optional is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = Monei.models.send_subscription_status_request.SendSubscriptionStatusRequest() # noqa: E501 - if include_optional : + # uncomment below to create an instance of `SendSubscriptionStatusRequest` + """ + model = SendSubscriptionStatusRequest() + if include_optional: return SendSubscriptionStatusRequest( - customer_email = '0', - customer_phone = '0', - channel = 'email', - language = '0' + customer_email = '', + customer_phone = '', + channel = 'email', + language = '' ) - else : + else: return SendSubscriptionStatusRequest( ) + """ def testSendSubscriptionStatusRequest(self): """Test SendSubscriptionStatusRequest""" - inst_req_only = self.make_instance(include_optional=False) - inst_req_and_optional = self.make_instance(include_optional=True) - + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/test/test_subscription.py b/test/test_subscription.py index 4c09c79..1ecad01 100644 --- a/test/test_subscription.py +++ b/test/test_subscription.py @@ -3,21 +3,18 @@ """ MONEI API v1 - The MONEI API is organized around [REST](https://en.wikipedia.org/wiki/Representational_State_Transfer). Our API has predictable resource-oriented URLs, accepts JSON-encoded request bodies, returns JSON-encoded responses, and uses standard HTTP response codes, authentication, and verbs.

**Base URL:** https://api.monei.com/v1

**Client libraries:** # noqa: E501 +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

- The version of the OpenAPI document: 1.1.0 - Generated by: https://openapi-generator.tech -""" + The version of the OpenAPI document: 1.5.1 + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest -import datetime -import Monei -from Monei.models.subscription import Subscription # noqa: E501 -from Monei.rest import ApiException +from Monei.models.subscription import Subscription class TestSubscription(unittest.TestCase): """Subscription unit test stubs""" @@ -28,58 +25,62 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional): + def make_instance(self, include_optional) -> Subscription: """Test Subscription - include_option is a boolean, when False only required + include_optional is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = Monei.models.subscription.Subscription() # noqa: E501 - if include_optional : + # uncomment below to create an instance of `Subscription` + """ + model = Subscription() + if include_optional: return Subscription( - id = '575bcd84-09fc-4a6e-8c4c-f88b8eb90bfa', - amount = 110, - currency = 'EUR', - description = 'MoonMail Monthly Lite', - account_id = 'aa9333ba-82de-400c-9ae7-087b9f8d2242', - livemode = False, - status = 'PENDING', + id = '575bcd84-09fc-4a6e-8c4c-f88b8eb90bfa', + amount = 110, + currency = 'EUR', + description = 'MoonMail Monthly Lite', + account_id = 'aa9333ba-82de-400c-9ae7-087b9f8d2242', + livemode = False, + status = 'PENDING', customer = Monei.models.payment_customer.Payment-Customer( email = 'john.doe@example.com', name = 'John Doe', - phone = '0', ), + phone = '', ), billing_details = Monei.models.payment_billing_details.Payment-BillingDetails( name = 'John Doe', email = 'john.doe@example.com', - phone = '0', - company = '0', + phone = '', + company = '', + tax_id = '', address = Monei.models.address.Address( country = 'ES', city = 'Málaga', line1 = 'Fake Street 123', - line2 = '0', + line2 = '', zip = '1234', - state = 'Málaga', ), ), + state = 'Málaga', ), ), shipping_details = Monei.models.payment_shipping_details.Payment-ShippingDetails( name = 'John Doe', email = 'john.doe@example.com', - phone = '0', - company = '0', + phone = '', + company = '', + tax_id = '', address = Monei.models.address.Address( country = 'ES', city = 'Málaga', line1 = 'Fake Street 123', - line2 = '0', + line2 = '', zip = '1234', - state = 'Málaga', ), ), - interval = 'month', - interval_count = 1, - pause_interval_count = 1, - last_order_id = '14379133960355', + state = 'Málaga', ), ), + interval = 'month', + interval_count = 1, + pause_interval_count = 1, + last_order_id = '14379133960355', last_payment = Monei.models.subscription_last_payment.Subscription-LastPayment( id = 'af6029f80f5fc73a8ad2753eea0b1be0', status = 'PENDING', - status_code = '0', - status_message = '0', ), + status_code = '', + status_message = '', ), payment_method = Monei.models.subscription_payment_method.Subscription-PaymentMethod( method = 'card', card = Monei.models.payment_payment_method_card.Payment-PaymentMethodCard( @@ -88,21 +89,26 @@ def make_instance(self, include_optional): type = 'credit', three_d_secure = False, three_d_secure_version = '2.1.0', + three_d_secure_flow = 'CHALLENGE', expiration = 2048544000, - last4 = '0004', ), ), - current_period_start = 1636366897, - current_period_end = 1636366897, - trial_period_end = 1636366897, - next_payment_at = 1636366897, - retry_count = 1, - cancel_at_period_end = False, - pause_at_period_end = False, + last4 = '0004', + tokenization_method = 'applePay', + cardholder_name = 'John Doe', + cardholder_email = 'email@example.com', ), ), + current_period_start = 1636366897, + current_period_end = 1636366897, + trial_period_end = 1636366897, + next_payment_at = 1636366897, + retry_count = 1, + retry_schedule = [{"interval":"day","intervalCount":1},{"interval":"day","intervalCount":3},{"interval":"week","intervalCount":1}], + cancel_at_period_end = False, + pause_at_period_end = False, trace_details = Monei.models.payment_trace_details.Payment-TraceDetails( ip = '100.100.200.100', country_code = 'ES', lang = 'es', device_type = 'desktop', - device_model = '0', + device_model = '', browser = 'Chrome', browser_version = '83.0.4103.116', os = 'Mac OS', @@ -110,23 +116,29 @@ def make_instance(self, include_optional): source = 'MONEI/PHP', source_version = '0.1.2', user_agent = 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) ...', - user_id = '0', - user_email = 'user@example.com', ), - sequence_id = '62b23b9f3627cc38b08ff471ccd313ad', - callback_url = 'https://example.com/subscriptions/callback', - payment_callback_url = 'https://example.com/payments/callback', - created_at = 1636366897, + browser_accept = 'text/html,application/xhtml+xml,application/json', + browser_color_depth = 24, + browser_screen_height = 1152, + browser_screen_width = 2048, + browser_timezone_offset = 'string', + user_id = '', + user_email = 'user@example.com', ), + sequence_id = '62b23b9f3627cc38b08ff471ccd313ad', + callback_url = 'https://example.com/subscriptions/callback', + payment_callback_url = 'https://example.com/payments/callback', + metadata = {"systemId":"12345"}, + created_at = 1636366897, updated_at = 1636366897 ) - else : + else: return Subscription( ) + """ def testSubscription(self): """Test Subscription""" - inst_req_only = self.make_instance(include_optional=False) - inst_req_and_optional = self.make_instance(include_optional=True) - + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/test/test_subscription_interval.py b/test/test_subscription_interval.py index 456c72b..c3411bf 100644 --- a/test/test_subscription_interval.py +++ b/test/test_subscription_interval.py @@ -3,21 +3,18 @@ """ MONEI API v1 - The MONEI API is organized around [REST](https://en.wikipedia.org/wiki/Representational_State_Transfer). Our API has predictable resource-oriented URLs, accepts JSON-encoded request bodies, returns JSON-encoded responses, and uses standard HTTP response codes, authentication, and verbs.

**Base URL:** https://api.monei.com/v1

**Client libraries:** # noqa: E501 +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

- The version of the OpenAPI document: 1.1.0 - Generated by: https://openapi-generator.tech -""" + The version of the OpenAPI document: 1.5.1 + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest -import datetime -import Monei -from Monei.models.subscription_interval import SubscriptionInterval # noqa: E501 -from Monei.rest import ApiException +from Monei.models.subscription_interval import SubscriptionInterval class TestSubscriptionInterval(unittest.TestCase): """SubscriptionInterval unit test stubs""" @@ -28,24 +25,9 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional): - """Test SubscriptionInterval - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # model = Monei.models.subscription_interval.SubscriptionInterval() # noqa: E501 - if include_optional : - return SubscriptionInterval( - ) - else : - return SubscriptionInterval( - ) - def testSubscriptionInterval(self): """Test SubscriptionInterval""" - inst_req_only = self.make_instance(include_optional=False) - inst_req_and_optional = self.make_instance(include_optional=True) - + # inst = SubscriptionInterval() if __name__ == '__main__': unittest.main() diff --git a/test/test_subscription_last_payment.py b/test/test_subscription_last_payment.py index 3ff5bcd..3de7c60 100644 --- a/test/test_subscription_last_payment.py +++ b/test/test_subscription_last_payment.py @@ -3,21 +3,18 @@ """ MONEI API v1 - The MONEI API is organized around [REST](https://en.wikipedia.org/wiki/Representational_State_Transfer). Our API has predictable resource-oriented URLs, accepts JSON-encoded request bodies, returns JSON-encoded responses, and uses standard HTTP response codes, authentication, and verbs.

**Base URL:** https://api.monei.com/v1

**Client libraries:** # noqa: E501 +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

- The version of the OpenAPI document: 1.1.0 - Generated by: https://openapi-generator.tech -""" + The version of the OpenAPI document: 1.5.1 + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest -import datetime -import Monei -from Monei.models.subscription_last_payment import SubscriptionLastPayment # noqa: E501 -from Monei.rest import ApiException +from Monei.models.subscription_last_payment import SubscriptionLastPayment class TestSubscriptionLastPayment(unittest.TestCase): """SubscriptionLastPayment unit test stubs""" @@ -28,28 +25,30 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional): + def make_instance(self, include_optional) -> SubscriptionLastPayment: """Test SubscriptionLastPayment - include_option is a boolean, when False only required + include_optional is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = Monei.models.subscription_last_payment.SubscriptionLastPayment() # noqa: E501 - if include_optional : + # uncomment below to create an instance of `SubscriptionLastPayment` + """ + model = SubscriptionLastPayment() + if include_optional: return SubscriptionLastPayment( - id = 'af6029f80f5fc73a8ad2753eea0b1be0', - status = 'PENDING', - status_code = '0', - status_message = '0' + id = 'af6029f80f5fc73a8ad2753eea0b1be0', + status = 'PENDING', + status_code = '', + status_message = '' ) - else : + else: return SubscriptionLastPayment( ) + """ def testSubscriptionLastPayment(self): """Test SubscriptionLastPayment""" - inst_req_only = self.make_instance(include_optional=False) - inst_req_and_optional = self.make_instance(include_optional=True) - + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/test/test_subscription_payment_method.py b/test/test_subscription_payment_method.py index 9db528d..44c25d4 100644 --- a/test/test_subscription_payment_method.py +++ b/test/test_subscription_payment_method.py @@ -3,21 +3,18 @@ """ MONEI API v1 - The MONEI API is organized around [REST](https://en.wikipedia.org/wiki/Representational_State_Transfer). Our API has predictable resource-oriented URLs, accepts JSON-encoded request bodies, returns JSON-encoded responses, and uses standard HTTP response codes, authentication, and verbs.

**Base URL:** https://api.monei.com/v1

**Client libraries:** # noqa: E501 +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

- The version of the OpenAPI document: 1.1.0 - Generated by: https://openapi-generator.tech -""" + The version of the OpenAPI document: 1.5.1 + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest -import datetime -import Monei -from Monei.models.subscription_payment_method import SubscriptionPaymentMethod # noqa: E501 -from Monei.rest import ApiException +from Monei.models.subscription_payment_method import SubscriptionPaymentMethod class TestSubscriptionPaymentMethod(unittest.TestCase): """SubscriptionPaymentMethod unit test stubs""" @@ -28,33 +25,39 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional): + def make_instance(self, include_optional) -> SubscriptionPaymentMethod: """Test SubscriptionPaymentMethod - include_option is a boolean, when False only required + include_optional is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = Monei.models.subscription_payment_method.SubscriptionPaymentMethod() # noqa: E501 - if include_optional : + # uncomment below to create an instance of `SubscriptionPaymentMethod` + """ + model = SubscriptionPaymentMethod() + if include_optional: return SubscriptionPaymentMethod( - method = 'card', + method = 'card', card = Monei.models.payment_payment_method_card.Payment-PaymentMethodCard( country = 'ES', brand = 'visa', type = 'credit', three_d_secure = False, three_d_secure_version = '2.1.0', + three_d_secure_flow = 'CHALLENGE', expiration = 2048544000, - last4 = '0004', ) + last4 = '0004', + tokenization_method = 'applePay', + cardholder_name = 'John Doe', + cardholder_email = 'email@example.com', ) ) - else : + else: return SubscriptionPaymentMethod( ) + """ def testSubscriptionPaymentMethod(self): """Test SubscriptionPaymentMethod""" - inst_req_only = self.make_instance(include_optional=False) - inst_req_and_optional = self.make_instance(include_optional=True) - + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/test/test_subscription_payment_method_card.py b/test/test_subscription_payment_method_card.py index 97979d3..dcd769f 100644 --- a/test/test_subscription_payment_method_card.py +++ b/test/test_subscription_payment_method_card.py @@ -3,21 +3,18 @@ """ MONEI API v1 - The MONEI API is organized around [REST](https://en.wikipedia.org/wiki/Representational_State_Transfer). Our API has predictable resource-oriented URLs, accepts JSON-encoded request bodies, returns JSON-encoded responses, and uses standard HTTP response codes, authentication, and verbs.

**Base URL:** https://api.monei.com/v1

**Client libraries:** # noqa: E501 +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

- The version of the OpenAPI document: 1.1.0 - Generated by: https://openapi-generator.tech -""" + The version of the OpenAPI document: 1.5.1 + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest -import datetime -import Monei -from Monei.models.subscription_payment_method_card import SubscriptionPaymentMethodCard # noqa: E501 -from Monei.rest import ApiException +from Monei.models.subscription_payment_method_card import SubscriptionPaymentMethodCard class TestSubscriptionPaymentMethodCard(unittest.TestCase): """SubscriptionPaymentMethodCard unit test stubs""" @@ -28,31 +25,33 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional): + def make_instance(self, include_optional) -> SubscriptionPaymentMethodCard: """Test SubscriptionPaymentMethodCard - include_option is a boolean, when False only required + include_optional is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = Monei.models.subscription_payment_method_card.SubscriptionPaymentMethodCard() # noqa: E501 - if include_optional : + # uncomment below to create an instance of `SubscriptionPaymentMethodCard` + """ + model = SubscriptionPaymentMethodCard() + if include_optional: return SubscriptionPaymentMethodCard( - country = 'ES', - brand = 'visa', - type = 'credit', - three_d_secure = False, - three_d_secure_version = '2.1.0', - expiration = 2048544000, + country = 'ES', + brand = 'visa', + type = 'credit', + three_d_secure = False, + three_d_secure_version = '2.1.0', + expiration = 2048544000, last4 = '0004' ) - else : + else: return SubscriptionPaymentMethodCard( ) + """ def testSubscriptionPaymentMethodCard(self): """Test SubscriptionPaymentMethodCard""" - inst_req_only = self.make_instance(include_optional=False) - inst_req_and_optional = self.make_instance(include_optional=True) - + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/test/test_subscription_retry_schedule.py b/test/test_subscription_retry_schedule.py deleted file mode 100644 index 6c433d3..0000000 --- a/test/test_subscription_retry_schedule.py +++ /dev/null @@ -1,37 +0,0 @@ -""" - MONEI API v1 - -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - - The version of the OpenAPI document: 1.5.0 - Generated by: https://openapi-generator.tech -""" - - -import sys -import unittest - -import Monei -from Monei.model.subscription_retry_schedule_inner import SubscriptionRetryScheduleInner -globals()['SubscriptionRetryScheduleInner'] = SubscriptionRetryScheduleInner -from Monei.model.subscription_retry_schedule import SubscriptionRetrySchedule - - -class TestSubscriptionRetrySchedule(unittest.TestCase): - """SubscriptionRetrySchedule unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testSubscriptionRetrySchedule(self): - """Test SubscriptionRetrySchedule""" - # FIXME: construct object with mandatory attributes with example values - # model = SubscriptionRetrySchedule() # noqa: E501 - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_subscription_retry_schedule_inner.py b/test/test_subscription_retry_schedule_inner.py index 75c6202..4c66918 100644 --- a/test/test_subscription_retry_schedule_inner.py +++ b/test/test_subscription_retry_schedule_inner.py @@ -1,19 +1,20 @@ +# coding: utf-8 + """ MONEI API v1 -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

View complete list of status codes →

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

- The version of the OpenAPI document: 1.5.0 - Generated by: https://openapi-generator.tech -""" + The version of the OpenAPI document: 1.5.1 + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -import sys -import unittest -import Monei -from Monei.model.subscription_retry_schedule_inner import SubscriptionRetryScheduleInner +import unittest +from Monei.models.subscription_retry_schedule_inner import SubscriptionRetryScheduleInner class TestSubscriptionRetryScheduleInner(unittest.TestCase): """SubscriptionRetryScheduleInner unit test stubs""" @@ -24,12 +25,30 @@ def setUp(self): def tearDown(self): pass + def make_instance(self, include_optional) -> SubscriptionRetryScheduleInner: + """Test SubscriptionRetryScheduleInner + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SubscriptionRetryScheduleInner` + """ + model = SubscriptionRetryScheduleInner() + if include_optional: + return SubscriptionRetryScheduleInner( + interval = 'day', + interval_count = 3 + ) + else: + return SubscriptionRetryScheduleInner( + interval = 'day', + interval_count = 3, + ) + """ + def testSubscriptionRetryScheduleInner(self): """Test SubscriptionRetryScheduleInner""" - # FIXME: construct object with mandatory attributes with example values - # model = SubscriptionRetryScheduleInner() # noqa: E501 - pass - + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/test/test_subscription_status.py b/test/test_subscription_status.py index 3d8df75..c215306 100644 --- a/test/test_subscription_status.py +++ b/test/test_subscription_status.py @@ -3,21 +3,18 @@ """ MONEI API v1 - The MONEI API is organized around [REST](https://en.wikipedia.org/wiki/Representational_State_Transfer). Our API has predictable resource-oriented URLs, accepts JSON-encoded request bodies, returns JSON-encoded responses, and uses standard HTTP response codes, authentication, and verbs.

**Base URL:** https://api.monei.com/v1

**Client libraries:** # noqa: E501 +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

- The version of the OpenAPI document: 1.1.0 - Generated by: https://openapi-generator.tech -""" + The version of the OpenAPI document: 1.5.1 + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest -import datetime -import Monei -from Monei.models.subscription_status import SubscriptionStatus # noqa: E501 -from Monei.rest import ApiException +from Monei.models.subscription_status import SubscriptionStatus class TestSubscriptionStatus(unittest.TestCase): """SubscriptionStatus unit test stubs""" @@ -28,24 +25,9 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional): - """Test SubscriptionStatus - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # model = Monei.models.subscription_status.SubscriptionStatus() # noqa: E501 - if include_optional : - return SubscriptionStatus( - ) - else : - return SubscriptionStatus( - ) - def testSubscriptionStatus(self): """Test SubscriptionStatus""" - inst_req_only = self.make_instance(include_optional=False) - inst_req_and_optional = self.make_instance(include_optional=True) - + # inst = SubscriptionStatus() if __name__ == '__main__': unittest.main() diff --git a/test/test_subscriptions_api.py b/test/test_subscriptions_api.py index aeead50..898b4bb 100644 --- a/test/test_subscriptions_api.py +++ b/test/test_subscriptions_api.py @@ -3,77 +3,89 @@ """ MONEI API v1 - The MONEI API is organized around [REST](https://en.wikipedia.org/wiki/Representational_State_Transfer). Our API has predictable resource-oriented URLs, accepts JSON-encoded request bodies, returns JSON-encoded responses, and uses standard HTTP response codes, authentication, and verbs.

**Base URL:** https://api.monei.com/v1

**Client libraries:** # noqa: E501 +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

- The version of the OpenAPI document: 1.1.0 - Generated by: https://openapi-generator.tech -""" + The version of the OpenAPI document: 1.5.1 + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest -import Monei -from Monei.api.subscriptions_api import SubscriptionsApi # noqa: E501 -from Monei.rest import ApiException +from Monei.api.subscriptions_api import SubscriptionsApi class TestSubscriptionsApi(unittest.TestCase): """SubscriptionsApi unit test stubs""" - def setUp(self): - self.api = Monei.api.subscriptions_api.SubscriptionsApi() # noqa: E501 + def setUp(self) -> None: + self.api = SubscriptionsApi() - def tearDown(self): + def tearDown(self) -> None: pass - def test_activate(self): + def test_activate(self) -> None: """Test case for activate - Activate Subscription # noqa: E501 + Activate Subscription """ pass - def test_cancel(self): + def test_cancel(self) -> None: """Test case for cancel - Cancel Subscription # noqa: E501 + Cancel Subscription """ pass - def test_create(self): + def test_create(self) -> None: """Test case for create - Create Subscription # noqa: E501 + Create Subscription """ pass - def test_get(self): + def test_get(self) -> None: """Test case for get - Get Subscription # noqa: E501 + Get Subscription """ pass - def test_pause(self): + def test_pause(self) -> None: """Test case for pause - Pause Subscription # noqa: E501 + Pause Subscription """ pass - def test_resume(self): + def test_resume(self) -> None: """Test case for resume - Resume Subscription # noqa: E501 + Resume Subscription + """ + pass + + def test_send_link(self) -> None: + """Test case for send_link + + Send Subscription Link + """ + pass + + def test_send_status(self) -> None: + """Test case for send_status + + Send Subscription Status """ pass - def test_update(self): + def test_update(self) -> None: """Test case for update - Update Subscription # noqa: E501 + Update Subscription """ pass diff --git a/test/test_subscriptions_api_integration.py b/test/test_subscriptions_api_integration.py new file mode 100644 index 0000000..3f8f034 --- /dev/null +++ b/test/test_subscriptions_api_integration.py @@ -0,0 +1,226 @@ +import pytest +from unittest.mock import patch, MagicMock + +from Monei.monei_client import MoneiClient +from Monei.api.subscriptions_api import SubscriptionsApi +from Monei.model.create_subscription_request import CreateSubscriptionRequest +from Monei.model.update_subscription_request import UpdateSubscriptionRequest +from Monei.model.pause_subscription_request import PauseSubscriptionRequest +from Monei.model.cancel_subscription_request import CancelSubscriptionRequest +from Monei.model.activate_subscription_request import ActivateSubscriptionRequest +from Monei.model.send_subscription_link_request import SendSubscriptionLinkRequest +from Monei.model.send_subscription_status_request import SendSubscriptionStatusRequest +from Monei.model.subscription_status import SubscriptionStatus +from Monei.model.subscription_interval import SubscriptionInterval + + +@pytest.mark.unit +class TestSubscriptionsApiIntegration: + """Integration tests for the Subscriptions API with mocked responses""" + + @pytest.fixture + def mock_subscription(self): + """Fixture for a mock subscription response""" + return { + "id": "sub_123456789", + "status": SubscriptionStatus("ACTIVE"), + "amount": 1000, + "currency": "EUR", + "description": "Test subscription", + "interval": SubscriptionInterval("MONTH"), + "intervalCount": 1, + "startDate": "2023-01-01", + "endDate": None, + "cancelAtPeriodEnd": False, + "created": "2023-01-01T12:00:00Z", + "updated": "2023-01-01T12:00:00Z", + } + + @pytest.fixture + def mock_client(self): + """Fixture for creating a mock client""" + return MoneiClient(api_key="test_api_key") + + @patch.object(SubscriptionsApi, "create") + def test_create_subscription(self, mock_create, mock_client, mock_subscription): + """Test creating a subscription""" + mock_create.return_value = mock_subscription + + subscription_request = CreateSubscriptionRequest( + amount=1000, + currency="EUR", + description="Test subscription", + interval=SubscriptionInterval("MONTH"), + interval_count=1, + payment_method_id="pm_123456789", + ) + + result = mock_client.Subscriptions.create(create_subscription_request=subscription_request) + + assert result["id"] == "sub_123456789" + assert result["status"] == SubscriptionStatus("ACTIVE") + assert result["amount"] == 1000 + assert result["currency"] == "EUR" + assert result["interval"] == SubscriptionInterval("MONTH") + mock_create.assert_called_once_with(create_subscription_request=subscription_request) + + @patch.object(SubscriptionsApi, "get") + def test_get_subscription(self, mock_get, mock_client, mock_subscription): + """Test retrieving a subscription""" + mock_get.return_value = mock_subscription + + result = mock_client.Subscriptions.get(subscription_id="sub_123456789") + + assert result["id"] == "sub_123456789" + assert result["status"] == SubscriptionStatus("ACTIVE") + mock_get.assert_called_once_with(subscription_id="sub_123456789") + + @patch.object(SubscriptionsApi, "list") + def test_list_subscriptions(self, mock_list, mock_client, mock_subscription): + """Test listing subscriptions""" + mock_list.return_value = { + "data": [ + mock_subscription, + { + "id": "sub_987654321", + "status": SubscriptionStatus("PAUSED"), + "amount": 2000, + "currency": "EUR", + "description": "Another subscription", + "interval": SubscriptionInterval("YEAR"), + "intervalCount": 1, + "startDate": "2023-01-02", + "endDate": None, + "cancelAtPeriodEnd": False, + "created": "2023-01-02T12:00:00Z", + "updated": "2023-01-02T12:00:00Z", + }, + ], + "hasMore": False, + "totalCount": 2, + } + + result = mock_client.Subscriptions.list() + + assert "data" in result + assert len(result["data"]) == 2 + assert result["data"][0]["id"] == "sub_123456789" + assert result["data"][0]["status"] == SubscriptionStatus("ACTIVE") + assert result["data"][1]["id"] == "sub_987654321" + assert result["data"][1]["status"] == SubscriptionStatus("PAUSED") + assert result["hasMore"] is False + assert result["totalCount"] == 2 + mock_list.assert_called_once() + + @patch.object(SubscriptionsApi, "update") + def test_update_subscription(self, mock_update, mock_client, mock_subscription): + """Test updating a subscription""" + updated_subscription = mock_subscription.copy() + updated_subscription["amount"] = 1500 + updated_subscription["description"] = "Updated subscription" + mock_update.return_value = updated_subscription + + update_request = UpdateSubscriptionRequest(amount=1500, description="Updated subscription") + + result = mock_client.Subscriptions.update( + subscription_id="sub_123456789", update_subscription_request=update_request + ) + + assert result["id"] == "sub_123456789" + assert result["amount"] == 1500 + assert result["description"] == "Updated subscription" + mock_update.assert_called_once_with( + subscription_id="sub_123456789", update_subscription_request=update_request + ) + + @patch.object(SubscriptionsApi, "pause") + def test_pause_subscription(self, mock_pause, mock_client, mock_subscription): + """Test pausing a subscription""" + paused_subscription = mock_subscription.copy() + paused_subscription["status"] = SubscriptionStatus("PAUSED") + mock_pause.return_value = paused_subscription + + pause_request = PauseSubscriptionRequest() + + result = mock_client.Subscriptions.pause( + subscription_id="sub_123456789", pause_subscription_request=pause_request + ) + + assert result["id"] == "sub_123456789" + assert result["status"] == SubscriptionStatus("PAUSED") + mock_pause.assert_called_once_with( + subscription_id="sub_123456789", pause_subscription_request=pause_request + ) + + @patch.object(SubscriptionsApi, "cancel") + def test_cancel_subscription(self, mock_cancel, mock_client, mock_subscription): + """Test canceling a subscription""" + canceled_subscription = mock_subscription.copy() + canceled_subscription["status"] = SubscriptionStatus("CANCELED") + mock_cancel.return_value = canceled_subscription + + cancel_request = CancelSubscriptionRequest() + + result = mock_client.Subscriptions.cancel( + subscription_id="sub_123456789", cancel_subscription_request=cancel_request + ) + + assert result["id"] == "sub_123456789" + assert result["status"] == SubscriptionStatus("CANCELED") + mock_cancel.assert_called_once_with( + subscription_id="sub_123456789", cancel_subscription_request=cancel_request + ) + + @patch.object(SubscriptionsApi, "activate") + def test_activate_subscription(self, mock_activate, mock_client, mock_subscription): + """Test activating a subscription""" + paused_subscription = mock_subscription.copy() + paused_subscription["status"] = SubscriptionStatus("PAUSED") + + activated_subscription = paused_subscription.copy() + activated_subscription["status"] = SubscriptionStatus("ACTIVE") + mock_activate.return_value = activated_subscription + + activate_request = ActivateSubscriptionRequest() + + result = mock_client.Subscriptions.activate( + subscription_id="sub_123456789", activate_subscription_request=activate_request + ) + + assert result["id"] == "sub_123456789" + assert result["status"] == SubscriptionStatus("ACTIVE") + mock_activate.assert_called_once_with( + subscription_id="sub_123456789", activate_subscription_request=activate_request + ) + + @patch.object(SubscriptionsApi, "send_link") + def test_send_subscription_link(self, mock_send_link, mock_client): + """Test sending a subscription link""" + success_response = {"success": True} + mock_send_link.return_value = success_response + + link_request = SendSubscriptionLinkRequest( + subscription_id="sub_123456789", email="customer@example.com" + ) + + result = mock_client.Subscriptions.send_link(send_subscription_link_request=link_request) + + assert result["success"] is True + mock_send_link.assert_called_once_with(send_subscription_link_request=link_request) + + @patch.object(SubscriptionsApi, "send_status") + def test_send_subscription_status(self, mock_send_status, mock_client): + """Test sending a subscription status""" + success_response = {"success": True} + mock_send_status.return_value = success_response + + status_request = SendSubscriptionStatusRequest( + subscription_id="sub_123456789", email="customer@example.com" + ) + + result = mock_client.Subscriptions.send_status( + send_subscription_status_request=status_request + ) + + assert result["success"] is True + mock_send_status.assert_called_once_with(send_subscription_status_request=status_request) diff --git a/test/test_update_subscription_request.py b/test/test_update_subscription_request.py index 283070c..592425e 100644 --- a/test/test_update_subscription_request.py +++ b/test/test_update_subscription_request.py @@ -3,21 +3,18 @@ """ MONEI API v1 - The MONEI API is organized around [REST](https://en.wikipedia.org/wiki/Representational_State_Transfer). Our API has predictable resource-oriented URLs, accepts JSON-encoded request bodies, returns JSON-encoded responses, and uses standard HTTP response codes, authentication, and verbs.

**Base URL:** https://api.monei.com/v1

**Client libraries:** # noqa: E501 +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

- The version of the OpenAPI document: 1.1.0 - Generated by: https://openapi-generator.tech -""" + The version of the OpenAPI document: 1.5.1 + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest -import datetime -import Monei -from Monei.models.update_subscription_request import UpdateSubscriptionRequest # noqa: E501 -from Monei.rest import ApiException +from Monei.models.update_subscription_request import UpdateSubscriptionRequest class TestUpdateSubscriptionRequest(unittest.TestCase): """UpdateSubscriptionRequest unit test stubs""" @@ -28,62 +25,68 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional): + def make_instance(self, include_optional) -> UpdateSubscriptionRequest: """Test UpdateSubscriptionRequest - include_option is a boolean, when False only required + include_optional is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = Monei.models.update_subscription_request.UpdateSubscriptionRequest() # noqa: E501 - if include_optional : + # uncomment below to create an instance of `UpdateSubscriptionRequest` + """ + model = UpdateSubscriptionRequest() + if include_optional: return UpdateSubscriptionRequest( - amount = 110, - interval = 'month', - interval_count = 1, - description = 'MoonMail Monthly Lite', + amount = 110, + interval = 'month', + interval_count = 1, + description = 'MoonMail Monthly Lite', customer = Monei.models.payment_customer.Payment-Customer( email = 'john.doe@example.com', name = 'John Doe', - phone = '0', ), + phone = '', ), billing_details = Monei.models.payment_billing_details.Payment-BillingDetails( name = 'John Doe', email = 'john.doe@example.com', - phone = '0', - company = '0', + phone = '', + company = '', + tax_id = '', address = Monei.models.address.Address( country = 'ES', city = 'Málaga', line1 = 'Fake Street 123', - line2 = '0', + line2 = '', zip = '1234', - state = 'Málaga', ), ), + state = 'Málaga', ), ), shipping_details = Monei.models.payment_shipping_details.Payment-ShippingDetails( name = 'John Doe', email = 'john.doe@example.com', - phone = '0', - company = '0', + phone = '', + company = '', + tax_id = '', address = Monei.models.address.Address( country = 'ES', city = 'Málaga', line1 = 'Fake Street 123', - line2 = '0', + line2 = '', zip = '1234', - state = 'Málaga', ), ), - trial_period_end = 1636366897, - callback_url = 'https://example.com/subscriptions/callback', - payment_callback_url = 'https://example.com/payments/callback', - pause_at_period_end = False, - cancel_at_period_end = False, - pause_interval_count = 1 + state = 'Málaga', ), ), + trial_period_end = 1636366897, + callback_url = 'https://example.com/subscriptions/callback', + payment_callback_url = 'https://example.com/payments/callback', + pause_at_period_end = False, + cancel_at_period_end = False, + pause_interval_count = 1, + retry_schedule = [{"interval":"day","intervalCount":1},{"interval":"day","intervalCount":3},{"interval":"week","intervalCount":1}], + metadata = {"systemId":"12345"} ) - else : + else: return UpdateSubscriptionRequest( ) + """ def testUpdateSubscriptionRequest(self): """Test UpdateSubscriptionRequest""" - inst_req_only = self.make_instance(include_optional=False) - inst_req_and_optional = self.make_instance(include_optional=True) - + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/test/test_validate_bizum_phone_request.py b/test/test_validate_bizum_phone_request.py index 8293bdf..639e24b 100644 --- a/test/test_validate_bizum_phone_request.py +++ b/test/test_validate_bizum_phone_request.py @@ -3,21 +3,18 @@ """ MONEI API v1 -

The MONEI API is organized around REST. Our API has predictable resource-oriented URLs, accepts JSON-encoded request bodies, returns JSON-encoded responses, and uses standard HTTP response codes, authentication, and verbs.

Base URL:

https://api.monei.com/v1

Client libraries:

Important:

If you are not using our official SDKs, you need to provide a valid User-Agent header in each request, otherwise your requests will be rejected.

# noqa: E501 +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

- The version of the OpenAPI document: 1.4.2 - Generated by: https://openapi-generator.tech -""" + The version of the OpenAPI document: 1.5.1 + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest -import datetime -import Monei -from Monei.models.validate_bizum_phone_request import ValidateBizumPhoneRequest # noqa: E501 -from Monei.rest import ApiException +from Monei.models.validate_bizum_phone_request import ValidateBizumPhoneRequest class TestValidateBizumPhoneRequest(unittest.TestCase): """ValidateBizumPhoneRequest unit test stubs""" @@ -28,29 +25,31 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional): + def make_instance(self, include_optional) -> ValidateBizumPhoneRequest: """Test ValidateBizumPhoneRequest - include_option is a boolean, when False only required + include_optional is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = Monei.models.validate_bizum_phone_request.ValidateBizumPhoneRequest() # noqa: E501 - if include_optional : + # uncomment below to create an instance of `ValidateBizumPhoneRequest` + """ + model = ValidateBizumPhoneRequest() + if include_optional: return ValidateBizumPhoneRequest( - account_id = 'aa9333ba-82de-400c-9ae7-087b9f8d2242', - payment_id = 'af6029f80f5fc73a8ad2753eea0b1be0', + account_id = 'aa9333ba-82de-400c-9ae7-087b9f8d2242', + payment_id = 'af6029f80f5fc73a8ad2753eea0b1be0', phone_number = '+34500000000' ) - else : + else: return ValidateBizumPhoneRequest( account_id = 'aa9333ba-82de-400c-9ae7-087b9f8d2242', phone_number = '+34500000000', ) + """ def testValidateBizumPhoneRequest(self): """Test ValidateBizumPhoneRequest""" - inst_req_only = self.make_instance(include_optional=False) - inst_req_and_optional = self.make_instance(include_optional=True) - + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/test/unit/test_client.py b/test/unit/test_client.py deleted file mode 100644 index 07fa912..0000000 --- a/test/unit/test_client.py +++ /dev/null @@ -1,40 +0,0 @@ -""" -Unit tests for the MONEI client. -""" - -import pytest -from unittest.mock import patch - -import Monei - - -class TestMoneiClient: - """Tests for the MoneiClient class.""" - - def test_client_initialization(self, api_key): - """Test that the client is initialized with the correct API key.""" - client = Monei.MoneiClient(api_key=api_key) - assert client.api_key == api_key - assert client.api_client is not None - - def test_client_initialization_without_api_key(self): - """Test that an error is raised when no API key is provided.""" - with pytest.raises(ValueError, match="API key is required"): - Monei.MoneiClient(api_key=None) - - @patch("Monei.api_client.ApiClient") - def test_client_with_custom_configuration(self, mock_api_client, api_key): - """Test that the client can be initialized with a custom configuration.""" - Monei.MoneiClient( - api_key=api_key, - host="https://custom-api.monei.com", - ssl_ca_cert="/path/to/cert", - verify_ssl=False, - ) - - # Check that the configuration was passed to the API client - mock_api_client.assert_called_once() - config = mock_api_client.call_args[0][0] - assert config.host == "https://custom-api.monei.com" - assert config.ssl_ca_cert == "/path/to/cert" - assert config.verify_ssl is False diff --git a/uv-dev.lock b/uv-dev.lock deleted file mode 100644 index af8ea67..0000000 --- a/uv-dev.lock +++ /dev/null @@ -1,42 +0,0 @@ -# This file was autogenerated by uv via the following command: -# uv pip compile pyproject.toml --extra test --extra lint -o uv-dev.lock -black==25.1.0 - # via monei-python-sdk (pyproject.toml) -certifi==2025.1.31 - # via monei-python-sdk (pyproject.toml) -click==8.1.8 - # via black -coverage==7.6.12 - # via pytest-cov -iniconfig==2.0.0 - # via pytest -mypy-extensions==1.0.0 - # via black -packaging==24.2 - # via - # black - # pytest -pathspec==0.12.1 - # via black -platformdirs==4.3.6 - # via black -pluggy==1.5.0 - # via pytest -pytest==8.3.5 - # via - # monei-python-sdk (pyproject.toml) - # pytest-cov -pytest-cov==6.0.0 - # via monei-python-sdk (pyproject.toml) -python-dateutil==2.9.0.post0 - # via monei-python-sdk (pyproject.toml) -ruff==0.9.9 - # via monei-python-sdk (pyproject.toml) -setuptools==75.8.2 - # via monei-python-sdk (pyproject.toml) -six==1.17.0 - # via - # monei-python-sdk (pyproject.toml) - # python-dateutil -urllib3==2.3.0 - # via monei-python-sdk (pyproject.toml) diff --git a/uv.lock b/uv.lock index dc78d0d..62d4c92 100644 --- a/uv.lock +++ b/uv.lock @@ -1,14 +1,278 @@ -# This file was autogenerated by uv via the following command: -# uv pip compile pyproject.toml -o uv.lock -certifi==2025.1.31 - # via monei-python-sdk (pyproject.toml) -python-dateutil==2.9.0.post0 - # via monei-python-sdk (pyproject.toml) -setuptools==75.8.2 - # via monei-python-sdk (pyproject.toml) -six==1.17.0 - # via - # monei-python-sdk (pyproject.toml) - # python-dateutil -urllib3==2.3.0 - # via monei-python-sdk (pyproject.toml) +version = 1 +revision = 1 +requires-python = ">=3.12" + +[[package]] +name = "black" +version = "25.1.0" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "click" }, + { name = "mypy-extensions" }, + { name = "packaging" }, + { name = "pathspec" }, + { name = "platformdirs" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/94/49/26a7b0f3f35da4b5a65f081943b7bcd22d7002f5f0fb8098ec1ff21cb6ef/black-25.1.0.tar.gz", hash = "sha256:33496d5cd1222ad73391352b4ae8da15253c5de89b93a80b3e2c8d9a19ec2666", size = 649449 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/83/71/3fe4741df7adf015ad8dfa082dd36c94ca86bb21f25608eb247b4afb15b2/black-25.1.0-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:4b60580e829091e6f9238c848ea6750efed72140b91b048770b64e74fe04908b", size = 1650988 }, + { url = "https://files.pythonhosted.org/packages/13/f3/89aac8a83d73937ccd39bbe8fc6ac8860c11cfa0af5b1c96d081facac844/black-25.1.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:1e2978f6df243b155ef5fa7e558a43037c3079093ed5d10fd84c43900f2d8ecc", size = 1453985 }, + { url = "https://files.pythonhosted.org/packages/6f/22/b99efca33f1f3a1d2552c714b1e1b5ae92efac6c43e790ad539a163d1754/black-25.1.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:3b48735872ec535027d979e8dcb20bf4f70b5ac75a8ea99f127c106a7d7aba9f", size = 1783816 }, + { url = "https://files.pythonhosted.org/packages/18/7e/a27c3ad3822b6f2e0e00d63d58ff6299a99a5b3aee69fa77cd4b0076b261/black-25.1.0-cp312-cp312-win_amd64.whl", hash = "sha256:ea0213189960bda9cf99be5b8c8ce66bb054af5e9e861249cd23471bd7b0b3ba", size = 1440860 }, + { url = "https://files.pythonhosted.org/packages/98/87/0edf98916640efa5d0696e1abb0a8357b52e69e82322628f25bf14d263d1/black-25.1.0-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:8f0b18a02996a836cc9c9c78e5babec10930862827b1b724ddfe98ccf2f2fe4f", size = 1650673 }, + { url = "https://files.pythonhosted.org/packages/52/e5/f7bf17207cf87fa6e9b676576749c6b6ed0d70f179a3d812c997870291c3/black-25.1.0-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:afebb7098bfbc70037a053b91ae8437c3857482d3a690fefc03e9ff7aa9a5fd3", size = 1453190 }, + { url = "https://files.pythonhosted.org/packages/e3/ee/adda3d46d4a9120772fae6de454c8495603c37c4c3b9c60f25b1ab6401fe/black-25.1.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:030b9759066a4ee5e5aca28c3c77f9c64789cdd4de8ac1df642c40b708be6171", size = 1782926 }, + { url = "https://files.pythonhosted.org/packages/cc/64/94eb5f45dcb997d2082f097a3944cfc7fe87e071907f677e80788a2d7b7a/black-25.1.0-cp313-cp313-win_amd64.whl", hash = "sha256:a22f402b410566e2d1c950708c77ebf5ebd5d0d88a6a2e87c86d9fb48afa0d18", size = 1442613 }, + { url = "https://files.pythonhosted.org/packages/09/71/54e999902aed72baf26bca0d50781b01838251a462612966e9fc4891eadd/black-25.1.0-py3-none-any.whl", hash = "sha256:95e8176dae143ba9097f351d174fdaf0ccd29efb414b362ae3fd72bf0f710717", size = 207646 }, +] + +[[package]] +name = "certifi" +version = "2025.1.31" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/1c/ab/c9f1e32b7b1bf505bf26f0ef697775960db7932abeb7b516de930ba2705f/certifi-2025.1.31.tar.gz", hash = "sha256:3d5da6925056f6f18f119200434a4780a94263f10d1c21d032a6f6b2baa20651", size = 167577 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/38/fc/bce832fd4fd99766c04d1ee0eead6b0ec6486fb100ae5e74c1d91292b982/certifi-2025.1.31-py3-none-any.whl", hash = "sha256:ca78db4565a652026a4db2bcdf68f2fb589ea80d0be70e03929ed730746b84fe", size = 166393 }, +] + +[[package]] +name = "click" +version = "8.1.8" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "colorama", marker = "sys_platform == 'win32'" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/b9/2e/0090cbf739cee7d23781ad4b89a9894a41538e4fcf4c31dcdd705b78eb8b/click-8.1.8.tar.gz", hash = "sha256:ed53c9d8990d83c2a27deae68e4ee337473f6330c040a31d4225c9574d16096a", size = 226593 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/7e/d4/7ebdbd03970677812aac39c869717059dbb71a4cfc033ca6e5221787892c/click-8.1.8-py3-none-any.whl", hash = "sha256:63c132bbbed01578a06712a2d1f497bb62d9c1c0d329b7903a866228027263b2", size = 98188 }, +] + +[[package]] +name = "colorama" +version = "0.4.6" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/d8/53/6f443c9a4a8358a93a6792e2acffb9d9d5cb0a5cfd8802644b7b1c9a02e4/colorama-0.4.6.tar.gz", hash = "sha256:08695f5cb7ed6e0531a20572697297273c47b8cae5a63ffc6d6ed5c201be6e44", size = 27697 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/d1/d6/3965ed04c63042e047cb6a3e6ed1a63a35087b6a609aa3a15ed8ac56c221/colorama-0.4.6-py2.py3-none-any.whl", hash = "sha256:4f1d9991f5acc0ca119f9d443620b77f9d6b33703e51011c16baf57afb285fc6", size = 25335 }, +] + +[[package]] +name = "coverage" +version = "7.6.12" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/0c/d6/2b53ab3ee99f2262e6f0b8369a43f6d66658eab45510331c0b3d5c8c4272/coverage-7.6.12.tar.gz", hash = "sha256:48cfc4641d95d34766ad41d9573cc0f22a48aa88d22657a1fe01dca0dbae4de2", size = 805941 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/e2/7f/4af2ed1d06ce6bee7eafc03b2ef748b14132b0bdae04388e451e4b2c529b/coverage-7.6.12-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:b172f8e030e8ef247b3104902cc671e20df80163b60a203653150d2fc204d1ad", size = 208645 }, + { url = "https://files.pythonhosted.org/packages/dc/60/d19df912989117caa95123524d26fc973f56dc14aecdec5ccd7d0084e131/coverage-7.6.12-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:641dfe0ab73deb7069fb972d4d9725bf11c239c309ce694dd50b1473c0f641c3", size = 208898 }, + { url = "https://files.pythonhosted.org/packages/bd/10/fecabcf438ba676f706bf90186ccf6ff9f6158cc494286965c76e58742fa/coverage-7.6.12-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:0e549f54ac5f301e8e04c569dfdb907f7be71b06b88b5063ce9d6953d2d58574", size = 242987 }, + { url = "https://files.pythonhosted.org/packages/4c/53/4e208440389e8ea936f5f2b0762dcd4cb03281a7722def8e2bf9dc9c3d68/coverage-7.6.12-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:959244a17184515f8c52dcb65fb662808767c0bd233c1d8a166e7cf74c9ea985", size = 239881 }, + { url = "https://files.pythonhosted.org/packages/c4/47/2ba744af8d2f0caa1f17e7746147e34dfc5f811fb65fc153153722d58835/coverage-7.6.12-cp312-cp312-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:bda1c5f347550c359f841d6614fb8ca42ae5cb0b74d39f8a1e204815ebe25750", size = 242142 }, + { url = "https://files.pythonhosted.org/packages/e9/90/df726af8ee74d92ee7e3bf113bf101ea4315d71508952bd21abc3fae471e/coverage-7.6.12-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:1ceeb90c3eda1f2d8c4c578c14167dbd8c674ecd7d38e45647543f19839dd6ea", size = 241437 }, + { url = "https://files.pythonhosted.org/packages/f6/af/995263fd04ae5f9cf12521150295bf03b6ba940d0aea97953bb4a6db3e2b/coverage-7.6.12-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:0f16f44025c06792e0fb09571ae454bcc7a3ec75eeb3c36b025eccf501b1a4c3", size = 239724 }, + { url = "https://files.pythonhosted.org/packages/1c/8e/5bb04f0318805e190984c6ce106b4c3968a9562a400180e549855d8211bd/coverage-7.6.12-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:b076e625396e787448d27a411aefff867db2bffac8ed04e8f7056b07024eed5a", size = 241329 }, + { url = "https://files.pythonhosted.org/packages/9e/9d/fa04d9e6c3f6459f4e0b231925277cfc33d72dfab7fa19c312c03e59da99/coverage-7.6.12-cp312-cp312-win32.whl", hash = "sha256:00b2086892cf06c7c2d74983c9595dc511acca00665480b3ddff749ec4fb2a95", size = 211289 }, + { url = "https://files.pythonhosted.org/packages/53/40/53c7ffe3c0c3fff4d708bc99e65f3d78c129110d6629736faf2dbd60ad57/coverage-7.6.12-cp312-cp312-win_amd64.whl", hash = "sha256:7ae6eabf519bc7871ce117fb18bf14e0e343eeb96c377667e3e5dd12095e0288", size = 212079 }, + { url = "https://files.pythonhosted.org/packages/76/89/1adf3e634753c0de3dad2f02aac1e73dba58bc5a3a914ac94a25b2ef418f/coverage-7.6.12-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:488c27b3db0ebee97a830e6b5a3ea930c4a6e2c07f27a5e67e1b3532e76b9ef1", size = 208673 }, + { url = "https://files.pythonhosted.org/packages/ce/64/92a4e239d64d798535c5b45baac6b891c205a8a2e7c9cc8590ad386693dc/coverage-7.6.12-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:5d1095bbee1851269f79fd8e0c9b5544e4c00c0c24965e66d8cba2eb5bb535fd", size = 208945 }, + { url = "https://files.pythonhosted.org/packages/b4/d0/4596a3ef3bca20a94539c9b1e10fd250225d1dec57ea78b0867a1cf9742e/coverage-7.6.12-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:0533adc29adf6a69c1baa88c3d7dbcaadcffa21afbed3ca7a225a440e4744bf9", size = 242484 }, + { url = "https://files.pythonhosted.org/packages/1c/ef/6fd0d344695af6718a38d0861408af48a709327335486a7ad7e85936dc6e/coverage-7.6.12-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:53c56358d470fa507a2b6e67a68fd002364d23c83741dbc4c2e0680d80ca227e", size = 239525 }, + { url = "https://files.pythonhosted.org/packages/0c/4b/373be2be7dd42f2bcd6964059fd8fa307d265a29d2b9bcf1d044bcc156ed/coverage-7.6.12-cp313-cp313-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:64cbb1a3027c79ca6310bf101014614f6e6e18c226474606cf725238cf5bc2d4", size = 241545 }, + { url = "https://files.pythonhosted.org/packages/a6/7d/0e83cc2673a7790650851ee92f72a343827ecaaea07960587c8f442b5cd3/coverage-7.6.12-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:79cac3390bfa9836bb795be377395f28410811c9066bc4eefd8015258a7578c6", size = 241179 }, + { url = "https://files.pythonhosted.org/packages/ff/8c/566ea92ce2bb7627b0900124e24a99f9244b6c8c92d09ff9f7633eb7c3c8/coverage-7.6.12-cp313-cp313-musllinux_1_2_i686.whl", hash = "sha256:9b148068e881faa26d878ff63e79650e208e95cf1c22bd3f77c3ca7b1d9821a3", size = 239288 }, + { url = "https://files.pythonhosted.org/packages/7d/e4/869a138e50b622f796782d642c15fb5f25a5870c6d0059a663667a201638/coverage-7.6.12-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:8bec2ac5da793c2685ce5319ca9bcf4eee683b8a1679051f8e6ec04c4f2fd7dc", size = 241032 }, + { url = "https://files.pythonhosted.org/packages/ae/28/a52ff5d62a9f9e9fe9c4f17759b98632edd3a3489fce70154c7d66054dd3/coverage-7.6.12-cp313-cp313-win32.whl", hash = "sha256:200e10beb6ddd7c3ded322a4186313d5ca9e63e33d8fab4faa67ef46d3460af3", size = 211315 }, + { url = "https://files.pythonhosted.org/packages/bc/17/ab849b7429a639f9722fa5628364c28d675c7ff37ebc3268fe9840dda13c/coverage-7.6.12-cp313-cp313-win_amd64.whl", hash = "sha256:2b996819ced9f7dbb812c701485d58f261bef08f9b85304d41219b1496b591ef", size = 212099 }, + { url = "https://files.pythonhosted.org/packages/d2/1c/b9965bf23e171d98505eb5eb4fb4d05c44efd256f2e0f19ad1ba8c3f54b0/coverage-7.6.12-cp313-cp313t-macosx_10_13_x86_64.whl", hash = "sha256:299cf973a7abff87a30609879c10df0b3bfc33d021e1adabc29138a48888841e", size = 209511 }, + { url = "https://files.pythonhosted.org/packages/57/b3/119c201d3b692d5e17784fee876a9a78e1b3051327de2709392962877ca8/coverage-7.6.12-cp313-cp313t-macosx_11_0_arm64.whl", hash = "sha256:4b467a8c56974bf06e543e69ad803c6865249d7a5ccf6980457ed2bc50312703", size = 209729 }, + { url = "https://files.pythonhosted.org/packages/52/4e/a7feb5a56b266304bc59f872ea07b728e14d5a64f1ad3a2cc01a3259c965/coverage-7.6.12-cp313-cp313t-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:2458f275944db8129f95d91aee32c828a408481ecde3b30af31d552c2ce284a0", size = 253988 }, + { url = "https://files.pythonhosted.org/packages/65/19/069fec4d6908d0dae98126aa7ad08ce5130a6decc8509da7740d36e8e8d2/coverage-7.6.12-cp313-cp313t-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:0a9d8be07fb0832636a0f72b80d2a652fe665e80e720301fb22b191c3434d924", size = 249697 }, + { url = "https://files.pythonhosted.org/packages/1c/da/5b19f09ba39df7c55f77820736bf17bbe2416bbf5216a3100ac019e15839/coverage-7.6.12-cp313-cp313t-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:14d47376a4f445e9743f6c83291e60adb1b127607a3618e3185bbc8091f0467b", size = 252033 }, + { url = "https://files.pythonhosted.org/packages/1e/89/4c2750df7f80a7872267f7c5fe497c69d45f688f7b3afe1297e52e33f791/coverage-7.6.12-cp313-cp313t-musllinux_1_2_aarch64.whl", hash = "sha256:b95574d06aa9d2bd6e5cc35a5bbe35696342c96760b69dc4287dbd5abd4ad51d", size = 251535 }, + { url = "https://files.pythonhosted.org/packages/78/3b/6d3ae3c1cc05f1b0460c51e6f6dcf567598cbd7c6121e5ad06643974703c/coverage-7.6.12-cp313-cp313t-musllinux_1_2_i686.whl", hash = "sha256:ecea0c38c9079570163d663c0433a9af4094a60aafdca491c6a3d248c7432827", size = 249192 }, + { url = "https://files.pythonhosted.org/packages/6e/8e/c14a79f535ce41af7d436bbad0d3d90c43d9e38ec409b4770c894031422e/coverage-7.6.12-cp313-cp313t-musllinux_1_2_x86_64.whl", hash = "sha256:2251fabcfee0a55a8578a9d29cecfee5f2de02f11530e7d5c5a05859aa85aee9", size = 250627 }, + { url = "https://files.pythonhosted.org/packages/cb/79/b7cee656cfb17a7f2c1b9c3cee03dd5d8000ca299ad4038ba64b61a9b044/coverage-7.6.12-cp313-cp313t-win32.whl", hash = "sha256:eb5507795caabd9b2ae3f1adc95f67b1104971c22c624bb354232d65c4fc90b3", size = 212033 }, + { url = "https://files.pythonhosted.org/packages/b6/c3/f7aaa3813f1fa9a4228175a7bd368199659d392897e184435a3b66408dd3/coverage-7.6.12-cp313-cp313t-win_amd64.whl", hash = "sha256:f60a297c3987c6c02ffb29effc70eadcbb412fe76947d394a1091a3615948e2f", size = 213240 }, + { url = "https://files.pythonhosted.org/packages/fb/b2/f655700e1024dec98b10ebaafd0cedbc25e40e4abe62a3c8e2ceef4f8f0a/coverage-7.6.12-py3-none-any.whl", hash = "sha256:eb8668cfbc279a536c633137deeb9435d2962caec279c3f8cf8b91fff6ff8953", size = 200552 }, +] + +[[package]] +name = "iniconfig" +version = "2.0.0" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/d7/4b/cbd8e699e64a6f16ca3a8220661b5f83792b3017d0f79807cb8708d33913/iniconfig-2.0.0.tar.gz", hash = "sha256:2d91e135bf72d31a410b17c16da610a82cb55f6b0477d1a902134b24a455b8b3", size = 4646 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/ef/a6/62565a6e1cf69e10f5727360368e451d4b7f58beeac6173dc9db836a5b46/iniconfig-2.0.0-py3-none-any.whl", hash = "sha256:b6a85871a79d2e3b22d2d1b94ac2824226a63c6b741c88f7ae975f18b6778374", size = 5892 }, +] + +[[package]] +name = "monei-python-sdk" +version = "0.1.0" +source = { editable = "." } +dependencies = [ + { name = "certifi" }, + { name = "python-dateutil" }, + { name = "setuptools" }, + { name = "six" }, + { name = "urllib3" }, +] + +[package.optional-dependencies] +lint = [ + { name = "black" }, + { name = "ruff" }, +] +test = [ + { name = "pytest" }, + { name = "pytest-cov" }, +] + +[package.metadata] +requires-dist = [ + { name = "black", marker = "extra == 'lint'", specifier = ">=23.0.0" }, + { name = "certifi" }, + { name = "pytest", marker = "extra == 'test'", specifier = ">=7.0.0" }, + { name = "pytest-cov", marker = "extra == 'test'", specifier = ">=4.0.0" }, + { name = "python-dateutil", specifier = ">=2.5.3" }, + { name = "ruff", marker = "extra == 'lint'", specifier = ">=0.1.0" }, + { name = "setuptools", specifier = ">=21.0.0" }, + { name = "six", specifier = ">=1.10" }, + { name = "urllib3", specifier = ">=1.25.3" }, +] +provides-extras = ["test", "lint"] + +[[package]] +name = "mypy-extensions" +version = "1.0.0" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/98/a4/1ab47638b92648243faf97a5aeb6ea83059cc3624972ab6b8d2316078d3f/mypy_extensions-1.0.0.tar.gz", hash = "sha256:75dbf8955dc00442a438fc4d0666508a9a97b6bd41aa2f0ffe9d2f2725af0782", size = 4433 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/2a/e2/5d3f6ada4297caebe1a2add3b126fe800c96f56dbe5d1988a2cbe0b267aa/mypy_extensions-1.0.0-py3-none-any.whl", hash = "sha256:4392f6c0eb8a5668a69e23d168ffa70f0be9ccfd32b5cc2d26a34ae5b844552d", size = 4695 }, +] + +[[package]] +name = "packaging" +version = "24.2" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/d0/63/68dbb6eb2de9cb10ee4c9c14a0148804425e13c4fb20d61cce69f53106da/packaging-24.2.tar.gz", hash = "sha256:c228a6dc5e932d346bc5739379109d49e8853dd8223571c7c5b55260edc0b97f", size = 163950 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/88/ef/eb23f262cca3c0c4eb7ab1933c3b1f03d021f2c48f54763065b6f0e321be/packaging-24.2-py3-none-any.whl", hash = "sha256:09abb1bccd265c01f4a3aa3f7a7db064b36514d2cba19a2f694fe6150451a759", size = 65451 }, +] + +[[package]] +name = "pathspec" +version = "0.12.1" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/ca/bc/f35b8446f4531a7cb215605d100cd88b7ac6f44ab3fc94870c120ab3adbf/pathspec-0.12.1.tar.gz", hash = "sha256:a482d51503a1ab33b1c67a6c3813a26953dbdc71c31dacaef9a838c4e29f5712", size = 51043 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/cc/20/ff623b09d963f88bfde16306a54e12ee5ea43e9b597108672ff3a408aad6/pathspec-0.12.1-py3-none-any.whl", hash = "sha256:a0d503e138a4c123b27490a4f7beda6a01c6f288df0e4a8b79c7eb0dc7b4cc08", size = 31191 }, +] + +[[package]] +name = "platformdirs" +version = "4.3.6" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/13/fc/128cc9cb8f03208bdbf93d3aa862e16d376844a14f9a0ce5cf4507372de4/platformdirs-4.3.6.tar.gz", hash = "sha256:357fb2acbc885b0419afd3ce3ed34564c13c9b95c89360cd9563f73aa5e2b907", size = 21302 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/3c/a6/bc1012356d8ece4d66dd75c4b9fc6c1f6650ddd5991e421177d9f8f671be/platformdirs-4.3.6-py3-none-any.whl", hash = "sha256:73e575e1408ab8103900836b97580d5307456908a03e92031bab39e4554cc3fb", size = 18439 }, +] + +[[package]] +name = "pluggy" +version = "1.5.0" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/96/2d/02d4312c973c6050a18b314a5ad0b3210edb65a906f868e31c111dede4a6/pluggy-1.5.0.tar.gz", hash = "sha256:2cffa88e94fdc978c4c574f15f9e59b7f4201d439195c3715ca9e2486f1d0cf1", size = 67955 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/88/5f/e351af9a41f866ac3f1fac4ca0613908d9a41741cfcf2228f4ad853b697d/pluggy-1.5.0-py3-none-any.whl", hash = "sha256:44e1ad92c8ca002de6377e165f3e0f1be63266ab4d554740532335b9d75ea669", size = 20556 }, +] + +[[package]] +name = "pytest" +version = "8.3.5" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "colorama", marker = "sys_platform == 'win32'" }, + { name = "iniconfig" }, + { name = "packaging" }, + { name = "pluggy" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/ae/3c/c9d525a414d506893f0cd8a8d0de7706446213181570cdbd766691164e40/pytest-8.3.5.tar.gz", hash = "sha256:f4efe70cc14e511565ac476b57c279e12a855b11f48f212af1080ef2263d3845", size = 1450891 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/30/3d/64ad57c803f1fa1e963a7946b6e0fea4a70df53c1a7fed304586539c2bac/pytest-8.3.5-py3-none-any.whl", hash = "sha256:c69214aa47deac29fad6c2a4f590b9c4a9fdb16a403176fe154b79c0b4d4d820", size = 343634 }, +] + +[[package]] +name = "pytest-cov" +version = "6.0.0" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "coverage" }, + { name = "pytest" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/be/45/9b538de8cef30e17c7b45ef42f538a94889ed6a16f2387a6c89e73220651/pytest-cov-6.0.0.tar.gz", hash = "sha256:fde0b595ca248bb8e2d76f020b465f3b107c9632e6a1d1705f17834c89dcadc0", size = 66945 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/36/3b/48e79f2cd6a61dbbd4807b4ed46cb564b4fd50a76166b1c4ea5c1d9e2371/pytest_cov-6.0.0-py3-none-any.whl", hash = "sha256:eee6f1b9e61008bd34975a4d5bab25801eb31898b032dd55addc93e96fcaaa35", size = 22949 }, +] + +[[package]] +name = "python-dateutil" +version = "2.9.0.post0" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "six" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/66/c0/0c8b6ad9f17a802ee498c46e004a0eb49bc148f2fd230864601a86dcf6db/python-dateutil-2.9.0.post0.tar.gz", hash = "sha256:37dd54208da7e1cd875388217d5e00ebd4179249f90fb72437e91a35459a0ad3", size = 342432 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/ec/57/56b9bcc3c9c6a792fcbaf139543cee77261f3651ca9da0c93f5c1221264b/python_dateutil-2.9.0.post0-py2.py3-none-any.whl", hash = "sha256:a8b2bc7bffae282281c8140a97d3aa9c14da0b136dfe83f850eea9a5f7470427", size = 229892 }, +] + +[[package]] +name = "ruff" +version = "0.9.9" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/6f/c3/418441a8170e8d53d05c0b9dad69760dbc7b8a12c10dbe6db1e1205d2377/ruff-0.9.9.tar.gz", hash = "sha256:0062ed13f22173e85f8f7056f9a24016e692efeea8704d1a5e8011b8aa850933", size = 3717448 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/bc/c3/2c4afa9ba467555d074b146d9aed0633a56ccdb900839fb008295d037b89/ruff-0.9.9-py3-none-linux_armv6l.whl", hash = "sha256:628abb5ea10345e53dff55b167595a159d3e174d6720bf19761f5e467e68d367", size = 10027252 }, + { url = "https://files.pythonhosted.org/packages/33/d1/439e58487cf9eac26378332e25e7d5ade4b800ce1eec7dc2cfc9b0d7ca96/ruff-0.9.9-py3-none-macosx_10_12_x86_64.whl", hash = "sha256:b6cd1428e834b35d7493354723543b28cc11dc14d1ce19b685f6e68e07c05ec7", size = 10840721 }, + { url = "https://files.pythonhosted.org/packages/50/44/fead822c38281ba0122f1b76b460488a175a9bd48b130650a6fb6dbcbcf9/ruff-0.9.9-py3-none-macosx_11_0_arm64.whl", hash = "sha256:5ee162652869120ad260670706f3cd36cd3f32b0c651f02b6da142652c54941d", size = 10161439 }, + { url = "https://files.pythonhosted.org/packages/11/ae/d404a2ab8e61ddf6342e09cc6b7f7846cce6b243e45c2007dbe0ca928a5d/ruff-0.9.9-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:3aa0f6b75082c9be1ec5a1db78c6d4b02e2375c3068438241dc19c7c306cc61a", size = 10336264 }, + { url = "https://files.pythonhosted.org/packages/6a/4e/7c268aa7d84cd709fb6f046b8972313142cffb40dfff1d2515c5e6288d54/ruff-0.9.9-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:584cc66e89fb5f80f84b05133dd677a17cdd86901d6479712c96597a3f28e7fe", size = 9908774 }, + { url = "https://files.pythonhosted.org/packages/cc/26/c618a878367ef1b76270fd027ca93692657d3f6122b84ba48911ef5f2edc/ruff-0.9.9-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:abf3369325761a35aba75cd5c55ba1b5eb17d772f12ab168fbfac54be85cf18c", size = 11428127 }, + { url = "https://files.pythonhosted.org/packages/d7/9a/c5588a93d9bfed29f565baf193fe802fa676a0c837938137ea6cf0576d8c/ruff-0.9.9-py3-none-manylinux_2_17_ppc64.manylinux2014_ppc64.whl", hash = "sha256:3403a53a32a90ce929aa2f758542aca9234befa133e29f4933dcef28a24317be", size = 12133187 }, + { url = "https://files.pythonhosted.org/packages/3e/ff/e7980a7704a60905ed7e156a8d73f604c846d9bd87deda9cabfa6cba073a/ruff-0.9.9-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:18454e7fa4e4d72cffe28a37cf6a73cb2594f81ec9f4eca31a0aaa9ccdfb1590", size = 11602937 }, + { url = "https://files.pythonhosted.org/packages/24/78/3690444ad9e3cab5c11abe56554c35f005b51d1d118b429765249095269f/ruff-0.9.9-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:0fadfe2c88724c9617339f62319ed40dcdadadf2888d5afb88bf3adee7b35bfb", size = 13771698 }, + { url = "https://files.pythonhosted.org/packages/6e/bf/e477c2faf86abe3988e0b5fd22a7f3520e820b2ee335131aca2e16120038/ruff-0.9.9-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6df104d08c442a1aabcfd254279b8cc1e2cbf41a605aa3e26610ba1ec4acf0b0", size = 11249026 }, + { url = "https://files.pythonhosted.org/packages/f7/82/cdaffd59e5a8cb5b14c408c73d7a555a577cf6645faaf83e52fe99521715/ruff-0.9.9-py3-none-musllinux_1_2_aarch64.whl", hash = "sha256:d7c62939daf5b2a15af48abbd23bea1efdd38c312d6e7c4cedf5a24e03207e17", size = 10220432 }, + { url = "https://files.pythonhosted.org/packages/fe/a4/2507d0026225efa5d4412b6e294dfe54725a78652a5c7e29e6bd0fc492f3/ruff-0.9.9-py3-none-musllinux_1_2_armv7l.whl", hash = "sha256:9494ba82a37a4b81b6a798076e4a3251c13243fc37967e998efe4cce58c8a8d1", size = 9874602 }, + { url = "https://files.pythonhosted.org/packages/d5/be/f3aab1813846b476c4bcffe052d232244979c3cd99d751c17afb530ca8e4/ruff-0.9.9-py3-none-musllinux_1_2_i686.whl", hash = "sha256:4efd7a96ed6d36ef011ae798bf794c5501a514be369296c672dab7921087fa57", size = 10851212 }, + { url = "https://files.pythonhosted.org/packages/8b/45/8e5fd559bea0d2f57c4e12bf197a2fade2fac465aa518284f157dfbca92b/ruff-0.9.9-py3-none-musllinux_1_2_x86_64.whl", hash = "sha256:ab90a7944c5a1296f3ecb08d1cbf8c2da34c7e68114b1271a431a3ad30cb660e", size = 11327490 }, + { url = "https://files.pythonhosted.org/packages/42/55/e6c90f13880aeef327746052907e7e930681f26a164fe130ddac28b08269/ruff-0.9.9-py3-none-win32.whl", hash = "sha256:6b4c376d929c25ecd6d87e182a230fa4377b8e5125a4ff52d506ee8c087153c1", size = 10227912 }, + { url = "https://files.pythonhosted.org/packages/35/b2/da925693cb82a1208aa34966c0f36cb222baca94e729dd22a587bc22d0f3/ruff-0.9.9-py3-none-win_amd64.whl", hash = "sha256:837982ea24091d4c1700ddb2f63b7070e5baec508e43b01de013dc7eff974ff1", size = 11355632 }, + { url = "https://files.pythonhosted.org/packages/31/d8/de873d1c1b020d668d8ec9855d390764cb90cf8f6486c0983da52be8b7b7/ruff-0.9.9-py3-none-win_arm64.whl", hash = "sha256:3ac78f127517209fe6d96ab00f3ba97cafe38718b23b1db3e96d8b2d39e37ddf", size = 10435860 }, +] + +[[package]] +name = "setuptools" +version = "75.8.2" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/d1/53/43d99d7687e8cdef5ab5f9ec5eaf2c0423c2b35133a2b7e7bc276fc32b21/setuptools-75.8.2.tar.gz", hash = "sha256:4880473a969e5f23f2a2be3646b2dfd84af9028716d398e46192f84bc36900d2", size = 1344083 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/a9/38/7d7362e031bd6dc121e5081d8cb6aa6f6fedf2b67bf889962134c6da4705/setuptools-75.8.2-py3-none-any.whl", hash = "sha256:558e47c15f1811c1fa7adbd0096669bf76c1d3f433f58324df69f3f5ecac4e8f", size = 1229385 }, +] + +[[package]] +name = "six" +version = "1.17.0" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/94/e7/b2c673351809dca68a0e064b6af791aa332cf192da575fd474ed7d6f16a2/six-1.17.0.tar.gz", hash = "sha256:ff70335d468e7eb6ec65b95b99d3a2836546063f63acc5171de367e834932a81", size = 34031 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/b7/ce/149a00dd41f10bc29e5921b496af8b574d8413afcd5e30dfa0ed46c2cc5e/six-1.17.0-py2.py3-none-any.whl", hash = "sha256:4721f391ed90541fddacab5acf947aa0d3dc7d27b2e1e8eda2be8970586c3274", size = 11050 }, +] + +[[package]] +name = "urllib3" +version = "2.3.0" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/aa/63/e53da845320b757bf29ef6a9062f5c669fe997973f966045cb019c3f4b66/urllib3-2.3.0.tar.gz", hash = "sha256:f8c5449b3cf0861679ce7e0503c7b44b5ec981bec0d1d3795a07f1ba96f0204d", size = 307268 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/c8/19/4ec628951a74043532ca2cf5d97b7b14863931476d117c471e8e2b1eb39f/urllib3-2.3.0-py3-none-any.whl", hash = "sha256:1cee9ad369867bfdbbb48b7dd50374c0967a0bb7710050facf0dd6911440e3df", size = 128369 }, +] diff --git a/yarn.lock b/yarn.lock index 72ca62a..018f3f7 100644 --- a/yarn.lock +++ b/yarn.lock @@ -278,54 +278,59 @@ __metadata: languageName: node linkType: hard -"@nestjs/axios@npm:3.1.3": - version: 3.1.3 - resolution: "@nestjs/axios@npm:3.1.3" +"@nestjs/axios@npm:0.1.0": + version: 0.1.0 + resolution: "@nestjs/axios@npm:0.1.0" + dependencies: + axios: "npm:0.27.2" peerDependencies: - "@nestjs/common": ^7.0.0 || ^8.0.0 || ^9.0.0 || ^10.0.0 - axios: ^1.3.1 + "@nestjs/common": ^7.0.0 || ^8.0.0 || ^9.0.0 + reflect-metadata: ^0.1.12 rxjs: ^6.0.0 || ^7.0.0 - checksum: 10c0/3b3f5ecc9a17317daafbf6ffe0cb792c5bd44d9fe7c6e2bda5d87163b9c2ed05a71a49d4e2d810c455eaa94f25e85e63673da21d674917bd9c16dfb937771109 + checksum: 10c0/21ae5ccd7352c16b2f2f14177fc20b2a2aa0e556437980380175b92181a91b8498f43e5b132de5a6175fc30022e2f7fbc750c10dedd6316b7fe50c351a22942a languageName: node linkType: hard -"@nestjs/common@npm:10.4.15": - version: 10.4.15 - resolution: "@nestjs/common@npm:10.4.15" +"@nestjs/common@npm:9.3.11": + version: 9.3.11 + resolution: "@nestjs/common@npm:9.3.11" dependencies: iterare: "npm:1.2.1" - tslib: "npm:2.8.1" - uid: "npm:2.0.2" + tslib: "npm:2.5.0" + uid: "npm:2.0.1" peerDependencies: + cache-manager: <=5 class-transformer: "*" class-validator: "*" - reflect-metadata: ^0.1.12 || ^0.2.0 + reflect-metadata: ^0.1.12 rxjs: ^7.1.0 peerDependenciesMeta: + cache-manager: + optional: true class-transformer: optional: true class-validator: optional: true - checksum: 10c0/9566993fd3f805df2be632f5a16ca90d81b0deeb50e1e7cde4a49d4948c0d8d7db58b42ded70f35061e95e91a40d2adcd9e19cb2771090114eb737f62d2ea4c6 + checksum: 10c0/bfc7c27d9ac7c0a83a16c9aa9139900e2328ea96b739444cf8b2afda6cc6218180634993baa739c292b337666f06a81d1d643fc64276544ededb48805d0f6a65 languageName: node linkType: hard -"@nestjs/core@npm:10.4.15": - version: 10.4.15 - resolution: "@nestjs/core@npm:10.4.15" +"@nestjs/core@npm:9.3.11": + version: 9.3.11 + resolution: "@nestjs/core@npm:9.3.11" dependencies: "@nuxtjs/opencollective": "npm:0.3.2" fast-safe-stringify: "npm:2.1.1" iterare: "npm:1.2.1" - path-to-regexp: "npm:3.3.0" - tslib: "npm:2.8.1" - uid: "npm:2.0.2" + path-to-regexp: "npm:3.2.0" + tslib: "npm:2.5.0" + uid: "npm:2.0.1" peerDependencies: - "@nestjs/common": ^10.0.0 - "@nestjs/microservices": ^10.0.0 - "@nestjs/platform-express": ^10.0.0 - "@nestjs/websockets": ^10.0.0 - reflect-metadata: ^0.1.12 || ^0.2.0 + "@nestjs/common": ^9.0.0 + "@nestjs/microservices": ^9.0.0 + "@nestjs/platform-express": ^9.0.0 + "@nestjs/websockets": ^9.0.0 + reflect-metadata: ^0.1.12 rxjs: ^7.1.0 peerDependenciesMeta: "@nestjs/microservices": @@ -334,7 +339,7 @@ __metadata: optional: true "@nestjs/websockets": optional: true - checksum: 10c0/68958efca25b28ea38bcfc810751c626a913a848d9ec86aab0a6021e708632b95585f0da5d5c2b0513bb64cacfc97d391b45ec002b718a8e90fdda1b4354bed1 + checksum: 10c0/d04e6968bc1a0200394cee5b4bc561920fb745f045a39f3f4b1bd37c311a35160a66415b0be6ba539dfcabda4f17a2f4d53736236ba9df9405028cc9ab54670a languageName: node linkType: hard @@ -502,31 +507,29 @@ __metadata: languageName: node linkType: hard -"@openapitools/openapi-generator-cli@npm:2.17.0": - version: 2.17.0 - resolution: "@openapitools/openapi-generator-cli@npm:2.17.0" +"@openapitools/openapi-generator-cli@npm:2.7.0": + version: 2.7.0 + resolution: "@openapitools/openapi-generator-cli@npm:2.7.0" dependencies: - "@nestjs/axios": "npm:3.1.3" - "@nestjs/common": "npm:10.4.15" - "@nestjs/core": "npm:10.4.15" + "@nestjs/axios": "npm:0.1.0" + "@nestjs/common": "npm:9.3.11" + "@nestjs/core": "npm:9.3.11" "@nuxtjs/opencollective": "npm:0.3.2" - axios: "npm:1.7.9" chalk: "npm:4.1.2" commander: "npm:8.3.0" compare-versions: "npm:4.1.4" concurrently: "npm:6.5.1" console.table: "npm:0.10.0" fs-extra: "npm:10.1.0" - glob: "npm:9.3.5" - inquirer: "npm:8.2.6" + glob: "npm:7.1.6" + inquirer: "npm:8.2.5" lodash: "npm:4.17.21" - proxy-agent: "npm:6.5.0" reflect-metadata: "npm:0.1.13" - rxjs: "npm:7.8.1" - tslib: "npm:2.8.1" + rxjs: "npm:7.8.0" + tslib: "npm:2.0.3" bin: openapi-generator-cli: main.js - checksum: 10c0/43cff421946c074706e2ad9c4c56ca9220caa0b675aad46ac31e7807d4ff728ea57c5a84c375150bc7e6bf36f29bc67a9bebb6ab1a157ba806913550d53b650f + checksum: 10c0/451e54750316a512563c9bca1c5ea2a5921e942763f9463795aab0a4dc8f1bb833fb67e4882ec7ce2b71afc81de1c75af156679ce4e660e895ba5e36f39fc0ff languageName: node linkType: hard @@ -707,14 +710,13 @@ __metadata: languageName: node linkType: hard -"axios@npm:1.7.9": - version: 1.7.9 - resolution: "axios@npm:1.7.9" +"axios@npm:0.27.2": + version: 0.27.2 + resolution: "axios@npm:0.27.2" dependencies: - follow-redirects: "npm:^1.15.6" + follow-redirects: "npm:^1.14.9" form-data: "npm:^4.0.0" - proxy-from-env: "npm:^1.1.0" - checksum: 10c0/b7a41e24b59fee5f0f26c1fc844b45b17442832eb3a0fb42dd4f1430eb4abc571fe168e67913e8a1d91c993232bd1d1ab03e20e4d1fee8c6147649b576fc1b0b + checksum: 10c0/76d673d2a90629944b44d6f345f01e58e9174690f635115d5ffd4aca495d99bcd8f95c590d5ccb473513f5ebc1d1a6e8934580d0c57cdd0498c3a101313ef771 languageName: node linkType: hard @@ -790,15 +792,6 @@ __metadata: languageName: node linkType: hard -"brace-expansion@npm:^2.0.1": - version: 2.0.1 - resolution: "brace-expansion@npm:2.0.1" - dependencies: - balanced-match: "npm:^1.0.0" - checksum: 10c0/b358f2fe060e2d7a87aa015979ecea07f3c37d4018f8d6deb5bd4c229ad3a0384fe6029bb76cd8be63c81e516ee52d1a0673edbe2023d53a5191732ae3c3e49f - languageName: node - linkType: hard - "braces@npm:^3.0.3": version: 3.0.3 resolution: "braces@npm:3.0.3" @@ -1548,7 +1541,7 @@ __metadata: languageName: node linkType: hard -"follow-redirects@npm:^1.15.6": +"follow-redirects@npm:^1.14.9": version: 1.15.9 resolution: "follow-redirects@npm:1.15.9" peerDependenciesMeta: @@ -1693,15 +1686,17 @@ __metadata: languageName: node linkType: hard -"glob@npm:9.3.5": - version: 9.3.5 - resolution: "glob@npm:9.3.5" +"glob@npm:7.1.6": + version: 7.1.6 + resolution: "glob@npm:7.1.6" dependencies: fs.realpath: "npm:^1.0.0" - minimatch: "npm:^8.0.2" - minipass: "npm:^4.2.4" - path-scurry: "npm:^1.6.1" - checksum: 10c0/2f6c2b9ee019ee21dc258ae97a88719614591e4c979cb4580b1b9df6f0f778a3cb38b4bdaf18dfa584637ea10f89a3c5f2533a5e449cf8741514ad18b0951f2e + inflight: "npm:^1.0.4" + inherits: "npm:2" + minimatch: "npm:^3.0.4" + once: "npm:^1.3.0" + path-is-absolute: "npm:^1.0.0" + checksum: 10c0/2575cce9306ac534388db751f0aa3e78afedb6af8f3b529ac6b2354f66765545145dba8530abf7bff49fb399a047d3f9b6901c38ee4c9503f592960d9af67763 languageName: node linkType: hard @@ -1938,9 +1933,9 @@ __metadata: languageName: node linkType: hard -"inquirer@npm:8.2.6": - version: 8.2.6 - resolution: "inquirer@npm:8.2.6" +"inquirer@npm:8.2.5": + version: 8.2.5 + resolution: "inquirer@npm:8.2.5" dependencies: ansi-escapes: "npm:^4.2.1" chalk: "npm:^4.1.1" @@ -1956,8 +1951,8 @@ __metadata: string-width: "npm:^4.1.0" strip-ansi: "npm:^6.0.0" through: "npm:^2.3.6" - wrap-ansi: "npm:^6.0.1" - checksum: 10c0/eb5724de1778265323f3a68c80acfa899378cb43c24cdcb58661386500e5696b6b0b6c700e046b7aa767fe7b4823c6f04e6ddc268173e3f84116112529016296 + wrap-ansi: "npm:^7.0.0" + checksum: 10c0/e3e64e10f5daeeb8f770f1310acceb4aab593c10d693e7676ecd4a5b023d5b865b484fec7ead516e5e394db70eff687ef85459f75890f11a99ceadc0f4adce18 languageName: node linkType: hard @@ -2315,13 +2310,6 @@ __metadata: languageName: node linkType: hard -"lru-cache@npm:^10.2.0": - version: 10.4.3 - resolution: "lru-cache@npm:10.4.3" - checksum: 10c0/ebd04fbca961e6c1d6c0af3799adcc966a1babe798f685bb84e6599266599cd95d94630b10262f5424539bc4640107e8a33aa28585374abf561d30d16f4b39fb - languageName: node - linkType: hard - "lru-cache@npm:^7.14.1": version: 7.18.3 resolution: "lru-cache@npm:7.18.3" @@ -2404,7 +2392,7 @@ __metadata: languageName: node linkType: hard -"minimatch@npm:^3.1.1": +"minimatch@npm:^3.0.4, minimatch@npm:^3.1.1": version: 3.1.2 resolution: "minimatch@npm:3.1.2" dependencies: @@ -2413,15 +2401,6 @@ __metadata: languageName: node linkType: hard -"minimatch@npm:^8.0.2": - version: 8.0.4 - resolution: "minimatch@npm:8.0.4" - dependencies: - brace-expansion: "npm:^2.0.1" - checksum: 10c0/a0a394c356dd5b4cb7f821720841a82fa6f07c9c562c5b716909d1b6ec5e56a7e4c4b5029da26dd256b7d2b3a3f38cbf9ddd8680e887b9b5282b09c05501c1ca - languageName: node - linkType: hard - "minimist@npm:^1.2.0": version: 1.2.8 resolution: "minimist@npm:1.2.8" @@ -2429,25 +2408,11 @@ __metadata: languageName: node linkType: hard -"minipass@npm:^4.2.4": - version: 4.2.8 - resolution: "minipass@npm:4.2.8" - checksum: 10c0/4ea76b030d97079f4429d6e8a8affd90baf1b6a1898977c8ccce4701c5a2ba2792e033abc6709373f25c2c4d4d95440d9d5e9464b46b7b76ca44d2ce26d939ce - languageName: node - linkType: hard - -"minipass@npm:^5.0.0 || ^6.0.2 || ^7.0.0": - version: 7.1.2 - resolution: "minipass@npm:7.1.2" - checksum: 10c0/b0fd20bb9fb56e5fa9a8bfac539e8915ae07430a619e4b86ff71f5fc757ef3924b23b2c4230393af1eda647ed3d75739e4e0acb250a6b1eb277cf7f8fe449557 - languageName: node - linkType: hard - "monei-python-sdk@workspace:.": version: 0.0.0-use.local resolution: "monei-python-sdk@workspace:." dependencies: - "@openapitools/openapi-generator-cli": "npm:2.17.0" + "@openapitools/openapi-generator-cli": "npm:2.7.0" "@release-it/bumper": "npm:^7.0.1" release-it: "npm:^18.1.2" languageName: unknown @@ -2772,20 +2737,10 @@ __metadata: languageName: node linkType: hard -"path-scurry@npm:^1.6.1": - version: 1.11.1 - resolution: "path-scurry@npm:1.11.1" - dependencies: - lru-cache: "npm:^10.2.0" - minipass: "npm:^5.0.0 || ^6.0.2 || ^7.0.0" - checksum: 10c0/32a13711a2a505616ae1cc1b5076801e453e7aae6ac40ab55b388bb91b9d0547a52f5aaceff710ea400205f18691120d4431e520afbe4266b836fadede15872d - languageName: node - linkType: hard - -"path-to-regexp@npm:3.3.0": - version: 3.3.0 - resolution: "path-to-regexp@npm:3.3.0" - checksum: 10c0/ffa0ebe7088d38d435a8d08b0fe6e8c93ceb2a81a65d4dd1d9a538f52e09d5e3474ed5f553cb3b180d894b0caa10698a68737ab599fd1e56b4663d1a64c9f77b +"path-to-regexp@npm:3.2.0": + version: 3.2.0 + resolution: "path-to-regexp@npm:3.2.0" + checksum: 10c0/2eeb1c698293acf6f89fe5af33b4c20822b3cee3e4e910c43bbee098c8dde34232fc194d5c2bc02df72affada446a181784e24f7a46932af323706be029ed1ba languageName: node linkType: hard @@ -3077,12 +3032,12 @@ __metadata: languageName: node linkType: hard -"rxjs@npm:7.8.1": - version: 7.8.1 - resolution: "rxjs@npm:7.8.1" +"rxjs@npm:7.8.0": + version: 7.8.0 + resolution: "rxjs@npm:7.8.0" dependencies: tslib: "npm:^2.1.0" - checksum: 10c0/3c49c1ecd66170b175c9cacf5cef67f8914dcbc7cd0162855538d365c83fea631167cacb644b3ce533b2ea0e9a4d0b12175186985f89d75abe73dbd8f7f06f68 + checksum: 10c0/c48833638ae5d339332f8b792e716c3c662950ba95ba04e9e97a8cfd4628d8f009129672793c6c067c872a4dab5757231d41d7256a2114a5fabbf30d8a5b9d67 languageName: node linkType: hard @@ -3385,10 +3340,17 @@ __metadata: languageName: node linkType: hard -"tslib@npm:2.8.1, tslib@npm:^2.0.1, tslib@npm:^2.1.0": - version: 2.8.1 - resolution: "tslib@npm:2.8.1" - checksum: 10c0/9c4759110a19c53f992d9aae23aac5ced636e99887b51b9e61def52611732872ff7668757d4e4c61f19691e36f4da981cd9485e869b4a7408d689f6bf1f14e62 +"tslib@npm:2.0.3": + version: 2.0.3 + resolution: "tslib@npm:2.0.3" + checksum: 10c0/57d9f8e71a768c37a70fcabbb76d686b31773329200db7135faff905818038c742191a0c3791e452ae738d057522c6151d34beddc8e4d0d897f28df84e55a0c0 + languageName: node + linkType: hard + +"tslib@npm:2.5.0": + version: 2.5.0 + resolution: "tslib@npm:2.5.0" + checksum: 10c0/e32fc99cc730dd514e53c44e668d76016e738f0bcc726aad5dbd2d335cf19b87a95a9b1e4f0a9993e370f1d702b5e471cdd4acabcac428a3099d496b9af2021e languageName: node linkType: hard @@ -3399,6 +3361,13 @@ __metadata: languageName: node linkType: hard +"tslib@npm:^2.0.1, tslib@npm:^2.1.0": + version: 2.8.1 + resolution: "tslib@npm:2.8.1" + checksum: 10c0/9c4759110a19c53f992d9aae23aac5ced636e99887b51b9e61def52611732872ff7668757d4e4c61f19691e36f4da981cd9485e869b4a7408d689f6bf1f14e62 + languageName: node + linkType: hard + "type-fest@npm:^0.21.3": version: 0.21.3 resolution: "type-fest@npm:0.21.3" @@ -3420,12 +3389,12 @@ __metadata: languageName: node linkType: hard -"uid@npm:2.0.2": - version: 2.0.2 - resolution: "uid@npm:2.0.2" +"uid@npm:2.0.1": + version: 2.0.1 + resolution: "uid@npm:2.0.1" dependencies: "@lukeed/csprng": "npm:^1.0.0" - checksum: 10c0/e9d02d0562c74e74b5a2519e586db9d7f8204978e476cddd191ee1a9efb85efafdbab2dbf3fc3dde0f5da01fd9da161f37d604dabf513447fd2c03d008f1324c + checksum: 10c0/1c1e0e4fcb4d89ad7852b8d3043d9c79aebab8129f49390dcc2ef712b5997313fadedea17e12bde74204a472efbe79dc931afe252d3dfed28059e4c67f9969ab languageName: node linkType: hard @@ -3581,7 +3550,7 @@ __metadata: languageName: node linkType: hard -"wrap-ansi@npm:^6.0.1, wrap-ansi@npm:^6.2.0": +"wrap-ansi@npm:^6.2.0": version: 6.2.0 resolution: "wrap-ansi@npm:6.2.0" dependencies: From 4e2fe17e87d85a5caf4ff5347d18b9a26c99e3fc Mon Sep 17 00:00:00 2001 From: Dmitriy Date: Thu, 6 Mar 2025 19:04:33 +0100 Subject: [PATCH 06/13] Refactor test suite to improve unit test coverage and mocking - Update unit tests for PaymentsApi, SubscriptionsApi, PaymentMethodsApi, ApplePayDomainApi, and BizumApi - Add comprehensive mock responses and error handling tests - Remove deprecated integration test files - Standardize test structure and improve test method coverage - Enhance error handling and response validation in unit tests --- test/conftest.py | 77 -- test/test_api_client_integration.py | 160 ---- test/test_apple_pay_domain_api.py | 54 +- test/test_apple_pay_domain_api_integration.py | 75 -- test/test_bizum_api.py | 74 +- test/test_bizum_api_integration.py | 60 -- test/test_monei_client.py | 789 +++++++++++++++--- test/test_payment_methods_api.py | 106 ++- test/test_payment_methods_api_integration.py | 133 --- test/test_payments_api.py | 292 ++++++- test/test_payments_api_example.py | 15 - test/test_payments_api_integration.py | 232 ----- test/test_subscriptions_api.py | 258 +++++- test/test_subscriptions_api_integration.py | 226 ----- 14 files changed, 1409 insertions(+), 1142 deletions(-) delete mode 100644 test/conftest.py delete mode 100644 test/test_api_client_integration.py delete mode 100644 test/test_apple_pay_domain_api_integration.py delete mode 100644 test/test_bizum_api_integration.py delete mode 100644 test/test_payment_methods_api_integration.py delete mode 100644 test/test_payments_api_example.py delete mode 100644 test/test_payments_api_integration.py delete mode 100644 test/test_subscriptions_api_integration.py diff --git a/test/conftest.py b/test/conftest.py deleted file mode 100644 index 1ca8533..0000000 --- a/test/conftest.py +++ /dev/null @@ -1,77 +0,0 @@ -import pytest -import os -from unittest.mock import patch, MagicMock -import json -import datetime - -# Constants for testing -TEST_API_KEY = "test_api_key" -TEST_ACCOUNT_ID = "acc_123456789" - - -@pytest.fixture -def api_client(): - """Fixture for creating a mock API client.""" - from Monei.api_client import ApiClient - - # Create a mock API client that doesn't make real API calls - with patch.object(ApiClient, "call_api", return_value=(None, 0, {})): - client = ApiClient() - client.configuration.api_key["apiKey"] = TEST_API_KEY - yield client - - -@pytest.fixture -def api_instance(api_client): - """Fixture for creating API instances with the mock client.""" - - def _get_api_instance(api_class): - return api_class(api_client=api_client) - - return _get_api_instance - - -@pytest.fixture -def mock_response(): - """Fixture for creating mock API responses.""" - - def _create_mock_response(status=200, data=None, headers=None): - mock_resp = MagicMock() - mock_resp.status = status - mock_resp.data = json.dumps(data or {}).encode("utf-8") - mock_resp.headers = headers or {} - return mock_resp - - return _create_mock_response - - -# Helper to convert datetime objects to strings in JSON serialization -def json_serial(obj): - if isinstance(obj, (datetime.datetime, datetime.date)): - return obj.isoformat() - raise TypeError(f"Type {type(obj)} not serializable") - - -# Skip tests that require real API calls in CI environments -def pytest_configure(config): - """Configure pytest markers.""" - config.addinivalue_line( - "markers", "generated: mark test as auto-generated by OpenAPI Generator" - ) - config.addinivalue_line("markers", "requires_api: mark test as requiring real API access") - - -def pytest_collection_modifyitems(config, items): - """Skip auto-generated tests that make real API calls unless explicitly enabled.""" - skip_generated = pytest.mark.skip(reason="Auto-generated test that makes real API calls") - - # Check if we're running in CI or if SKIP_GENERATED_TESTS is set - if os.environ.get("CI") or os.environ.get("SKIP_GENERATED_TESTS"): - for item in items: - if "test_" in item.name and not item.get_closest_marker("requires_api"): - # Mark all auto-generated tests with the 'generated' marker - item.add_marker(pytest.mark.generated) - - # Skip tests that would make real API calls - if not any(marker.name == "requires_api" for marker in item.iter_markers()): - item.add_marker(skip_generated) diff --git a/test/test_api_client_integration.py b/test/test_api_client_integration.py deleted file mode 100644 index da7b44b..0000000 --- a/test/test_api_client_integration.py +++ /dev/null @@ -1,160 +0,0 @@ -import pytest -from unittest.mock import patch, MagicMock -import json - -from Monei.api_client import ApiClient -from Monei.configuration import Configuration -from Monei.exceptions import ApiException -from Monei.rest import RESTResponse - - -@pytest.mark.unit -class TestApiClientIntegration: - """Integration tests for the API client with mocked responses""" - - @pytest.fixture - def mock_api_client(self): - """Fixture for creating a mock API client""" - config = Configuration() - config.api_key["Authorization"] = "test_api_key" - return ApiClient(configuration=config) - - @pytest.fixture - def mock_response(self): - """Fixture for creating a mock response""" - mock_resp = MagicMock(spec=RESTResponse) - mock_resp.getheaders.return_value = {"Content-Type": "application/json"} - mock_resp.status = 200 - return mock_resp - - def test_deserialize_json_response(self, mock_api_client, mock_response): - """Test deserializing a JSON response""" - payment_data = { - "id": "pay_123456789", - "amount": 1000, - "currency": "EUR", - "status": "PENDING", - } - mock_response.data = json.dumps(payment_data).encode("utf-8") - - result = mock_api_client.deserialize(mock_response, "Payment") - - assert result == payment_data - - def test_deserialize_empty_response(self, mock_api_client, mock_response): - """Test deserializing an empty response""" - mock_response.data = b"" - - result = mock_api_client.deserialize(mock_response, "Payment") - - assert result is None - - def test_deserialize_non_json_response(self, mock_api_client, mock_response): - """Test deserializing a non-JSON response""" - mock_response.getheaders.return_value = {"Content-Type": "text/plain"} - mock_response.data = b"Not a JSON response" - - with pytest.raises(ApiException) as excinfo: - mock_api_client.deserialize(mock_response, "Payment") - - assert "Content type 'text/plain' is not supported" in str(excinfo.value) - - @patch.object(ApiClient, "request") - def test_call_api_success(self, mock_request, mock_api_client, mock_response): - """Test successful API call""" - payment_data = { - "id": "pay_123456789", - "amount": 1000, - "currency": "EUR", - "status": "PENDING", - } - mock_response.data = json.dumps(payment_data).encode("utf-8") - mock_request.return_value = mock_response - - data, status, headers = mock_api_client.call_api( - "/payments", - "POST", - path_params={}, - query_params={}, - header_params={}, - body={"amount": 1000, "currency": "EUR"}, - post_params=[], - files={}, - response_type="Payment", - auth_settings=["apiKey"], - async_req=False, - _return_http_data_only=True, - _preload_content=True, - _request_timeout=None, - collection_formats={}, - ) - - assert data == payment_data - assert status == 200 - assert headers == {"Content-Type": "application/json"} - - @patch.object(ApiClient, "request") - def test_call_api_error(self, mock_request, mock_api_client): - """Test API call with error response""" - error_response = {"statusCode": 400, "error": "Bad Request", "message": "Invalid amount"} - - mock_resp = MagicMock(spec=RESTResponse) - mock_resp.getheaders.return_value = {"Content-Type": "application/json"} - mock_resp.status = 400 - mock_resp.data = json.dumps(error_response).encode("utf-8") - mock_request.return_value = mock_resp - - with pytest.raises(ApiException) as excinfo: - mock_api_client.call_api( - "/payments", - "POST", - path_params={}, - query_params={}, - header_params={}, - body={"amount": -1000, "currency": "EUR"}, - post_params=[], - files={}, - response_type="Payment", - auth_settings=["apiKey"], - async_req=False, - _return_http_data_only=True, - _preload_content=True, - _request_timeout=None, - collection_formats={}, - ) - - assert excinfo.value.status == 400 - assert "Invalid amount" in str(excinfo.value) - - def test_set_default_header(self, mock_api_client): - """Test setting a default header""" - mock_api_client.set_default_header("User-Agent", "CustomApp/1.0") - - assert "User-Agent" in mock_api_client.default_headers - assert mock_api_client.default_headers["User-Agent"] == "CustomApp/1.0" - - # Test overwriting an existing header - mock_api_client.set_default_header("User-Agent", "AnotherApp/2.0") - assert mock_api_client.default_headers["User-Agent"] == "AnotherApp/2.0" - - def test_select_header_accept(self, mock_api_client): - """Test selecting the Accept header""" - # Test with supported content types - accept = mock_api_client.select_header_accept(["application/json", "application/xml"]) - assert accept == "application/json, application/xml" - - # Test with no content types - accept = mock_api_client.select_header_accept([]) - assert accept is None - - def test_select_header_content_type(self, mock_api_client): - """Test selecting the Content-Type header""" - # Test with supported content types - content_type = mock_api_client.select_header_content_type( - ["application/json", "application/xml"] - ) - assert content_type == "application/json" - - # Test with no content types - content_type = mock_api_client.select_header_content_type([]) - assert content_type == "application/json" diff --git a/test/test_apple_pay_domain_api.py b/test/test_apple_pay_domain_api.py index 74cd315..b64db7a 100644 --- a/test/test_apple_pay_domain_api.py +++ b/test/test_apple_pay_domain_api.py @@ -13,25 +13,71 @@ import unittest +from unittest.mock import patch, MagicMock from Monei.api.apple_pay_domain_api import ApplePayDomainApi +from Monei.api_client import ApiClient +from Monei.configuration import Configuration +from Monei.exceptions import ApiException class TestApplePayDomainApi(unittest.TestCase): """ApplePayDomainApi unit test stubs""" def setUp(self) -> None: - self.api = ApplePayDomainApi() + configuration = Configuration() + configuration.api_key = {"Authorization": "test_api_key"} + self.api_client = ApiClient(configuration) + self.api = ApplePayDomainApi(self.api_client) def tearDown(self) -> None: pass - def test_register(self) -> None: + @patch.object(ApiClient, "call_api") + def test_register(self, mock_call_api) -> None: """Test case for register - Register Domain + Register Apple Pay Domain """ - pass + # Configure the mock to return a successful response + mock_response = { + "success": True + } + mock_call_api.return_value = mock_response + + # Test the method + domain_data = { + "domainName": "example.com" + } + response = self.api.register(domain_data) + + # Verify the response + self.assertEqual(response, mock_response) + mock_call_api.assert_called_once() + + @patch.object(ApiClient, "call_api") + def test_error_handling(self, mock_call_api) -> None: + """Test error handling in API calls""" + # Configure the mock to raise an ApiException + mock_call_api.side_effect = ApiException( + status=400, + reason="Bad Request", + body='{"status":"ERROR","statusCode":400,"requestId":"req_123","message":"Invalid domain name"}' + ) + + # Test the method + domain_data = { + "domainName": "invalid-domain" + } + + # Verify that the exception is raised + with self.assertRaises(ApiException) as context: + self.api.register(domain_data) + + # Verify the exception details + self.assertEqual(context.exception.status, 400) + self.assertEqual(context.exception.reason, "Bad Request") + self.assertIn("Invalid domain name", context.exception.body) if __name__ == '__main__': diff --git a/test/test_apple_pay_domain_api_integration.py b/test/test_apple_pay_domain_api_integration.py deleted file mode 100644 index 15f1436..0000000 --- a/test/test_apple_pay_domain_api_integration.py +++ /dev/null @@ -1,75 +0,0 @@ -import pytest -from unittest.mock import patch, MagicMock - -from Monei.monei_client import MoneiClient -from Monei.api.apple_pay_domain_api import ApplePayDomainApi -from Monei.model.register_apple_pay_domain_request import RegisterApplePayDomainRequest - - -@pytest.mark.unit -class TestApplePayDomainApiIntegration: - """Integration tests for the Apple Pay Domain API with mocked responses""" - - @pytest.fixture - def mock_client(self): - """Fixture for creating a mock client""" - return MoneiClient(api_key="test_api_key") - - @patch.object(ApplePayDomainApi, 'register') - def test_register_apple_pay_domain(self, mock_register, mock_client): - """Test registering an Apple Pay domain""" - success_response = { - "success": True, - "domain": "example.com" - } - mock_register.return_value = success_response - - register_request = RegisterApplePayDomainRequest( - domain="example.com" - ) - - result = mock_client.ApplePayDomain.register(register_apple_pay_domain_request=register_request) - - assert result["success"] is True - assert result["domain"] == "example.com" - mock_register.assert_called_once_with(register_apple_pay_domain_request=register_request) - - @patch.object(ApplePayDomainApi, 'list') - def test_list_apple_pay_domains(self, mock_list, mock_client): - """Test listing Apple Pay domains""" - domains_response = { - "data": [ - {"domain": "example.com", "created": "2023-01-01T12:00:00Z"}, - {"domain": "shop.example.com", "created": "2023-01-02T12:00:00Z"} - ], - "hasMore": False, - "totalCount": 2 - } - mock_list.return_value = domains_response - - result = mock_client.ApplePayDomain.list() - - assert "data" in result - assert len(result["data"]) == 2 - assert result["data"][0]["domain"] == "example.com" - assert result["data"][1]["domain"] == "shop.example.com" - assert result["hasMore"] is False - assert result["totalCount"] == 2 - mock_list.assert_called_once() - - @patch.object(ApplePayDomainApi, 'delete') - def test_delete_apple_pay_domain(self, mock_delete, mock_client): - """Test deleting an Apple Pay domain""" - success_response = { - "success": True, - "domain": "example.com", - "deleted": True - } - mock_delete.return_value = success_response - - result = mock_client.ApplePayDomain.delete(domain="example.com") - - assert result["success"] is True - assert result["domain"] == "example.com" - assert result["deleted"] is True - mock_delete.assert_called_once_with(domain="example.com") \ No newline at end of file diff --git a/test/test_bizum_api.py b/test/test_bizum_api.py index b429ff2..a62efdd 100644 --- a/test/test_bizum_api.py +++ b/test/test_bizum_api.py @@ -13,25 +13,91 @@ import unittest +from unittest.mock import patch, MagicMock from Monei.api.bizum_api import BizumApi +from Monei.api_client import ApiClient +from Monei.configuration import Configuration +from Monei.exceptions import ApiException class TestBizumApi(unittest.TestCase): """BizumApi unit test stubs""" def setUp(self) -> None: - self.api = BizumApi() + configuration = Configuration() + configuration.api_key = {"Authorization": "test_api_key"} + self.api_client = ApiClient(configuration) + self.api = BizumApi(self.api_client) def tearDown(self) -> None: pass - def test_validate_phone(self) -> None: + @patch.object(ApiClient, "call_api") + def test_validate_phone(self, mock_call_api) -> None: """Test case for validate_phone - Validate Phone + Validate Bizum Phone """ - pass + # Configure the mock to return a successful response + mock_response = { + "valid": True + } + mock_call_api.return_value = mock_response + + # Test the method + validate_data = { + "phoneNumber": "+34600000000" + } + response = self.api.validate_phone(validate_data) + + # Verify the response + self.assertEqual(response, mock_response) + mock_call_api.assert_called_once() + + @patch.object(ApiClient, "call_api") + def test_validate_phone_invalid(self, mock_call_api) -> None: + """Test case for validate_phone with invalid phone number""" + # Configure the mock to return a response for invalid phone + mock_response = { + "valid": False + } + mock_call_api.return_value = mock_response + + # Test the method + validate_data = { + "phoneNumber": "+34999999999" # Invalid phone number + } + response = self.api.validate_phone(validate_data) + + # Verify the response + self.assertEqual(response, mock_response) + self.assertFalse(response["valid"]) + mock_call_api.assert_called_once() + + @patch.object(ApiClient, "call_api") + def test_error_handling(self, mock_call_api) -> None: + """Test error handling in API calls""" + # Configure the mock to raise an ApiException + mock_call_api.side_effect = ApiException( + status=400, + reason="Bad Request", + body='{"status":"ERROR","statusCode":400,"requestId":"req_123","message":"Invalid phone number format"}' + ) + + # Test the method + validate_data = { + "phoneNumber": "invalid-phone" + } + + # Verify that the exception is raised + with self.assertRaises(ApiException) as context: + self.api.validate_phone(validate_data) + + # Verify the exception details + self.assertEqual(context.exception.status, 400) + self.assertEqual(context.exception.reason, "Bad Request") + self.assertIn("Invalid phone number format", context.exception.body) if __name__ == '__main__': diff --git a/test/test_bizum_api_integration.py b/test/test_bizum_api_integration.py deleted file mode 100644 index 27bc0c3..0000000 --- a/test/test_bizum_api_integration.py +++ /dev/null @@ -1,60 +0,0 @@ -import pytest -from unittest.mock import patch, MagicMock - -from Monei.monei_client import MoneiClient -from Monei.api.bizum_api import BizumApi -from Monei.model.validate_bizum_phone_request import ValidateBizumPhoneRequest - - -@pytest.mark.unit -class TestBizumApiIntegration: - """Integration tests for the Bizum API with mocked responses""" - - @pytest.fixture - def mock_client(self): - """Fixture for creating a mock client""" - return MoneiClient(api_key="test_api_key") - - @patch.object(BizumApi, 'validate_phone') - def test_validate_bizum_phone(self, mock_validate_phone, mock_client): - """Test validating a Bizum phone number""" - success_response = { - "valid": True, - "phone": "+34600000000" - } - mock_validate_phone.return_value = success_response - - validate_request = ValidateBizumPhoneRequest( - phone="+34600000000" - ) - - result = mock_client.Bizum.validate_phone(validate_bizum_phone_request=validate_request) - - assert result["valid"] is True - assert result["phone"] == "+34600000000" - mock_validate_phone.assert_called_once_with(validate_bizum_phone_request=validate_request) - - @patch.object(BizumApi, 'validate_phone') - def test_validate_invalid_bizum_phone(self, mock_validate_phone, mock_client): - """Test validating an invalid Bizum phone number""" - invalid_response = { - "valid": False, - "phone": "+34600000000", - "error": { - "code": "invalid_phone", - "message": "The phone number is not registered with Bizum" - } - } - mock_validate_phone.return_value = invalid_response - - validate_request = ValidateBizumPhoneRequest( - phone="+34600000000" - ) - - result = mock_client.Bizum.validate_phone(validate_bizum_phone_request=validate_request) - - assert result["valid"] is False - assert result["phone"] == "+34600000000" - assert "error" in result - assert result["error"]["code"] == "invalid_phone" - mock_validate_phone.assert_called_once_with(validate_bizum_phone_request=validate_request) \ No newline at end of file diff --git a/test/test_monei_client.py b/test/test_monei_client.py index ab91d21..b419aa9 100644 --- a/test/test_monei_client.py +++ b/test/test_monei_client.py @@ -1,11 +1,21 @@ -import pytest +# coding: utf-8 + +""" +MONEI API v1 - MoneiClient Tests + +Unit tests for the MoneiClient class. +""" + +import unittest +import json import hmac import hashlib -import json from unittest.mock import patch, MagicMock -from Monei.monei_client import MoneiClient +from Monei.monei_client import MoneiClient, DEFAULT_USER_AGENT from Monei.exceptions import ApiException +from Monei.configuration import Configuration +from Monei.api_client import ApiClient from Monei.api.payments_api import PaymentsApi from Monei.api.payment_methods_api import PaymentMethodsApi from Monei.api.subscriptions_api import SubscriptionsApi @@ -13,101 +23,686 @@ from Monei.api.bizum_api import BizumApi -@pytest.mark.unit -class TestMoneiClient: - """Tests for the MoneiClient class""" - - def test_init_with_api_key(self): - """Test initializing the client with an API key""" - client = MoneiClient(api_key="test_api_key") - assert client.api_key == "test_api_key" - assert client.account_id is None - assert "MONEI/Python" in client.user_agent - assert isinstance(client.Payments, PaymentsApi) - assert isinstance(client.PaymentMethods, PaymentMethodsApi) - assert isinstance(client.Subscriptions, SubscriptionsApi) - assert isinstance(client.ApplePayDomain, ApplePayDomainApi) - assert isinstance(client.Bizum, BizumApi) - # Test alias - assert client.payments is client.Payments - - def test_init_with_account_id_and_user_agent(self): - """Test initializing the client with an account ID and custom user agent""" +class TestMoneiClient(unittest.TestCase): + """MoneiClient unit test stubs""" + + def setUp(self) -> None: + self.api_key = "test_api_key_12345" + self.account_id = "test_account_id_67890" + self.user_agent = "TestPlatform/1.0" + self.client = MoneiClient(api_key=self.api_key) + + def tearDown(self) -> None: + pass + + def test_init_with_api_key_only(self) -> None: + """Test initializing with API key only""" + client = MoneiClient(api_key=self.api_key) + self.assertIsInstance(client, MoneiClient) + self.assertIsInstance(client.Payments, PaymentsApi) + self.assertIsInstance(client.PaymentMethods, PaymentMethodsApi) + self.assertIsInstance(client.Subscriptions, SubscriptionsApi) + self.assertIsInstance(client.ApplePayDomain, ApplePayDomainApi) + self.assertIsInstance(client.Bizum, BizumApi) + self.assertEqual(client.user_agent, DEFAULT_USER_AGENT) + + def test_init_with_custom_config(self) -> None: + """Test initializing with custom configuration""" + config = Configuration() + config.debug = True + client = MoneiClient(api_key=self.api_key, config=config) + self.assertIsInstance(client, MoneiClient) + self.assertTrue(client.config.debug) + + def test_init_with_account_id_and_user_agent(self) -> None: + """Test initializing with account ID and user agent""" client = MoneiClient( - api_key="test_api_key", - account_id="acc_123456789", - user_agent="CustomApp/1.0" + api_key=self.api_key, account_id=self.account_id, user_agent=self.user_agent + ) + self.assertIsInstance(client, MoneiClient) + self.assertEqual(client.account_id, self.account_id) + self.assertEqual(client.user_agent, self.user_agent) + + def test_init_with_account_id_without_user_agent(self) -> None: + """Test initializing with account ID but without user agent should raise exception""" + with self.assertRaises(ApiException) as context: + MoneiClient(api_key=self.api_key, account_id=self.account_id) + + self.assertEqual(context.exception.status, 400) + self.assertEqual( + context.exception.reason, "User-Agent must be provided when using Account ID" ) - assert client.api_key == "test_api_key" - assert client.account_id == "acc_123456789" - assert client.user_agent == "CustomApp/1.0" - assert "MONEI-Account-ID" in client._api_client.default_headers - assert client._api_client.default_headers["MONEI-Account-ID"] == "acc_123456789" - - def test_init_with_account_id_without_user_agent_raises_exception(self): - """Test that initializing with account_id but no user_agent raises an exception""" - with pytest.raises(ApiException) as excinfo: - MoneiClient(api_key="test_api_key", account_id="acc_123456789") - assert "User-Agent must be provided" in str(excinfo.value) - - def test_set_account_id_with_user_agent(self): - """Test setting account ID after initialization with custom user agent""" - client = MoneiClient(api_key="test_api_key", user_agent="CustomApp/1.0") - client.set_account_id("acc_123456789") - assert client.account_id == "acc_123456789" - # Check that the header was set in the API client - assert client._api_client.default_headers.get("MONEI-Account-ID") == "acc_123456789" - - def test_set_account_id_without_user_agent_raises_exception(self): - """Test that setting account_id without a custom user_agent raises an exception""" - client = MoneiClient(api_key="test_api_key") - with pytest.raises(ApiException) as excinfo: - client.set_account_id("acc_123456789") - assert "User-Agent must be set" in str(excinfo.value) - - def test_set_user_agent(self): - """Test setting a custom user agent""" - client = MoneiClient(api_key="test_api_key") - client.set_user_agent("CustomApp/1.0") - assert client.user_agent == "CustomApp/1.0" - assert client._api_client.user_agent == "CustomApp/1.0" - - def test_verify_signature_valid(self): - """Test verifying a valid signature""" - client = MoneiClient(api_key="test_api_key") - body = '{"event":"payment.created","data":{"id":"pay_123"}}' - + + def test_set_account_id(self) -> None: + """Test setting account ID after initialization""" + client = MoneiClient(api_key=self.api_key, user_agent=self.user_agent) + client.set_account_id(self.account_id) + self.assertEqual(client.account_id, self.account_id) + + def test_set_account_id_without_user_agent(self) -> None: + """Test setting account ID without user agent should raise exception""" + client = MoneiClient(api_key=self.api_key) + with self.assertRaises(ApiException) as context: + client.set_account_id(self.account_id) + + self.assertEqual(context.exception.status, 400) + self.assertEqual(context.exception.reason, "User-Agent must be set before using Account ID") + + def test_set_user_agent(self) -> None: + """Test setting user agent after initialization""" + client = MoneiClient(api_key=self.api_key) + client.set_user_agent(self.user_agent) + self.assertEqual(client.user_agent, self.user_agent) + + def test_verify_signature(self) -> None: + """Test verifying webhook signature""" + client = MoneiClient(api_key=self.api_key) + + # Create test data + raw_body = '{"id":"3690bd3f7294db82fed08c7371bace32","amount":11700,"currency":"EUR","orderId":"588439","status":"SUCCEEDED","message":"Transaction Approved"}' + timestamp = "1602604555" + # Calculate a valid signature - timestamp = "1620000000000" - calculated_hmac = hmac.new( - bytes("test_api_key", "utf-8"), - msg=bytes(f"{timestamp}.{body}", "utf-8"), - digestmod=hashlib.sha256 + signature_payload = f"{timestamp}.{raw_body}" + hmac_digest = hmac.new( + bytes(self.api_key, "utf-8"), + msg=bytes(signature_payload, "utf-8"), + digestmod=hashlib.sha256, ).hexdigest() - - signature = f"t={timestamp},v1={calculated_hmac}" - - # Verify the signature - result = client.verify_signature(body, signature) - assert result == {"event": "payment.created", "data": {"id": "pay_123"}} - - def test_verify_signature_invalid(self): - """Test verifying an invalid signature""" - client = MoneiClient(api_key="test_api_key") - body = '{"event":"payment.created","data":{"id":"pay_123"}}' - signature = "t=1620000000000,v1=invalid_signature" - - with pytest.raises(ApiException) as excinfo: - client.verify_signature(body, signature) - assert "Signature verification failed" in str(excinfo.value) - - def test_remove_account_id(self): - """Test removing the account ID""" - client = MoneiClient(api_key="test_api_key", user_agent="CustomApp/1.0", account_id="acc_123456789") - assert client.account_id == "acc_123456789" - assert "MONEI-Account-ID" in client._api_client.default_headers - - # Remove account ID - client.set_account_id(None) - assert client.account_id is None - assert "MONEI-Account-ID" not in client._api_client.default_headers \ No newline at end of file + + valid_signature = f"t={timestamp},v1={hmac_digest}" + + # Test valid signature + result = client.verify_signature(raw_body, valid_signature) + self.assertEqual(result, json.loads(raw_body)) + + # Test invalid signature + invalid_signature = f"t={timestamp},v1=invalid_signature" + with self.assertRaises(ApiException) as context: + client.verify_signature(raw_body, invalid_signature) + + self.assertEqual(context.exception.status, 401) + self.assertEqual(context.exception.reason, "[401] Signature verification failed") + + # Payments API Tests + @patch("Monei.api.payments_api.PaymentsApi.create") + def test_payments_create(self, mock_create) -> None: + """Test Payments.create method""" + client = MoneiClient(api_key=self.api_key) + + # Setup mock return value + expected_response = { + "id": "pay_123", + "amount": 1000, + "currency": "EUR", + "orderId": "order_123", + "description": "Test payment", + "status": "PENDING", + } + mock_create.return_value = expected_response + + # Test the method + payment_data = { + "amount": 1000, + "currency": "EUR", + "orderId": "order_123", + "description": "Test payment", + } + response = client.Payments.create(payment_data) + + # Verify the response + self.assertEqual(response, expected_response) + mock_create.assert_called_once_with(payment_data) + + @patch("Monei.api.payments_api.PaymentsApi.get") + def test_payments_get(self, mock_get) -> None: + """Test Payments.get method""" + client = MoneiClient(api_key=self.api_key) + + # Setup mock return value + payment_id = "pay_123" + expected_response = { + "id": payment_id, + "amount": 1000, + "currency": "EUR", + "orderId": "order_123", + "description": "Test payment", + "status": "SUCCEEDED", + } + mock_get.return_value = expected_response + + # Test the method + response = client.Payments.get(payment_id) + + # Verify the response + self.assertEqual(response, expected_response) + mock_get.assert_called_once_with(payment_id) + + @patch("Monei.api.payments_api.PaymentsApi.capture") + def test_payments_capture(self, mock_capture) -> None: + """Test Payments.capture method""" + client = MoneiClient(api_key=self.api_key) + + # Setup mock return value + payment_id = "pay_123" + capture_data = {"amount": 1000} + expected_response = { + "id": payment_id, + "amount": 1000, + "currency": "EUR", + "orderId": "order_123", + "description": "Test payment", + "status": "SUCCEEDED", + } + mock_capture.return_value = expected_response + + # Test the method + response = client.Payments.capture(payment_id, capture_data) + + # Verify the response + self.assertEqual(response, expected_response) + mock_capture.assert_called_once_with(payment_id, capture_data) + + @patch("Monei.api.payments_api.PaymentsApi.cancel") + def test_payments_cancel(self, mock_cancel) -> None: + """Test Payments.cancel method""" + client = MoneiClient(api_key=self.api_key) + + # Setup mock return value + payment_id = "pay_123" + cancel_data = {"reason": "CUSTOMER_REQUEST"} + expected_response = { + "id": payment_id, + "amount": 1000, + "currency": "EUR", + "orderId": "order_123", + "description": "Test payment", + "status": "CANCELLED", + } + mock_cancel.return_value = expected_response + + # Test the method + response = client.Payments.cancel(payment_id, cancel_data) + + # Verify the response + self.assertEqual(response, expected_response) + mock_cancel.assert_called_once_with(payment_id, cancel_data) + + @patch("Monei.api.payments_api.PaymentsApi.confirm") + def test_payments_confirm(self, mock_confirm) -> None: + """Test Payments.confirm method""" + client = MoneiClient(api_key=self.api_key) + + # Setup mock return value + payment_id = "pay_123" + confirm_data = {"paymentToken": "tok_123", "sessionId": "sess_123"} + expected_response = { + "id": payment_id, + "amount": 1000, + "currency": "EUR", + "orderId": "order_123", + "description": "Test payment", + "status": "SUCCEEDED", + } + mock_confirm.return_value = expected_response + + # Test the method + response = client.Payments.confirm(payment_id, confirm_data) + + # Verify the response + self.assertEqual(response, expected_response) + mock_confirm.assert_called_once_with(payment_id, confirm_data) + + @patch("Monei.api.payments_api.PaymentsApi.refund") + def test_payments_refund(self, mock_refund) -> None: + """Test Payments.refund method""" + client = MoneiClient(api_key=self.api_key) + + # Setup mock return value + payment_id = "pay_123" + refund_data = {"amount": 500, "reason": "CUSTOMER_REQUEST"} + expected_response = { + "id": "ref_123", + "paymentId": payment_id, + "amount": 500, + "reason": "CUSTOMER_REQUEST", + "status": "SUCCEEDED", + } + mock_refund.return_value = expected_response + + # Test the method + response = client.Payments.refund(payment_id, refund_data) + + # Verify the response + self.assertEqual(response, expected_response) + mock_refund.assert_called_once_with(payment_id, refund_data) + + @patch("Monei.api.payments_api.PaymentsApi.recurring") + def test_payments_recurring(self, mock_recurring) -> None: + """Test Payments.recurring method""" + client = MoneiClient(api_key=self.api_key) + + # Setup mock return value + sequence_id = "seq_123" + recurring_data = { + "amount": 1000, + "currency": "EUR", + "orderId": "order_123", + "description": "Recurring payment", + "paymentMethodId": "pm_123", + } + expected_response = { + "id": "pay_456", + "amount": 1000, + "currency": "EUR", + "orderId": "order_123", + "description": "Recurring payment", + "status": "SUCCEEDED", + "sequenceId": sequence_id, + } + mock_recurring.return_value = expected_response + + # Test the method + response = client.Payments.recurring(sequence_id, recurring_data) + + # Verify the response + self.assertEqual(response, expected_response) + mock_recurring.assert_called_once_with(sequence_id, recurring_data) + + @patch("Monei.api.payments_api.PaymentsApi.send_link") + def test_payments_send_link(self, mock_send_link) -> None: + """Test Payments.send_link method""" + client = MoneiClient(api_key=self.api_key) + + # Setup mock return value + payment_id = "pay_123" + link_data = {"customerEmail": "customer@example.com", "customerPhone": "+34600000000"} + expected_response = {"success": True} + mock_send_link.return_value = expected_response + + # Test the method + response = client.Payments.send_link(payment_id, link_data) + + # Verify the response + self.assertEqual(response, expected_response) + mock_send_link.assert_called_once_with(payment_id, link_data) + + @patch("Monei.api.payments_api.PaymentsApi.send_receipt") + def test_payments_send_receipt(self, mock_send_receipt) -> None: + """Test Payments.send_receipt method""" + client = MoneiClient(api_key=self.api_key) + + # Setup mock return value + payment_id = "pay_123" + receipt_data = {"customerEmail": "customer@example.com"} + expected_response = {"success": True} + mock_send_receipt.return_value = expected_response + + # Test the method + response = client.Payments.send_receipt(payment_id, receipt_data) + + # Verify the response + self.assertEqual(response, expected_response) + mock_send_receipt.assert_called_once_with(payment_id, receipt_data) + + @patch("Monei.api.payments_api.PaymentsApi.send_request") + def test_payments_send_request(self, mock_send_request) -> None: + """Test Payments.send_request method""" + client = MoneiClient(api_key=self.api_key) + + # Setup mock return value + payment_id = "pay_123" + request_data = {"phoneNumber": "+34600000000"} + expected_response = { + "id": payment_id, + "amount": 1000, + "currency": "EUR", + "orderId": "order_123", + "description": "Payment request", + "status": "PENDING", + } + mock_send_request.return_value = expected_response + + # Test the method + response = client.Payments.send_request(payment_id, request_data) + + # Verify the response + self.assertEqual(response, expected_response) + mock_send_request.assert_called_once_with(payment_id, request_data) + + # Payment Methods API Tests + @patch("Monei.api.payment_methods_api.PaymentMethodsApi.get") + def test_payment_methods_get(self, mock_get) -> None: + """Test PaymentMethods.get method""" + client = MoneiClient(api_key=self.api_key) + + # Setup mock return value + payment_method_id = "pm_123" + expected_response = { + "id": payment_method_id, + "type": "CARD", + "card": {"last4": "4242", "brand": "VISA", "expiryMonth": 12, "expiryYear": 2025}, + "customerId": "cus_123", + "status": "ACTIVE", + } + mock_get.return_value = expected_response + + # Test the method + response = client.PaymentMethods.get(payment_method_id=payment_method_id) + + # Verify the response + self.assertEqual(response, expected_response) + mock_get.assert_called_once_with(payment_method_id=payment_method_id) + + # Subscriptions API Tests + @patch("Monei.api.subscriptions_api.SubscriptionsApi.create") + def test_subscriptions_create(self, mock_create) -> None: + """Test Subscriptions.create method""" + client = MoneiClient(api_key=self.api_key) + + # Setup mock return value + expected_response = { + "id": "sub_123", + "status": "ACTIVE", + "amount": 1000, + "currency": "EUR", + "interval": "month", + "customerId": "cus_123", + "paymentMethodId": "pm_123", + "planId": "plan_123", + "startDate": "2023-01-01", + } + mock_create.return_value = expected_response + + # Test the method + subscription_data = { + "amount": 1000, + "currency": "EUR", + "interval": "month", + "customerId": "cus_123", + "paymentMethodId": "pm_123", + "planId": "plan_123", + "startDate": "2023-01-01", + } + response = client.Subscriptions.create(subscription_data) + + # Verify the response + self.assertEqual(response, expected_response) + mock_create.assert_called_once_with(subscription_data) + + @patch("Monei.api.subscriptions_api.SubscriptionsApi.get") + def test_subscriptions_get(self, mock_get) -> None: + """Test Subscriptions.get method""" + client = MoneiClient(api_key=self.api_key) + + # Setup mock return value + subscription_id = "sub_123" + expected_response = { + "id": subscription_id, + "customerId": "cus_123", + "paymentMethodId": "pm_123", + "planId": "plan_123", + "status": "ACTIVE", + } + mock_get.return_value = expected_response + + # Test the method + response = client.Subscriptions.get(subscription_id) + + # Verify the response + self.assertEqual(response, expected_response) + mock_get.assert_called_once_with(subscription_id) + + @patch("Monei.api.subscriptions_api.SubscriptionsApi.cancel") + def test_subscriptions_cancel(self, mock_cancel) -> None: + """Test Subscriptions.cancel method""" + client = MoneiClient(api_key=self.api_key) + + # Setup mock return value + subscription_id = "sub_123" + cancel_data = {"cancelAtPeriodEnd": True} + expected_response = { + "id": subscription_id, + "customerId": "cus_123", + "paymentMethodId": "pm_123", + "planId": "plan_123", + "status": "CANCELED", + "cancelAtPeriodEnd": True, + } + mock_cancel.return_value = expected_response + + # Test the method + response = client.Subscriptions.cancel(subscription_id, cancel_data) + + # Verify the response + self.assertEqual(response, expected_response) + mock_cancel.assert_called_once_with(subscription_id, cancel_data) + + @patch("Monei.api.subscriptions_api.SubscriptionsApi.activate") + def test_subscriptions_activate(self, mock_activate) -> None: + """Test Subscriptions.activate method""" + client = MoneiClient(api_key=self.api_key) + + # Setup mock return value + subscription_id = "sub_123" + activate_data = {"paymentToken": "tok_123", "sessionId": "sess_123"} + expected_response = { + "id": subscription_id, + "customerId": "cus_123", + "paymentMethodId": "pm_123", + "planId": "plan_123", + "status": "ACTIVE", + } + mock_activate.return_value = expected_response + + # Test the method + response = client.Subscriptions.activate(subscription_id, activate_data) + + # Verify the response + self.assertEqual(response, expected_response) + mock_activate.assert_called_once_with(subscription_id, activate_data) + + @patch("Monei.api.subscriptions_api.SubscriptionsApi.pause") + def test_subscriptions_pause(self, mock_pause) -> None: + """Test Subscriptions.pause method""" + client = MoneiClient(api_key=self.api_key) + + # Setup mock return value + subscription_id = "sub_123" + pause_data = {"pauseAtPeriodEnd": True, "pauseIntervalCount": 1} + expected_response = { + "id": subscription_id, + "customerId": "cus_123", + "paymentMethodId": "pm_123", + "planId": "plan_123", + "status": "PAUSED", + "resumeAt": "2023-06-01", + } + mock_pause.return_value = expected_response + + # Test the method + response = client.Subscriptions.pause(subscription_id, pause_data) + + # Verify the response + self.assertEqual(response, expected_response) + mock_pause.assert_called_once_with(subscription_id, pause_data) + + @patch("Monei.api.subscriptions_api.SubscriptionsApi.resume") + def test_subscriptions_resume(self, mock_resume) -> None: + """Test Subscriptions.resume method""" + client = MoneiClient(api_key=self.api_key) + + # Setup mock return value + subscription_id = "sub_123" + expected_response = { + "id": subscription_id, + "customerId": "cus_123", + "paymentMethodId": "pm_123", + "planId": "plan_123", + "status": "ACTIVE", + } + mock_resume.return_value = expected_response + + # Test the method + response = client.Subscriptions.resume(subscription_id) + + # Verify the response + self.assertEqual(response, expected_response) + mock_resume.assert_called_once_with(subscription_id) + + @patch("Monei.api.subscriptions_api.SubscriptionsApi.send_link") + def test_subscriptions_send_link(self, mock_send_link) -> None: + """Test Subscriptions.send_link method""" + client = MoneiClient(api_key=self.api_key) + + # Setup mock return value + subscription_id = "sub_123" + link_data = {"customerEmail": "customer@example.com", "customerPhone": "+34600000000"} + expected_response = {"success": True} + mock_send_link.return_value = expected_response + + # Test the method + response = client.Subscriptions.send_link(subscription_id, link_data) + + # Verify the response + self.assertEqual(response, expected_response) + mock_send_link.assert_called_once_with(subscription_id, link_data) + + @patch("Monei.api.subscriptions_api.SubscriptionsApi.send_status") + def test_subscriptions_send_status(self, mock_send_status) -> None: + """Test Subscriptions.send_status method""" + client = MoneiClient(api_key=self.api_key) + + # Setup mock return value + subscription_id = "sub_123" + status_data = {"customerEmail": "customer@example.com"} + expected_response = {"success": True} + mock_send_status.return_value = expected_response + + # Test the method + response = client.Subscriptions.send_status(subscription_id, status_data) + + # Verify the response + self.assertEqual(response, expected_response) + mock_send_status.assert_called_once_with(subscription_id, status_data) + + @patch("Monei.api.subscriptions_api.SubscriptionsApi.update") + def test_subscriptions_update(self, mock_update) -> None: + """Test Subscriptions.update method""" + client = MoneiClient(api_key=self.api_key) + + # Setup mock return value + subscription_id = "sub_123" + update_data = {"amount": 2000, "description": "Updated subscription"} + expected_response = { + "id": subscription_id, + "customerId": "cus_123", + "paymentMethodId": "pm_123", + "planId": "plan_123", + "status": "ACTIVE", + "amount": 2000, + "description": "Updated subscription", + } + mock_update.return_value = expected_response + + # Test the method + response = client.Subscriptions.update(subscription_id, update_data) + + # Verify the response + self.assertEqual(response, expected_response) + mock_update.assert_called_once_with(subscription_id, update_data) + + # Apple Pay Domain API Tests + @patch("Monei.api.apple_pay_domain_api.ApplePayDomainApi.register") + def test_apple_pay_domain_register(self, mock_register) -> None: + """Test ApplePayDomain.register method""" + client = MoneiClient(api_key=self.api_key) + + # Setup mock return value + domain_data = {"domainName": "example.com"} + expected_response = {"success": True} + mock_register.return_value = expected_response + + # Test the method + response = client.ApplePayDomain.register(domain_data) + + # Verify the response + self.assertEqual(response, expected_response) + mock_register.assert_called_once_with(domain_data) + + # Bizum API Tests + @patch("Monei.api.bizum_api.BizumApi.validate_phone") + def test_bizum_validate_phone(self, mock_validate_phone) -> None: + """Test Bizum.validate_phone method""" + client = MoneiClient( + api_key=self.api_key, user_agent=self.user_agent, account_id=self.account_id + ) + + # Setup mock return value + validate_data = {"phoneNumber": "+34600000000"} + expected_response = {"valid": True} + mock_validate_phone.return_value = expected_response + + # Test the method + response = client.Bizum.validate_phone(validate_data) + + # Verify the response + self.assertEqual(response, expected_response) + mock_validate_phone.assert_called_once_with(validate_data) + + def test_aliases(self) -> None: + """Test that all aliases are correctly set""" + client = MoneiClient(api_key=self.api_key) + + # Check all aliases + self.assertEqual(client.payments, client.Payments) + self.assertEqual(client.payment_methods, client.PaymentMethods) + self.assertEqual(client.subscriptions, client.Subscriptions) + self.assertEqual(client.apple_pay_domain, client.ApplePayDomain) + self.assertEqual(client.bizum, client.Bizum) + + def test_duplicate_aliases(self) -> None: + """Test that there are no duplicate aliases""" + client = MoneiClient(api_key=self.api_key) + + # Check for duplicate aliases in the client + # In the current code, payments is assigned twice + self.assertEqual(client.payments, client.Payments) + + @patch("Monei.api.payments_api.PaymentsApi.create") + def test_error_handling(self, mock_create) -> None: + """Test error handling for API calls""" + client = MoneiClient(api_key=self.api_key) + + # Setup mock to raise an ApiException + error_response = { + "status": "ERROR", + "statusCode": 400, + "requestId": "req_123", + "message": "Invalid request", + "requestTime": "2023-01-01T12:00:00Z", + } + mock_create.side_effect = ApiException( + status=400, reason="Bad Request", body=json.dumps(error_response) + ) + + # Test the method + payment_data = { + "amount": 1000, + "currency": "EUR", + "orderId": "order_123", + "description": "Test payment", + } + + # Verify that the exception is raised + with self.assertRaises(ApiException) as context: + client.Payments.create(payment_data) + + # Verify the exception details + self.assertEqual(context.exception.status, 400) + self.assertEqual(context.exception.reason, "Bad Request") + self.assertIn("Invalid request", context.exception.body) + + +if __name__ == "__main__": + unittest.main() diff --git a/test/test_payment_methods_api.py b/test/test_payment_methods_api.py index e8c4e0d..9c40489 100644 --- a/test/test_payment_methods_api.py +++ b/test/test_payment_methods_api.py @@ -13,25 +13,123 @@ import unittest +from unittest.mock import patch, MagicMock from Monei.api.payment_methods_api import PaymentMethodsApi +from Monei.api_client import ApiClient +from Monei.configuration import Configuration +from Monei.exceptions import ApiException class TestPaymentMethodsApi(unittest.TestCase): """PaymentMethodsApi unit test stubs""" def setUp(self) -> None: - self.api = PaymentMethodsApi() + configuration = Configuration() + configuration.api_key = {"Authorization": "test_api_key"} + self.api_client = ApiClient(configuration) + self.api = PaymentMethodsApi(self.api_client) def tearDown(self) -> None: pass - def test_get(self) -> None: + @patch.object(ApiClient, "call_api") + def test_get(self, mock_call_api) -> None: """Test case for get - Get Payment Methods + Get Payment Method """ - pass + # Configure the mock to return a successful response + mock_response = { + "id": "pm_123", + "type": "CARD", + "card": { + "last4": "4242", + "brand": "VISA", + "expiryMonth": 12, + "expiryYear": 2025 + }, + "customerId": "cus_123", + "status": "ACTIVE" + } + mock_call_api.return_value = mock_response + + # Test the method + customer_id = "cus_123" + payment_method_id = "pm_123" + response = self.api.get(customer_id=customer_id, payment_method_id=payment_method_id) + + # Verify the response + self.assertEqual(response, mock_response) + mock_call_api.assert_called_once() + + @patch.object(ApiClient, "call_api") + def test_list(self, mock_call_api) -> None: + """Test case for list + + List Payment Methods + """ + # Configure the mock to return a successful response + mock_response = { + "data": [ + { + "id": "pm_123", + "type": "CARD", + "card": { + "last4": "4242", + "brand": "VISA", + "expiryMonth": 12, + "expiryYear": 2025 + }, + "customerId": "cus_123", + "status": "ACTIVE" + }, + { + "id": "pm_456", + "type": "CARD", + "card": { + "last4": "1234", + "brand": "MASTERCARD", + "expiryMonth": 10, + "expiryYear": 2024 + }, + "customerId": "cus_123", + "status": "ACTIVE" + } + ], + "hasMore": False + } + mock_call_api.return_value = mock_response + + # Test the method + customer_id = "cus_123" + response = self.api.list(customer_id=customer_id) + + # Verify the response + self.assertEqual(response, mock_response) + mock_call_api.assert_called_once() + + @patch.object(ApiClient, "call_api") + def test_error_handling(self, mock_call_api) -> None: + """Test error handling in API calls""" + # Configure the mock to raise an ApiException + mock_call_api.side_effect = ApiException( + status=404, + reason="Not Found", + body='{"status":"ERROR","statusCode":404,"requestId":"req_123","message":"Payment method not found"}' + ) + + # Test the method + payment_method_id = "pm_nonexistent" + + # Verify that the exception is raised + with self.assertRaises(ApiException) as context: + self.api.get(payment_method_id=payment_method_id) + + # Verify the exception details + self.assertEqual(context.exception.status, 404) + self.assertEqual(context.exception.reason, "Not Found") + self.assertIn("Payment method not found", context.exception.body) if __name__ == '__main__': diff --git a/test/test_payment_methods_api_integration.py b/test/test_payment_methods_api_integration.py deleted file mode 100644 index 5009659..0000000 --- a/test/test_payment_methods_api_integration.py +++ /dev/null @@ -1,133 +0,0 @@ -import pytest -from unittest.mock import patch, MagicMock - -from Monei.monei_client import MoneiClient -from Monei.api.payment_methods_api import PaymentMethodsApi - - -@pytest.mark.unit -class TestPaymentMethodsApiIntegration: - """Integration tests for the Payment Methods API with mocked responses""" - - @pytest.fixture - def mock_payment_method(self): - """Fixture for a mock payment method response""" - return { - "id": "pm_123456789", - "type": "card", - "card": { - "brand": "visa", - "last4": "4242", - "expMonth": 12, - "expYear": 2025 - }, - "created": "2023-01-01T12:00:00Z" - } - - @pytest.fixture - def mock_client(self): - """Fixture for creating a mock client""" - return MoneiClient(api_key="test_api_key") - - @patch.object(PaymentMethodsApi, 'list') - def test_list_payment_methods(self, mock_list, mock_client, mock_payment_method): - """Test listing payment methods""" - mock_list.return_value = { - "data": [ - mock_payment_method, - { - "id": "pm_987654321", - "type": "sepa", - "sepa": { - "iban": "DE89370400440532013000", - "last4": "3000" - }, - "created": "2023-01-02T12:00:00Z" - } - ], - "hasMore": False, - "totalCount": 2 - } - - result = mock_client.PaymentMethods.list() - - assert "data" in result - assert len(result["data"]) == 2 - assert result["data"][0]["id"] == "pm_123456789" - assert result["data"][0]["type"] == "card" - assert result["data"][1]["id"] == "pm_987654321" - assert result["data"][1]["type"] == "sepa" - assert result["hasMore"] is False - assert result["totalCount"] == 2 - mock_list.assert_called_once() - - @patch.object(PaymentMethodsApi, 'get') - def test_get_payment_method(self, mock_get, mock_client, mock_payment_method): - """Test retrieving a payment method""" - mock_get.return_value = mock_payment_method - - result = mock_client.PaymentMethods.get(payment_method_id="pm_123456789") - - assert result["id"] == "pm_123456789" - assert result["type"] == "card" - assert result["card"]["brand"] == "visa" - assert result["card"]["last4"] == "4242" - mock_get.assert_called_once_with(payment_method_id="pm_123456789") - - @patch.object(PaymentMethodsApi, 'delete') - def test_delete_payment_method(self, mock_delete, mock_client): - """Test deleting a payment method""" - mock_delete.return_value = { - "id": "pm_123456789", - "deleted": True - } - - result = mock_client.PaymentMethods.delete(payment_method_id="pm_123456789") - - assert result["id"] == "pm_123456789" - assert result["deleted"] is True - mock_delete.assert_called_once_with(payment_method_id="pm_123456789") - - @patch.object(PaymentMethodsApi, 'list') - def test_list_payment_methods_with_params(self, mock_list, mock_client, mock_payment_method): - """Test listing payment methods with parameters""" - mock_list.return_value = { - "data": [mock_payment_method], - "hasMore": False, - "totalCount": 1 - } - - # Test with customer_id parameter - result = mock_client.PaymentMethods.list(customer_id="cus_123456789") - - assert len(result["data"]) == 1 - assert result["data"][0]["id"] == "pm_123456789" - mock_list.assert_called_with(customer_id="cus_123456789") - - # Test with type parameter - mock_list.reset_mock() - mock_list.return_value = { - "data": [mock_payment_method], - "hasMore": False, - "totalCount": 1 - } - - result = mock_client.PaymentMethods.list(type="card") - - assert len(result["data"]) == 1 - assert result["data"][0]["type"] == "card" - mock_list.assert_called_with(type="card") - - # Test with limit and starting_after parameters - mock_list.reset_mock() - mock_list.return_value = { - "data": [mock_payment_method], - "hasMore": True, - "totalCount": 10 - } - - result = mock_client.PaymentMethods.list(limit=1, starting_after="pm_000000000") - - assert len(result["data"]) == 1 - assert result["hasMore"] is True - mock_list.assert_called_with(limit=1, starting_after="pm_000000000") \ No newline at end of file diff --git a/test/test_payments_api.py b/test/test_payments_api.py index 3334270..90ddae2 100644 --- a/test/test_payments_api.py +++ b/test/test_payments_api.py @@ -1,101 +1,321 @@ # coding: utf-8 """ - MONEI API v1 +MONEI API v1 -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

+

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

- The version of the OpenAPI document: 1.5.1 - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 1.5.1 +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 import unittest +from unittest.mock import patch, MagicMock from Monei.api.payments_api import PaymentsApi +from Monei.api_client import ApiClient +from Monei.configuration import Configuration +from Monei.exceptions import ApiException class TestPaymentsApi(unittest.TestCase): """PaymentsApi unit test stubs""" def setUp(self) -> None: - self.api = PaymentsApi() + configuration = Configuration() + configuration.api_key = {"Authorization": "test_api_key"} + self.api_client = ApiClient(configuration) + self.api = PaymentsApi(self.api_client) def tearDown(self) -> None: pass - def test_cancel(self) -> None: + @patch.object(ApiClient, "call_api") + def test_cancel(self, mock_call_api) -> None: """Test case for cancel Cancel Payment """ - pass - - def test_capture(self) -> None: + # Configure the mock to return a successful response + mock_response = { + "id": "pay_123", + "amount": 1000, + "currency": "EUR", + "orderId": "order_123", + "status": "CANCELLED", + "cancellationReason": "CUSTOMER_REQUEST", + } + mock_call_api.return_value = mock_response + + # Test the method + payment_id = "pay_123" + cancel_data = {"reason": "CUSTOMER_REQUEST"} + response = self.api.cancel(payment_id, cancel_data) + + # Verify the response + self.assertEqual(response, mock_response) + mock_call_api.assert_called_once() + + @patch.object(ApiClient, "call_api") + def test_capture(self, mock_call_api) -> None: """Test case for capture Capture Payment """ - pass - - def test_confirm(self) -> None: + # Configure the mock to return a successful response + mock_response = { + "id": "pay_123", + "amount": 1000, + "currency": "EUR", + "orderId": "order_123", + "status": "SUCCEEDED", + } + mock_call_api.return_value = mock_response + + # Test the method + payment_id = "pay_123" + capture_data = {"amount": 1000} + response = self.api.capture(payment_id, capture_data) + + # Verify the response + self.assertEqual(response, mock_response) + mock_call_api.assert_called_once() + + @patch.object(ApiClient, "call_api") + def test_confirm(self, mock_call_api) -> None: """Test case for confirm Confirm Payment """ - pass - - def test_create(self) -> None: + # Configure the mock to return a successful response + mock_response = { + "id": "pay_123", + "amount": 1000, + "currency": "EUR", + "orderId": "order_123", + "status": "SUCCEEDED", + } + mock_call_api.return_value = mock_response + + # Test the method + payment_id = "pay_123" + confirm_data = {"paymentToken": "tok_123", "sessionId": "sess_123"} + response = self.api.confirm(payment_id, confirm_data) + + # Verify the response + self.assertEqual(response, mock_response) + mock_call_api.assert_called_once() + + @patch.object(ApiClient, "call_api") + def test_create(self, mock_call_api) -> None: """Test case for create Create Payment """ - pass - - def test_get(self) -> None: + # Configure the mock to return a successful response + mock_response = { + "id": "pay_123", + "amount": 1000, + "currency": "EUR", + "orderId": "order_123", + "description": "Test payment", + "status": "PENDING", + "nextAction": {"type": "REDIRECT", "redirectUrl": "https://checkout.monei.com/123"}, + } + mock_call_api.return_value = mock_response + + # Test the method + payment_data = { + "amount": 1000, + "currency": "EUR", + "orderId": "order_123", + "description": "Test payment", + "completeUrl": "https://example.com/complete", + "cancelUrl": "https://example.com/cancel", + } + response = self.api.create(payment_data) + + # Verify the response + self.assertEqual(response, mock_response) + mock_call_api.assert_called_once() + + @patch.object(ApiClient, "call_api") + def test_get(self, mock_call_api) -> None: """Test case for get Get Payment """ - pass - - def test_recurring(self) -> None: + # Configure the mock to return a successful response + mock_response = { + "id": "pay_123", + "amount": 1000, + "currency": "EUR", + "orderId": "order_123", + "description": "Test payment", + "status": "SUCCEEDED", + } + mock_call_api.return_value = mock_response + + # Test the method + payment_id = "pay_123" + response = self.api.get(payment_id) + + # Verify the response + self.assertEqual(response, mock_response) + mock_call_api.assert_called_once() + + @patch.object(ApiClient, "call_api") + def test_recurring(self, mock_call_api) -> None: """Test case for recurring Recurring Payment """ - pass - - def test_refund(self) -> None: + # Configure the mock to return a successful response + mock_response = { + "id": "pay_456", + "amount": 1000, + "currency": "EUR", + "orderId": "order_456", + "description": "Recurring payment", + "status": "SUCCEEDED", + "sequenceId": "seq_123", + } + mock_call_api.return_value = mock_response + + # Test the method + sequence_id = "seq_123" + recurring_data = { + "amount": 1000, + "currency": "EUR", + "orderId": "order_456", + "description": "Recurring payment", + "paymentMethodId": "pm_123", + } + response = self.api.recurring(sequence_id, recurring_data) + + # Verify the response + self.assertEqual(response, mock_response) + mock_call_api.assert_called_once() + + @patch.object(ApiClient, "call_api") + def test_refund(self, mock_call_api) -> None: """Test case for refund Refund Payment """ - pass - - def test_send_link(self) -> None: + # Configure the mock to return a successful response + mock_response = { + "id": "ref_123", + "paymentId": "pay_123", + "amount": 500, + "reason": "CUSTOMER_REQUEST", + "status": "SUCCEEDED", + } + mock_call_api.return_value = mock_response + + # Test the method + payment_id = "pay_123" + refund_data = {"amount": 500, "reason": "CUSTOMER_REQUEST"} + response = self.api.refund(payment_id, refund_data) + + # Verify the response + self.assertEqual(response, mock_response) + mock_call_api.assert_called_once() + + @patch.object(ApiClient, "call_api") + def test_send_link(self, mock_call_api) -> None: """Test case for send_link Send Payment Link """ - pass + # Configure the mock to return a successful response + mock_response = {"success": True} + mock_call_api.return_value = mock_response - def test_send_receipt(self) -> None: + # Test the method + payment_id = "pay_123" + link_data = {"customerEmail": "customer@example.com", "customerPhone": "+34600000000"} + response = self.api.send_link(payment_id, link_data) + + # Verify the response + self.assertEqual(response, mock_response) + mock_call_api.assert_called_once() + + @patch.object(ApiClient, "call_api") + def test_send_receipt(self, mock_call_api) -> None: """Test case for send_receipt Send Payment Receipt """ - pass + # Configure the mock to return a successful response + mock_response = {"success": True} + mock_call_api.return_value = mock_response - def test_send_request(self) -> None: + # Test the method + payment_id = "pay_123" + receipt_data = {"customerEmail": "customer@example.com"} + response = self.api.send_receipt(payment_id, receipt_data) + + # Verify the response + self.assertEqual(response, mock_response) + mock_call_api.assert_called_once() + + @patch.object(ApiClient, "call_api") + def test_send_request(self, mock_call_api) -> None: """Test case for send_request Send Payment Request """ - pass - - -if __name__ == '__main__': + # Configure the mock to return a successful response + mock_response = { + "id": "pay_123", + "amount": 1000, + "currency": "EUR", + "orderId": "order_123", + "description": "Payment request", + "status": "PENDING", + } + mock_call_api.return_value = mock_response + + # Test the method + payment_id = "pay_123" + request_data = {"phoneNumber": "+34600000000"} + response = self.api.send_request(payment_id, request_data) + + # Verify the response + self.assertEqual(response, mock_response) + mock_call_api.assert_called_once() + + @patch.object(ApiClient, "call_api") + def test_error_handling(self, mock_call_api) -> None: + """Test error handling in API calls""" + # Configure the mock to raise an ApiException + mock_call_api.side_effect = ApiException( + status=400, + reason="Bad Request", + body='{"status":"ERROR","statusCode":400,"requestId":"req_123","message":"Invalid request"}', + ) + + # Test the method + payment_data = { + "amount": 1000, + "currency": "EUR", + "orderId": "order_123", + "description": "Test payment", + } + + # Verify that the exception is raised + with self.assertRaises(ApiException) as context: + self.api.create(payment_data) + + # Verify the exception details + self.assertEqual(context.exception.status, 400) + self.assertEqual(context.exception.reason, "Bad Request") + self.assertIn("Invalid request", context.exception.body) + + +if __name__ == "__main__": unittest.main() diff --git a/test/test_payments_api_example.py b/test/test_payments_api_example.py deleted file mode 100644 index 65c5f77..0000000 --- a/test/test_payments_api_example.py +++ /dev/null @@ -1,15 +0,0 @@ -import pytest - - -@pytest.mark.unit -def test_mock_example(): - """A simple test example that doesn't rely on problematic models.""" - # This is just a placeholder test to demonstrate the test setup - assert True - - -@pytest.mark.requires_api -def test_skip_example(): - """This test will be skipped when SKIP_GENERATED_TESTS is set.""" - # This test would be skipped in CI or when SKIP_GENERATED_TESTS is set - assert True diff --git a/test/test_payments_api_integration.py b/test/test_payments_api_integration.py deleted file mode 100644 index 20f3e94..0000000 --- a/test/test_payments_api_integration.py +++ /dev/null @@ -1,232 +0,0 @@ -import pytest -from unittest.mock import patch, MagicMock - -from Monei.monei_client import MoneiClient -from Monei.api.payments_api import PaymentsApi -from Monei.model.create_payment_request import CreatePaymentRequest -from Monei.model.confirm_payment_request import ConfirmPaymentRequest -from Monei.model.capture_payment_request import CapturePaymentRequest -from Monei.model.refund_payment_request import RefundPaymentRequest -from Monei.model.cancel_payment_request import CancelPaymentRequest -from Monei.model.recurring_payment_request import RecurringPaymentRequest -from Monei.model.send_payment_link_request import SendPaymentLinkRequest -from Monei.model.send_payment_receipt_request import SendPaymentReceiptRequest -from Monei.model.send_payment_request_request import SendPaymentRequestRequest -from Monei.model.payment_status import PaymentStatus -from Monei.model.payment import Payment - - -@pytest.mark.unit -class TestPaymentsApiIntegration: - """Integration tests for the Payments API with mocked responses""" - - @pytest.fixture - def mock_payment_response(self): - """Fixture for a mock payment response""" - return { - "id": "pay_123456789", - "amount": 1000, - "currency": "EUR", - "status": PaymentStatus("PENDING"), - "description": "Test payment", - "created": "2023-01-01T12:00:00Z", - "updated": "2023-01-01T12:00:00Z", - } - - @pytest.fixture - def mock_client(self): - """Fixture for creating a mock client""" - return MoneiClient(api_key="test_api_key") - - @patch.object(PaymentsApi, "create") - def test_create_payment(self, mock_create, mock_client, mock_payment_response): - """Test creating a payment""" - mock_create.return_value = mock_payment_response - - payment_request = CreatePaymentRequest( - amount=1000, currency="EUR", description="Test payment" # 10.00 in cents - ) - - result = mock_client.Payments.create(create_payment_request=payment_request) - - assert result["id"] == "pay_123456789" - assert result["amount"] == 1000 - assert result["currency"] == "EUR" - assert result["status"] == PaymentStatus("PENDING") - mock_create.assert_called_once_with(create_payment_request=payment_request) - - @patch.object(PaymentsApi, "get") - def test_get_payment(self, mock_get, mock_client, mock_payment_response): - """Test retrieving a payment""" - mock_get.return_value = mock_payment_response - - result = mock_client.Payments.get(payment_id="pay_123456789") - - assert result["id"] == "pay_123456789" - assert result["status"] == PaymentStatus("PENDING") - mock_get.assert_called_once_with(payment_id="pay_123456789") - - @patch.object(PaymentsApi, "confirm") - def test_confirm_payment(self, mock_confirm, mock_client): - """Test confirming a payment""" - confirmed_payment = { - "id": "pay_123456789", - "amount": 1000, - "currency": "EUR", - "status": PaymentStatus("CONFIRMED"), - "description": "Test payment", - "created": "2023-01-01T12:00:00Z", - "updated": "2023-01-01T12:01:00Z", - } - mock_confirm.return_value = confirmed_payment - - confirm_request = ConfirmPaymentRequest() - result = mock_client.Payments.confirm( - payment_id="pay_123456789", confirm_payment_request=confirm_request - ) - - assert result["id"] == "pay_123456789" - assert result["status"] == PaymentStatus("CONFIRMED") - mock_confirm.assert_called_once_with( - payment_id="pay_123456789", confirm_payment_request=confirm_request - ) - - @patch.object(PaymentsApi, "capture") - def test_capture_payment(self, mock_capture, mock_client): - """Test capturing a payment""" - captured_payment = { - "id": "pay_123456789", - "amount": 1000, - "currency": "EUR", - "status": PaymentStatus("COMPLETED"), - "description": "Test payment", - "created": "2023-01-01T12:00:00Z", - "updated": "2023-01-01T12:02:00Z", - } - mock_capture.return_value = captured_payment - - capture_request = CapturePaymentRequest(amount=1000) - result = mock_client.Payments.capture( - payment_id="pay_123456789", capture_payment_request=capture_request - ) - - assert result["id"] == "pay_123456789" - assert result["status"] == PaymentStatus("COMPLETED") - mock_capture.assert_called_once_with( - payment_id="pay_123456789", capture_payment_request=capture_request - ) - - @patch.object(PaymentsApi, "refund") - def test_refund_payment(self, mock_refund, mock_client): - """Test refunding a payment""" - refunded_payment = { - "id": "pay_123456789", - "amount": 1000, - "currency": "EUR", - "status": PaymentStatus("REFUNDED"), - "description": "Test payment", - "created": "2023-01-01T12:00:00Z", - "updated": "2023-01-01T12:03:00Z", - } - mock_refund.return_value = refunded_payment - - refund_request = RefundPaymentRequest(amount=1000) - result = mock_client.Payments.refund( - payment_id="pay_123456789", refund_payment_request=refund_request - ) - - assert result["id"] == "pay_123456789" - assert result["status"] == PaymentStatus("REFUNDED") - mock_refund.assert_called_once_with( - payment_id="pay_123456789", refund_payment_request=refund_request - ) - - @patch.object(PaymentsApi, "cancel") - def test_cancel_payment(self, mock_cancel, mock_client): - """Test canceling a payment""" - canceled_payment = { - "id": "pay_123456789", - "amount": 1000, - "currency": "EUR", - "status": PaymentStatus("CANCELED"), - "description": "Test payment", - "created": "2023-01-01T12:00:00Z", - "updated": "2023-01-01T12:04:00Z", - } - mock_cancel.return_value = canceled_payment - - cancel_request = CancelPaymentRequest() - result = mock_client.Payments.cancel( - payment_id="pay_123456789", cancel_payment_request=cancel_request - ) - - assert result["id"] == "pay_123456789" - assert result["status"] == PaymentStatus("CANCELED") - mock_cancel.assert_called_once_with( - payment_id="pay_123456789", cancel_payment_request=cancel_request - ) - - @patch.object(PaymentsApi, "recurring") - def test_recurring_payment(self, mock_recurring, mock_client): - """Test creating a recurring payment""" - recurring_payment = { - "id": "pay_987654321", - "amount": 1000, - "currency": "EUR", - "status": PaymentStatus("PENDING"), - "description": "Recurring payment", - "created": "2023-01-02T12:00:00Z", - "updated": "2023-01-02T12:00:00Z", - } - mock_recurring.return_value = recurring_payment - - recurring_request = RecurringPaymentRequest( - amount=1000, currency="EUR", description="Recurring payment", payment_id="pay_123456789" - ) - result = mock_client.Payments.recurring(recurring_payment_request=recurring_request) - - assert result["id"] == "pay_987654321" - assert result["description"] == "Recurring payment" - mock_recurring.assert_called_once_with(recurring_payment_request=recurring_request) - - @patch.object(PaymentsApi, "send_link") - def test_send_payment_link(self, mock_send_link, mock_client): - """Test sending a payment link""" - success_response = {"success": True} - mock_send_link.return_value = success_response - - link_request = SendPaymentLinkRequest( - payment_id="pay_123456789", email="customer@example.com" - ) - result = mock_client.Payments.send_link(send_payment_link_request=link_request) - - assert result["success"] is True - mock_send_link.assert_called_once_with(send_payment_link_request=link_request) - - @patch.object(PaymentsApi, "send_receipt") - def test_send_payment_receipt(self, mock_send_receipt, mock_client): - """Test sending a payment receipt""" - success_response = {"success": True} - mock_send_receipt.return_value = success_response - - receipt_request = SendPaymentReceiptRequest( - payment_id="pay_123456789", email="customer@example.com" - ) - result = mock_client.Payments.send_receipt(send_payment_receipt_request=receipt_request) - - assert result["success"] is True - mock_send_receipt.assert_called_once_with(send_payment_receipt_request=receipt_request) - - @patch.object(PaymentsApi, "send_request") - def test_send_payment_request(self, mock_send_request, mock_client): - """Test sending a payment request""" - success_response = {"success": True} - mock_send_request.return_value = success_response - - request_request = SendPaymentRequestRequest( - payment_id="pay_123456789", email="customer@example.com" - ) - result = mock_client.Payments.send_request(send_payment_request_request=request_request) - - assert result["success"] is True - mock_send_request.assert_called_once_with(send_payment_request_request=request_request) diff --git a/test/test_subscriptions_api.py b/test/test_subscriptions_api.py index 898b4bb..ad2d7de 100644 --- a/test/test_subscriptions_api.py +++ b/test/test_subscriptions_api.py @@ -13,81 +13,301 @@ import unittest +from unittest.mock import patch, MagicMock from Monei.api.subscriptions_api import SubscriptionsApi +from Monei.api_client import ApiClient +from Monei.configuration import Configuration +from Monei.exceptions import ApiException class TestSubscriptionsApi(unittest.TestCase): """SubscriptionsApi unit test stubs""" def setUp(self) -> None: - self.api = SubscriptionsApi() + configuration = Configuration() + configuration.api_key = {"Authorization": "test_api_key"} + self.api_client = ApiClient(configuration) + self.api = SubscriptionsApi(self.api_client) def tearDown(self) -> None: pass - def test_activate(self) -> None: + @patch.object(ApiClient, "call_api") + def test_activate(self, mock_call_api) -> None: """Test case for activate Activate Subscription """ - pass + # Configure the mock to return a successful response + mock_response = { + "id": "sub_123", + "customerId": "cus_123", + "paymentMethodId": "pm_123", + "planId": "plan_123", + "status": "ACTIVE" + } + mock_call_api.return_value = mock_response + + # Test the method + subscription_id = "sub_123" + activate_data = { + "paymentToken": "tok_123", + "sessionId": "sess_123" + } + response = self.api.activate(subscription_id, activate_data) - def test_cancel(self) -> None: + # Verify the response + self.assertEqual(response, mock_response) + mock_call_api.assert_called_once() + + @patch.object(ApiClient, "call_api") + def test_cancel(self, mock_call_api) -> None: """Test case for cancel Cancel Subscription """ - pass + # Configure the mock to return a successful response + mock_response = { + "id": "sub_123", + "customerId": "cus_123", + "paymentMethodId": "pm_123", + "planId": "plan_123", + "status": "CANCELED", + "cancelAtPeriodEnd": True + } + mock_call_api.return_value = mock_response - def test_create(self) -> None: + # Test the method + subscription_id = "sub_123" + cancel_data = { + "cancelAtPeriodEnd": True + } + response = self.api.cancel(subscription_id, cancel_data) + + # Verify the response + self.assertEqual(response, mock_response) + mock_call_api.assert_called_once() + + @patch.object(ApiClient, "call_api") + def test_create(self, mock_call_api) -> None: """Test case for create Create Subscription """ - pass + # Configure the mock to return a successful response + mock_response = { + "id": "sub_123", + "status": "ACTIVE", + "amount": 1000, + "currency": "EUR", + "interval": "month", + "customerId": "cus_123", + "paymentMethodId": "pm_123", + "planId": "plan_123", + "startDate": "2023-01-01" + } + mock_call_api.return_value = mock_response + + # Test the method + subscription_data = { + "amount": 1000, + "currency": "EUR", + "interval": "month", + "customerId": "cus_123", + "paymentMethodId": "pm_123", + "planId": "plan_123", + "startDate": "2023-01-01" + } + response = self.api.create(subscription_data) - def test_get(self) -> None: + # Verify the response + self.assertEqual(response, mock_response) + mock_call_api.assert_called_once() + + @patch.object(ApiClient, "call_api") + def test_get(self, mock_call_api) -> None: """Test case for get Get Subscription """ - pass + # Configure the mock to return a successful response + mock_response = { + "id": "sub_123", + "customerId": "cus_123", + "paymentMethodId": "pm_123", + "planId": "plan_123", + "status": "ACTIVE", + "amount": 1000, + "currency": "EUR", + "interval": "month" + } + mock_call_api.return_value = mock_response + + # Test the method + subscription_id = "sub_123" + response = self.api.get(subscription_id) + + # Verify the response + self.assertEqual(response, mock_response) + mock_call_api.assert_called_once() - def test_pause(self) -> None: + @patch.object(ApiClient, "call_api") + def test_pause(self, mock_call_api) -> None: """Test case for pause Pause Subscription """ - pass + # Configure the mock to return a successful response + mock_response = { + "id": "sub_123", + "customerId": "cus_123", + "paymentMethodId": "pm_123", + "planId": "plan_123", + "status": "PAUSED", + "resumeAt": "2023-06-01" + } + mock_call_api.return_value = mock_response + + # Test the method + subscription_id = "sub_123" + pause_data = { + "pauseAtPeriodEnd": True, + "pauseIntervalCount": 1 + } + response = self.api.pause(subscription_id, pause_data) - def test_resume(self) -> None: + # Verify the response + self.assertEqual(response, mock_response) + mock_call_api.assert_called_once() + + @patch.object(ApiClient, "call_api") + def test_resume(self, mock_call_api) -> None: """Test case for resume Resume Subscription """ - pass + # Configure the mock to return a successful response + mock_response = { + "id": "sub_123", + "customerId": "cus_123", + "paymentMethodId": "pm_123", + "planId": "plan_123", + "status": "ACTIVE" + } + mock_call_api.return_value = mock_response - def test_send_link(self) -> None: + # Test the method + subscription_id = "sub_123" + response = self.api.resume(subscription_id) + + # Verify the response + self.assertEqual(response, mock_response) + mock_call_api.assert_called_once() + + @patch.object(ApiClient, "call_api") + def test_send_link(self, mock_call_api) -> None: """Test case for send_link Send Subscription Link """ - pass + # Configure the mock to return a successful response + mock_response = { + "success": True + } + mock_call_api.return_value = mock_response + + # Test the method + subscription_id = "sub_123" + link_data = { + "customerEmail": "customer@example.com", + "customerPhone": "+34600000000" + } + response = self.api.send_link(subscription_id, link_data) - def test_send_status(self) -> None: + # Verify the response + self.assertEqual(response, mock_response) + mock_call_api.assert_called_once() + + @patch.object(ApiClient, "call_api") + def test_send_status(self, mock_call_api) -> None: """Test case for send_status Send Subscription Status """ - pass + # Configure the mock to return a successful response + mock_response = { + "success": True + } + mock_call_api.return_value = mock_response + + # Test the method + subscription_id = "sub_123" + status_data = { + "customerEmail": "customer@example.com" + } + response = self.api.send_status(subscription_id, status_data) + + # Verify the response + self.assertEqual(response, mock_response) + mock_call_api.assert_called_once() - def test_update(self) -> None: + @patch.object(ApiClient, "call_api") + def test_update(self, mock_call_api) -> None: """Test case for update Update Subscription """ - pass + # Configure the mock to return a successful response + mock_response = { + "id": "sub_123", + "customerId": "cus_123", + "paymentMethodId": "pm_123", + "planId": "plan_123", + "status": "ACTIVE", + "amount": 2000, + "description": "Updated subscription" + } + mock_call_api.return_value = mock_response + + # Test the method + subscription_id = "sub_123" + update_data = { + "amount": 2000, + "description": "Updated subscription" + } + response = self.api.update(subscription_id, update_data) + + # Verify the response + self.assertEqual(response, mock_response) + mock_call_api.assert_called_once() + + @patch.object(ApiClient, "call_api") + def test_error_handling(self, mock_call_api) -> None: + """Test error handling in API calls""" + # Configure the mock to raise an ApiException + mock_call_api.side_effect = ApiException( + status=400, + reason="Bad Request", + body='{"status":"ERROR","statusCode":400,"requestId":"req_123","message":"Invalid request"}' + ) + + # Test the method + subscription_data = { + "amount": 1000, + "currency": "EUR", + "interval": "month", + "customerId": "cus_123" + } + + # Verify that the exception is raised + with self.assertRaises(ApiException) as context: + self.api.create(subscription_data) + + # Verify the exception details + self.assertEqual(context.exception.status, 400) + self.assertEqual(context.exception.reason, "Bad Request") + self.assertIn("Invalid request", context.exception.body) if __name__ == '__main__': diff --git a/test/test_subscriptions_api_integration.py b/test/test_subscriptions_api_integration.py deleted file mode 100644 index 3f8f034..0000000 --- a/test/test_subscriptions_api_integration.py +++ /dev/null @@ -1,226 +0,0 @@ -import pytest -from unittest.mock import patch, MagicMock - -from Monei.monei_client import MoneiClient -from Monei.api.subscriptions_api import SubscriptionsApi -from Monei.model.create_subscription_request import CreateSubscriptionRequest -from Monei.model.update_subscription_request import UpdateSubscriptionRequest -from Monei.model.pause_subscription_request import PauseSubscriptionRequest -from Monei.model.cancel_subscription_request import CancelSubscriptionRequest -from Monei.model.activate_subscription_request import ActivateSubscriptionRequest -from Monei.model.send_subscription_link_request import SendSubscriptionLinkRequest -from Monei.model.send_subscription_status_request import SendSubscriptionStatusRequest -from Monei.model.subscription_status import SubscriptionStatus -from Monei.model.subscription_interval import SubscriptionInterval - - -@pytest.mark.unit -class TestSubscriptionsApiIntegration: - """Integration tests for the Subscriptions API with mocked responses""" - - @pytest.fixture - def mock_subscription(self): - """Fixture for a mock subscription response""" - return { - "id": "sub_123456789", - "status": SubscriptionStatus("ACTIVE"), - "amount": 1000, - "currency": "EUR", - "description": "Test subscription", - "interval": SubscriptionInterval("MONTH"), - "intervalCount": 1, - "startDate": "2023-01-01", - "endDate": None, - "cancelAtPeriodEnd": False, - "created": "2023-01-01T12:00:00Z", - "updated": "2023-01-01T12:00:00Z", - } - - @pytest.fixture - def mock_client(self): - """Fixture for creating a mock client""" - return MoneiClient(api_key="test_api_key") - - @patch.object(SubscriptionsApi, "create") - def test_create_subscription(self, mock_create, mock_client, mock_subscription): - """Test creating a subscription""" - mock_create.return_value = mock_subscription - - subscription_request = CreateSubscriptionRequest( - amount=1000, - currency="EUR", - description="Test subscription", - interval=SubscriptionInterval("MONTH"), - interval_count=1, - payment_method_id="pm_123456789", - ) - - result = mock_client.Subscriptions.create(create_subscription_request=subscription_request) - - assert result["id"] == "sub_123456789" - assert result["status"] == SubscriptionStatus("ACTIVE") - assert result["amount"] == 1000 - assert result["currency"] == "EUR" - assert result["interval"] == SubscriptionInterval("MONTH") - mock_create.assert_called_once_with(create_subscription_request=subscription_request) - - @patch.object(SubscriptionsApi, "get") - def test_get_subscription(self, mock_get, mock_client, mock_subscription): - """Test retrieving a subscription""" - mock_get.return_value = mock_subscription - - result = mock_client.Subscriptions.get(subscription_id="sub_123456789") - - assert result["id"] == "sub_123456789" - assert result["status"] == SubscriptionStatus("ACTIVE") - mock_get.assert_called_once_with(subscription_id="sub_123456789") - - @patch.object(SubscriptionsApi, "list") - def test_list_subscriptions(self, mock_list, mock_client, mock_subscription): - """Test listing subscriptions""" - mock_list.return_value = { - "data": [ - mock_subscription, - { - "id": "sub_987654321", - "status": SubscriptionStatus("PAUSED"), - "amount": 2000, - "currency": "EUR", - "description": "Another subscription", - "interval": SubscriptionInterval("YEAR"), - "intervalCount": 1, - "startDate": "2023-01-02", - "endDate": None, - "cancelAtPeriodEnd": False, - "created": "2023-01-02T12:00:00Z", - "updated": "2023-01-02T12:00:00Z", - }, - ], - "hasMore": False, - "totalCount": 2, - } - - result = mock_client.Subscriptions.list() - - assert "data" in result - assert len(result["data"]) == 2 - assert result["data"][0]["id"] == "sub_123456789" - assert result["data"][0]["status"] == SubscriptionStatus("ACTIVE") - assert result["data"][1]["id"] == "sub_987654321" - assert result["data"][1]["status"] == SubscriptionStatus("PAUSED") - assert result["hasMore"] is False - assert result["totalCount"] == 2 - mock_list.assert_called_once() - - @patch.object(SubscriptionsApi, "update") - def test_update_subscription(self, mock_update, mock_client, mock_subscription): - """Test updating a subscription""" - updated_subscription = mock_subscription.copy() - updated_subscription["amount"] = 1500 - updated_subscription["description"] = "Updated subscription" - mock_update.return_value = updated_subscription - - update_request = UpdateSubscriptionRequest(amount=1500, description="Updated subscription") - - result = mock_client.Subscriptions.update( - subscription_id="sub_123456789", update_subscription_request=update_request - ) - - assert result["id"] == "sub_123456789" - assert result["amount"] == 1500 - assert result["description"] == "Updated subscription" - mock_update.assert_called_once_with( - subscription_id="sub_123456789", update_subscription_request=update_request - ) - - @patch.object(SubscriptionsApi, "pause") - def test_pause_subscription(self, mock_pause, mock_client, mock_subscription): - """Test pausing a subscription""" - paused_subscription = mock_subscription.copy() - paused_subscription["status"] = SubscriptionStatus("PAUSED") - mock_pause.return_value = paused_subscription - - pause_request = PauseSubscriptionRequest() - - result = mock_client.Subscriptions.pause( - subscription_id="sub_123456789", pause_subscription_request=pause_request - ) - - assert result["id"] == "sub_123456789" - assert result["status"] == SubscriptionStatus("PAUSED") - mock_pause.assert_called_once_with( - subscription_id="sub_123456789", pause_subscription_request=pause_request - ) - - @patch.object(SubscriptionsApi, "cancel") - def test_cancel_subscription(self, mock_cancel, mock_client, mock_subscription): - """Test canceling a subscription""" - canceled_subscription = mock_subscription.copy() - canceled_subscription["status"] = SubscriptionStatus("CANCELED") - mock_cancel.return_value = canceled_subscription - - cancel_request = CancelSubscriptionRequest() - - result = mock_client.Subscriptions.cancel( - subscription_id="sub_123456789", cancel_subscription_request=cancel_request - ) - - assert result["id"] == "sub_123456789" - assert result["status"] == SubscriptionStatus("CANCELED") - mock_cancel.assert_called_once_with( - subscription_id="sub_123456789", cancel_subscription_request=cancel_request - ) - - @patch.object(SubscriptionsApi, "activate") - def test_activate_subscription(self, mock_activate, mock_client, mock_subscription): - """Test activating a subscription""" - paused_subscription = mock_subscription.copy() - paused_subscription["status"] = SubscriptionStatus("PAUSED") - - activated_subscription = paused_subscription.copy() - activated_subscription["status"] = SubscriptionStatus("ACTIVE") - mock_activate.return_value = activated_subscription - - activate_request = ActivateSubscriptionRequest() - - result = mock_client.Subscriptions.activate( - subscription_id="sub_123456789", activate_subscription_request=activate_request - ) - - assert result["id"] == "sub_123456789" - assert result["status"] == SubscriptionStatus("ACTIVE") - mock_activate.assert_called_once_with( - subscription_id="sub_123456789", activate_subscription_request=activate_request - ) - - @patch.object(SubscriptionsApi, "send_link") - def test_send_subscription_link(self, mock_send_link, mock_client): - """Test sending a subscription link""" - success_response = {"success": True} - mock_send_link.return_value = success_response - - link_request = SendSubscriptionLinkRequest( - subscription_id="sub_123456789", email="customer@example.com" - ) - - result = mock_client.Subscriptions.send_link(send_subscription_link_request=link_request) - - assert result["success"] is True - mock_send_link.assert_called_once_with(send_subscription_link_request=link_request) - - @patch.object(SubscriptionsApi, "send_status") - def test_send_subscription_status(self, mock_send_status, mock_client): - """Test sending a subscription status""" - success_response = {"success": True} - mock_send_status.return_value = success_response - - status_request = SendSubscriptionStatusRequest( - subscription_id="sub_123456789", email="customer@example.com" - ) - - result = mock_client.Subscriptions.send_status( - send_subscription_status_request=status_request - ) - - assert result["success"] is True - mock_send_status.assert_called_once_with(send_subscription_status_request=status_request) From 9b072909647e6f2a94d9149f46dc129b6b6762cf Mon Sep 17 00:00:00 2001 From: Dmitriy Date: Thu, 6 Mar 2025 20:02:11 +0100 Subject: [PATCH 07/13] Downgrade OpenAPI generator and clean up project dependencies - Downgrade OpenAPI generator version from 7.12.0 to 6.0.1 - Remove deprecated model and test files - Update requirements and test dependencies - Simplify project configuration files - Remove unused GitHub workflow and build scripts --- .github/workflows/python.yml | 31 - .github/workflows/test.yml | 35 + .openapi-generator/FILES | 178 +- .openapi-generator/VERSION | 2 +- LICENSE | 21 + Monei/__init__.py | 109 +- Monei/api/__init__.py | 12 +- Monei/api/apple_pay_domain_api.py | 459 +- Monei/api/bizum_api.py | 459 +- Monei/api/payment_methods_api.py | 462 +- Monei/api/payments_api.py | 4435 ++++++----------- Monei/api/subscriptions_api.py | 3952 +++++---------- Monei/api_client.py | 1223 ++--- Monei/apis/__init__.py | 21 + Monei/configuration.py | 330 +- Monei/exceptions.py | 120 +- Monei/model/__init__.py | 5 + Monei/model/activate_subscription_request.py | 291 ++ Monei/model/address.py | 283 ++ .../apple_pay_domain_register200_response.py | 263 + .../apple_pay_domain_register400_response.py | 335 ++ .../apple_pay_domain_register401_response.py | 335 ++ .../apple_pay_domain_register404_response.py | 335 ++ .../apple_pay_domain_register422_response.py | 335 ++ .../apple_pay_domain_register500_response.py | 335 ++ .../apple_pay_domain_register503_response.py | 335 ++ .../model/bizum_validate_phone200_response.py | 263 + Monei/model/cancel_payment_request.py | 269 + Monei/model/cancel_subscription_request.py | 263 + Monei/model/capture_payment_request.py | 263 + Monei/model/confirm_payment_request.py | 305 ++ .../confirm_payment_request_payment_method.py | 269 + ...irm_payment_request_payment_method_card.py | 267 + Monei/model/create_payment_request.py | 389 ++ Monei/model/create_subscription_request.py | 339 ++ Monei/model/error.py | 293 ++ Monei/model/pause_subscription_request.py | 267 + Monei/model/payment.py | 411 ++ Monei/model/payment_billing_details.py | 289 ++ Monei/model/payment_cancellation_reason.py | 291 ++ Monei/model/payment_customer.py | 271 + Monei/model/payment_last_refund_reason.py | 291 ++ Monei/model/payment_message_channel.py | 291 ++ Monei/model/payment_message_language.py | 295 ++ Monei/model/payment_methods.py | 303 ++ Monei/model/payment_methods_metadata.py | 363 ++ .../model/payment_methods_metadata_alipay.py | 263 + .../payment_methods_metadata_apple_pay.py | 263 + .../payment_methods_metadata_bancontact.py | 263 + Monei/model/payment_methods_metadata_bizum.py | 263 + Monei/model/payment_methods_metadata_blik.py | 263 + Monei/model/payment_methods_metadata_card.py | 263 + .../payment_methods_metadata_click_to_pay.py | 289 ++ ..._methods_metadata_click_to_pay_discover.py | 267 + ...ethods_metadata_click_to_pay_mastercard.py | 267 + ...ment_methods_metadata_click_to_pay_visa.py | 267 + Monei/model/payment_methods_metadata_eps.py | 263 + .../model/payment_methods_metadata_giropay.py | 263 + .../payment_methods_metadata_google_pay.py | 267 + .../model/payment_methods_metadata_i_deal.py | 263 + .../model/payment_methods_metadata_klarna.py | 263 + Monei/model/payment_methods_metadata_mbway.py | 263 + Monei/model/payment_methods_metadata_sepa.py | 263 + .../model/payment_methods_metadata_sofort.py | 263 + .../model/payment_methods_metadata_trustly.py | 263 + Monei/model/payment_methods_methods.py | 286 ++ Monei/model/payment_next_action.py | 278 ++ Monei/model/payment_payment_method.py | 338 ++ Monei/model/payment_payment_method_bizum.py | 263 + .../payment_payment_method_bizum_input.py | 263 + Monei/model/payment_payment_method_card.py | 327 ++ .../payment_payment_method_card_input.py | 283 ++ Monei/model/payment_payment_method_cofidis.py | 263 + Monei/model/payment_payment_method_input.py | 275 + Monei/model/payment_payment_method_klarna.py | 285 ++ Monei/model/payment_payment_method_mbway.py | 263 + Monei/model/payment_payment_method_paypal.py | 263 + Monei/model/payment_payment_method_sepa.py | 295 ++ Monei/model/payment_payment_method_trustly.py | 263 + Monei/model/payment_payment_methods.py | 286 ++ Monei/model/payment_refund_reason.py | 291 ++ Monei/model/payment_sequence.py | 284 ++ Monei/model/payment_sequence_recurring.py | 267 + Monei/model/payment_session_details.py | 327 ++ Monei/model/payment_shipping_details.py | 289 ++ Monei/model/payment_shop.py | 267 + Monei/model/payment_status.py | 296 ++ Monei/model/payment_trace_details.py | 335 ++ Monei/model/payment_transaction_type.py | 284 ++ Monei/model/recurring_payment_request.py | 313 ++ Monei/model/refund_payment_request.py | 273 + .../register_apple_pay_domain_request.py | 269 + Monei/model/send_payment_link_request.py | 283 ++ Monei/model/send_payment_receipt_request.py | 283 ++ Monei/model/send_payment_request_request.py | 279 ++ Monei/model/send_subscription_link_request.py | 280 ++ .../model/send_subscription_status_request.py | 280 ++ Monei/model/subscription.py | 405 ++ Monei/model/subscription_interval.py | 292 ++ Monei/model/subscription_last_payment.py | 281 ++ Monei/model/subscription_payment_method.py | 276 + .../model/subscription_payment_method_card.py | 300 ++ Monei/model/subscription_retry_schedule.py | 291 ++ .../subscription_retry_schedule_inner.py | 285 ++ Monei/model/subscription_status.py | 295 ++ Monei/model/update_subscription_request.py | 333 ++ Monei/model/validate_bizum_phone_request.py | 279 ++ Monei/model_utils.py | 2058 ++++++++ Monei/models/__init__.py | 192 +- Monei/models/activate_subscription_request.py | 101 - Monei/models/address.py | 97 - .../apple_pay_domain_register200_response.py | 87 - .../bizum_validate_phone200_response.py | 87 - Monei/models/cancel_payment_request.py | 88 - Monei/models/cancel_subscription_request.py | 87 - Monei/models/capture_payment_request.py | 87 - Monei/models/confirm_payment_request.py | 115 - .../confirm_payment_request_payment_method.py | 91 - ...irm_payment_request_payment_method_card.py | 89 - Monei/models/create_payment_request.py | 160 - Monei/models/create_subscription_request.py | 134 - Monei/models/error.py | 96 - Monei/models/pause_subscription_request.py | 89 - Monei/models/payment.py | 186 - Monei/models/payment_billing_details.py | 101 - Monei/models/payment_customer.py | 91 - Monei/models/payment_methods.py | 118 - Monei/models/payment_methods_metadata.py | 186 - .../models/payment_methods_metadata_alipay.py | 87 - .../payment_methods_metadata_apple_pay.py | 87 - .../payment_methods_metadata_bancontact.py | 87 - .../models/payment_methods_metadata_bizum.py | 87 - Monei/models/payment_methods_metadata_blik.py | 87 - Monei/models/payment_methods_metadata_card.py | 87 - .../payment_methods_metadata_click_to_pay.py | 107 - ..._methods_metadata_click_to_pay_discover.py | 89 - ...ethods_metadata_click_to_pay_mastercard.py | 89 - ...ment_methods_metadata_click_to_pay_visa.py | 89 - Monei/models/payment_methods_metadata_eps.py | 87 - .../payment_methods_metadata_giropay.py | 87 - .../payment_methods_metadata_google_pay.py | 89 - .../models/payment_methods_metadata_i_deal.py | 87 - .../models/payment_methods_metadata_klarna.py | 87 - .../models/payment_methods_metadata_mbway.py | 87 - Monei/models/payment_methods_metadata_sepa.py | 87 - .../models/payment_methods_metadata_sofort.py | 87 - .../payment_methods_metadata_trustly.py | 87 - Monei/models/payment_next_action.py | 101 - Monei/models/payment_payment_method.py | 150 - Monei/models/payment_payment_method_bizum.py | 87 - .../payment_payment_method_bizum_input.py | 87 - Monei/models/payment_payment_method_card.py | 147 - .../payment_payment_method_card_input.py | 97 - .../models/payment_payment_method_cofidis.py | 87 - Monei/models/payment_payment_method_input.py | 97 - Monei/models/payment_payment_method_klarna.py | 109 - Monei/models/payment_payment_method_mbway.py | 87 - Monei/models/payment_payment_method_paypal.py | 87 - Monei/models/payment_payment_method_sepa.py | 103 - .../models/payment_payment_method_trustly.py | 87 - Monei/models/payment_refund_reason.py | 38 - Monei/models/payment_sequence.py | 100 - Monei/models/payment_sequence_recurring.py | 89 - Monei/models/payment_session_details.py | 119 - Monei/models/payment_shipping_details.py | 101 - Monei/models/payment_shop.py | 89 - Monei/models/payment_status.py | 43 - Monei/models/payment_trace_details.py | 123 - Monei/models/payment_transaction_type.py | 39 - Monei/models/recurring_payment_request.py | 116 - Monei/models/refund_payment_request.py | 90 - .../register_apple_pay_domain_request.py | 87 - Monei/models/send_payment_link_request.py | 95 - Monei/models/send_payment_receipt_request.py | 95 - Monei/models/send_payment_request_request.py | 90 - .../models/send_subscription_link_request.py | 103 - .../send_subscription_status_request.py | 103 - Monei/models/subscription.py | 181 - Monei/models/subscription_last_payment.py | 94 - Monei/models/subscription_payment_method.py | 103 - .../subscription_payment_method_card.py | 119 - .../subscription_retry_schedule_inner.py | 97 - Monei/models/subscription_status.py | 42 - Monei/models/update_subscription_request.py | 136 - Monei/models/validate_bizum_phone_request.py | 91 - Monei/rest.py | 378 +- README.md | 5 +- openapitools.json | 2 +- package.json | 5 +- pyproject.toml | 101 +- pytest.ini | 17 - requirements-lock.txt | 18 - requirements.txt | 7 +- scripts/release.sh | 59 +- setup.cfg | 8 - setup.py | 39 - test-requirements.txt | 7 +- test/test_activate_subscription_request.py | 47 +- test/test_address.py | 45 +- test/test_apple_pay_domain_api.py | 73 +- test/test_apple_pay_domain_api_integration.py | 45 + ...t_apple_pay_domain_register200_response.py | 40 +- ...t_apple_pay_domain_register400_response.py | 49 +- ...t_apple_pay_domain_register401_response.py | 49 +- ...t_apple_pay_domain_register404_response.py | 53 +- ...t_apple_pay_domain_register422_response.py | 37 + ...t_apple_pay_domain_register500_response.py | 37 + ...t_apple_pay_domain_register503_response.py | 37 + test/test_bizum_api.py | 93 +- test/test_bizum_api_integration.py | 47 + test/test_bizum_validate_phone200_response.py | 40 +- test/test_cancel_payment_request.py | 42 +- test/test_cancel_subscription_request.py | 40 +- test/test_capture_payment_request.py | 40 +- test/test_confirm_payment_request.py | 85 +- ..._confirm_payment_request_payment_method.py | 44 +- ...irm_payment_request_payment_method_card.py | 41 +- test/test_create_payment_request.py | 140 +- test/test_create_subscription_request.py | 93 +- test/test_error.py | 49 +- test/test_error_handling.py | 81 + test/test_monei_client.py | 688 +-- test/test_pause_subscription_request.py | 41 +- test/test_payment.py | 204 +- test/test_payment_billing_details.py | 53 +- test/test_payment_cancellation_reason.py | 22 +- test/test_payment_customer.py | 42 +- test/test_payment_last_refund_reason.py | 22 +- test/test_payment_message_channel.py | 22 +- test/test_payment_message_language.py | 22 +- test/test_payment_methods.py | 97 +- test/test_payment_methods_api.py | 125 +- test/test_payment_methods_api_integration.py | 55 + test/test_payment_methods_metadata.py | 116 +- test/test_payment_methods_metadata_alipay.py | 40 +- ...test_payment_methods_metadata_apple_pay.py | 40 +- ...est_payment_methods_metadata_bancontact.py | 40 +- test/test_payment_methods_metadata_bizum.py | 40 +- test/test_payment_methods_metadata_blik.py | 40 +- test/test_payment_methods_metadata_card.py | 40 +- ...t_payment_methods_metadata_click_to_pay.py | 56 +- ..._methods_metadata_click_to_pay_discover.py | 41 +- ...ethods_metadata_click_to_pay_mastercard.py | 41 +- ...ment_methods_metadata_click_to_pay_visa.py | 41 +- test/test_payment_methods_metadata_eps.py | 40 +- test/test_payment_methods_metadata_giropay.py | 40 +- ...est_payment_methods_metadata_google_pay.py | 41 +- test/test_payment_methods_metadata_i_deal.py | 40 +- test/test_payment_methods_metadata_klarna.py | 40 +- test/test_payment_methods_metadata_mbway.py | 40 +- test/test_payment_methods_metadata_sepa.py | 40 +- test/test_payment_methods_metadata_sofort.py | 40 +- test/test_payment_methods_metadata_trustly.py | 40 +- .../test_payment_methods_methods.py | 48 +- test/test_payment_next_action.py | 42 +- test/test_payment_payment_method.py | 93 +- test/test_payment_payment_method_bizum.py | 40 +- ...test_payment_payment_method_bizum_input.py | 40 +- test/test_payment_payment_method_card.py | 50 +- .../test_payment_payment_method_card_input.py | 45 +- test/test_payment_payment_method_cofidis.py | 40 +- test/test_payment_payment_method_input.py | 52 +- test/test_payment_payment_method_klarna.py | 41 +- test/test_payment_payment_method_mbway.py | 40 +- test/test_payment_payment_method_paypal.py | 40 +- test/test_payment_payment_method_sepa.py | 48 +- test/test_payment_payment_method_trustly.py | 40 +- .../test_payment_payment_methods.py | 47 +- test/test_payment_refund_reason.py | 22 +- test/test_payment_sequence.py | 46 +- test/test_payment_sequence_recurring.py | 41 +- test/test_payment_session_details.py | 56 +- test/test_payment_shipping_details.py | 53 +- test/test_payment_shop.py | 41 +- test/test_payment_status.py | 22 +- test/test_payment_trace_details.py | 58 +- test/test_payment_transaction_type.py | 22 +- test/test_payments_api.py | 305 +- test/test_payments_api_integration.py | 306 ++ test/test_recurring_payment_request.py | 84 +- test/test_refund_payment_request.py | 43 +- .../test_register_apple_pay_domain_request.py | 41 +- test/test_send_payment_link_request.py | 47 +- test/test_send_payment_receipt_request.py | 47 +- test/test_send_payment_request_request.py | 44 +- test/test_send_subscription_link_request.py | 43 +- test/test_send_subscription_status_request.py | 43 +- test/test_subscription.py | 151 +- test/test_subscription_interval.py | 22 +- test/test_subscription_last_payment.py | 45 +- test/test_subscription_payment_method.py | 54 +- test/test_subscription_payment_method_card.py | 46 +- test/test_subscription_retry_schedule.py | 37 + .../test_subscription_retry_schedule_inner.py | 43 +- test/test_subscription_status.py | 22 +- test/test_subscriptions_api.py | 295 +- test/test_subscriptions_api_integration.py | 274 + test/test_update_subscription_request.py | 91 +- test/test_validate_bizum_phone_request.py | 44 +- uv.lock | 350 +- yarn.lock | 219 +- 301 files changed, 35373 insertions(+), 20302 deletions(-) delete mode 100644 .github/workflows/python.yml create mode 100644 .github/workflows/test.yml create mode 100644 LICENSE create mode 100644 Monei/apis/__init__.py create mode 100644 Monei/model/__init__.py create mode 100644 Monei/model/activate_subscription_request.py create mode 100644 Monei/model/address.py create mode 100644 Monei/model/apple_pay_domain_register200_response.py create mode 100644 Monei/model/apple_pay_domain_register400_response.py create mode 100644 Monei/model/apple_pay_domain_register401_response.py create mode 100644 Monei/model/apple_pay_domain_register404_response.py create mode 100644 Monei/model/apple_pay_domain_register422_response.py create mode 100644 Monei/model/apple_pay_domain_register500_response.py create mode 100644 Monei/model/apple_pay_domain_register503_response.py create mode 100644 Monei/model/bizum_validate_phone200_response.py create mode 100644 Monei/model/cancel_payment_request.py create mode 100644 Monei/model/cancel_subscription_request.py create mode 100644 Monei/model/capture_payment_request.py create mode 100644 Monei/model/confirm_payment_request.py create mode 100644 Monei/model/confirm_payment_request_payment_method.py create mode 100644 Monei/model/confirm_payment_request_payment_method_card.py create mode 100644 Monei/model/create_payment_request.py create mode 100644 Monei/model/create_subscription_request.py create mode 100644 Monei/model/error.py create mode 100644 Monei/model/pause_subscription_request.py create mode 100644 Monei/model/payment.py create mode 100644 Monei/model/payment_billing_details.py create mode 100644 Monei/model/payment_cancellation_reason.py create mode 100644 Monei/model/payment_customer.py create mode 100644 Monei/model/payment_last_refund_reason.py create mode 100644 Monei/model/payment_message_channel.py create mode 100644 Monei/model/payment_message_language.py create mode 100644 Monei/model/payment_methods.py create mode 100644 Monei/model/payment_methods_metadata.py create mode 100644 Monei/model/payment_methods_metadata_alipay.py create mode 100644 Monei/model/payment_methods_metadata_apple_pay.py create mode 100644 Monei/model/payment_methods_metadata_bancontact.py create mode 100644 Monei/model/payment_methods_metadata_bizum.py create mode 100644 Monei/model/payment_methods_metadata_blik.py create mode 100644 Monei/model/payment_methods_metadata_card.py create mode 100644 Monei/model/payment_methods_metadata_click_to_pay.py create mode 100644 Monei/model/payment_methods_metadata_click_to_pay_discover.py create mode 100644 Monei/model/payment_methods_metadata_click_to_pay_mastercard.py create mode 100644 Monei/model/payment_methods_metadata_click_to_pay_visa.py create mode 100644 Monei/model/payment_methods_metadata_eps.py create mode 100644 Monei/model/payment_methods_metadata_giropay.py create mode 100644 Monei/model/payment_methods_metadata_google_pay.py create mode 100644 Monei/model/payment_methods_metadata_i_deal.py create mode 100644 Monei/model/payment_methods_metadata_klarna.py create mode 100644 Monei/model/payment_methods_metadata_mbway.py create mode 100644 Monei/model/payment_methods_metadata_sepa.py create mode 100644 Monei/model/payment_methods_metadata_sofort.py create mode 100644 Monei/model/payment_methods_metadata_trustly.py create mode 100644 Monei/model/payment_methods_methods.py create mode 100644 Monei/model/payment_next_action.py create mode 100644 Monei/model/payment_payment_method.py create mode 100644 Monei/model/payment_payment_method_bizum.py create mode 100644 Monei/model/payment_payment_method_bizum_input.py create mode 100644 Monei/model/payment_payment_method_card.py create mode 100644 Monei/model/payment_payment_method_card_input.py create mode 100644 Monei/model/payment_payment_method_cofidis.py create mode 100644 Monei/model/payment_payment_method_input.py create mode 100644 Monei/model/payment_payment_method_klarna.py create mode 100644 Monei/model/payment_payment_method_mbway.py create mode 100644 Monei/model/payment_payment_method_paypal.py create mode 100644 Monei/model/payment_payment_method_sepa.py create mode 100644 Monei/model/payment_payment_method_trustly.py create mode 100644 Monei/model/payment_payment_methods.py create mode 100644 Monei/model/payment_refund_reason.py create mode 100644 Monei/model/payment_sequence.py create mode 100644 Monei/model/payment_sequence_recurring.py create mode 100644 Monei/model/payment_session_details.py create mode 100644 Monei/model/payment_shipping_details.py create mode 100644 Monei/model/payment_shop.py create mode 100644 Monei/model/payment_status.py create mode 100644 Monei/model/payment_trace_details.py create mode 100644 Monei/model/payment_transaction_type.py create mode 100644 Monei/model/recurring_payment_request.py create mode 100644 Monei/model/refund_payment_request.py create mode 100644 Monei/model/register_apple_pay_domain_request.py create mode 100644 Monei/model/send_payment_link_request.py create mode 100644 Monei/model/send_payment_receipt_request.py create mode 100644 Monei/model/send_payment_request_request.py create mode 100644 Monei/model/send_subscription_link_request.py create mode 100644 Monei/model/send_subscription_status_request.py create mode 100644 Monei/model/subscription.py create mode 100644 Monei/model/subscription_interval.py create mode 100644 Monei/model/subscription_last_payment.py create mode 100644 Monei/model/subscription_payment_method.py create mode 100644 Monei/model/subscription_payment_method_card.py create mode 100644 Monei/model/subscription_retry_schedule.py create mode 100644 Monei/model/subscription_retry_schedule_inner.py create mode 100644 Monei/model/subscription_status.py create mode 100644 Monei/model/update_subscription_request.py create mode 100644 Monei/model/validate_bizum_phone_request.py create mode 100644 Monei/model_utils.py delete mode 100644 Monei/models/activate_subscription_request.py delete mode 100644 Monei/models/address.py delete mode 100644 Monei/models/apple_pay_domain_register200_response.py delete mode 100644 Monei/models/bizum_validate_phone200_response.py delete mode 100644 Monei/models/cancel_payment_request.py delete mode 100644 Monei/models/cancel_subscription_request.py delete mode 100644 Monei/models/capture_payment_request.py delete mode 100644 Monei/models/confirm_payment_request.py delete mode 100644 Monei/models/confirm_payment_request_payment_method.py delete mode 100644 Monei/models/confirm_payment_request_payment_method_card.py delete mode 100644 Monei/models/create_payment_request.py delete mode 100644 Monei/models/create_subscription_request.py delete mode 100644 Monei/models/error.py delete mode 100644 Monei/models/pause_subscription_request.py delete mode 100644 Monei/models/payment.py delete mode 100644 Monei/models/payment_billing_details.py delete mode 100644 Monei/models/payment_customer.py delete mode 100644 Monei/models/payment_methods.py delete mode 100644 Monei/models/payment_methods_metadata.py delete mode 100644 Monei/models/payment_methods_metadata_alipay.py delete mode 100644 Monei/models/payment_methods_metadata_apple_pay.py delete mode 100644 Monei/models/payment_methods_metadata_bancontact.py delete mode 100644 Monei/models/payment_methods_metadata_bizum.py delete mode 100644 Monei/models/payment_methods_metadata_blik.py delete mode 100644 Monei/models/payment_methods_metadata_card.py delete mode 100644 Monei/models/payment_methods_metadata_click_to_pay.py delete mode 100644 Monei/models/payment_methods_metadata_click_to_pay_discover.py delete mode 100644 Monei/models/payment_methods_metadata_click_to_pay_mastercard.py delete mode 100644 Monei/models/payment_methods_metadata_click_to_pay_visa.py delete mode 100644 Monei/models/payment_methods_metadata_eps.py delete mode 100644 Monei/models/payment_methods_metadata_giropay.py delete mode 100644 Monei/models/payment_methods_metadata_google_pay.py delete mode 100644 Monei/models/payment_methods_metadata_i_deal.py delete mode 100644 Monei/models/payment_methods_metadata_klarna.py delete mode 100644 Monei/models/payment_methods_metadata_mbway.py delete mode 100644 Monei/models/payment_methods_metadata_sepa.py delete mode 100644 Monei/models/payment_methods_metadata_sofort.py delete mode 100644 Monei/models/payment_methods_metadata_trustly.py delete mode 100644 Monei/models/payment_next_action.py delete mode 100644 Monei/models/payment_payment_method.py delete mode 100644 Monei/models/payment_payment_method_bizum.py delete mode 100644 Monei/models/payment_payment_method_bizum_input.py delete mode 100644 Monei/models/payment_payment_method_card.py delete mode 100644 Monei/models/payment_payment_method_card_input.py delete mode 100644 Monei/models/payment_payment_method_cofidis.py delete mode 100644 Monei/models/payment_payment_method_input.py delete mode 100644 Monei/models/payment_payment_method_klarna.py delete mode 100644 Monei/models/payment_payment_method_mbway.py delete mode 100644 Monei/models/payment_payment_method_paypal.py delete mode 100644 Monei/models/payment_payment_method_sepa.py delete mode 100644 Monei/models/payment_payment_method_trustly.py delete mode 100644 Monei/models/payment_refund_reason.py delete mode 100644 Monei/models/payment_sequence.py delete mode 100644 Monei/models/payment_sequence_recurring.py delete mode 100644 Monei/models/payment_session_details.py delete mode 100644 Monei/models/payment_shipping_details.py delete mode 100644 Monei/models/payment_shop.py delete mode 100644 Monei/models/payment_status.py delete mode 100644 Monei/models/payment_trace_details.py delete mode 100644 Monei/models/payment_transaction_type.py delete mode 100644 Monei/models/recurring_payment_request.py delete mode 100644 Monei/models/refund_payment_request.py delete mode 100644 Monei/models/register_apple_pay_domain_request.py delete mode 100644 Monei/models/send_payment_link_request.py delete mode 100644 Monei/models/send_payment_receipt_request.py delete mode 100644 Monei/models/send_payment_request_request.py delete mode 100644 Monei/models/send_subscription_link_request.py delete mode 100644 Monei/models/send_subscription_status_request.py delete mode 100644 Monei/models/subscription.py delete mode 100644 Monei/models/subscription_last_payment.py delete mode 100644 Monei/models/subscription_payment_method.py delete mode 100644 Monei/models/subscription_payment_method_card.py delete mode 100644 Monei/models/subscription_retry_schedule_inner.py delete mode 100644 Monei/models/subscription_status.py delete mode 100644 Monei/models/update_subscription_request.py delete mode 100644 Monei/models/validate_bizum_phone_request.py delete mode 100644 pytest.ini delete mode 100644 requirements-lock.txt delete mode 100644 setup.cfg delete mode 100644 setup.py create mode 100644 test/test_apple_pay_domain_api_integration.py rename Monei/models/payment_last_refund_reason.py => test/test_apple_pay_domain_register400_response.py (71%) rename Monei/models/payment_cancellation_reason.py => test/test_apple_pay_domain_register401_response.py (71%) rename Monei/models/payment_message_language.py => test/test_apple_pay_domain_register404_response.py (71%) create mode 100644 test/test_apple_pay_domain_register422_response.py create mode 100644 test/test_apple_pay_domain_register500_response.py create mode 100644 test/test_apple_pay_domain_register503_response.py create mode 100644 test/test_bizum_api_integration.py create mode 100644 test/test_error_handling.py create mode 100644 test/test_payment_methods_api_integration.py rename Monei/models/subscription_interval.py => test/test_payment_methods_methods.py (75%) rename Monei/models/payment_message_channel.py => test/test_payment_payment_methods.py (75%) create mode 100644 test/test_payments_api_integration.py create mode 100644 test/test_subscription_retry_schedule.py create mode 100644 test/test_subscriptions_api_integration.py diff --git a/.github/workflows/python.yml b/.github/workflows/python.yml deleted file mode 100644 index dd318a6..0000000 --- a/.github/workflows/python.yml +++ /dev/null @@ -1,31 +0,0 @@ -# NOTE: This file is auto generated by OpenAPI Generator. -# URL: https://openapi-generator.tech -# -# ref: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python - -name: Monei Python package - -on: [push, pull_request] - -jobs: - build: - - runs-on: ubuntu-latest - strategy: - matrix: - python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"] - - steps: - - uses: actions/checkout@v4 - - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v4 - with: - python-version: ${{ matrix.python-version }} - - name: Install dependencies - run: | - python -m pip install --upgrade pip - pip install -r requirements.txt - pip install -r test-requirements.txt - - name: Test with pytest - run: | - pytest --cov=Monei diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..be5a9d0 --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,35 @@ +name: Test + +on: [push, pull_request] + +jobs: + test: + runs-on: ubuntu-latest + strategy: + matrix: + python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"] + + steps: + - uses: actions/checkout@v4 + + - name: Install uv and set Python version + uses: astral-sh/setup-uv@v5 + with: + python-version: ${{ matrix.python-version }} + enable-cache: true + cache-dependency-glob: "requirements*.txt uv.lock" + + - name: Install dependencies + run: uv sync --all + + - name: Run tests with pytest + run: uv run pytest --cov=Monei --cov-report=xml + + - name: Upload coverage to Codecov + uses: codecov/codecov-action@v3 + with: + file: ./coverage.xml + fail_ci_if_error: false + + - name: Minimize uv cache + run: uv cache prune --ci \ No newline at end of file diff --git a/.openapi-generator/FILES b/.openapi-generator/FILES index 273b81a..2e62127 100644 --- a/.openapi-generator/FILES +++ b/.openapi-generator/FILES @@ -1,4 +1,3 @@ -.github/workflows/python.yml Monei/__init__.py Monei/api/__init__.py Monei/api/apple_pay_domain_api.py @@ -7,94 +6,103 @@ Monei/api/payment_methods_api.py Monei/api/payments_api.py Monei/api/subscriptions_api.py Monei/api_client.py -Monei/api_response.py +Monei/apis/__init__.py Monei/configuration.py Monei/exceptions.py +Monei/model/__init__.py +Monei/model/activate_subscription_request.py +Monei/model/address.py +Monei/model/apple_pay_domain_register200_response.py +Monei/model/apple_pay_domain_register400_response.py +Monei/model/apple_pay_domain_register401_response.py +Monei/model/apple_pay_domain_register404_response.py +Monei/model/apple_pay_domain_register422_response.py +Monei/model/apple_pay_domain_register500_response.py +Monei/model/apple_pay_domain_register503_response.py +Monei/model/bizum_validate_phone200_response.py +Monei/model/cancel_payment_request.py +Monei/model/cancel_subscription_request.py +Monei/model/capture_payment_request.py +Monei/model/confirm_payment_request.py +Monei/model/confirm_payment_request_payment_method.py +Monei/model/confirm_payment_request_payment_method_card.py +Monei/model/create_payment_request.py +Monei/model/create_subscription_request.py +Monei/model/error.py +Monei/model/pause_subscription_request.py +Monei/model/payment.py +Monei/model/payment_billing_details.py +Monei/model/payment_cancellation_reason.py +Monei/model/payment_customer.py +Monei/model/payment_last_refund_reason.py +Monei/model/payment_message_channel.py +Monei/model/payment_message_language.py +Monei/model/payment_methods.py +Monei/model/payment_methods_metadata.py +Monei/model/payment_methods_metadata_alipay.py +Monei/model/payment_methods_metadata_apple_pay.py +Monei/model/payment_methods_metadata_bancontact.py +Monei/model/payment_methods_metadata_bizum.py +Monei/model/payment_methods_metadata_blik.py +Monei/model/payment_methods_metadata_card.py +Monei/model/payment_methods_metadata_click_to_pay.py +Monei/model/payment_methods_metadata_click_to_pay_discover.py +Monei/model/payment_methods_metadata_click_to_pay_mastercard.py +Monei/model/payment_methods_metadata_click_to_pay_visa.py +Monei/model/payment_methods_metadata_eps.py +Monei/model/payment_methods_metadata_giropay.py +Monei/model/payment_methods_metadata_google_pay.py +Monei/model/payment_methods_metadata_i_deal.py +Monei/model/payment_methods_metadata_klarna.py +Monei/model/payment_methods_metadata_mbway.py +Monei/model/payment_methods_metadata_sepa.py +Monei/model/payment_methods_metadata_sofort.py +Monei/model/payment_methods_metadata_trustly.py +Monei/model/payment_methods_methods.py +Monei/model/payment_next_action.py +Monei/model/payment_payment_method.py +Monei/model/payment_payment_method_bizum.py +Monei/model/payment_payment_method_bizum_input.py +Monei/model/payment_payment_method_card.py +Monei/model/payment_payment_method_card_input.py +Monei/model/payment_payment_method_cofidis.py +Monei/model/payment_payment_method_input.py +Monei/model/payment_payment_method_klarna.py +Monei/model/payment_payment_method_mbway.py +Monei/model/payment_payment_method_paypal.py +Monei/model/payment_payment_method_sepa.py +Monei/model/payment_payment_method_trustly.py +Monei/model/payment_payment_methods.py +Monei/model/payment_refund_reason.py +Monei/model/payment_sequence.py +Monei/model/payment_sequence_recurring.py +Monei/model/payment_session_details.py +Monei/model/payment_shipping_details.py +Monei/model/payment_shop.py +Monei/model/payment_status.py +Monei/model/payment_trace_details.py +Monei/model/payment_transaction_type.py +Monei/model/recurring_payment_request.py +Monei/model/refund_payment_request.py +Monei/model/register_apple_pay_domain_request.py +Monei/model/send_payment_link_request.py +Monei/model/send_payment_receipt_request.py +Monei/model/send_payment_request_request.py +Monei/model/send_subscription_link_request.py +Monei/model/send_subscription_status_request.py +Monei/model/subscription.py +Monei/model/subscription_interval.py +Monei/model/subscription_last_payment.py +Monei/model/subscription_payment_method.py +Monei/model/subscription_payment_method_card.py +Monei/model/subscription_retry_schedule.py +Monei/model/subscription_retry_schedule_inner.py +Monei/model/subscription_status.py +Monei/model/update_subscription_request.py +Monei/model/validate_bizum_phone_request.py +Monei/model_utils.py Monei/models/__init__.py -Monei/models/activate_subscription_request.py -Monei/models/address.py -Monei/models/apple_pay_domain_register200_response.py -Monei/models/bizum_validate_phone200_response.py -Monei/models/cancel_payment_request.py -Monei/models/cancel_subscription_request.py -Monei/models/capture_payment_request.py -Monei/models/confirm_payment_request.py -Monei/models/confirm_payment_request_payment_method.py -Monei/models/confirm_payment_request_payment_method_card.py -Monei/models/create_payment_request.py -Monei/models/create_subscription_request.py -Monei/models/error.py -Monei/models/pause_subscription_request.py -Monei/models/payment.py -Monei/models/payment_billing_details.py -Monei/models/payment_cancellation_reason.py -Monei/models/payment_customer.py -Monei/models/payment_last_refund_reason.py -Monei/models/payment_message_channel.py -Monei/models/payment_message_language.py -Monei/models/payment_methods.py -Monei/models/payment_methods_metadata.py -Monei/models/payment_methods_metadata_alipay.py -Monei/models/payment_methods_metadata_apple_pay.py -Monei/models/payment_methods_metadata_bancontact.py -Monei/models/payment_methods_metadata_bizum.py -Monei/models/payment_methods_metadata_blik.py -Monei/models/payment_methods_metadata_card.py -Monei/models/payment_methods_metadata_click_to_pay.py -Monei/models/payment_methods_metadata_click_to_pay_discover.py -Monei/models/payment_methods_metadata_click_to_pay_mastercard.py -Monei/models/payment_methods_metadata_click_to_pay_visa.py -Monei/models/payment_methods_metadata_eps.py -Monei/models/payment_methods_metadata_giropay.py -Monei/models/payment_methods_metadata_google_pay.py -Monei/models/payment_methods_metadata_i_deal.py -Monei/models/payment_methods_metadata_klarna.py -Monei/models/payment_methods_metadata_mbway.py -Monei/models/payment_methods_metadata_sepa.py -Monei/models/payment_methods_metadata_sofort.py -Monei/models/payment_methods_metadata_trustly.py -Monei/models/payment_next_action.py -Monei/models/payment_payment_method.py -Monei/models/payment_payment_method_bizum.py -Monei/models/payment_payment_method_bizum_input.py -Monei/models/payment_payment_method_card.py -Monei/models/payment_payment_method_card_input.py -Monei/models/payment_payment_method_cofidis.py -Monei/models/payment_payment_method_input.py -Monei/models/payment_payment_method_klarna.py -Monei/models/payment_payment_method_mbway.py -Monei/models/payment_payment_method_paypal.py -Monei/models/payment_payment_method_sepa.py -Monei/models/payment_payment_method_trustly.py -Monei/models/payment_refund_reason.py -Monei/models/payment_sequence.py -Monei/models/payment_sequence_recurring.py -Monei/models/payment_session_details.py -Monei/models/payment_shipping_details.py -Monei/models/payment_shop.py -Monei/models/payment_status.py -Monei/models/payment_trace_details.py -Monei/models/payment_transaction_type.py -Monei/models/recurring_payment_request.py -Monei/models/refund_payment_request.py -Monei/models/register_apple_pay_domain_request.py -Monei/models/send_payment_link_request.py -Monei/models/send_payment_receipt_request.py -Monei/models/send_payment_request_request.py -Monei/models/send_subscription_link_request.py -Monei/models/send_subscription_status_request.py -Monei/models/subscription.py -Monei/models/subscription_interval.py -Monei/models/subscription_last_payment.py -Monei/models/subscription_payment_method.py -Monei/models/subscription_payment_method_card.py -Monei/models/subscription_retry_schedule_inner.py -Monei/models/subscription_status.py -Monei/models/update_subscription_request.py -Monei/models/validate_bizum_phone_request.py -Monei/py.typed Monei/rest.py -pyproject.toml requirements.txt test-requirements.txt test/__init__.py diff --git a/.openapi-generator/VERSION b/.openapi-generator/VERSION index 5f84a81..6d54bbd 100644 --- a/.openapi-generator/VERSION +++ b/.openapi-generator/VERSION @@ -1 +1 @@ -7.12.0 +6.0.1 \ No newline at end of file diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..c187f4b --- /dev/null +++ b/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2020 MONEI + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/Monei/__init__.py b/Monei/__init__.py index e74bfd5..6a8eda7 100644 --- a/Monei/__init__.py +++ b/Monei/__init__.py @@ -1,120 +1,29 @@ -# coding: utf-8 - # flake8: noqa """ MONEI API v1 -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

- - The version of the OpenAPI document: 1.5.1 - Generated by OpenAPI Generator (https://openapi-generator.tech) +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - Do not edit the class manually. -""" # noqa: E501 + The version of the OpenAPI document: 1.5.3 + Generated by: https://openapi-generator.tech +""" __version__ = "1.2.6" -# import apis into sdk package -from Monei.api.apple_pay_domain_api import ApplePayDomainApi -from Monei.api.bizum_api import BizumApi -from Monei.api.payment_methods_api import PaymentMethodsApi -from Monei.api.payments_api import PaymentsApi -from Monei.api.subscriptions_api import SubscriptionsApi - # import ApiClient -from Monei.api_response import ApiResponse from Monei.api_client import ApiClient + +# import Configuration from Monei.configuration import Configuration + +# import exceptions from Monei.exceptions import OpenApiException +from Monei.exceptions import ApiAttributeError from Monei.exceptions import ApiTypeError from Monei.exceptions import ApiValueError from Monei.exceptions import ApiKeyError -from Monei.exceptions import ApiAttributeError from Monei.exceptions import ApiException - -# import models into sdk package -from Monei.models.activate_subscription_request import ActivateSubscriptionRequest -from Monei.models.address import Address -from Monei.models.apple_pay_domain_register200_response import ApplePayDomainRegister200Response -from Monei.models.bizum_validate_phone200_response import BizumValidatePhone200Response -from Monei.models.cancel_payment_request import CancelPaymentRequest -from Monei.models.cancel_subscription_request import CancelSubscriptionRequest -from Monei.models.capture_payment_request import CapturePaymentRequest -from Monei.models.confirm_payment_request import ConfirmPaymentRequest -from Monei.models.confirm_payment_request_payment_method import ConfirmPaymentRequestPaymentMethod -from Monei.models.confirm_payment_request_payment_method_card import ConfirmPaymentRequestPaymentMethodCard -from Monei.models.create_payment_request import CreatePaymentRequest -from Monei.models.create_subscription_request import CreateSubscriptionRequest -from Monei.models.error import Error -from Monei.models.pause_subscription_request import PauseSubscriptionRequest -from Monei.models.payment import Payment -from Monei.models.payment_billing_details import PaymentBillingDetails -from Monei.models.payment_cancellation_reason import PaymentCancellationReason -from Monei.models.payment_customer import PaymentCustomer -from Monei.models.payment_last_refund_reason import PaymentLastRefundReason -from Monei.models.payment_message_channel import PaymentMessageChannel -from Monei.models.payment_message_language import PaymentMessageLanguage -from Monei.models.payment_methods import PaymentMethods -from Monei.models.payment_methods_metadata import PaymentMethodsMetadata -from Monei.models.payment_methods_metadata_alipay import PaymentMethodsMetadataAlipay -from Monei.models.payment_methods_metadata_apple_pay import PaymentMethodsMetadataApplePay -from Monei.models.payment_methods_metadata_bancontact import PaymentMethodsMetadataBancontact -from Monei.models.payment_methods_metadata_bizum import PaymentMethodsMetadataBizum -from Monei.models.payment_methods_metadata_blik import PaymentMethodsMetadataBlik -from Monei.models.payment_methods_metadata_card import PaymentMethodsMetadataCard -from Monei.models.payment_methods_metadata_click_to_pay import PaymentMethodsMetadataClickToPay -from Monei.models.payment_methods_metadata_click_to_pay_discover import PaymentMethodsMetadataClickToPayDiscover -from Monei.models.payment_methods_metadata_click_to_pay_mastercard import PaymentMethodsMetadataClickToPayMastercard -from Monei.models.payment_methods_metadata_click_to_pay_visa import PaymentMethodsMetadataClickToPayVisa -from Monei.models.payment_methods_metadata_eps import PaymentMethodsMetadataEps -from Monei.models.payment_methods_metadata_giropay import PaymentMethodsMetadataGiropay -from Monei.models.payment_methods_metadata_google_pay import PaymentMethodsMetadataGooglePay -from Monei.models.payment_methods_metadata_i_deal import PaymentMethodsMetadataIDeal -from Monei.models.payment_methods_metadata_klarna import PaymentMethodsMetadataKlarna -from Monei.models.payment_methods_metadata_mbway import PaymentMethodsMetadataMbway -from Monei.models.payment_methods_metadata_sepa import PaymentMethodsMetadataSepa -from Monei.models.payment_methods_metadata_sofort import PaymentMethodsMetadataSofort -from Monei.models.payment_methods_metadata_trustly import PaymentMethodsMetadataTrustly -from Monei.models.payment_next_action import PaymentNextAction -from Monei.models.payment_payment_method import PaymentPaymentMethod -from Monei.models.payment_payment_method_bizum import PaymentPaymentMethodBizum -from Monei.models.payment_payment_method_bizum_input import PaymentPaymentMethodBizumInput -from Monei.models.payment_payment_method_card import PaymentPaymentMethodCard -from Monei.models.payment_payment_method_card_input import PaymentPaymentMethodCardInput -from Monei.models.payment_payment_method_cofidis import PaymentPaymentMethodCofidis -from Monei.models.payment_payment_method_input import PaymentPaymentMethodInput -from Monei.models.payment_payment_method_klarna import PaymentPaymentMethodKlarna -from Monei.models.payment_payment_method_mbway import PaymentPaymentMethodMbway -from Monei.models.payment_payment_method_paypal import PaymentPaymentMethodPaypal -from Monei.models.payment_payment_method_sepa import PaymentPaymentMethodSepa -from Monei.models.payment_payment_method_trustly import PaymentPaymentMethodTrustly -from Monei.models.payment_refund_reason import PaymentRefundReason -from Monei.models.payment_sequence import PaymentSequence -from Monei.models.payment_sequence_recurring import PaymentSequenceRecurring -from Monei.models.payment_session_details import PaymentSessionDetails -from Monei.models.payment_shipping_details import PaymentShippingDetails -from Monei.models.payment_shop import PaymentShop -from Monei.models.payment_status import PaymentStatus -from Monei.models.payment_trace_details import PaymentTraceDetails -from Monei.models.payment_transaction_type import PaymentTransactionType -from Monei.models.recurring_payment_request import RecurringPaymentRequest -from Monei.models.refund_payment_request import RefundPaymentRequest -from Monei.models.register_apple_pay_domain_request import RegisterApplePayDomainRequest -from Monei.models.send_payment_link_request import SendPaymentLinkRequest -from Monei.models.send_payment_receipt_request import SendPaymentReceiptRequest -from Monei.models.send_payment_request_request import SendPaymentRequestRequest -from Monei.models.send_subscription_link_request import SendSubscriptionLinkRequest -from Monei.models.send_subscription_status_request import SendSubscriptionStatusRequest -from Monei.models.subscription import Subscription -from Monei.models.subscription_interval import SubscriptionInterval -from Monei.models.subscription_last_payment import SubscriptionLastPayment -from Monei.models.subscription_payment_method import SubscriptionPaymentMethod -from Monei.models.subscription_payment_method_card import SubscriptionPaymentMethodCard -from Monei.models.subscription_retry_schedule_inner import SubscriptionRetryScheduleInner -from Monei.models.subscription_status import SubscriptionStatus -from Monei.models.update_subscription_request import UpdateSubscriptionRequest -from Monei.models.validate_bizum_phone_request import ValidateBizumPhoneRequest # import custom MoneiClient from Monei.monei_client import MoneiClient diff --git a/Monei/api/__init__.py b/Monei/api/__init__.py index 3ce3c08..fc05745 100644 --- a/Monei/api/__init__.py +++ b/Monei/api/__init__.py @@ -1,9 +1,3 @@ -# flake8: noqa - -# import apis into api package -from Monei.api.apple_pay_domain_api import ApplePayDomainApi -from Monei.api.bizum_api import BizumApi -from Monei.api.payment_methods_api import PaymentMethodsApi -from Monei.api.payments_api import PaymentsApi -from Monei.api.subscriptions_api import SubscriptionsApi - +# do not import all apis into this module because that uses a lot of memory and stack frames +# if you need the ability to import all apis from one package, import them with +# from Monei.apis import ApplePayDomainApi diff --git a/Monei/api/apple_pay_domain_api.py b/Monei/api/apple_pay_domain_api.py index c2a080d..653b855 100644 --- a/Monei/api/apple_pay_domain_api.py +++ b/Monei/api/apple_pay_domain_api.py @@ -1,329 +1,180 @@ -# coding: utf-8 - """ MONEI API v1 -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

- - The version of the OpenAPI document: 1.5.1 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 -import warnings -from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt -from typing import Any, Dict, List, Optional, Tuple, Union -from typing_extensions import Annotated - -from Monei.models.apple_pay_domain_register200_response import ApplePayDomainRegister200Response -from Monei.models.register_apple_pay_domain_request import RegisterApplePayDomainRequest - -from Monei.api_client import ApiClient, RequestSerialized -from Monei.api_response import ApiResponse -from Monei.rest import RESTResponseType + The version of the OpenAPI document: 1.5.3 + Generated by: https://openapi-generator.tech +""" -class ApplePayDomainApi: +import re # noqa: F401 +import sys # noqa: F401 + +from Monei.api_client import ApiClient, Endpoint as _Endpoint +from Monei.model_utils import ( # noqa: F401 + check_allowed_values, + check_validations, + date, + datetime, + file_type, + none_type, + validate_and_convert_types +) +from Monei.model.apple_pay_domain_register200_response import ApplePayDomainRegister200Response +from Monei.model.apple_pay_domain_register400_response import ApplePayDomainRegister400Response +from Monei.model.apple_pay_domain_register401_response import ApplePayDomainRegister401Response +from Monei.model.apple_pay_domain_register404_response import ApplePayDomainRegister404Response +from Monei.model.apple_pay_domain_register422_response import ApplePayDomainRegister422Response +from Monei.model.apple_pay_domain_register500_response import ApplePayDomainRegister500Response +from Monei.model.apple_pay_domain_register503_response import ApplePayDomainRegister503Response +from Monei.model.register_apple_pay_domain_request import RegisterApplePayDomainRequest + + +class ApplePayDomainApi(object): """NOTE: This class is auto generated by OpenAPI Generator Ref: https://openapi-generator.tech Do not edit the class manually. """ - def __init__(self, api_client=None) -> None: + def __init__(self, api_client=None): if api_client is None: - api_client = ApiClient.get_default() + api_client = ApiClient() self.api_client = api_client + self.register_endpoint = _Endpoint( + settings={ + 'response_type': (ApplePayDomainRegister200Response,), + 'auth': [ + 'APIKey' + ], + 'endpoint_path': '/apple-pay/domains', + 'operation_id': 'register', + 'http_method': 'POST', + 'servers': None, + }, + params_map={ + 'all': [ + 'register_apple_pay_domain_request', + ], + 'required': [ + 'register_apple_pay_domain_request', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + 'register_apple_pay_domain_request': + (RegisterApplePayDomainRequest,), + }, + 'attribute_map': { + }, + 'location_map': { + 'register_apple_pay_domain_request': 'body', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [ + 'application/json' + ] + }, + api_client=api_client + ) - - @validate_call def register( self, - register_apple_pay_domain_request: RegisterApplePayDomainRequest, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApplePayDomainRegister200Response: - """Register Domain - -

Registers a domain with Apple Pay.

This endpoint allows you to register your website domain with Apple Pay, which is required before you can accept Apple Pay payments on your website. The domain must be accessible via HTTPS and have a valid SSL certificate.

Before registering, you must download this domain association file and host it at /.well-known/apple-developer-merchantid-domain-association on your site.

For example, if you're registering example.com, make that file available at https://example.com/.well-known/apple-developer-merchantid-domain-association.

After registration, Apple will verify your domain. Once verified, you can display Apple Pay buttons and process Apple Pay payments on your website.

- - :param register_apple_pay_domain_request: (required) - :type register_apple_pay_domain_request: RegisterApplePayDomainRequest - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._register_serialize( - register_apple_pay_domain_request=register_apple_pay_domain_request, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index + register_apple_pay_domain_request, + **kwargs + ): + """Register Domain # noqa: E501 + +

Registers a domain with Apple Pay.

This endpoint allows you to register your website domain with Apple Pay, which is required before you can accept Apple Pay payments on your website. The domain must be accessible via HTTPS and have a valid SSL certificate.

Before registering, you must download this domain association file and host it at /.well-known/apple-developer-merchantid-domain-association on your site.

For example, if you're registering example.com, make that file available at https://example.com/.well-known/apple-developer-merchantid-domain-association.

After registration, Apple will verify your domain. Once verified, you can display Apple Pay buttons and process Apple Pay payments on your website.

# noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.register(register_apple_pay_domain_request, async_req=True) + >>> result = thread.get() + + Args: + register_apple_pay_domain_request (RegisterApplePayDomainRequest): + + Keyword Args: + _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 + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None + async_req (bool): execute request asynchronously + + Returns: + ApplePayDomainRegister200Response + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "ApplePayDomainRegister200Response", - '400': "Error", - '401': "Error", - '404': "Error", - '422': "Error", - '500': "Error", - '503': "Error", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def register_with_http_info( - self, - register_apple_pay_domain_request: RegisterApplePayDomainRequest, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[ApplePayDomainRegister200Response]: - """Register Domain - -

Registers a domain with Apple Pay.

This endpoint allows you to register your website domain with Apple Pay, which is required before you can accept Apple Pay payments on your website. The domain must be accessible via HTTPS and have a valid SSL certificate.

Before registering, you must download this domain association file and host it at /.well-known/apple-developer-merchantid-domain-association on your site.

For example, if you're registering example.com, make that file available at https://example.com/.well-known/apple-developer-merchantid-domain-association.

After registration, Apple will verify your domain. Once verified, you can display Apple Pay buttons and process Apple Pay payments on your website.

- - :param register_apple_pay_domain_request: (required) - :type register_apple_pay_domain_request: RegisterApplePayDomainRequest - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._register_serialize( - register_apple_pay_domain_request=register_apple_pay_domain_request, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "ApplePayDomainRegister200Response", - '400': "Error", - '401': "Error", - '404': "Error", - '422': "Error", - '500': "Error", - '503': "Error", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True ) - - - @validate_call - def register_without_preload_content( - self, - register_apple_pay_domain_request: RegisterApplePayDomainRequest, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """Register Domain - -

Registers a domain with Apple Pay.

This endpoint allows you to register your website domain with Apple Pay, which is required before you can accept Apple Pay payments on your website. The domain must be accessible via HTTPS and have a valid SSL certificate.

Before registering, you must download this domain association file and host it at /.well-known/apple-developer-merchantid-domain-association on your site.

For example, if you're registering example.com, make that file available at https://example.com/.well-known/apple-developer-merchantid-domain-association.

After registration, Apple will verify your domain. Once verified, you can display Apple Pay buttons and process Apple Pay payments on your website.

- - :param register_apple_pay_domain_request: (required) - :type register_apple_pay_domain_request: RegisterApplePayDomainRequest - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._register_serialize( - register_apple_pay_domain_request=register_apple_pay_domain_request, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "ApplePayDomainRegister200Response", - '400': "Error", - '401': "Error", - '404': "Error", - '422': "Error", - '500': "Error", - '503': "Error", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _register_serialize( - self, - register_apple_pay_domain_request, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - # process the query parameters - # process the header parameters - # process the form parameters - # process the body parameter - if register_apple_pay_domain_request is not None: - _body_params = register_apple_pay_domain_request - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - # set the HTTP header `Content-Type` - if _content_type: - _header_params['Content-Type'] = _content_type - else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/json' - ] - ) - ) - if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type - - # authentication setting - _auth_settings: List[str] = [ - 'APIKey' - ] - - return self.api_client.param_serialize( - method='POST', - resource_path='/apple-pay/domains', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False ) - + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + kwargs['register_apple_pay_domain_request'] = \ + register_apple_pay_domain_request + return self.register_endpoint.call_with_http_info(**kwargs) diff --git a/Monei/api/bizum_api.py b/Monei/api/bizum_api.py index 30626c1..4184310 100644 --- a/Monei/api/bizum_api.py +++ b/Monei/api/bizum_api.py @@ -1,329 +1,180 @@ -# coding: utf-8 - """ MONEI API v1 -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

- - The version of the OpenAPI document: 1.5.1 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 -import warnings -from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt -from typing import Any, Dict, List, Optional, Tuple, Union -from typing_extensions import Annotated - -from Monei.models.bizum_validate_phone200_response import BizumValidatePhone200Response -from Monei.models.validate_bizum_phone_request import ValidateBizumPhoneRequest - -from Monei.api_client import ApiClient, RequestSerialized -from Monei.api_response import ApiResponse -from Monei.rest import RESTResponseType + The version of the OpenAPI document: 1.5.3 + Generated by: https://openapi-generator.tech +""" -class BizumApi: +import re # noqa: F401 +import sys # noqa: F401 + +from Monei.api_client import ApiClient, Endpoint as _Endpoint +from Monei.model_utils import ( # noqa: F401 + check_allowed_values, + check_validations, + date, + datetime, + file_type, + none_type, + validate_and_convert_types +) +from Monei.model.apple_pay_domain_register400_response import ApplePayDomainRegister400Response +from Monei.model.apple_pay_domain_register401_response import ApplePayDomainRegister401Response +from Monei.model.apple_pay_domain_register404_response import ApplePayDomainRegister404Response +from Monei.model.apple_pay_domain_register422_response import ApplePayDomainRegister422Response +from Monei.model.apple_pay_domain_register500_response import ApplePayDomainRegister500Response +from Monei.model.apple_pay_domain_register503_response import ApplePayDomainRegister503Response +from Monei.model.bizum_validate_phone200_response import BizumValidatePhone200Response +from Monei.model.validate_bizum_phone_request import ValidateBizumPhoneRequest + + +class BizumApi(object): """NOTE: This class is auto generated by OpenAPI Generator Ref: https://openapi-generator.tech Do not edit the class manually. """ - def __init__(self, api_client=None) -> None: + def __init__(self, api_client=None): if api_client is None: - api_client = ApiClient.get_default() + api_client = ApiClient() self.api_client = api_client + self.validate_phone_endpoint = _Endpoint( + settings={ + 'response_type': (BizumValidatePhone200Response,), + 'auth': [ + 'APIKey' + ], + 'endpoint_path': '/bizum/validate-phone', + 'operation_id': 'validate_phone', + 'http_method': 'POST', + 'servers': None, + }, + params_map={ + 'all': [ + 'validate_bizum_phone_request', + ], + 'required': [ + 'validate_bizum_phone_request', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + 'validate_bizum_phone_request': + (ValidateBizumPhoneRequest,), + }, + 'attribute_map': { + }, + 'location_map': { + 'validate_bizum_phone_request': 'body', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [ + 'application/json' + ] + }, + api_client=api_client + ) - - @validate_call def validate_phone( self, - validate_bizum_phone_request: ValidateBizumPhoneRequest, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> BizumValidatePhone200Response: - """Validate Phone - -

Validates if a phone number is registered with Bizum.

Use this endpoint to check if a customer's phone number can be used for Bizum payments before attempting to process a payment. This helps provide a better user experience by preventing failed payment attempts for non-registered numbers.

The response will indicate whether the phone number is valid for Bizum payments.

- - :param validate_bizum_phone_request: (required) - :type validate_bizum_phone_request: ValidateBizumPhoneRequest - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._validate_phone_serialize( - validate_bizum_phone_request=validate_bizum_phone_request, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index + validate_bizum_phone_request, + **kwargs + ): + """Validate Phone # noqa: E501 + +

Validates if a phone number is registered with Bizum.

Use this endpoint to check if a customer's phone number can be used for Bizum payments before attempting to process a payment. This helps provide a better user experience by preventing failed payment attempts for non-registered numbers.

The response will indicate whether the phone number is valid for Bizum payments.

# noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.validate_phone(validate_bizum_phone_request, async_req=True) + >>> result = thread.get() + + Args: + validate_bizum_phone_request (ValidateBizumPhoneRequest): + + Keyword Args: + _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 + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None + async_req (bool): execute request asynchronously + + Returns: + BizumValidatePhone200Response + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "BizumValidatePhone200Response", - '400': "Error", - '401': "Error", - '404': "Error", - '422': "Error", - '500': "Error", - '503': "Error", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def validate_phone_with_http_info( - self, - validate_bizum_phone_request: ValidateBizumPhoneRequest, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[BizumValidatePhone200Response]: - """Validate Phone - -

Validates if a phone number is registered with Bizum.

Use this endpoint to check if a customer's phone number can be used for Bizum payments before attempting to process a payment. This helps provide a better user experience by preventing failed payment attempts for non-registered numbers.

The response will indicate whether the phone number is valid for Bizum payments.

- - :param validate_bizum_phone_request: (required) - :type validate_bizum_phone_request: ValidateBizumPhoneRequest - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._validate_phone_serialize( - validate_bizum_phone_request=validate_bizum_phone_request, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "BizumValidatePhone200Response", - '400': "Error", - '401': "Error", - '404': "Error", - '422': "Error", - '500': "Error", - '503': "Error", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True ) - - - @validate_call - def validate_phone_without_preload_content( - self, - validate_bizum_phone_request: ValidateBizumPhoneRequest, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """Validate Phone - -

Validates if a phone number is registered with Bizum.

Use this endpoint to check if a customer's phone number can be used for Bizum payments before attempting to process a payment. This helps provide a better user experience by preventing failed payment attempts for non-registered numbers.

The response will indicate whether the phone number is valid for Bizum payments.

- - :param validate_bizum_phone_request: (required) - :type validate_bizum_phone_request: ValidateBizumPhoneRequest - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._validate_phone_serialize( - validate_bizum_phone_request=validate_bizum_phone_request, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "BizumValidatePhone200Response", - '400': "Error", - '401': "Error", - '404': "Error", - '422': "Error", - '500': "Error", - '503': "Error", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _validate_phone_serialize( - self, - validate_bizum_phone_request, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - # process the query parameters - # process the header parameters - # process the form parameters - # process the body parameter - if validate_bizum_phone_request is not None: - _body_params = validate_bizum_phone_request - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - # set the HTTP header `Content-Type` - if _content_type: - _header_params['Content-Type'] = _content_type - else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/json' - ] - ) - ) - if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type - - # authentication setting - _auth_settings: List[str] = [ - 'APIKey' - ] - - return self.api_client.param_serialize( - method='POST', - resource_path='/bizum/validate-phone', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False ) - + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + kwargs['validate_bizum_phone_request'] = \ + validate_bizum_phone_request + return self.validate_phone_endpoint.call_with_http_info(**kwargs) diff --git a/Monei/api/payment_methods_api.py b/Monei/api/payment_methods_api.py index 897c53d..689ed91 100644 --- a/Monei/api/payment_methods_api.py +++ b/Monei/api/payment_methods_api.py @@ -1,336 +1,176 @@ -# coding: utf-8 - """ MONEI API v1 -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

- - The version of the OpenAPI document: 1.5.1 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - -import warnings -from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt -from typing import Any, Dict, List, Optional, Tuple, Union -from typing_extensions import Annotated - -from pydantic import Field, StrictStr -from typing import Optional -from typing_extensions import Annotated -from Monei.models.payment_methods import PaymentMethods +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 -from Monei.api_client import ApiClient, RequestSerialized -from Monei.api_response import ApiResponse -from Monei.rest import RESTResponseType + The version of the OpenAPI document: 1.5.3 + Generated by: https://openapi-generator.tech +""" -class PaymentMethodsApi: +import re # noqa: F401 +import sys # noqa: F401 + +from Monei.api_client import ApiClient, Endpoint as _Endpoint +from Monei.model_utils import ( # noqa: F401 + check_allowed_values, + check_validations, + date, + datetime, + file_type, + none_type, + validate_and_convert_types +) +from Monei.model.apple_pay_domain_register400_response import ApplePayDomainRegister400Response +from Monei.model.apple_pay_domain_register401_response import ApplePayDomainRegister401Response +from Monei.model.apple_pay_domain_register404_response import ApplePayDomainRegister404Response +from Monei.model.apple_pay_domain_register422_response import ApplePayDomainRegister422Response +from Monei.model.apple_pay_domain_register500_response import ApplePayDomainRegister500Response +from Monei.model.apple_pay_domain_register503_response import ApplePayDomainRegister503Response +from Monei.model.payment_methods import PaymentMethods + + +class PaymentMethodsApi(object): """NOTE: This class is auto generated by OpenAPI Generator Ref: https://openapi-generator.tech Do not edit the class manually. """ - def __init__(self, api_client=None) -> None: + def __init__(self, api_client=None): if api_client is None: - api_client = ApiClient.get_default() + api_client = ApiClient() self.api_client = api_client + self.get_endpoint = _Endpoint( + settings={ + 'response_type': (PaymentMethods,), + 'auth': [], + 'endpoint_path': '/payment-methods', + 'operation_id': 'get', + 'http_method': 'GET', + 'servers': None, + }, + params_map={ + 'all': [ + 'account_id', + 'payment_id', + ], + 'required': [], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + 'account_id': + (str,), + 'payment_id': + (str,), + }, + 'attribute_map': { + 'account_id': 'accountId', + 'payment_id': 'paymentId', + }, + 'location_map': { + 'account_id': 'query', + 'payment_id': 'query', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [], + }, + api_client=api_client + ) - - @validate_call def get( self, - account_id: Annotated[Optional[StrictStr], Field(description="The ID of the account to get payment methods for")] = None, - payment_id: Annotated[Optional[StrictStr], Field(description="The ID of the payment to get payment methods for")] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> PaymentMethods: - """Get Payment Methods - -

Retrieve available payment methods for an account or a specific payment.

You can provide either an accountId or a paymentId as a query parameter to get the available payment methods.

When providing a paymentId, the response will include additional payment-specific information such as amount and currency. This is useful when you want to show payment options that are specifically available for a particular transaction.

When providing an accountId, the response will include all payment methods available for that account based on the merchant's configuration and supported payment methods.

- - :param account_id: The ID of the account to get payment methods for - :type account_id: str - :param payment_id: The ID of the payment to get payment methods for - :type payment_id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._get_serialize( - account_id=account_id, - payment_id=payment_id, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index + **kwargs + ): + """Get Payment Methods # noqa: E501 + +

Retrieve available payment methods for an account or a specific payment.

You can provide either an accountId or a paymentId as a query parameter to get the available payment methods.

When providing a paymentId, the response will include additional payment-specific information such as amount and currency. This is useful when you want to show payment options that are specifically available for a particular transaction.

When providing an accountId, the response will include all payment methods available for that account based on the merchant's configuration and supported payment methods.

# 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(async_req=True) + >>> result = thread.get() + + + Keyword Args: + account_id (str): The ID of the account to get payment methods for. [optional] + payment_id (str): The ID of the payment to get payment methods for. [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 + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None + async_req (bool): execute request asynchronously + + Returns: + PaymentMethods + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "PaymentMethods", - '400': "Error", - '401': "Error", - '404': "Error", - '422': "Error", - '500': "Error", - '503': "Error", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def get_with_http_info( - self, - account_id: Annotated[Optional[StrictStr], Field(description="The ID of the account to get payment methods for")] = None, - payment_id: Annotated[Optional[StrictStr], Field(description="The ID of the payment to get payment methods for")] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[PaymentMethods]: - """Get Payment Methods - -

Retrieve available payment methods for an account or a specific payment.

You can provide either an accountId or a paymentId as a query parameter to get the available payment methods.

When providing a paymentId, the response will include additional payment-specific information such as amount and currency. This is useful when you want to show payment options that are specifically available for a particular transaction.

When providing an accountId, the response will include all payment methods available for that account based on the merchant's configuration and supported payment methods.

- - :param account_id: The ID of the account to get payment methods for - :type account_id: str - :param payment_id: The ID of the payment to get payment methods for - :type payment_id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._get_serialize( - account_id=account_id, - payment_id=payment_id, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "PaymentMethods", - '400': "Error", - '401': "Error", - '404': "Error", - '422': "Error", - '500': "Error", - '503': "Error", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True ) - - - @validate_call - def get_without_preload_content( - self, - account_id: Annotated[Optional[StrictStr], Field(description="The ID of the account to get payment methods for")] = None, - payment_id: Annotated[Optional[StrictStr], Field(description="The ID of the payment to get payment methods for")] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """Get Payment Methods - -

Retrieve available payment methods for an account or a specific payment.

You can provide either an accountId or a paymentId as a query parameter to get the available payment methods.

When providing a paymentId, the response will include additional payment-specific information such as amount and currency. This is useful when you want to show payment options that are specifically available for a particular transaction.

When providing an accountId, the response will include all payment methods available for that account based on the merchant's configuration and supported payment methods.

- - :param account_id: The ID of the account to get payment methods for - :type account_id: str - :param payment_id: The ID of the payment to get payment methods for - :type payment_id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._get_serialize( - account_id=account_id, - payment_id=payment_id, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "PaymentMethods", - '400': "Error", - '401': "Error", - '404': "Error", - '422': "Error", - '500': "Error", - '503': "Error", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _get_serialize( - self, - account_id, - payment_id, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - # process the query parameters - if account_id is not None: - - _query_params.append(('accountId', account_id)) - - if payment_id is not None: - - _query_params.append(('paymentId', payment_id)) - - # process the header parameters - # process the form parameters - # process the body parameter - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - ] - - return self.api_client.param_serialize( - method='GET', - resource_path='/payment-methods', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False ) - + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + return self.get_endpoint.call_with_http_info(**kwargs) diff --git a/Monei/api/payments_api.py b/Monei/api/payments_api.py index f47745b..d64cbf4 100644 --- a/Monei/api/payments_api.py +++ b/Monei/api/payments_api.py @@ -1,3075 +1,1454 @@ -# coding: utf-8 - """ MONEI API v1 -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

+

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 + + The version of the OpenAPI document: 1.5.3 + Generated by: https://openapi-generator.tech +""" - The version of the OpenAPI document: 1.5.1 - Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. -""" # noqa: E501 - -import warnings -from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt -from typing import Any, Dict, List, Optional, Tuple, Union -from typing_extensions import Annotated - -from pydantic import Field, StrictStr -from typing import Optional -from typing_extensions import Annotated -from Monei.models.cancel_payment_request import CancelPaymentRequest -from Monei.models.capture_payment_request import CapturePaymentRequest -from Monei.models.confirm_payment_request import ConfirmPaymentRequest -from Monei.models.create_payment_request import CreatePaymentRequest -from Monei.models.payment import Payment -from Monei.models.recurring_payment_request import RecurringPaymentRequest -from Monei.models.refund_payment_request import RefundPaymentRequest -from Monei.models.send_payment_link_request import SendPaymentLinkRequest -from Monei.models.send_payment_receipt_request import SendPaymentReceiptRequest -from Monei.models.send_payment_request_request import SendPaymentRequestRequest - -from Monei.api_client import ApiClient, RequestSerialized -from Monei.api_response import ApiResponse -from Monei.rest import RESTResponseType - - -class PaymentsApi: +import re # noqa: F401 +import sys # noqa: F401 + +from Monei.api_client import ApiClient, Endpoint as _Endpoint +from Monei.model_utils import ( # noqa: F401 + check_allowed_values, + check_validations, + date, + datetime, + file_type, + none_type, + validate_and_convert_types +) +from Monei.model.apple_pay_domain_register400_response import ApplePayDomainRegister400Response +from Monei.model.apple_pay_domain_register401_response import ApplePayDomainRegister401Response +from Monei.model.apple_pay_domain_register404_response import ApplePayDomainRegister404Response +from Monei.model.apple_pay_domain_register422_response import ApplePayDomainRegister422Response +from Monei.model.apple_pay_domain_register500_response import ApplePayDomainRegister500Response +from Monei.model.apple_pay_domain_register503_response import ApplePayDomainRegister503Response +from Monei.model.cancel_payment_request import CancelPaymentRequest +from Monei.model.capture_payment_request import CapturePaymentRequest +from Monei.model.confirm_payment_request import ConfirmPaymentRequest +from Monei.model.create_payment_request import CreatePaymentRequest +from Monei.model.payment import Payment +from Monei.model.recurring_payment_request import RecurringPaymentRequest +from Monei.model.refund_payment_request import RefundPaymentRequest +from Monei.model.send_payment_link_request import SendPaymentLinkRequest +from Monei.model.send_payment_receipt_request import SendPaymentReceiptRequest +from Monei.model.send_payment_request_request import SendPaymentRequestRequest + + +class PaymentsApi(object): """NOTE: This class is auto generated by OpenAPI Generator Ref: https://openapi-generator.tech Do not edit the class manually. """ - def __init__(self, api_client=None) -> None: + def __init__(self, api_client=None): if api_client is None: - api_client = ApiClient.get_default() + api_client = ApiClient() self.api_client = api_client + self.cancel_endpoint = _Endpoint( + settings={ + 'response_type': (Payment,), + 'auth': [ + 'APIKey' + ], + 'endpoint_path': '/payments/{id}/cancel', + 'operation_id': 'cancel', + 'http_method': 'POST', + 'servers': None, + }, + params_map={ + 'all': [ + 'id', + 'cancel_payment_request', + ], + 'required': [ + 'id', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + 'id': + (str,), + 'cancel_payment_request': + (CancelPaymentRequest,), + }, + 'attribute_map': { + 'id': 'id', + }, + 'location_map': { + 'id': 'path', + 'cancel_payment_request': 'body', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [ + 'application/json' + ] + }, + api_client=api_client + ) + self.capture_endpoint = _Endpoint( + settings={ + 'response_type': (Payment,), + 'auth': [ + 'APIKey' + ], + 'endpoint_path': '/payments/{id}/capture', + 'operation_id': 'capture', + 'http_method': 'POST', + 'servers': None, + }, + params_map={ + 'all': [ + 'id', + 'capture_payment_request', + ], + 'required': [ + 'id', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + 'id': + (str,), + 'capture_payment_request': + (CapturePaymentRequest,), + }, + 'attribute_map': { + 'id': 'id', + }, + 'location_map': { + 'id': 'path', + 'capture_payment_request': 'body', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [ + 'application/json' + ] + }, + api_client=api_client + ) + self.confirm_endpoint = _Endpoint( + settings={ + 'response_type': (Payment,), + 'auth': [ + 'APIKey' + ], + 'endpoint_path': '/payments/{id}/confirm', + 'operation_id': 'confirm', + 'http_method': 'POST', + 'servers': None, + }, + params_map={ + 'all': [ + 'id', + 'confirm_payment_request', + ], + 'required': [ + 'id', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + 'id': + (str,), + 'confirm_payment_request': + (ConfirmPaymentRequest,), + }, + 'attribute_map': { + 'id': 'id', + }, + 'location_map': { + 'id': 'path', + 'confirm_payment_request': 'body', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [ + 'application/json' + ] + }, + api_client=api_client + ) + self.create_endpoint = _Endpoint( + settings={ + 'response_type': (Payment,), + 'auth': [ + 'APIKey' + ], + 'endpoint_path': '/payments', + 'operation_id': 'create', + 'http_method': 'POST', + 'servers': None, + }, + params_map={ + 'all': [ + 'create_payment_request', + ], + 'required': [ + 'create_payment_request', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + 'create_payment_request': + (CreatePaymentRequest,), + }, + 'attribute_map': { + }, + 'location_map': { + 'create_payment_request': 'body', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [ + 'application/json' + ] + }, + api_client=api_client + ) + self.get_endpoint = _Endpoint( + settings={ + 'response_type': (Payment,), + 'auth': [ + 'APIKey' + ], + 'endpoint_path': '/payments/{id}', + 'operation_id': 'get', + 'http_method': 'GET', + 'servers': None, + }, + params_map={ + 'all': [ + 'id', + ], + 'required': [ + 'id', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + 'id': + (str,), + }, + 'attribute_map': { + 'id': 'id', + }, + 'location_map': { + 'id': 'path', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [], + }, + api_client=api_client + ) + self.recurring_endpoint = _Endpoint( + settings={ + 'response_type': (Payment,), + 'auth': [ + 'APIKey' + ], + 'endpoint_path': '/payments/{sequenceId}/recurring', + 'operation_id': 'recurring', + 'http_method': 'POST', + 'servers': None, + }, + params_map={ + 'all': [ + 'sequence_id', + 'recurring_payment_request', + ], + 'required': [ + 'sequence_id', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + 'sequence_id': + (str,), + 'recurring_payment_request': + (RecurringPaymentRequest,), + }, + 'attribute_map': { + 'sequence_id': 'sequenceId', + }, + 'location_map': { + 'sequence_id': 'path', + 'recurring_payment_request': 'body', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [ + 'application/json' + ] + }, + api_client=api_client + ) + self.refund_endpoint = _Endpoint( + settings={ + 'response_type': (Payment,), + 'auth': [ + 'APIKey' + ], + 'endpoint_path': '/payments/{id}/refund', + 'operation_id': 'refund', + 'http_method': 'POST', + 'servers': None, + }, + params_map={ + 'all': [ + 'id', + 'refund_payment_request', + ], + 'required': [ + 'id', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + 'id': + (str,), + 'refund_payment_request': + (RefundPaymentRequest,), + }, + 'attribute_map': { + 'id': 'id', + }, + 'location_map': { + 'id': 'path', + 'refund_payment_request': 'body', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [ + 'application/json' + ] + }, + api_client=api_client + ) + self.send_link_endpoint = _Endpoint( + settings={ + 'response_type': (Payment,), + 'auth': [ + 'APIKey' + ], + 'endpoint_path': '/payments/{id}/link', + 'operation_id': 'send_link', + 'http_method': 'POST', + 'servers': None, + }, + params_map={ + 'all': [ + 'id', + 'send_payment_link_request', + ], + 'required': [ + 'id', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + 'id': + (str,), + 'send_payment_link_request': + (SendPaymentLinkRequest,), + }, + 'attribute_map': { + 'id': 'id', + }, + 'location_map': { + 'id': 'path', + 'send_payment_link_request': 'body', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [ + 'application/json' + ] + }, + api_client=api_client + ) + self.send_receipt_endpoint = _Endpoint( + settings={ + 'response_type': (Payment,), + 'auth': [ + 'APIKey' + ], + 'endpoint_path': '/payments/{id}/receipt', + 'operation_id': 'send_receipt', + 'http_method': 'POST', + 'servers': None, + }, + params_map={ + 'all': [ + 'id', + 'send_payment_receipt_request', + ], + 'required': [ + 'id', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + 'id': + (str,), + 'send_payment_receipt_request': + (SendPaymentReceiptRequest,), + }, + 'attribute_map': { + 'id': 'id', + }, + 'location_map': { + 'id': 'path', + 'send_payment_receipt_request': 'body', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [ + 'application/json' + ] + }, + api_client=api_client + ) + self.send_request_endpoint = _Endpoint( + settings={ + 'response_type': (Payment,), + 'auth': [ + 'APIKey' + ], + 'endpoint_path': '/payments/{id}/rtp', + 'operation_id': 'send_request', + 'http_method': 'POST', + 'servers': None, + }, + params_map={ + 'all': [ + 'id', + 'send_payment_request_request', + ], + 'required': [ + 'id', + 'send_payment_request_request', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + 'id': + (str,), + 'send_payment_request_request': + (SendPaymentRequestRequest,), + }, + 'attribute_map': { + 'id': 'id', + }, + 'location_map': { + 'id': 'path', + 'send_payment_request_request': 'body', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [ + 'application/json' + ] + }, + api_client=api_client + ) - - @validate_call def cancel( - self, - id: Annotated[StrictStr, Field(description="The payment ID")], - cancel_payment_request: Optional[CancelPaymentRequest] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> Payment: - """Cancel Payment - -

Releases reserved funds from a previously authorized payment. This endpoint can only be used with payments in AUTHORIZED status.

This operation is part of the two-step authorization flow:

  1. Authorize: Create a payment with transactionType: AUTH to reserve funds
  2. Cancel: Release the reserved funds if you decide not to capture the payment

Cancellation makes the reserved funds available to the customer again and prevents you from being able to capture those funds in the future. Once cancelled, an authorization cannot be reactivated.

- - :param id: The payment ID (required) - :type id: str - :param cancel_payment_request: - :type cancel_payment_request: CancelPaymentRequest - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._cancel_serialize( - id=id, - cancel_payment_request=cancel_payment_request, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "Payment", - '400': "Error", - '401': "Error", - '404': "Error", - '422': "Error", - '500': "Error", - '503': "Error", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def cancel_with_http_info( - self, - id: Annotated[StrictStr, Field(description="The payment ID")], - cancel_payment_request: Optional[CancelPaymentRequest] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[Payment]: - """Cancel Payment - -

Releases reserved funds from a previously authorized payment. This endpoint can only be used with payments in AUTHORIZED status.

This operation is part of the two-step authorization flow:

  1. Authorize: Create a payment with transactionType: AUTH to reserve funds
  2. Cancel: Release the reserved funds if you decide not to capture the payment

Cancellation makes the reserved funds available to the customer again and prevents you from being able to capture those funds in the future. Once cancelled, an authorization cannot be reactivated.

- - :param id: The payment ID (required) - :type id: str - :param cancel_payment_request: - :type cancel_payment_request: CancelPaymentRequest - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._cancel_serialize( - id=id, - cancel_payment_request=cancel_payment_request, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "Payment", - '400': "Error", - '401': "Error", - '404': "Error", - '422': "Error", - '500': "Error", - '503': "Error", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def cancel_without_preload_content( - self, - id: Annotated[StrictStr, Field(description="The payment ID")], - cancel_payment_request: Optional[CancelPaymentRequest] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """Cancel Payment - -

Releases reserved funds from a previously authorized payment. This endpoint can only be used with payments in AUTHORIZED status.

This operation is part of the two-step authorization flow:

  1. Authorize: Create a payment with transactionType: AUTH to reserve funds
  2. Cancel: Release the reserved funds if you decide not to capture the payment

Cancellation makes the reserved funds available to the customer again and prevents you from being able to capture those funds in the future. Once cancelled, an authorization cannot be reactivated.

- - :param id: The payment ID (required) - :type id: str - :param cancel_payment_request: - :type cancel_payment_request: CancelPaymentRequest - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._cancel_serialize( - id=id, - cancel_payment_request=cancel_payment_request, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "Payment", - '400': "Error", - '401': "Error", - '404': "Error", - '422': "Error", - '500': "Error", - '503': "Error", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _cancel_serialize( self, id, - cancel_payment_request, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - if id is not None: - _path_params['id'] = id - # process the query parameters - # process the header parameters - # process the form parameters - # process the body parameter - if cancel_payment_request is not None: - _body_params = cancel_payment_request - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - # set the HTTP header `Content-Type` - if _content_type: - _header_params['Content-Type'] = _content_type - else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/json' - ] - ) - ) - if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type - - # authentication setting - _auth_settings: List[str] = [ - 'APIKey' - ] - - return self.api_client.param_serialize( - method='POST', - resource_path='/payments/{id}/cancel', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - - @validate_call + **kwargs + ): + """Cancel Payment # noqa: E501 + +

Releases reserved funds from a previously authorized payment. This endpoint can only be used with payments in AUTHORIZED status.

This operation is part of the two-step authorization flow:

  1. Authorize: Create a payment with transactionType: AUTH to reserve funds
  2. Cancel: Release the reserved funds if you decide not to capture the payment

Cancellation makes the reserved funds available to the customer again and prevents you from being able to capture those funds in the future. Once cancelled, an authorization cannot be reactivated.

# 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(id, async_req=True) + >>> result = thread.get() + + Args: + id (str): The payment ID + + Keyword Args: + cancel_payment_request (CancelPaymentRequest): [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 + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None + async_req (bool): execute request asynchronously + + Returns: + Payment + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + kwargs['id'] = \ + id + return self.cancel_endpoint.call_with_http_info(**kwargs) + def capture( - self, - id: Annotated[StrictStr, Field(description="The payment ID")], - capture_payment_request: Optional[CapturePaymentRequest] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> Payment: - """Capture Payment - -

Captures funds from a previously authorized payment. This endpoint can only be used with payments in AUTHORIZED status.

This operation completes the two-step authorization flow:

  1. Authorize: Create a payment with transactionType: AUTH to reserve funds
  2. Capture: Transfer the reserved funds to your account when ready to fulfill the order

Important: Authorized payments expire after exactly seven days. After expiration, they will be marked as EXPIRED and can no longer be captured. Be sure to capture funds within this timeframe or communicate with your customer about a new payment.

- - :param id: The payment ID (required) - :type id: str - :param capture_payment_request: - :type capture_payment_request: CapturePaymentRequest - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._capture_serialize( - id=id, - capture_payment_request=capture_payment_request, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "Payment", - '400': "Error", - '401': "Error", - '404': "Error", - '422': "Error", - '500': "Error", - '503': "Error", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def capture_with_http_info( - self, - id: Annotated[StrictStr, Field(description="The payment ID")], - capture_payment_request: Optional[CapturePaymentRequest] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[Payment]: - """Capture Payment - -

Captures funds from a previously authorized payment. This endpoint can only be used with payments in AUTHORIZED status.

This operation completes the two-step authorization flow:

  1. Authorize: Create a payment with transactionType: AUTH to reserve funds
  2. Capture: Transfer the reserved funds to your account when ready to fulfill the order

Important: Authorized payments expire after exactly seven days. After expiration, they will be marked as EXPIRED and can no longer be captured. Be sure to capture funds within this timeframe or communicate with your customer about a new payment.

- - :param id: The payment ID (required) - :type id: str - :param capture_payment_request: - :type capture_payment_request: CapturePaymentRequest - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._capture_serialize( - id=id, - capture_payment_request=capture_payment_request, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "Payment", - '400': "Error", - '401': "Error", - '404': "Error", - '422': "Error", - '500': "Error", - '503': "Error", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def capture_without_preload_content( - self, - id: Annotated[StrictStr, Field(description="The payment ID")], - capture_payment_request: Optional[CapturePaymentRequest] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """Capture Payment - -

Captures funds from a previously authorized payment. This endpoint can only be used with payments in AUTHORIZED status.

This operation completes the two-step authorization flow:

  1. Authorize: Create a payment with transactionType: AUTH to reserve funds
  2. Capture: Transfer the reserved funds to your account when ready to fulfill the order

Important: Authorized payments expire after exactly seven days. After expiration, they will be marked as EXPIRED and can no longer be captured. Be sure to capture funds within this timeframe or communicate with your customer about a new payment.

- - :param id: The payment ID (required) - :type id: str - :param capture_payment_request: - :type capture_payment_request: CapturePaymentRequest - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._capture_serialize( - id=id, - capture_payment_request=capture_payment_request, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "Payment", - '400': "Error", - '401': "Error", - '404': "Error", - '422': "Error", - '500': "Error", - '503': "Error", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _capture_serialize( self, id, - capture_payment_request, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - if id is not None: - _path_params['id'] = id - # process the query parameters - # process the header parameters - # process the form parameters - # process the body parameter - if capture_payment_request is not None: - _body_params = capture_payment_request - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - # set the HTTP header `Content-Type` - if _content_type: - _header_params['Content-Type'] = _content_type - else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/json' - ] - ) - ) - if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type - - # authentication setting - _auth_settings: List[str] = [ - 'APIKey' - ] - - return self.api_client.param_serialize( - method='POST', - resource_path='/payments/{id}/capture', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - - @validate_call + **kwargs + ): + """Capture Payment # noqa: E501 + +

Captures funds from a previously authorized payment. This endpoint can only be used with payments in AUTHORIZED status.

This operation completes the two-step authorization flow:

  1. Authorize: Create a payment with transactionType: AUTH to reserve funds
  2. Capture: Transfer the reserved funds to your account when ready to fulfill the order

Important: Authorized payments expire after exactly seven days. After expiration, they will be marked as EXPIRED and can no longer be captured. Be sure to capture funds within this timeframe or communicate with your customer about a new payment.

# 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(id, async_req=True) + >>> result = thread.get() + + Args: + id (str): The payment ID + + Keyword Args: + capture_payment_request (CapturePaymentRequest): [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 + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None + async_req (bool): execute request asynchronously + + Returns: + Payment + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + kwargs['id'] = \ + id + return self.capture_endpoint.call_with_http_info(**kwargs) + def confirm( - self, - id: Annotated[StrictStr, Field(description="The payment ID")], - confirm_payment_request: Optional[ConfirmPaymentRequest] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> Payment: - """Confirm Payment - -

Confirms a payment that was created without payment details. This endpoint can only be used with payments in PENDING status.

The two-step payment flow:

  1. Create: First, create a payment without payment details (status: PENDING)
  2. Confirm: Then provide payment details to complete the transaction

When confirming a payment, you can use:

  • A newly generated paymentToken from monei.js Components
  • A permanent paymentToken from a previous payment (generated with generatePaymentToken: true)

Using permanent payment tokens enables one-click checkout experiences for returning customers without requiring them to re-enter their payment information.

You can provide additional customer information during confirmation, which will override any corresponding information originally passed in the payment creation request.

- - :param id: The payment ID (required) - :type id: str - :param confirm_payment_request: - :type confirm_payment_request: ConfirmPaymentRequest - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._confirm_serialize( - id=id, - confirm_payment_request=confirm_payment_request, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "Payment", - '400': "Error", - '401': "Error", - '404': "Error", - '422': "Error", - '500': "Error", - '503': "Error", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def confirm_with_http_info( - self, - id: Annotated[StrictStr, Field(description="The payment ID")], - confirm_payment_request: Optional[ConfirmPaymentRequest] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[Payment]: - """Confirm Payment - -

Confirms a payment that was created without payment details. This endpoint can only be used with payments in PENDING status.

The two-step payment flow:

  1. Create: First, create a payment without payment details (status: PENDING)
  2. Confirm: Then provide payment details to complete the transaction

When confirming a payment, you can use:

  • A newly generated paymentToken from monei.js Components
  • A permanent paymentToken from a previous payment (generated with generatePaymentToken: true)

Using permanent payment tokens enables one-click checkout experiences for returning customers without requiring them to re-enter their payment information.

You can provide additional customer information during confirmation, which will override any corresponding information originally passed in the payment creation request.

- - :param id: The payment ID (required) - :type id: str - :param confirm_payment_request: - :type confirm_payment_request: ConfirmPaymentRequest - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._confirm_serialize( - id=id, - confirm_payment_request=confirm_payment_request, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "Payment", - '400': "Error", - '401': "Error", - '404': "Error", - '422': "Error", - '500': "Error", - '503': "Error", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def confirm_without_preload_content( - self, - id: Annotated[StrictStr, Field(description="The payment ID")], - confirm_payment_request: Optional[ConfirmPaymentRequest] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """Confirm Payment - -

Confirms a payment that was created without payment details. This endpoint can only be used with payments in PENDING status.

The two-step payment flow:

  1. Create: First, create a payment without payment details (status: PENDING)
  2. Confirm: Then provide payment details to complete the transaction

When confirming a payment, you can use:

  • A newly generated paymentToken from monei.js Components
  • A permanent paymentToken from a previous payment (generated with generatePaymentToken: true)

Using permanent payment tokens enables one-click checkout experiences for returning customers without requiring them to re-enter their payment information.

You can provide additional customer information during confirmation, which will override any corresponding information originally passed in the payment creation request.

- - :param id: The payment ID (required) - :type id: str - :param confirm_payment_request: - :type confirm_payment_request: ConfirmPaymentRequest - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._confirm_serialize( - id=id, - confirm_payment_request=confirm_payment_request, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "Payment", - '400': "Error", - '401': "Error", - '404': "Error", - '422': "Error", - '500': "Error", - '503': "Error", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _confirm_serialize( self, id, - confirm_payment_request, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - if id is not None: - _path_params['id'] = id - # process the query parameters - # process the header parameters - # process the form parameters - # process the body parameter - if confirm_payment_request is not None: - _body_params = confirm_payment_request - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - # set the HTTP header `Content-Type` - if _content_type: - _header_params['Content-Type'] = _content_type - else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/json' - ] - ) - ) - if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type - - # authentication setting - _auth_settings: List[str] = [ - 'APIKey' - ] - - return self.api_client.param_serialize( - method='POST', - resource_path='/payments/{id}/confirm', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - - @validate_call + **kwargs + ): + """Confirm Payment # noqa: E501 + +

Confirms a payment that was created without payment details. This endpoint can only be used with payments in PENDING status.

The two-step payment flow:

  1. Create: First, create a payment without payment details (status: PENDING)
  2. Confirm: Then provide payment details to complete the transaction

When confirming a payment, you can use:

  • A newly generated paymentToken from monei.js Components
  • A permanent paymentToken from a previous payment (generated with generatePaymentToken: true)

Using permanent payment tokens enables one-click checkout experiences for returning customers without requiring them to re-enter their payment information.

You can provide additional customer information during confirmation, which will override any corresponding information originally passed in the payment creation 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.confirm(id, async_req=True) + >>> result = thread.get() + + Args: + id (str): The payment ID + + Keyword Args: + confirm_payment_request (ConfirmPaymentRequest): [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 + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None + async_req (bool): execute request asynchronously + + Returns: + Payment + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + kwargs['id'] = \ + id + return self.confirm_endpoint.call_with_http_info(**kwargs) + def create( - self, - create_payment_request: CreatePaymentRequest, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> Payment: - """Create Payment - -

Creates a new payment with the specified parameters.

You can create a payment in two ways:

  1. Immediate processing: Provide a paymentToken or paymentMethod - The payment will be processed instantly
  2. Deferred processing: Create without payment details - The payment remains in PENDING status until you confirm it later using the confirm endpoint

When creating a payment without payment details, you can redirect customers to the hosted payment page where they can select their preferred payment method and complete the transaction.

For immediate processing, use one of these token options:

  • A temporary paymentToken generated on the frontend using monei.js Components
  • A permanent paymentToken from a previous successful payment (when generatePaymentToken: true was included)

Permanent tokens enable one-click checkout experiences for returning customers by allowing you to securely store and reuse payment details without requiring customers to re-enter their information.

- - :param create_payment_request: (required) - :type create_payment_request: CreatePaymentRequest - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._create_serialize( - create_payment_request=create_payment_request, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "Payment", - '400': "Error", - '401': "Error", - '404': "Error", - '422': "Error", - '500': "Error", - '503': "Error", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def create_with_http_info( - self, - create_payment_request: CreatePaymentRequest, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[Payment]: - """Create Payment - -

Creates a new payment with the specified parameters.

You can create a payment in two ways:

  1. Immediate processing: Provide a paymentToken or paymentMethod - The payment will be processed instantly
  2. Deferred processing: Create without payment details - The payment remains in PENDING status until you confirm it later using the confirm endpoint

When creating a payment without payment details, you can redirect customers to the hosted payment page where they can select their preferred payment method and complete the transaction.

For immediate processing, use one of these token options:

  • A temporary paymentToken generated on the frontend using monei.js Components
  • A permanent paymentToken from a previous successful payment (when generatePaymentToken: true was included)

Permanent tokens enable one-click checkout experiences for returning customers by allowing you to securely store and reuse payment details without requiring customers to re-enter their information.

- - :param create_payment_request: (required) - :type create_payment_request: CreatePaymentRequest - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._create_serialize( - create_payment_request=create_payment_request, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "Payment", - '400': "Error", - '401': "Error", - '404': "Error", - '422': "Error", - '500': "Error", - '503': "Error", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def create_without_preload_content( - self, - create_payment_request: CreatePaymentRequest, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """Create Payment - -

Creates a new payment with the specified parameters.

You can create a payment in two ways:

  1. Immediate processing: Provide a paymentToken or paymentMethod - The payment will be processed instantly
  2. Deferred processing: Create without payment details - The payment remains in PENDING status until you confirm it later using the confirm endpoint

When creating a payment without payment details, you can redirect customers to the hosted payment page where they can select their preferred payment method and complete the transaction.

For immediate processing, use one of these token options:

  • A temporary paymentToken generated on the frontend using monei.js Components
  • A permanent paymentToken from a previous successful payment (when generatePaymentToken: true was included)

Permanent tokens enable one-click checkout experiences for returning customers by allowing you to securely store and reuse payment details without requiring customers to re-enter their information.

- - :param create_payment_request: (required) - :type create_payment_request: CreatePaymentRequest - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._create_serialize( - create_payment_request=create_payment_request, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "Payment", - '400': "Error", - '401': "Error", - '404': "Error", - '422': "Error", - '500': "Error", - '503': "Error", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _create_serialize( self, create_payment_request, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - # process the query parameters - # process the header parameters - # process the form parameters - # process the body parameter - if create_payment_request is not None: - _body_params = create_payment_request - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - # set the HTTP header `Content-Type` - if _content_type: - _header_params['Content-Type'] = _content_type - else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/json' - ] - ) - ) - if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type - - # authentication setting - _auth_settings: List[str] = [ - 'APIKey' - ] - - return self.api_client.param_serialize( - method='POST', - resource_path='/payments', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - - @validate_call + **kwargs + ): + """Create Payment # noqa: E501 + +

Creates a new payment with the specified parameters.

You can create a payment in two ways:

  1. Immediate processing: Provide a paymentToken or paymentMethod - The payment will be processed instantly
  2. Deferred processing: Create without payment details - The payment remains in PENDING status until you confirm it later using the confirm endpoint

When creating a payment without payment details, you can redirect customers to the hosted payment page where they can select their preferred payment method and complete the transaction.

For immediate processing, use one of these token options:

  • A temporary paymentToken generated on the frontend using monei.js Components
  • A permanent paymentToken from a previous successful payment (when generatePaymentToken: true was included)

Permanent tokens enable one-click checkout experiences for returning customers by allowing you to securely store and reuse payment details without requiring customers to re-enter their information.

# 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(create_payment_request, async_req=True) + >>> result = thread.get() + + Args: + create_payment_request (CreatePaymentRequest): + + Keyword Args: + _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 + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None + async_req (bool): execute request asynchronously + + Returns: + Payment + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + kwargs['create_payment_request'] = \ + create_payment_request + return self.create_endpoint.call_with_http_info(**kwargs) + def get( - self, - id: Annotated[StrictStr, Field(description="The payment ID")], - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> Payment: - """Get Payment - -

Retrieves the complete details of an existing payment by its unique ID.

This endpoint returns all available information about the payment, including its current status, amount, customer details, timestamps, and transaction history. Use this to check the status of a payment, verify payment details, or retrieve information for your records.

Supply the unique payment ID that was returned from your previous request.

- - :param id: The payment ID (required) - :type id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._get_serialize( - id=id, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "Payment", - '400': "Error", - '401': "Error", - '404': "Error", - '422': "Error", - '500': "Error", - '503': "Error", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def get_with_http_info( - self, - id: Annotated[StrictStr, Field(description="The payment ID")], - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[Payment]: - """Get Payment - -

Retrieves the complete details of an existing payment by its unique ID.

This endpoint returns all available information about the payment, including its current status, amount, customer details, timestamps, and transaction history. Use this to check the status of a payment, verify payment details, or retrieve information for your records.

Supply the unique payment ID that was returned from your previous request.

- - :param id: The payment ID (required) - :type id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._get_serialize( - id=id, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "Payment", - '400': "Error", - '401': "Error", - '404': "Error", - '422': "Error", - '500': "Error", - '503': "Error", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def get_without_preload_content( - self, - id: Annotated[StrictStr, Field(description="The payment ID")], - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """Get Payment - -

Retrieves the complete details of an existing payment by its unique ID.

This endpoint returns all available information about the payment, including its current status, amount, customer details, timestamps, and transaction history. Use this to check the status of a payment, verify payment details, or retrieve information for your records.

Supply the unique payment ID that was returned from your previous request.

- - :param id: The payment ID (required) - :type id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._get_serialize( - id=id, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "Payment", - '400': "Error", - '401': "Error", - '404': "Error", - '422': "Error", - '500': "Error", - '503': "Error", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _get_serialize( self, id, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - if id is not None: - _path_params['id'] = id - # process the query parameters - # process the header parameters - # process the form parameters - # process the body parameter - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - 'APIKey' - ] - - return self.api_client.param_serialize( - method='GET', - resource_path='/payments/{id}', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) + **kwargs + ): + """Get Payment # noqa: E501 + +

Retrieves the complete details of an existing payment by its unique ID.

This endpoint returns all available information about the payment, including its current status, amount, customer details, timestamps, and transaction history. Use this to check the status of a payment, verify payment details, or retrieve information for your records.

Supply the unique payment ID that was returned from your previous 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.get(id, async_req=True) + >>> result = thread.get() + + Args: + id (str): The payment ID + + Keyword Args: + _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 + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None + async_req (bool): execute request asynchronously + + Returns: + Payment + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + kwargs['id'] = \ + id + return self.get_endpoint.call_with_http_info(**kwargs) - - - - @validate_call def recurring( - self, - sequence_id: Annotated[StrictStr, Field(description="The sequence ID")], - recurring_payment_request: Optional[RecurringPaymentRequest] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> Payment: - """Recurring Payment - -

Creates a subsequent charge using the payment details from a previous transaction.

This endpoint enables recurring billing and subscription payments by:

  • Using the same payment method as the original payment
  • Charging the customer without requiring them to re-enter payment details
  • Supporting variable or fixed amounts (defaults to the original payment amount if not specified)

Prerequisites:

  1. The initial payment must be created with the sequence parameter
  2. The initial payment will return a sequenceId in the response
  3. This sequenceId must be provided in the URL path when making subsequent recurring charges

Ideal for subscription services, membership renewals, and installment payments.

Need more advanced subscription management? For comprehensive subscription management with features like billing cycles, trial periods, and automatic recurring billing, consider using the Subscriptions API instead. It provides a complete solution for creating and managing subscription-based services.

- - :param sequence_id: The sequence ID (required) - :type sequence_id: str - :param recurring_payment_request: - :type recurring_payment_request: RecurringPaymentRequest - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._recurring_serialize( - sequence_id=sequence_id, - recurring_payment_request=recurring_payment_request, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "Payment", - '400': "Error", - '401': "Error", - '404': "Error", - '422': "Error", - '500': "Error", - '503': "Error", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def recurring_with_http_info( - self, - sequence_id: Annotated[StrictStr, Field(description="The sequence ID")], - recurring_payment_request: Optional[RecurringPaymentRequest] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[Payment]: - """Recurring Payment - -

Creates a subsequent charge using the payment details from a previous transaction.

This endpoint enables recurring billing and subscription payments by:

  • Using the same payment method as the original payment
  • Charging the customer without requiring them to re-enter payment details
  • Supporting variable or fixed amounts (defaults to the original payment amount if not specified)

Prerequisites:

  1. The initial payment must be created with the sequence parameter
  2. The initial payment will return a sequenceId in the response
  3. This sequenceId must be provided in the URL path when making subsequent recurring charges

Ideal for subscription services, membership renewals, and installment payments.

Need more advanced subscription management? For comprehensive subscription management with features like billing cycles, trial periods, and automatic recurring billing, consider using the Subscriptions API instead. It provides a complete solution for creating and managing subscription-based services.

- - :param sequence_id: The sequence ID (required) - :type sequence_id: str - :param recurring_payment_request: - :type recurring_payment_request: RecurringPaymentRequest - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._recurring_serialize( - sequence_id=sequence_id, - recurring_payment_request=recurring_payment_request, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "Payment", - '400': "Error", - '401': "Error", - '404': "Error", - '422': "Error", - '500': "Error", - '503': "Error", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def recurring_without_preload_content( - self, - sequence_id: Annotated[StrictStr, Field(description="The sequence ID")], - recurring_payment_request: Optional[RecurringPaymentRequest] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """Recurring Payment - -

Creates a subsequent charge using the payment details from a previous transaction.

This endpoint enables recurring billing and subscription payments by:

  • Using the same payment method as the original payment
  • Charging the customer without requiring them to re-enter payment details
  • Supporting variable or fixed amounts (defaults to the original payment amount if not specified)

Prerequisites:

  1. The initial payment must be created with the sequence parameter
  2. The initial payment will return a sequenceId in the response
  3. This sequenceId must be provided in the URL path when making subsequent recurring charges

Ideal for subscription services, membership renewals, and installment payments.

Need more advanced subscription management? For comprehensive subscription management with features like billing cycles, trial periods, and automatic recurring billing, consider using the Subscriptions API instead. It provides a complete solution for creating and managing subscription-based services.

- - :param sequence_id: The sequence ID (required) - :type sequence_id: str - :param recurring_payment_request: - :type recurring_payment_request: RecurringPaymentRequest - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._recurring_serialize( - sequence_id=sequence_id, - recurring_payment_request=recurring_payment_request, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "Payment", - '400': "Error", - '401': "Error", - '404': "Error", - '422': "Error", - '500': "Error", - '503': "Error", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _recurring_serialize( self, sequence_id, - recurring_payment_request, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - if sequence_id is not None: - _path_params['sequenceId'] = sequence_id - # process the query parameters - # process the header parameters - # process the form parameters - # process the body parameter - if recurring_payment_request is not None: - _body_params = recurring_payment_request - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - # set the HTTP header `Content-Type` - if _content_type: - _header_params['Content-Type'] = _content_type - else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/json' - ] - ) - ) - if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type - - # authentication setting - _auth_settings: List[str] = [ - 'APIKey' - ] - - return self.api_client.param_serialize( - method='POST', - resource_path='/payments/{sequenceId}/recurring', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - - @validate_call + **kwargs + ): + """Recurring Payment # noqa: E501 + +

Creates a subsequent charge using the payment details from a previous transaction.

This endpoint enables recurring billing and subscription payments by:

  • Using the same payment method as the original payment
  • Charging the customer without requiring them to re-enter payment details
  • Supporting variable or fixed amounts (defaults to the original payment amount if not specified)

Prerequisites:

  1. The initial payment must be created with the sequence parameter
  2. The initial payment will return a sequenceId in the response
  3. This sequenceId must be provided in the URL path when making subsequent recurring charges

Ideal for subscription services, membership renewals, and installment payments.

Need more advanced subscription management? For comprehensive subscription management with features like billing cycles, trial periods, and automatic recurring billing, consider using the Subscriptions API instead. It provides a complete solution for creating and managing subscription-based services.

# noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.recurring(sequence_id, async_req=True) + >>> result = thread.get() + + Args: + sequence_id (str): The sequence ID + + Keyword Args: + recurring_payment_request (RecurringPaymentRequest): [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 + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None + async_req (bool): execute request asynchronously + + Returns: + Payment + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + kwargs['sequence_id'] = \ + sequence_id + return self.recurring_endpoint.call_with_http_info(**kwargs) + def refund( - self, - id: Annotated[StrictStr, Field(description="The payment ID")], - refund_payment_request: Optional[RefundPaymentRequest] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> Payment: - """Refund Payment - -

Returns funds from a completed payment back to the customer's original payment method.

Refund options:

  • Full refund: Return the entire payment amount
  • Partial refund: Specify an amount less than the original payment
  • Multiple partial refunds: Issue several partial refunds until the total payment amount is reached

Limitations:

  • You can only refund payments that have been successfully processed
  • A payment can only be refunded up to its original amount
  • Once fully refunded, a payment cannot be refunded again
  • Attempting to refund more than the remaining available amount will result in an error
- - :param id: The payment ID (required) - :type id: str - :param refund_payment_request: - :type refund_payment_request: RefundPaymentRequest - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._refund_serialize( - id=id, - refund_payment_request=refund_payment_request, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "Payment", - '400': "Error", - '401': "Error", - '404': "Error", - '422': "Error", - '500': "Error", - '503': "Error", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def refund_with_http_info( - self, - id: Annotated[StrictStr, Field(description="The payment ID")], - refund_payment_request: Optional[RefundPaymentRequest] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[Payment]: - """Refund Payment - -

Returns funds from a completed payment back to the customer's original payment method.

Refund options:

  • Full refund: Return the entire payment amount
  • Partial refund: Specify an amount less than the original payment
  • Multiple partial refunds: Issue several partial refunds until the total payment amount is reached

Limitations:

  • You can only refund payments that have been successfully processed
  • A payment can only be refunded up to its original amount
  • Once fully refunded, a payment cannot be refunded again
  • Attempting to refund more than the remaining available amount will result in an error
- - :param id: The payment ID (required) - :type id: str - :param refund_payment_request: - :type refund_payment_request: RefundPaymentRequest - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._refund_serialize( - id=id, - refund_payment_request=refund_payment_request, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "Payment", - '400': "Error", - '401': "Error", - '404': "Error", - '422': "Error", - '500': "Error", - '503': "Error", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def refund_without_preload_content( - self, - id: Annotated[StrictStr, Field(description="The payment ID")], - refund_payment_request: Optional[RefundPaymentRequest] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """Refund Payment - -

Returns funds from a completed payment back to the customer's original payment method.

Refund options:

  • Full refund: Return the entire payment amount
  • Partial refund: Specify an amount less than the original payment
  • Multiple partial refunds: Issue several partial refunds until the total payment amount is reached

Limitations:

  • You can only refund payments that have been successfully processed
  • A payment can only be refunded up to its original amount
  • Once fully refunded, a payment cannot be refunded again
  • Attempting to refund more than the remaining available amount will result in an error
- - :param id: The payment ID (required) - :type id: str - :param refund_payment_request: - :type refund_payment_request: RefundPaymentRequest - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._refund_serialize( - id=id, - refund_payment_request=refund_payment_request, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "Payment", - '400': "Error", - '401': "Error", - '404': "Error", - '422': "Error", - '500': "Error", - '503': "Error", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _refund_serialize( self, id, - refund_payment_request, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - if id is not None: - _path_params['id'] = id - # process the query parameters - # process the header parameters - # process the form parameters - # process the body parameter - if refund_payment_request is not None: - _body_params = refund_payment_request - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - # set the HTTP header `Content-Type` - if _content_type: - _header_params['Content-Type'] = _content_type - else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/json' - ] - ) - ) - if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type - - # authentication setting - _auth_settings: List[str] = [ - 'APIKey' - ] - - return self.api_client.param_serialize( - method='POST', - resource_path='/payments/{id}/refund', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - - @validate_call + **kwargs + ): + """Refund Payment # noqa: E501 + +

Returns funds from a completed payment back to the customer's original payment method.

Refund options:

  • Full refund: Return the entire payment amount
  • Partial refund: Specify an amount less than the original payment
  • Multiple partial refunds: Issue several partial refunds until the total payment amount is reached

Limitations:

  • You can only refund payments that have been successfully processed
  • A payment can only be refunded up to its original amount
  • Once fully refunded, a payment cannot be refunded again
  • Attempting to refund more than the remaining available amount will result in an error
# noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.refund(id, async_req=True) + >>> result = thread.get() + + Args: + id (str): The payment ID + + Keyword Args: + refund_payment_request (RefundPaymentRequest): [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 + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None + async_req (bool): execute request asynchronously + + Returns: + Payment + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + kwargs['id'] = \ + id + return self.refund_endpoint.call_with_http_info(**kwargs) + def send_link( - self, - id: Annotated[StrictStr, Field(description="The payment ID")], - send_payment_link_request: Optional[SendPaymentLinkRequest] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> Payment: - """Send Payment Link - -

Sends a payment link to the customer through their preferred communication channel.

This API can only be used for payments with the following status:

  • Pending

Delivery channels are automatically selected based on available customer information:

  • If customer email is available: Link is sent via email
  • If customer phone is available: Link is sent via WhatsApp
  • If WhatsApp delivery fails: Link is sent via SMS as a fallback

The payment link allows customers to complete the payment at their convenience using their preferred payment method on the secure MONEI payment page. If no customer contact information is provided, the system will use the details stored in the payment record.

- - :param id: The payment ID (required) - :type id: str - :param send_payment_link_request: - :type send_payment_link_request: SendPaymentLinkRequest - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._send_link_serialize( - id=id, - send_payment_link_request=send_payment_link_request, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "Payment", - '400': "Error", - '401': "Error", - '404': "Error", - '422': "Error", - '500': "Error", - '503': "Error", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def send_link_with_http_info( - self, - id: Annotated[StrictStr, Field(description="The payment ID")], - send_payment_link_request: Optional[SendPaymentLinkRequest] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[Payment]: - """Send Payment Link - -

Sends a payment link to the customer through their preferred communication channel.

This API can only be used for payments with the following status:

  • Pending

Delivery channels are automatically selected based on available customer information:

  • If customer email is available: Link is sent via email
  • If customer phone is available: Link is sent via WhatsApp
  • If WhatsApp delivery fails: Link is sent via SMS as a fallback

The payment link allows customers to complete the payment at their convenience using their preferred payment method on the secure MONEI payment page. If no customer contact information is provided, the system will use the details stored in the payment record.

- - :param id: The payment ID (required) - :type id: str - :param send_payment_link_request: - :type send_payment_link_request: SendPaymentLinkRequest - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._send_link_serialize( - id=id, - send_payment_link_request=send_payment_link_request, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "Payment", - '400': "Error", - '401': "Error", - '404': "Error", - '422': "Error", - '500': "Error", - '503': "Error", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def send_link_without_preload_content( - self, - id: Annotated[StrictStr, Field(description="The payment ID")], - send_payment_link_request: Optional[SendPaymentLinkRequest] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """Send Payment Link - -

Sends a payment link to the customer through their preferred communication channel.

This API can only be used for payments with the following status:

  • Pending

Delivery channels are automatically selected based on available customer information:

  • If customer email is available: Link is sent via email
  • If customer phone is available: Link is sent via WhatsApp
  • If WhatsApp delivery fails: Link is sent via SMS as a fallback

The payment link allows customers to complete the payment at their convenience using their preferred payment method on the secure MONEI payment page. If no customer contact information is provided, the system will use the details stored in the payment record.

- - :param id: The payment ID (required) - :type id: str - :param send_payment_link_request: - :type send_payment_link_request: SendPaymentLinkRequest - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._send_link_serialize( - id=id, - send_payment_link_request=send_payment_link_request, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "Payment", - '400': "Error", - '401': "Error", - '404': "Error", - '422': "Error", - '500': "Error", - '503': "Error", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _send_link_serialize( self, id, - send_payment_link_request, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - if id is not None: - _path_params['id'] = id - # process the query parameters - # process the header parameters - # process the form parameters - # process the body parameter - if send_payment_link_request is not None: - _body_params = send_payment_link_request - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - # set the HTTP header `Content-Type` - if _content_type: - _header_params['Content-Type'] = _content_type - else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/json' - ] - ) - ) - if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type - - # authentication setting - _auth_settings: List[str] = [ - 'APIKey' - ] - - return self.api_client.param_serialize( - method='POST', - resource_path='/payments/{id}/link', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - - @validate_call + **kwargs + ): + """Send Payment Link # noqa: E501 + +

Sends a payment link to the customer through their preferred communication channel.

This API can only be used for payments with the following status:

  • Pending

Delivery channels are automatically selected based on available customer information:

  • If customer email is available: Link is sent via email
  • If customer phone is available: Link is sent via WhatsApp
  • If WhatsApp delivery fails: Link is sent via SMS as a fallback

The payment link allows customers to complete the payment at their convenience using their preferred payment method on the secure MONEI payment page. If no customer contact information is provided, the system will use the details stored in the payment record.

# noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.send_link(id, async_req=True) + >>> result = thread.get() + + Args: + id (str): The payment ID + + Keyword Args: + send_payment_link_request (SendPaymentLinkRequest): [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 + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None + async_req (bool): execute request asynchronously + + Returns: + Payment + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + kwargs['id'] = \ + id + return self.send_link_endpoint.call_with_http_info(**kwargs) + def send_receipt( - self, - id: Annotated[StrictStr, Field(description="The payment ID")], - send_payment_receipt_request: Optional[SendPaymentReceiptRequest] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> Payment: - """Send Payment Receipt - -

Sends a payment receipt to the customer through their preferred communication channel.

This API can only be used for payments with the following status:

  • Succeeded

Delivery channels are automatically selected based on available customer information:

  • If customer email is available: Receipt is sent via email
  • If customer phone is available: Receipt is sent via WhatsApp
  • If WhatsApp delivery fails: Receipt is sent via SMS as a fallback

The receipt includes payment details such as amount, date, transaction ID, and merchant information, providing customers with a record of their successful transaction. If no customer contact information is provided, the system will use the details stored in the payment record.

- - :param id: The payment ID (required) - :type id: str - :param send_payment_receipt_request: - :type send_payment_receipt_request: SendPaymentReceiptRequest - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._send_receipt_serialize( - id=id, - send_payment_receipt_request=send_payment_receipt_request, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "Payment", - '400': "Error", - '401': "Error", - '404': "Error", - '422': "Error", - '500': "Error", - '503': "Error", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def send_receipt_with_http_info( - self, - id: Annotated[StrictStr, Field(description="The payment ID")], - send_payment_receipt_request: Optional[SendPaymentReceiptRequest] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[Payment]: - """Send Payment Receipt - -

Sends a payment receipt to the customer through their preferred communication channel.

This API can only be used for payments with the following status:

  • Succeeded

Delivery channels are automatically selected based on available customer information:

  • If customer email is available: Receipt is sent via email
  • If customer phone is available: Receipt is sent via WhatsApp
  • If WhatsApp delivery fails: Receipt is sent via SMS as a fallback

The receipt includes payment details such as amount, date, transaction ID, and merchant information, providing customers with a record of their successful transaction. If no customer contact information is provided, the system will use the details stored in the payment record.

- - :param id: The payment ID (required) - :type id: str - :param send_payment_receipt_request: - :type send_payment_receipt_request: SendPaymentReceiptRequest - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._send_receipt_serialize( - id=id, - send_payment_receipt_request=send_payment_receipt_request, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "Payment", - '400': "Error", - '401': "Error", - '404': "Error", - '422': "Error", - '500': "Error", - '503': "Error", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def send_receipt_without_preload_content( - self, - id: Annotated[StrictStr, Field(description="The payment ID")], - send_payment_receipt_request: Optional[SendPaymentReceiptRequest] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """Send Payment Receipt - -

Sends a payment receipt to the customer through their preferred communication channel.

This API can only be used for payments with the following status:

  • Succeeded

Delivery channels are automatically selected based on available customer information:

  • If customer email is available: Receipt is sent via email
  • If customer phone is available: Receipt is sent via WhatsApp
  • If WhatsApp delivery fails: Receipt is sent via SMS as a fallback

The receipt includes payment details such as amount, date, transaction ID, and merchant information, providing customers with a record of their successful transaction. If no customer contact information is provided, the system will use the details stored in the payment record.

- - :param id: The payment ID (required) - :type id: str - :param send_payment_receipt_request: - :type send_payment_receipt_request: SendPaymentReceiptRequest - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._send_receipt_serialize( - id=id, - send_payment_receipt_request=send_payment_receipt_request, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "Payment", - '400': "Error", - '401': "Error", - '404': "Error", - '422': "Error", - '500': "Error", - '503': "Error", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _send_receipt_serialize( self, id, - send_payment_receipt_request, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - if id is not None: - _path_params['id'] = id - # process the query parameters - # process the header parameters - # process the form parameters - # process the body parameter - if send_payment_receipt_request is not None: - _body_params = send_payment_receipt_request - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - # set the HTTP header `Content-Type` - if _content_type: - _header_params['Content-Type'] = _content_type - else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/json' - ] - ) - ) - if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type - - # authentication setting - _auth_settings: List[str] = [ - 'APIKey' - ] - - return self.api_client.param_serialize( - method='POST', - resource_path='/payments/{id}/receipt', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - - @validate_call + **kwargs + ): + """Send Payment Receipt # noqa: E501 + +

Sends a payment receipt to the customer through their preferred communication channel.

This API can only be used for payments with the following status:

  • Succeeded

Delivery channels are automatically selected based on available customer information:

  • If customer email is available: Receipt is sent via email
  • If customer phone is available: Receipt is sent via WhatsApp
  • If WhatsApp delivery fails: Receipt is sent via SMS as a fallback

The receipt includes payment details such as amount, date, transaction ID, and merchant information, providing customers with a record of their successful transaction. If no customer contact information is provided, the system will use the details stored in the payment record.

# noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.send_receipt(id, async_req=True) + >>> result = thread.get() + + Args: + id (str): The payment ID + + Keyword Args: + send_payment_receipt_request (SendPaymentReceiptRequest): [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 + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None + async_req (bool): execute request asynchronously + + Returns: + Payment + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + kwargs['id'] = \ + id + return self.send_receipt_endpoint.call_with_http_info(**kwargs) + def send_request( - self, - id: Annotated[StrictStr, Field(description="The payment ID")], - send_payment_request_request: SendPaymentRequestRequest, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> Payment: - """Send Payment Request - -

Sends a direct payment request to the customer's phone with smart channel selection.

Smart delivery logic based on customer phone capabilities:

  • If the phone number is registered with Bizum and that payment method is available: The customer receives a push notification in their banking app to instantly approve the payment
  • If Bizum is not available or the phone is not registered with Bizum: The customer receives a payment link via WhatsApp to complete the payment

This endpoint provides a streamlined payment experience, especially for Spanish customers with Bizum integration, enabling quick and convenient mobile payments.

- - :param id: The payment ID (required) - :type id: str - :param send_payment_request_request: (required) - :type send_payment_request_request: SendPaymentRequestRequest - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._send_request_serialize( - id=id, - send_payment_request_request=send_payment_request_request, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "Payment", - '400': "Error", - '401': "Error", - '404': "Error", - '422': "Error", - '500': "Error", - '503': "Error", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def send_request_with_http_info( - self, - id: Annotated[StrictStr, Field(description="The payment ID")], - send_payment_request_request: SendPaymentRequestRequest, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[Payment]: - """Send Payment Request - -

Sends a direct payment request to the customer's phone with smart channel selection.

Smart delivery logic based on customer phone capabilities:

  • If the phone number is registered with Bizum and that payment method is available: The customer receives a push notification in their banking app to instantly approve the payment
  • If Bizum is not available or the phone is not registered with Bizum: The customer receives a payment link via WhatsApp to complete the payment

This endpoint provides a streamlined payment experience, especially for Spanish customers with Bizum integration, enabling quick and convenient mobile payments.

- - :param id: The payment ID (required) - :type id: str - :param send_payment_request_request: (required) - :type send_payment_request_request: SendPaymentRequestRequest - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._send_request_serialize( - id=id, - send_payment_request_request=send_payment_request_request, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "Payment", - '400': "Error", - '401': "Error", - '404': "Error", - '422': "Error", - '500': "Error", - '503': "Error", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def send_request_without_preload_content( - self, - id: Annotated[StrictStr, Field(description="The payment ID")], - send_payment_request_request: SendPaymentRequestRequest, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """Send Payment Request - -

Sends a direct payment request to the customer's phone with smart channel selection.

Smart delivery logic based on customer phone capabilities:

  • If the phone number is registered with Bizum and that payment method is available: The customer receives a push notification in their banking app to instantly approve the payment
  • If Bizum is not available or the phone is not registered with Bizum: The customer receives a payment link via WhatsApp to complete the payment

This endpoint provides a streamlined payment experience, especially for Spanish customers with Bizum integration, enabling quick and convenient mobile payments.

- - :param id: The payment ID (required) - :type id: str - :param send_payment_request_request: (required) - :type send_payment_request_request: SendPaymentRequestRequest - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._send_request_serialize( - id=id, - send_payment_request_request=send_payment_request_request, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "Payment", - '400': "Error", - '401': "Error", - '404': "Error", - '422': "Error", - '500': "Error", - '503': "Error", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _send_request_serialize( self, id, send_payment_request_request, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - if id is not None: - _path_params['id'] = id - # process the query parameters - # process the header parameters - # process the form parameters - # process the body parameter - if send_payment_request_request is not None: - _body_params = send_payment_request_request - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - # set the HTTP header `Content-Type` - if _content_type: - _header_params['Content-Type'] = _content_type - else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/json' - ] - ) - ) - if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type - - # authentication setting - _auth_settings: List[str] = [ - 'APIKey' - ] - - return self.api_client.param_serialize( - method='POST', - resource_path='/payments/{id}/rtp', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - + **kwargs + ): + """Send Payment Request # noqa: E501 + +

Sends a direct payment request to the customer's phone with smart channel selection.

Smart delivery logic based on customer phone capabilities:

  • If the phone number is registered with Bizum and that payment method is available: The customer receives a push notification in their banking app to instantly approve the payment
  • If Bizum is not available or the phone is not registered with Bizum: The customer receives a payment link via WhatsApp to complete the payment

This endpoint provides a streamlined payment experience, especially for Spanish customers with Bizum integration, enabling quick and convenient mobile payments.

# noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.send_request(id, send_payment_request_request, async_req=True) + >>> result = thread.get() + + Args: + id (str): The payment ID + send_payment_request_request (SendPaymentRequestRequest): + + Keyword Args: + _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 + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None + async_req (bool): execute request asynchronously + + Returns: + Payment + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + kwargs['id'] = \ + id + kwargs['send_payment_request_request'] = \ + send_payment_request_request + return self.send_request_endpoint.call_with_http_info(**kwargs) diff --git a/Monei/api/subscriptions_api.py b/Monei/api/subscriptions_api.py index 38d0e91..3b14bef 100644 --- a/Monei/api/subscriptions_api.py +++ b/Monei/api/subscriptions_api.py @@ -1,2738 +1,1304 @@ -# coding: utf-8 - """ MONEI API v1 -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

+

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 + + The version of the OpenAPI document: 1.5.3 + Generated by: https://openapi-generator.tech +""" - The version of the OpenAPI document: 1.5.1 - Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. -""" # noqa: E501 - -import warnings -from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt -from typing import Any, Dict, List, Optional, Tuple, Union -from typing_extensions import Annotated - -from pydantic import Field, StrictStr -from typing import Optional -from typing_extensions import Annotated -from Monei.models.activate_subscription_request import ActivateSubscriptionRequest -from Monei.models.cancel_subscription_request import CancelSubscriptionRequest -from Monei.models.create_subscription_request import CreateSubscriptionRequest -from Monei.models.pause_subscription_request import PauseSubscriptionRequest -from Monei.models.send_subscription_link_request import SendSubscriptionLinkRequest -from Monei.models.send_subscription_status_request import SendSubscriptionStatusRequest -from Monei.models.subscription import Subscription -from Monei.models.update_subscription_request import UpdateSubscriptionRequest - -from Monei.api_client import ApiClient, RequestSerialized -from Monei.api_response import ApiResponse -from Monei.rest import RESTResponseType - - -class SubscriptionsApi: +import re # noqa: F401 +import sys # noqa: F401 + +from Monei.api_client import ApiClient, Endpoint as _Endpoint +from Monei.model_utils import ( # noqa: F401 + check_allowed_values, + check_validations, + date, + datetime, + file_type, + none_type, + validate_and_convert_types +) +from Monei.model.activate_subscription_request import ActivateSubscriptionRequest +from Monei.model.apple_pay_domain_register400_response import ApplePayDomainRegister400Response +from Monei.model.apple_pay_domain_register401_response import ApplePayDomainRegister401Response +from Monei.model.apple_pay_domain_register404_response import ApplePayDomainRegister404Response +from Monei.model.apple_pay_domain_register422_response import ApplePayDomainRegister422Response +from Monei.model.apple_pay_domain_register500_response import ApplePayDomainRegister500Response +from Monei.model.apple_pay_domain_register503_response import ApplePayDomainRegister503Response +from Monei.model.cancel_subscription_request import CancelSubscriptionRequest +from Monei.model.create_subscription_request import CreateSubscriptionRequest +from Monei.model.pause_subscription_request import PauseSubscriptionRequest +from Monei.model.send_subscription_link_request import SendSubscriptionLinkRequest +from Monei.model.send_subscription_status_request import SendSubscriptionStatusRequest +from Monei.model.subscription import Subscription +from Monei.model.update_subscription_request import UpdateSubscriptionRequest + + +class SubscriptionsApi(object): """NOTE: This class is auto generated by OpenAPI Generator Ref: https://openapi-generator.tech Do not edit the class manually. """ - def __init__(self, api_client=None) -> None: + def __init__(self, api_client=None): if api_client is None: - api_client = ApiClient.get_default() + api_client = ApiClient() self.api_client = api_client + self.activate_endpoint = _Endpoint( + settings={ + 'response_type': (Subscription,), + 'auth': [ + 'APIKey' + ], + 'endpoint_path': '/subscriptions/{id}/activate', + 'operation_id': 'activate', + 'http_method': 'POST', + 'servers': None, + }, + params_map={ + 'all': [ + 'id', + 'activate_subscription_request', + ], + 'required': [ + 'id', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + 'id': + (str,), + 'activate_subscription_request': + (ActivateSubscriptionRequest,), + }, + 'attribute_map': { + 'id': 'id', + }, + 'location_map': { + 'id': 'path', + 'activate_subscription_request': 'body', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [ + 'application/json' + ] + }, + api_client=api_client + ) + self.cancel_endpoint = _Endpoint( + settings={ + 'response_type': (Subscription,), + 'auth': [ + 'APIKey' + ], + 'endpoint_path': '/subscriptions/{id}/cancel', + 'operation_id': 'cancel', + 'http_method': 'POST', + 'servers': None, + }, + params_map={ + 'all': [ + 'id', + 'cancel_subscription_request', + ], + 'required': [ + 'id', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + 'id': + (str,), + 'cancel_subscription_request': + (CancelSubscriptionRequest,), + }, + 'attribute_map': { + 'id': 'id', + }, + 'location_map': { + 'id': 'path', + 'cancel_subscription_request': 'body', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [ + 'application/json' + ] + }, + api_client=api_client + ) + self.create_endpoint = _Endpoint( + settings={ + 'response_type': (Subscription,), + 'auth': [ + 'APIKey' + ], + 'endpoint_path': '/subscriptions', + 'operation_id': 'create', + 'http_method': 'POST', + 'servers': None, + }, + params_map={ + 'all': [ + 'create_subscription_request', + ], + 'required': [ + 'create_subscription_request', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + 'create_subscription_request': + (CreateSubscriptionRequest,), + }, + 'attribute_map': { + }, + 'location_map': { + 'create_subscription_request': 'body', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [ + 'application/json' + ] + }, + api_client=api_client + ) + self.get_endpoint = _Endpoint( + settings={ + 'response_type': (Subscription,), + 'auth': [ + 'APIKey' + ], + 'endpoint_path': '/subscriptions/{id}', + 'operation_id': 'get', + 'http_method': 'GET', + 'servers': None, + }, + params_map={ + 'all': [ + 'id', + ], + 'required': [ + 'id', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + 'id': + (str,), + }, + 'attribute_map': { + 'id': 'id', + }, + 'location_map': { + 'id': 'path', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [], + }, + api_client=api_client + ) + self.pause_endpoint = _Endpoint( + settings={ + 'response_type': (Subscription,), + 'auth': [ + 'APIKey' + ], + 'endpoint_path': '/subscriptions/{id}/pause', + 'operation_id': 'pause', + 'http_method': 'POST', + 'servers': None, + }, + params_map={ + 'all': [ + 'id', + 'pause_subscription_request', + ], + 'required': [ + 'id', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + 'id': + (str,), + 'pause_subscription_request': + (PauseSubscriptionRequest,), + }, + 'attribute_map': { + 'id': 'id', + }, + 'location_map': { + 'id': 'path', + 'pause_subscription_request': 'body', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [ + 'application/json' + ] + }, + api_client=api_client + ) + self.resume_endpoint = _Endpoint( + settings={ + 'response_type': (Subscription,), + 'auth': [ + 'APIKey' + ], + 'endpoint_path': '/subscriptions/{id}/resume', + 'operation_id': 'resume', + 'http_method': 'POST', + 'servers': None, + }, + params_map={ + 'all': [ + 'id', + ], + 'required': [ + 'id', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + 'id': + (str,), + }, + 'attribute_map': { + 'id': 'id', + }, + 'location_map': { + 'id': 'path', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [], + }, + api_client=api_client + ) + self.send_link_endpoint = _Endpoint( + settings={ + 'response_type': (Subscription,), + 'auth': [ + 'APIKey' + ], + 'endpoint_path': '/subscriptions/{id}/link', + 'operation_id': 'send_link', + 'http_method': 'POST', + 'servers': None, + }, + params_map={ + 'all': [ + 'id', + 'send_subscription_link_request', + ], + 'required': [ + 'id', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + 'id': + (str,), + 'send_subscription_link_request': + (SendSubscriptionLinkRequest,), + }, + 'attribute_map': { + 'id': 'id', + }, + 'location_map': { + 'id': 'path', + 'send_subscription_link_request': 'body', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [ + 'application/json' + ] + }, + api_client=api_client + ) + self.send_status_endpoint = _Endpoint( + settings={ + 'response_type': (Subscription,), + 'auth': [ + 'APIKey' + ], + 'endpoint_path': '/subscriptions/{id}/status', + 'operation_id': 'send_status', + 'http_method': 'POST', + 'servers': None, + }, + params_map={ + 'all': [ + 'id', + 'send_subscription_status_request', + ], + 'required': [ + 'id', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + 'id': + (str,), + 'send_subscription_status_request': + (SendSubscriptionStatusRequest,), + }, + 'attribute_map': { + 'id': 'id', + }, + 'location_map': { + 'id': 'path', + 'send_subscription_status_request': 'body', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [ + 'application/json' + ] + }, + api_client=api_client + ) + self.update_endpoint = _Endpoint( + settings={ + 'response_type': (Subscription,), + 'auth': [ + 'APIKey' + ], + 'endpoint_path': '/subscriptions/{id}', + 'operation_id': 'update', + 'http_method': 'PUT', + 'servers': None, + }, + params_map={ + 'all': [ + 'id', + 'update_subscription_request', + ], + 'required': [ + 'id', + 'update_subscription_request', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + 'id': + (str,), + 'update_subscription_request': + (UpdateSubscriptionRequest,), + }, + 'attribute_map': { + 'id': 'id', + }, + 'location_map': { + 'id': 'path', + 'update_subscription_request': 'body', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [ + 'application/json' + ] + }, + api_client=api_client + ) - - @validate_call def activate( - self, - id: Annotated[StrictStr, Field(description="The subscription ID")], - activate_subscription_request: Optional[ActivateSubscriptionRequest] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> Subscription: - """Activate Subscription - -

Activates a subscription by attaching a payment method and initiating the billing cycle.

Activation Process:

  1. This endpoint transitions a PENDING subscription to ACTIVE status
  2. An initial payment is created to validate the payment method:
    • For regular subscriptions: First billing cycle payment is processed immediately
    • For trial subscriptions: A zero-amount payment is created to verify the payment method

Payment Method Updates: If the subscription is already active, this endpoint can be used to update the payment method. The update process creates a zero-amount payment to verify the new payment method works correctly.

Important Notes:

  • Subscription billing begins immediately upon successful activation (unless in trial period)
  • The payment method provided will be used for all future recurring charges
  • Activation failures (due to invalid payment method) will keep the subscription in PENDING status
- - :param id: The subscription ID (required) - :type id: str - :param activate_subscription_request: - :type activate_subscription_request: ActivateSubscriptionRequest - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._activate_serialize( - id=id, - activate_subscription_request=activate_subscription_request, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "Subscription", - '400': "Error", - '401': "Error", - '404': "Error", - '422': "Error", - '500': "Error", - '503': "Error", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def activate_with_http_info( - self, - id: Annotated[StrictStr, Field(description="The subscription ID")], - activate_subscription_request: Optional[ActivateSubscriptionRequest] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[Subscription]: - """Activate Subscription - -

Activates a subscription by attaching a payment method and initiating the billing cycle.

Activation Process:

  1. This endpoint transitions a PENDING subscription to ACTIVE status
  2. An initial payment is created to validate the payment method:
    • For regular subscriptions: First billing cycle payment is processed immediately
    • For trial subscriptions: A zero-amount payment is created to verify the payment method

Payment Method Updates: If the subscription is already active, this endpoint can be used to update the payment method. The update process creates a zero-amount payment to verify the new payment method works correctly.

Important Notes:

  • Subscription billing begins immediately upon successful activation (unless in trial period)
  • The payment method provided will be used for all future recurring charges
  • Activation failures (due to invalid payment method) will keep the subscription in PENDING status
- - :param id: The subscription ID (required) - :type id: str - :param activate_subscription_request: - :type activate_subscription_request: ActivateSubscriptionRequest - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._activate_serialize( - id=id, - activate_subscription_request=activate_subscription_request, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "Subscription", - '400': "Error", - '401': "Error", - '404': "Error", - '422': "Error", - '500': "Error", - '503': "Error", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def activate_without_preload_content( - self, - id: Annotated[StrictStr, Field(description="The subscription ID")], - activate_subscription_request: Optional[ActivateSubscriptionRequest] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """Activate Subscription - -

Activates a subscription by attaching a payment method and initiating the billing cycle.

Activation Process:

  1. This endpoint transitions a PENDING subscription to ACTIVE status
  2. An initial payment is created to validate the payment method:
    • For regular subscriptions: First billing cycle payment is processed immediately
    • For trial subscriptions: A zero-amount payment is created to verify the payment method

Payment Method Updates: If the subscription is already active, this endpoint can be used to update the payment method. The update process creates a zero-amount payment to verify the new payment method works correctly.

Important Notes:

  • Subscription billing begins immediately upon successful activation (unless in trial period)
  • The payment method provided will be used for all future recurring charges
  • Activation failures (due to invalid payment method) will keep the subscription in PENDING status
- - :param id: The subscription ID (required) - :type id: str - :param activate_subscription_request: - :type activate_subscription_request: ActivateSubscriptionRequest - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._activate_serialize( - id=id, - activate_subscription_request=activate_subscription_request, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "Subscription", - '400': "Error", - '401': "Error", - '404': "Error", - '422': "Error", - '500': "Error", - '503': "Error", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _activate_serialize( self, id, - activate_subscription_request, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - if id is not None: - _path_params['id'] = id - # process the query parameters - # process the header parameters - # process the form parameters - # process the body parameter - if activate_subscription_request is not None: - _body_params = activate_subscription_request - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - # set the HTTP header `Content-Type` - if _content_type: - _header_params['Content-Type'] = _content_type - else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/json' - ] - ) - ) - if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type - - # authentication setting - _auth_settings: List[str] = [ - 'APIKey' - ] - - return self.api_client.param_serialize( - method='POST', - resource_path='/subscriptions/{id}/activate', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - - @validate_call + **kwargs + ): + """Activate Subscription # noqa: E501 + +

Activates a subscription by attaching a payment method and initiating the billing cycle.

Activation Process:

  1. This endpoint transitions a PENDING subscription to ACTIVE status
  2. An initial payment is created to validate the payment method:
    • For regular subscriptions: First billing cycle payment is processed immediately
    • For trial subscriptions: A zero-amount payment is created to verify the payment method

Payment Method Updates: If the subscription is already active, this endpoint can be used to update the payment method. The update process creates a zero-amount payment to verify the new payment method works correctly.

Important Notes:

  • Subscription billing begins immediately upon successful activation (unless in trial period)
  • The payment method provided will be used for all future recurring charges
  • Activation failures (due to invalid payment method) will keep the subscription in PENDING status
# noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.activate(id, async_req=True) + >>> result = thread.get() + + Args: + id (str): The subscription ID + + Keyword Args: + activate_subscription_request (ActivateSubscriptionRequest): [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 + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None + async_req (bool): execute request asynchronously + + Returns: + Subscription + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + kwargs['id'] = \ + id + return self.activate_endpoint.call_with_http_info(**kwargs) + def cancel( - self, - id: Annotated[StrictStr, Field(description="The subscription ID")], - cancel_subscription_request: Optional[CancelSubscriptionRequest] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> Subscription: - """Cancel Subscription - -

Cancels an active subscription, permanently stopping the billing cycle.

Cancellation Effects:

  • The subscription status changes to CANCELED
  • No further charges will be processed
  • Access to subscription services typically ends immediately or at period end (depending on your business rules)

Important Notes:

  • Cancellation is permanent and cannot be undone
  • To restart service, a new subscription must be created
  • Consider using pauseAtPeriodEnd or cancelAtPeriodEnd for softer transitions

Use this endpoint when a customer wishes to completely terminate their subscription.

- - :param id: The subscription ID (required) - :type id: str - :param cancel_subscription_request: - :type cancel_subscription_request: CancelSubscriptionRequest - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._cancel_serialize( - id=id, - cancel_subscription_request=cancel_subscription_request, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "Subscription", - '400': "Error", - '401': "Error", - '404': "Error", - '422': "Error", - '500': "Error", - '503': "Error", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def cancel_with_http_info( - self, - id: Annotated[StrictStr, Field(description="The subscription ID")], - cancel_subscription_request: Optional[CancelSubscriptionRequest] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[Subscription]: - """Cancel Subscription - -

Cancels an active subscription, permanently stopping the billing cycle.

Cancellation Effects:

  • The subscription status changes to CANCELED
  • No further charges will be processed
  • Access to subscription services typically ends immediately or at period end (depending on your business rules)

Important Notes:

  • Cancellation is permanent and cannot be undone
  • To restart service, a new subscription must be created
  • Consider using pauseAtPeriodEnd or cancelAtPeriodEnd for softer transitions

Use this endpoint when a customer wishes to completely terminate their subscription.

- - :param id: The subscription ID (required) - :type id: str - :param cancel_subscription_request: - :type cancel_subscription_request: CancelSubscriptionRequest - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._cancel_serialize( - id=id, - cancel_subscription_request=cancel_subscription_request, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "Subscription", - '400': "Error", - '401': "Error", - '404': "Error", - '422': "Error", - '500': "Error", - '503': "Error", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def cancel_without_preload_content( - self, - id: Annotated[StrictStr, Field(description="The subscription ID")], - cancel_subscription_request: Optional[CancelSubscriptionRequest] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """Cancel Subscription - -

Cancels an active subscription, permanently stopping the billing cycle.

Cancellation Effects:

  • The subscription status changes to CANCELED
  • No further charges will be processed
  • Access to subscription services typically ends immediately or at period end (depending on your business rules)

Important Notes:

  • Cancellation is permanent and cannot be undone
  • To restart service, a new subscription must be created
  • Consider using pauseAtPeriodEnd or cancelAtPeriodEnd for softer transitions

Use this endpoint when a customer wishes to completely terminate their subscription.

- - :param id: The subscription ID (required) - :type id: str - :param cancel_subscription_request: - :type cancel_subscription_request: CancelSubscriptionRequest - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._cancel_serialize( - id=id, - cancel_subscription_request=cancel_subscription_request, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "Subscription", - '400': "Error", - '401': "Error", - '404': "Error", - '422': "Error", - '500': "Error", - '503': "Error", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _cancel_serialize( self, id, - cancel_subscription_request, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - if id is not None: - _path_params['id'] = id - # process the query parameters - # process the header parameters - # process the form parameters - # process the body parameter - if cancel_subscription_request is not None: - _body_params = cancel_subscription_request - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - # set the HTTP header `Content-Type` - if _content_type: - _header_params['Content-Type'] = _content_type - else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/json' - ] - ) - ) - if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type - - # authentication setting - _auth_settings: List[str] = [ - 'APIKey' - ] - - return self.api_client.param_serialize( - method='POST', - resource_path='/subscriptions/{id}/cancel', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - - @validate_call + **kwargs + ): + """Cancel Subscription # noqa: E501 + +

Cancels an active subscription, permanently stopping the billing cycle.

Cancellation Effects:

  • The subscription status changes to CANCELED
  • No further charges will be processed
  • Access to subscription services typically ends immediately or at period end (depending on your business rules)

Important Notes:

  • Cancellation is permanent and cannot be undone
  • To restart service, a new subscription must be created
  • Consider using pauseAtPeriodEnd or cancelAtPeriodEnd for softer transitions

Use this endpoint when a customer wishes to completely terminate their subscription.

# 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(id, async_req=True) + >>> result = thread.get() + + Args: + id (str): The subscription ID + + Keyword Args: + cancel_subscription_request (CancelSubscriptionRequest): [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 + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None + async_req (bool): execute request asynchronously + + Returns: + Subscription + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + kwargs['id'] = \ + id + return self.cancel_endpoint.call_with_http_info(**kwargs) + def create( - self, - create_subscription_request: CreateSubscriptionRequest, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> Subscription: - """Create Subscription - -

Creates a new subscription with the specified parameters.

Subscription Lifecycle:

  1. When first created, the subscription has a PENDING status
  2. To initiate billing, you must call the activate endpoint with payment details
  3. Once activated, the subscription will automatically bill according to the configured interval

Key Configuration Parameters:

  • Billing settings: Amount, currency, interval (daily, weekly, monthly, yearly)
  • Schedule customization: Interval count, trial period duration
  • Customer information: Contact details, billing and shipping addresses
  • Communication: Callback URLs for webhook notifications about subscription events

Best Practices:

  • Set clear, descriptive names for subscriptions to help with identification
  • Configure appropriate webhook notifications to monitor subscription status changes
  • Consider offering trial periods to increase customer conversion rates
  • Use metadata to store additional information relevant to your business logic
- - :param create_subscription_request: (required) - :type create_subscription_request: CreateSubscriptionRequest - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._create_serialize( - create_subscription_request=create_subscription_request, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "Subscription", - '400': "Error", - '401': "Error", - '404': "Error", - '422': "Error", - '500': "Error", - '503': "Error", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def create_with_http_info( - self, - create_subscription_request: CreateSubscriptionRequest, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[Subscription]: - """Create Subscription - -

Creates a new subscription with the specified parameters.

Subscription Lifecycle:

  1. When first created, the subscription has a PENDING status
  2. To initiate billing, you must call the activate endpoint with payment details
  3. Once activated, the subscription will automatically bill according to the configured interval

Key Configuration Parameters:

  • Billing settings: Amount, currency, interval (daily, weekly, monthly, yearly)
  • Schedule customization: Interval count, trial period duration
  • Customer information: Contact details, billing and shipping addresses
  • Communication: Callback URLs for webhook notifications about subscription events

Best Practices:

  • Set clear, descriptive names for subscriptions to help with identification
  • Configure appropriate webhook notifications to monitor subscription status changes
  • Consider offering trial periods to increase customer conversion rates
  • Use metadata to store additional information relevant to your business logic
- - :param create_subscription_request: (required) - :type create_subscription_request: CreateSubscriptionRequest - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._create_serialize( - create_subscription_request=create_subscription_request, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "Subscription", - '400': "Error", - '401': "Error", - '404': "Error", - '422': "Error", - '500': "Error", - '503': "Error", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def create_without_preload_content( - self, - create_subscription_request: CreateSubscriptionRequest, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """Create Subscription - -

Creates a new subscription with the specified parameters.

Subscription Lifecycle:

  1. When first created, the subscription has a PENDING status
  2. To initiate billing, you must call the activate endpoint with payment details
  3. Once activated, the subscription will automatically bill according to the configured interval

Key Configuration Parameters:

  • Billing settings: Amount, currency, interval (daily, weekly, monthly, yearly)
  • Schedule customization: Interval count, trial period duration
  • Customer information: Contact details, billing and shipping addresses
  • Communication: Callback URLs for webhook notifications about subscription events

Best Practices:

  • Set clear, descriptive names for subscriptions to help with identification
  • Configure appropriate webhook notifications to monitor subscription status changes
  • Consider offering trial periods to increase customer conversion rates
  • Use metadata to store additional information relevant to your business logic
- - :param create_subscription_request: (required) - :type create_subscription_request: CreateSubscriptionRequest - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._create_serialize( - create_subscription_request=create_subscription_request, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "Subscription", - '400': "Error", - '401': "Error", - '404': "Error", - '422': "Error", - '500': "Error", - '503': "Error", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _create_serialize( self, create_subscription_request, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - # process the query parameters - # process the header parameters - # process the form parameters - # process the body parameter - if create_subscription_request is not None: - _body_params = create_subscription_request - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - # set the HTTP header `Content-Type` - if _content_type: - _header_params['Content-Type'] = _content_type - else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/json' - ] - ) - ) - if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type - - # authentication setting - _auth_settings: List[str] = [ - 'APIKey' - ] - - return self.api_client.param_serialize( - method='POST', - resource_path='/subscriptions', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - - @validate_call + **kwargs + ): + """Create Subscription # noqa: E501 + +

Creates a new subscription with the specified parameters.

Subscription Lifecycle:

  1. When first created, the subscription has a PENDING status
  2. To initiate billing, you must call the activate endpoint with payment details
  3. Once activated, the subscription will automatically bill according to the configured interval

Key Configuration Parameters:

  • Billing settings: Amount, currency, interval (daily, weekly, monthly, yearly)
  • Schedule customization: Interval count, trial period duration
  • Customer information: Contact details, billing and shipping addresses
  • Communication: Callback URLs for webhook notifications about subscription events

Best Practices:

  • Set clear, descriptive names for subscriptions to help with identification
  • Configure appropriate webhook notifications to monitor subscription status changes
  • Consider offering trial periods to increase customer conversion rates
  • Use metadata to store additional information relevant to your business logic
# 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(create_subscription_request, async_req=True) + >>> result = thread.get() + + Args: + create_subscription_request (CreateSubscriptionRequest): + + Keyword Args: + _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 + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None + async_req (bool): execute request asynchronously + + Returns: + Subscription + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + kwargs['create_subscription_request'] = \ + create_subscription_request + return self.create_endpoint.call_with_http_info(**kwargs) + def get( - self, - id: Annotated[StrictStr, Field(description="The subscription ID")], - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> Subscription: - """Get Subscription - -

Retrieves the complete details of an existing subscription by its unique ID.

This endpoint returns comprehensive information about the subscription, including:

  • Current status and lifecycle details (active, paused, canceled)
  • Billing configuration (amount, currency, interval)
  • Schedule information (current period, next payment date)
  • Customer and payment method details
  • Payment history (including last payment status)
  • Trial period information (if applicable)

Use this endpoint to check subscription status, verify billing details, or retrieve information needed for customer support inquiries.

- - :param id: The subscription ID (required) - :type id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._get_serialize( - id=id, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "Subscription", - '400': "Error", - '401': "Error", - '404': "Error", - '422': "Error", - '500': "Error", - '503': "Error", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def get_with_http_info( - self, - id: Annotated[StrictStr, Field(description="The subscription ID")], - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[Subscription]: - """Get Subscription - -

Retrieves the complete details of an existing subscription by its unique ID.

This endpoint returns comprehensive information about the subscription, including:

  • Current status and lifecycle details (active, paused, canceled)
  • Billing configuration (amount, currency, interval)
  • Schedule information (current period, next payment date)
  • Customer and payment method details
  • Payment history (including last payment status)
  • Trial period information (if applicable)

Use this endpoint to check subscription status, verify billing details, or retrieve information needed for customer support inquiries.

- - :param id: The subscription ID (required) - :type id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._get_serialize( - id=id, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "Subscription", - '400': "Error", - '401': "Error", - '404': "Error", - '422': "Error", - '500': "Error", - '503': "Error", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def get_without_preload_content( - self, - id: Annotated[StrictStr, Field(description="The subscription ID")], - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """Get Subscription - -

Retrieves the complete details of an existing subscription by its unique ID.

This endpoint returns comprehensive information about the subscription, including:

  • Current status and lifecycle details (active, paused, canceled)
  • Billing configuration (amount, currency, interval)
  • Schedule information (current period, next payment date)
  • Customer and payment method details
  • Payment history (including last payment status)
  • Trial period information (if applicable)

Use this endpoint to check subscription status, verify billing details, or retrieve information needed for customer support inquiries.

- - :param id: The subscription ID (required) - :type id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._get_serialize( - id=id, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "Subscription", - '400': "Error", - '401': "Error", - '404': "Error", - '422': "Error", - '500': "Error", - '503': "Error", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _get_serialize( self, id, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - if id is not None: - _path_params['id'] = id - # process the query parameters - # process the header parameters - # process the form parameters - # process the body parameter - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - 'APIKey' - ] - - return self.api_client.param_serialize( - method='GET', - resource_path='/subscriptions/{id}', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - + **kwargs + ): + """Get Subscription # noqa: E501 + +

Retrieves the complete details of an existing subscription by its unique ID.

This endpoint returns comprehensive information about the subscription, including:

  • Current status and lifecycle details (active, paused, canceled)
  • Billing configuration (amount, currency, interval)
  • Schedule information (current period, next payment date)
  • Customer and payment method details
  • Payment history (including last payment status)
  • Trial period information (if applicable)

Use this endpoint to check subscription status, verify billing details, or retrieve information needed for customer support inquiries.

# 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(id, async_req=True) + >>> result = thread.get() + + Args: + id (str): The subscription ID + + Keyword Args: + _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 + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None + async_req (bool): execute request asynchronously + + Returns: + Subscription + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + kwargs['id'] = \ + id + return self.get_endpoint.call_with_http_info(**kwargs) - - - @validate_call def pause( - self, - id: Annotated[StrictStr, Field(description="The subscription ID")], - pause_subscription_request: Optional[PauseSubscriptionRequest] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> Subscription: - """Pause Subscription - -

Pauses an active subscription, temporarily halting the billing cycle.

Pause Effects:

  • Billing is immediately suspended
  • The subscription status changes to PAUSED
  • No charges will be processed while the subscription remains paused
  • The current billing period end date remains unchanged

Use Cases:

  • Temporary service interruptions
  • Customer vacation or absence periods
  • Account maintenance or dispute resolution

To resume billing, use the resume endpoint.

- - :param id: The subscription ID (required) - :type id: str - :param pause_subscription_request: - :type pause_subscription_request: PauseSubscriptionRequest - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._pause_serialize( - id=id, - pause_subscription_request=pause_subscription_request, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "Subscription", - '400': "Error", - '401': "Error", - '404': "Error", - '422': "Error", - '500': "Error", - '503': "Error", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def pause_with_http_info( - self, - id: Annotated[StrictStr, Field(description="The subscription ID")], - pause_subscription_request: Optional[PauseSubscriptionRequest] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[Subscription]: - """Pause Subscription - -

Pauses an active subscription, temporarily halting the billing cycle.

Pause Effects:

  • Billing is immediately suspended
  • The subscription status changes to PAUSED
  • No charges will be processed while the subscription remains paused
  • The current billing period end date remains unchanged

Use Cases:

  • Temporary service interruptions
  • Customer vacation or absence periods
  • Account maintenance or dispute resolution

To resume billing, use the resume endpoint.

- - :param id: The subscription ID (required) - :type id: str - :param pause_subscription_request: - :type pause_subscription_request: PauseSubscriptionRequest - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._pause_serialize( - id=id, - pause_subscription_request=pause_subscription_request, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "Subscription", - '400': "Error", - '401': "Error", - '404': "Error", - '422': "Error", - '500': "Error", - '503': "Error", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def pause_without_preload_content( - self, - id: Annotated[StrictStr, Field(description="The subscription ID")], - pause_subscription_request: Optional[PauseSubscriptionRequest] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """Pause Subscription - -

Pauses an active subscription, temporarily halting the billing cycle.

Pause Effects:

  • Billing is immediately suspended
  • The subscription status changes to PAUSED
  • No charges will be processed while the subscription remains paused
  • The current billing period end date remains unchanged

Use Cases:

  • Temporary service interruptions
  • Customer vacation or absence periods
  • Account maintenance or dispute resolution

To resume billing, use the resume endpoint.

- - :param id: The subscription ID (required) - :type id: str - :param pause_subscription_request: - :type pause_subscription_request: PauseSubscriptionRequest - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._pause_serialize( - id=id, - pause_subscription_request=pause_subscription_request, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "Subscription", - '400': "Error", - '401': "Error", - '404': "Error", - '422': "Error", - '500': "Error", - '503': "Error", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _pause_serialize( self, id, - pause_subscription_request, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - if id is not None: - _path_params['id'] = id - # process the query parameters - # process the header parameters - # process the form parameters - # process the body parameter - if pause_subscription_request is not None: - _body_params = pause_subscription_request - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - # set the HTTP header `Content-Type` - if _content_type: - _header_params['Content-Type'] = _content_type - else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/json' - ] - ) - ) - if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type - - # authentication setting - _auth_settings: List[str] = [ - 'APIKey' - ] - - return self.api_client.param_serialize( - method='POST', - resource_path='/subscriptions/{id}/pause', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - - @validate_call + **kwargs + ): + """Pause Subscription # noqa: E501 + +

Pauses an active subscription, temporarily halting the billing cycle.

Pause Effects:

  • Billing is immediately suspended
  • The subscription status changes to PAUSED
  • No charges will be processed while the subscription remains paused
  • The current billing period end date remains unchanged

Use Cases:

  • Temporary service interruptions
  • Customer vacation or absence periods
  • Account maintenance or dispute resolution

To resume billing, use the resume endpoint.

# noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.pause(id, async_req=True) + >>> result = thread.get() + + Args: + id (str): The subscription ID + + Keyword Args: + pause_subscription_request (PauseSubscriptionRequest): [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 + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None + async_req (bool): execute request asynchronously + + Returns: + Subscription + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + kwargs['id'] = \ + id + return self.pause_endpoint.call_with_http_info(**kwargs) + def resume( - self, - id: Annotated[StrictStr, Field(description="The subscription ID")], - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> Subscription: - """Resume Subscription - -

Resumes a previously paused subscription, reactivating the billing cycle.

Resume Effects:

  • Billing is immediately reactivated
  • The subscription status changes from PAUSED to ACTIVE
  • The next billing date is recalculated based on the current date
  • Regular charging schedule resumes according to the subscription interval

Important Notes:

  • No immediate charge is created when resuming (billing continues on next scheduled date)
  • Any pause duration is added to the current billing period, maintaining the expected number of billing cycles
  • If a significant time has passed, verify that the payment method is still valid
- - :param id: The subscription ID (required) - :type id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._resume_serialize( - id=id, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "Subscription", - '400': "Error", - '401': "Error", - '404': "Error", - '422': "Error", - '500': "Error", - '503': "Error", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def resume_with_http_info( - self, - id: Annotated[StrictStr, Field(description="The subscription ID")], - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[Subscription]: - """Resume Subscription - -

Resumes a previously paused subscription, reactivating the billing cycle.

Resume Effects:

  • Billing is immediately reactivated
  • The subscription status changes from PAUSED to ACTIVE
  • The next billing date is recalculated based on the current date
  • Regular charging schedule resumes according to the subscription interval

Important Notes:

  • No immediate charge is created when resuming (billing continues on next scheduled date)
  • Any pause duration is added to the current billing period, maintaining the expected number of billing cycles
  • If a significant time has passed, verify that the payment method is still valid
- - :param id: The subscription ID (required) - :type id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._resume_serialize( - id=id, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "Subscription", - '400': "Error", - '401': "Error", - '404': "Error", - '422': "Error", - '500': "Error", - '503': "Error", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def resume_without_preload_content( - self, - id: Annotated[StrictStr, Field(description="The subscription ID")], - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """Resume Subscription - -

Resumes a previously paused subscription, reactivating the billing cycle.

Resume Effects:

  • Billing is immediately reactivated
  • The subscription status changes from PAUSED to ACTIVE
  • The next billing date is recalculated based on the current date
  • Regular charging schedule resumes according to the subscription interval

Important Notes:

  • No immediate charge is created when resuming (billing continues on next scheduled date)
  • Any pause duration is added to the current billing period, maintaining the expected number of billing cycles
  • If a significant time has passed, verify that the payment method is still valid
- - :param id: The subscription ID (required) - :type id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._resume_serialize( - id=id, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "Subscription", - '400': "Error", - '401': "Error", - '404': "Error", - '422': "Error", - '500': "Error", - '503': "Error", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _resume_serialize( self, id, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - if id is not None: - _path_params['id'] = id - # process the query parameters - # process the header parameters - # process the form parameters - # process the body parameter - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) + **kwargs + ): + """Resume Subscription # noqa: E501 + +

Resumes a previously paused subscription, reactivating the billing cycle.

Resume Effects:

  • Billing is immediately reactivated
  • The subscription status changes from PAUSED to ACTIVE
  • The next billing date is recalculated based on the current date
  • Regular charging schedule resumes according to the subscription interval

Important Notes:

  • No immediate charge is created when resuming (billing continues on next scheduled date)
  • Any pause duration is added to the current billing period, maintaining the expected number of billing cycles
  • If a significant time has passed, verify that the payment method is still valid
# noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.resume(id, async_req=True) + >>> result = thread.get() + + Args: + id (str): The subscription ID + + Keyword Args: + _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 + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None + async_req (bool): execute request asynchronously + + Returns: + Subscription + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + kwargs['id'] = \ + id + return self.resume_endpoint.call_with_http_info(**kwargs) - - # authentication setting - _auth_settings: List[str] = [ - 'APIKey' - ] - - return self.api_client.param_serialize( - method='POST', - resource_path='/subscriptions/{id}/resume', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - - @validate_call def send_link( - self, - id: Annotated[StrictStr, Field(description="The subscription ID")], - send_subscription_link_request: Optional[SendSubscriptionLinkRequest] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> Subscription: - """Send Subscription Link - -

Sends a subscription activation link to the customer through their preferred communication channel.

This API can only be used for subscriptions with the following status:

  • Pending

Delivery channels are automatically selected based on available customer information:

  • If customer email is available: Link is sent via email
  • If customer phone is available: Link is sent via WhatsApp
  • If WhatsApp delivery fails: Link is sent via SMS as a fallback

The subscription activation link allows customers to complete their subscription setup by providing payment details on the secure MONEI payment page. If no customer contact information is provided, the system will use the details stored in the subscription record.

- - :param id: The subscription ID (required) - :type id: str - :param send_subscription_link_request: - :type send_subscription_link_request: SendSubscriptionLinkRequest - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._send_link_serialize( - id=id, - send_subscription_link_request=send_subscription_link_request, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "Subscription", - '400': "Error", - '401': "Error", - '404': "Error", - '422': "Error", - '500': "Error", - '503': "Error", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def send_link_with_http_info( - self, - id: Annotated[StrictStr, Field(description="The subscription ID")], - send_subscription_link_request: Optional[SendSubscriptionLinkRequest] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[Subscription]: - """Send Subscription Link - -

Sends a subscription activation link to the customer through their preferred communication channel.

This API can only be used for subscriptions with the following status:

  • Pending

Delivery channels are automatically selected based on available customer information:

  • If customer email is available: Link is sent via email
  • If customer phone is available: Link is sent via WhatsApp
  • If WhatsApp delivery fails: Link is sent via SMS as a fallback

The subscription activation link allows customers to complete their subscription setup by providing payment details on the secure MONEI payment page. If no customer contact information is provided, the system will use the details stored in the subscription record.

- - :param id: The subscription ID (required) - :type id: str - :param send_subscription_link_request: - :type send_subscription_link_request: SendSubscriptionLinkRequest - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._send_link_serialize( - id=id, - send_subscription_link_request=send_subscription_link_request, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "Subscription", - '400': "Error", - '401': "Error", - '404': "Error", - '422': "Error", - '500': "Error", - '503': "Error", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def send_link_without_preload_content( - self, - id: Annotated[StrictStr, Field(description="The subscription ID")], - send_subscription_link_request: Optional[SendSubscriptionLinkRequest] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """Send Subscription Link - -

Sends a subscription activation link to the customer through their preferred communication channel.

This API can only be used for subscriptions with the following status:

  • Pending

Delivery channels are automatically selected based on available customer information:

  • If customer email is available: Link is sent via email
  • If customer phone is available: Link is sent via WhatsApp
  • If WhatsApp delivery fails: Link is sent via SMS as a fallback

The subscription activation link allows customers to complete their subscription setup by providing payment details on the secure MONEI payment page. If no customer contact information is provided, the system will use the details stored in the subscription record.

- - :param id: The subscription ID (required) - :type id: str - :param send_subscription_link_request: - :type send_subscription_link_request: SendSubscriptionLinkRequest - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._send_link_serialize( - id=id, - send_subscription_link_request=send_subscription_link_request, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "Subscription", - '400': "Error", - '401': "Error", - '404': "Error", - '422': "Error", - '500': "Error", - '503': "Error", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _send_link_serialize( self, id, - send_subscription_link_request, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - if id is not None: - _path_params['id'] = id - # process the query parameters - # process the header parameters - # process the form parameters - # process the body parameter - if send_subscription_link_request is not None: - _body_params = send_subscription_link_request - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - # set the HTTP header `Content-Type` - if _content_type: - _header_params['Content-Type'] = _content_type - else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/json' - ] - ) - ) - if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type - - # authentication setting - _auth_settings: List[str] = [ - 'APIKey' - ] - - return self.api_client.param_serialize( - method='POST', - resource_path='/subscriptions/{id}/link', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - - @validate_call + **kwargs + ): + """Send Subscription Link # noqa: E501 + +

Sends a subscription activation link to the customer through their preferred communication channel.

This API can only be used for subscriptions with the following status:

  • Pending

Delivery channels are automatically selected based on available customer information:

  • If customer email is available: Link is sent via email
  • If customer phone is available: Link is sent via WhatsApp
  • If WhatsApp delivery fails: Link is sent via SMS as a fallback

The subscription activation link allows customers to complete their subscription setup by providing payment details on the secure MONEI payment page. If no customer contact information is provided, the system will use the details stored in the subscription record.

# noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.send_link(id, async_req=True) + >>> result = thread.get() + + Args: + id (str): The subscription ID + + Keyword Args: + send_subscription_link_request (SendSubscriptionLinkRequest): [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 + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None + async_req (bool): execute request asynchronously + + Returns: + Subscription + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + kwargs['id'] = \ + id + return self.send_link_endpoint.call_with_http_info(**kwargs) + def send_status( - self, - id: Annotated[StrictStr, Field(description="The subscription ID")], - send_subscription_status_request: Optional[SendSubscriptionStatusRequest] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> Subscription: - """Send Subscription Status - -

Sends subscription status information to the customer through their preferred communication channel.

This API can only be used for subscriptions with the following statuses:

  • Active
  • Trialing
  • Past due

Delivery channels are automatically selected based on available customer information:

  • If customer email is available: Status is sent via email
  • If customer phone is available: Status is sent via WhatsApp
  • If WhatsApp delivery fails: Status is sent via SMS as a fallback

The status notification includes subscription details such as current status, upcoming payments, and recent changes. If no customer contact information is provided, the system will use the details stored in the subscription record.

Email notifications include contextual action links based on subscription status:

  • For past due subscriptions: A link to reactivate the subscription
  • For active and trialing subscriptions: A link to update the payment method

You can specify the customer's email or phone number, the preferred communication channel (email or SMS), and the language for the message.

- - :param id: The subscription ID (required) - :type id: str - :param send_subscription_status_request: - :type send_subscription_status_request: SendSubscriptionStatusRequest - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._send_status_serialize( - id=id, - send_subscription_status_request=send_subscription_status_request, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "Subscription", - '400': "Error", - '401': "Error", - '404': "Error", - '422': "Error", - '500': "Error", - '503': "Error", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def send_status_with_http_info( - self, - id: Annotated[StrictStr, Field(description="The subscription ID")], - send_subscription_status_request: Optional[SendSubscriptionStatusRequest] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[Subscription]: - """Send Subscription Status - -

Sends subscription status information to the customer through their preferred communication channel.

This API can only be used for subscriptions with the following statuses:

  • Active
  • Trialing
  • Past due

Delivery channels are automatically selected based on available customer information:

  • If customer email is available: Status is sent via email
  • If customer phone is available: Status is sent via WhatsApp
  • If WhatsApp delivery fails: Status is sent via SMS as a fallback

The status notification includes subscription details such as current status, upcoming payments, and recent changes. If no customer contact information is provided, the system will use the details stored in the subscription record.

Email notifications include contextual action links based on subscription status:

  • For past due subscriptions: A link to reactivate the subscription
  • For active and trialing subscriptions: A link to update the payment method

You can specify the customer's email or phone number, the preferred communication channel (email or SMS), and the language for the message.

- - :param id: The subscription ID (required) - :type id: str - :param send_subscription_status_request: - :type send_subscription_status_request: SendSubscriptionStatusRequest - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._send_status_serialize( - id=id, - send_subscription_status_request=send_subscription_status_request, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "Subscription", - '400': "Error", - '401': "Error", - '404': "Error", - '422': "Error", - '500': "Error", - '503': "Error", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def send_status_without_preload_content( - self, - id: Annotated[StrictStr, Field(description="The subscription ID")], - send_subscription_status_request: Optional[SendSubscriptionStatusRequest] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """Send Subscription Status - -

Sends subscription status information to the customer through their preferred communication channel.

This API can only be used for subscriptions with the following statuses:

  • Active
  • Trialing
  • Past due

Delivery channels are automatically selected based on available customer information:

  • If customer email is available: Status is sent via email
  • If customer phone is available: Status is sent via WhatsApp
  • If WhatsApp delivery fails: Status is sent via SMS as a fallback

The status notification includes subscription details such as current status, upcoming payments, and recent changes. If no customer contact information is provided, the system will use the details stored in the subscription record.

Email notifications include contextual action links based on subscription status:

  • For past due subscriptions: A link to reactivate the subscription
  • For active and trialing subscriptions: A link to update the payment method

You can specify the customer's email or phone number, the preferred communication channel (email or SMS), and the language for the message.

- - :param id: The subscription ID (required) - :type id: str - :param send_subscription_status_request: - :type send_subscription_status_request: SendSubscriptionStatusRequest - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._send_status_serialize( - id=id, - send_subscription_status_request=send_subscription_status_request, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "Subscription", - '400': "Error", - '401': "Error", - '404': "Error", - '422': "Error", - '500': "Error", - '503': "Error", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _send_status_serialize( self, id, - send_subscription_status_request, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - if id is not None: - _path_params['id'] = id - # process the query parameters - # process the header parameters - # process the form parameters - # process the body parameter - if send_subscription_status_request is not None: - _body_params = send_subscription_status_request - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - # set the HTTP header `Content-Type` - if _content_type: - _header_params['Content-Type'] = _content_type - else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/json' - ] - ) - ) - if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type - - # authentication setting - _auth_settings: List[str] = [ - 'APIKey' - ] - - return self.api_client.param_serialize( - method='POST', - resource_path='/subscriptions/{id}/status', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - - @validate_call + **kwargs + ): + """Send Subscription Status # noqa: E501 + +

Sends subscription status information to the customer through their preferred communication channel.

This API can only be used for subscriptions with the following statuses:

  • Active
  • Trialing
  • Past due

Delivery channels are automatically selected based on available customer information:

  • If customer email is available: Status is sent via email
  • If customer phone is available: Status is sent via WhatsApp
  • If WhatsApp delivery fails: Status is sent via SMS as a fallback

The status notification includes subscription details such as current status, upcoming payments, and recent changes. If no customer contact information is provided, the system will use the details stored in the subscription record.

Email notifications include contextual action links based on subscription status:

  • For past due subscriptions: A link to reactivate the subscription
  • For active and trialing subscriptions: A link to update the payment method

You can specify the customer's email or phone number, the preferred communication channel (email or SMS), and the language for the message.

# noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.send_status(id, async_req=True) + >>> result = thread.get() + + Args: + id (str): The subscription ID + + Keyword Args: + send_subscription_status_request (SendSubscriptionStatusRequest): [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 + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None + async_req (bool): execute request asynchronously + + Returns: + Subscription + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + kwargs['id'] = \ + id + return self.send_status_endpoint.call_with_http_info(**kwargs) + def update( - self, - id: Annotated[StrictStr, Field(description="The subscription ID")], - update_subscription_request: UpdateSubscriptionRequest, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> Subscription: - """Update Subscription - -

Updates the configuration of an existing subscription.

Modifiable Parameters:

  • Billing information (amount, description)
  • Customer details (contact information, billing/shipping addresses)
  • Subscription settings (cancelAtPeriodEnd, pauseAtPeriodEnd)
  • Metadata (for your internal tracking)

Update Effects:

  • Amount changes apply to the next billing cycle
  • Customer information updates take effect immediately
  • Setting cancelAtPeriodEnd to true will end the subscription after the current period
  • Setting pauseAtPeriodEnd to true will pause billing after the current period

Note: Some fundamental properties cannot be changed once a subscription is created, including currency and billing interval. To modify these, you would need to cancel the existing subscription and create a new one.

- - :param id: The subscription ID (required) - :type id: str - :param update_subscription_request: (required) - :type update_subscription_request: UpdateSubscriptionRequest - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._update_serialize( - id=id, - update_subscription_request=update_subscription_request, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "Subscription", - '400': "Error", - '401': "Error", - '404': "Error", - '422': "Error", - '500': "Error", - '503': "Error", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def update_with_http_info( - self, - id: Annotated[StrictStr, Field(description="The subscription ID")], - update_subscription_request: UpdateSubscriptionRequest, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[Subscription]: - """Update Subscription - -

Updates the configuration of an existing subscription.

Modifiable Parameters:

  • Billing information (amount, description)
  • Customer details (contact information, billing/shipping addresses)
  • Subscription settings (cancelAtPeriodEnd, pauseAtPeriodEnd)
  • Metadata (for your internal tracking)

Update Effects:

  • Amount changes apply to the next billing cycle
  • Customer information updates take effect immediately
  • Setting cancelAtPeriodEnd to true will end the subscription after the current period
  • Setting pauseAtPeriodEnd to true will pause billing after the current period

Note: Some fundamental properties cannot be changed once a subscription is created, including currency and billing interval. To modify these, you would need to cancel the existing subscription and create a new one.

- - :param id: The subscription ID (required) - :type id: str - :param update_subscription_request: (required) - :type update_subscription_request: UpdateSubscriptionRequest - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._update_serialize( - id=id, - update_subscription_request=update_subscription_request, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "Subscription", - '400': "Error", - '401': "Error", - '404': "Error", - '422': "Error", - '500': "Error", - '503': "Error", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def update_without_preload_content( - self, - id: Annotated[StrictStr, Field(description="The subscription ID")], - update_subscription_request: UpdateSubscriptionRequest, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """Update Subscription - -

Updates the configuration of an existing subscription.

Modifiable Parameters:

  • Billing information (amount, description)
  • Customer details (contact information, billing/shipping addresses)
  • Subscription settings (cancelAtPeriodEnd, pauseAtPeriodEnd)
  • Metadata (for your internal tracking)

Update Effects:

  • Amount changes apply to the next billing cycle
  • Customer information updates take effect immediately
  • Setting cancelAtPeriodEnd to true will end the subscription after the current period
  • Setting pauseAtPeriodEnd to true will pause billing after the current period

Note: Some fundamental properties cannot be changed once a subscription is created, including currency and billing interval. To modify these, you would need to cancel the existing subscription and create a new one.

- - :param id: The subscription ID (required) - :type id: str - :param update_subscription_request: (required) - :type update_subscription_request: UpdateSubscriptionRequest - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._update_serialize( - id=id, - update_subscription_request=update_subscription_request, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "Subscription", - '400': "Error", - '401': "Error", - '404': "Error", - '422': "Error", - '500': "Error", - '503': "Error", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _update_serialize( self, id, update_subscription_request, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - if id is not None: - _path_params['id'] = id - # process the query parameters - # process the header parameters - # process the form parameters - # process the body parameter - if update_subscription_request is not None: - _body_params = update_subscription_request - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - # set the HTTP header `Content-Type` - if _content_type: - _header_params['Content-Type'] = _content_type - else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/json' - ] - ) - ) - if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type - - # authentication setting - _auth_settings: List[str] = [ - 'APIKey' - ] - - return self.api_client.param_serialize( - method='PUT', - resource_path='/subscriptions/{id}', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - + **kwargs + ): + """Update Subscription # noqa: E501 + +

Updates the configuration of an existing subscription.

Modifiable Parameters:

  • Billing information (amount, description)
  • Customer details (contact information, billing/shipping addresses)
  • Subscription settings (cancelAtPeriodEnd, pauseAtPeriodEnd)
  • Metadata (for your internal tracking)

Update Effects:

  • Amount changes apply to the next billing cycle
  • Customer information updates take effect immediately
  • Setting cancelAtPeriodEnd to true will end the subscription after the current period
  • Setting pauseAtPeriodEnd to true will pause billing after the current period

Note: Some fundamental properties cannot be changed once a subscription is created, including currency and billing interval. To modify these, you would need to cancel the existing subscription and create a new one.

# noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.update(id, update_subscription_request, async_req=True) + >>> result = thread.get() + + Args: + id (str): The subscription ID + update_subscription_request (UpdateSubscriptionRequest): + + Keyword Args: + _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 + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None + async_req (bool): execute request asynchronously + + Returns: + Subscription + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + kwargs['id'] = \ + id + kwargs['update_subscription_request'] = \ + update_subscription_request + return self.update_endpoint.call_with_http_info(**kwargs) diff --git a/Monei/api_client.py b/Monei/api_client.py index cd00d07..edff26f 100644 --- a/Monei/api_client.py +++ b/Monei/api_client.py @@ -1,48 +1,45 @@ -# coding: utf-8 - """ MONEI API v1 -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

- - The version of the OpenAPI document: 1.5.1 - Generated by OpenAPI Generator (https://openapi-generator.tech) +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - Do not edit the class manually. -""" # noqa: E501 + The version of the OpenAPI document: 1.5.3 + Generated by: https://openapi-generator.tech +""" -import datetime -from dateutil.parser import parse -from enum import Enum -import decimal import json +import atexit import mimetypes +from multiprocessing.pool import ThreadPool +import io import os import re -import tempfile - +import typing from urllib.parse import quote -from typing import Tuple, Optional, List, Dict, Union -from pydantic import SecretStr +from urllib3.fields import RequestField + -from Monei.configuration import Configuration -from Monei.api_response import ApiResponse, T as ApiResponseT -import Monei.models from Monei import rest -from Monei.exceptions import ( - ApiValueError, - ApiException, - BadRequestException, - UnauthorizedException, - ForbiddenException, - NotFoundException, - ServiceException +from Monei.configuration import Configuration +from Monei.exceptions import ApiTypeError, ApiValueError, ApiException +from Monei.model_utils import ( + ModelNormal, + ModelSimple, + ModelComposed, + check_allowed_values, + check_validations, + date, + datetime, + deserialize_file, + file_type, + model_to_dict, + none_type, + validate_and_convert_types ) -RequestSerialized = Tuple[str, str, Dict[str, str], Optional[str], List[str]] -class ApiClient: +class ApiClient(object): """Generic API client for OpenAPI client library builds. OpenAPI generic API client. This client handles the client- @@ -50,39 +47,28 @@ class ApiClient: the methods and models for each application are generated from the OpenAPI templates. + NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + Do not edit the class manually. + :param configuration: .Configuration object for this client :param header_name: a header to pass when making calls to the API. :param header_value: a header value to pass when making calls to the API. :param cookie: a cookie to include in the header when making calls to the API + :param pool_threads: The number of threads to use for async requests + to the API. More threads means more concurrent API requests. """ - PRIMITIVE_TYPES = (float, bool, bytes, str, int) - NATIVE_TYPES_MAPPING = { - 'int': int, - 'long': int, # TODO remove as only py3 is supported? - 'float': float, - 'str': str, - 'bool': bool, - 'date': datetime.date, - 'datetime': datetime.datetime, - 'decimal': decimal.Decimal, - 'object': object, - } _pool = None - def __init__( - self, - configuration=None, - header_name=None, - header_value=None, - cookie=None - ) -> None: - # use default configuration if none is provided + def __init__(self, configuration=None, header_name=None, header_value=None, + cookie=None, pool_threads=1): if configuration is None: - configuration = Configuration.get_default() + configuration = Configuration.get_default_copy() self.configuration = configuration + self.pool_threads = pool_threads self.rest_client = rest.RESTClientObject(configuration) self.default_headers = {} @@ -91,13 +77,30 @@ def __init__( self.cookie = cookie # Set default User-Agent. self.user_agent = 'OpenAPI-Generator/1.2.6/python' - self.client_side_validation = configuration.client_side_validation def __enter__(self): return self def __exit__(self, exc_type, exc_value, traceback): - pass + self.close() + + def close(self): + if self._pool: + self._pool.close() + self._pool.join() + self._pool = None + if hasattr(atexit, 'unregister'): + atexit.unregister(self.close) + + @property + def pool(self): + """Create thread pool on first request + avoids instantiating unused threadpool for blocking clients. + """ + if self._pool is None: + atexit.register(self.close) + self._pool = ThreadPool(self.pool_threads) + return self._pool @property def user_agent(self): @@ -111,69 +114,27 @@ def user_agent(self, value): def set_default_header(self, header_name, header_value): self.default_headers[header_name] = header_value - - _default = None - - @classmethod - def get_default(cls): - """Return new instance of ApiClient. - - This method returns newly created, based on default constructor, - object of ApiClient class or returns a copy of default - ApiClient. - - :return: The ApiClient object. - """ - if cls._default is None: - cls._default = ApiClient() - return cls._default - - @classmethod - def set_default(cls, default): - """Set default instance of ApiClient. - - It stores default ApiClient. - - :param default: object of ApiClient. - """ - cls._default = default - - def param_serialize( + def __call_api( self, - method, - resource_path, - path_params=None, - query_params=None, - header_params=None, - body=None, - post_params=None, - files=None, auth_settings=None, - collection_formats=None, - _host=None, - _request_auth=None - ) -> RequestSerialized: - - """Builds the HTTP request params needed by the request. - :param method: Method to call. - :param resource_path: Path to method endpoint. - :param path_params: Path parameters in the url. - :param query_params: Query parameters in the url. - :param header_params: Header parameters to be - placed in the request header. - :param body: Request body. - :param post_params dict: Request post form parameters, - for `application/x-www-form-urlencoded`, `multipart/form-data`. - :param auth_settings list: Auth Settings names for the request. - :param files dict: key -> filename, value -> filepath, - for `multipart/form-data`. - :param collection_formats: dict of collection formats for path, query, - header, and post parameters. - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - :return: tuple of form (path, http_method, query_params, header_params, - body, post_params, files) - """ + resource_path: str, + method: str, + path_params: typing.Optional[typing.Dict[str, typing.Any]] = None, + query_params: typing.Optional[typing.List[typing.Tuple[str, typing.Any]]] = None, + header_params: typing.Optional[typing.Dict[str, typing.Any]] = None, + body: typing.Optional[typing.Any] = None, + post_params: typing.Optional[typing.List[typing.Tuple[str, typing.Any]]] = None, + files: typing.Optional[typing.Dict[str, typing.List[io.IOBase]]] = None, + response_type: typing.Optional[typing.Tuple[typing.Any]] = None, + auth_settings: typing.Optional[typing.List[str]] = None, + _return_http_data_only: typing.Optional[bool] = None, + collection_formats: typing.Optional[typing.Dict[str, str]] = None, + _preload_content: bool = True, + _request_timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + _host: typing.Optional[str] = None, + _check_type: typing.Optional[bool] = None, + _content_type: typing.Optional[str] = None, + _request_auths: typing.Optional[typing.List[typing.Dict[str, typing.Any]]] = None + ): config = self.configuration @@ -184,17 +145,14 @@ def param_serialize( header_params['Cookie'] = self.cookie if header_params: header_params = self.sanitize_for_serialization(header_params) - header_params = dict( - self.parameters_to_tuples(header_params,collection_formats) - ) + header_params = dict(self.parameters_to_tuples(header_params, + collection_formats)) # path parameters if path_params: path_params = self.sanitize_for_serialization(path_params) - path_params = self.parameters_to_tuples( - path_params, - collection_formats - ) + path_params = self.parameters_to_tuples(path_params, + collection_formats) for k, v in path_params: # specified safe chars, encode everything resource_path = resource_path.replace( @@ -202,269 +160,345 @@ def param_serialize( quote(str(v), safe=config.safe_chars_for_path_param) ) + # query parameters + if query_params: + query_params = self.sanitize_for_serialization(query_params) + query_params = self.parameters_to_tuples(query_params, + collection_formats) + # post parameters if post_params or files: post_params = post_params if post_params else [] post_params = self.sanitize_for_serialization(post_params) - post_params = self.parameters_to_tuples( - post_params, - collection_formats - ) - if files: - post_params.extend(self.files_parameters(files)) - - # auth setting - self.update_params_for_auth( - header_params, - query_params, - auth_settings, - resource_path, - method, - body, - request_auth=_request_auth - ) + post_params = self.parameters_to_tuples(post_params, + collection_formats) + post_params.extend(self.files_parameters(files)) + if header_params['Content-Type'].startswith("multipart"): + post_params = self.parameters_to_multipart(post_params, + (dict)) # body if body: body = self.sanitize_for_serialization(body) + # auth setting + self.update_params_for_auth(header_params, query_params, + auth_settings, resource_path, method, body, + request_auths=_request_auths) + # request url - if _host is None or self.configuration.ignore_operation_servers: + if _host is None: url = self.configuration.host + resource_path else: # use server/host defined in path or operation instead url = _host + resource_path - # query parameters - if query_params: - query_params = self.sanitize_for_serialization(query_params) - url_query = self.parameters_to_url_query( - query_params, - collection_formats - ) - url += "?" + url_query - - return method, url, header_params, body, post_params - - - def call_api( - self, - method, - url, - header_params=None, - body=None, - post_params=None, - _request_timeout=None - ) -> rest.RESTResponse: - """Makes the HTTP request (synchronous) - :param method: Method to call. - :param url: Path to method endpoint. - :param header_params: Header parameters to be - placed in the request header. - :param body: Request body. - :param post_params dict: Request post form parameters, - for `application/x-www-form-urlencoded`, `multipart/form-data`. - :param _request_timeout: timeout setting for this request. - :return: RESTResponse - """ - try: # perform request and return response - response_data = self.rest_client.request( - method, url, - headers=header_params, - body=body, post_params=post_params, - _request_timeout=_request_timeout - ) - + response_data = self.request( + method, url, query_params=query_params, headers=header_params, + 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') raise e - return response_data - - def response_deserialize( - self, - response_data: rest.RESTResponse, - response_types_map: Optional[Dict[str, ApiResponseT]]=None - ) -> ApiResponse[ApiResponseT]: - """Deserializes response into an object. - :param response_data: RESTResponse object to be deserialized. - :param response_types_map: dict of response types. - :return: ApiResponse - """ + self.last_response = response_data - msg = "RESTResponse.read() must be called before passing it to response_deserialize()" - assert response_data.data is not None, msg + return_data = response_data - response_type = response_types_map.get(str(response_data.status), None) - if not response_type and isinstance(response_data.status, int) and 100 <= response_data.status <= 599: - # if not found, look for '1XX', '2XX', etc. - response_type = response_types_map.get(str(response_data.status)[0] + "XX", None) + if not _preload_content: + return (return_data) + return return_data # deserialize response data - response_text = None - return_data = None - try: - if response_type == "bytearray": - return_data = response_data.data - elif response_type == "file": - return_data = self.__deserialize_file(response_data) - elif response_type is not None: - match = None + if response_type: + if response_type != (file_type,): + encoding = "utf-8" content_type = response_data.getheader('content-type') if content_type is not None: - match = re.search(r"charset=([a-zA-Z\-\d]+)[\s;]?", content_type) - encoding = match.group(1) if match else "utf-8" - response_text = response_data.data.decode(encoding) - return_data = self.deserialize(response_text, response_type, content_type) - finally: - if not 200 <= response_data.status <= 299: - raise ApiException.from_response( - http_resp=response_data, - body=response_text, - data=return_data, - ) + match = re.search(r"charset=([a-zA-Z\-\d]+)[\s\;]?", content_type) + if match: + encoding = match.group(1) + response_data.data = response_data.data.decode(encoding) + + return_data = self.deserialize( + response_data, + response_type, + _check_type + ) + else: + return_data = None - return ApiResponse( - status_code = response_data.status, - data = return_data, - headers = response_data.getheaders(), - raw_data = response_data.data - ) + if _return_http_data_only: + return (return_data) + else: + return (return_data, response_data.status, + response_data.getheaders()) - def sanitize_for_serialization(self, obj): - """Builds a JSON POST object. + def parameters_to_multipart(self, params, collection_types): + """Get parameters as list of tuples, formatting as json if value is collection_types + :param params: Parameters as list of two-tuples + :param dict collection_types: Parameter collection types + :return: Parameters as list of tuple or urllib3.fields.RequestField + """ + new_params = [] + if collection_types is None: + collection_types = (dict) + for k, v in params.items() if isinstance(params, dict) else params: # noqa: E501 + if isinstance( + v, collection_types): # v is instance of collection_type, formatting as application/json + v = json.dumps(v, ensure_ascii=False).encode("utf-8") + field = RequestField(k, v) + field.make_multipart(content_type="application/json; charset=utf-8") + new_params.append(field) + else: + new_params.append((k, v)) + return new_params + + @classmethod + def sanitize_for_serialization(cls, obj): + """Prepares data for transmission before it is sent with the rest client If obj is None, return None. - If obj is SecretStr, return obj.get_secret_value() If obj is str, int, long, float, bool, return directly. If obj is datetime.datetime, datetime.date convert to string in iso8601 format. - If obj is decimal.Decimal return string representation. If obj is list, sanitize each element in the list. If obj is dict, return the dict. If obj is OpenAPI model, return the properties dict. - + If obj is io.IOBase, return the bytes :param obj: The data to serialize. :return: The serialized form of data. """ - if obj is None: - return None - elif isinstance(obj, Enum): - return obj.value - elif isinstance(obj, SecretStr): - return obj.get_secret_value() - elif isinstance(obj, self.PRIMITIVE_TYPES): + if isinstance(obj, (ModelNormal, ModelComposed)): + return { + key: cls.sanitize_for_serialization(val) for key, + val in model_to_dict( + obj, + serialize=True).items()} + elif isinstance(obj, io.IOBase): + return cls.get_file_data_and_close_file(obj) + elif isinstance(obj, (str, int, float, none_type, bool)): return obj - elif isinstance(obj, list): - return [ - self.sanitize_for_serialization(sub_obj) for sub_obj in obj - ] - elif isinstance(obj, tuple): - return tuple( - self.sanitize_for_serialization(sub_obj) for sub_obj in obj - ) - elif isinstance(obj, (datetime.datetime, datetime.date)): + elif isinstance(obj, (datetime, date)): return obj.isoformat() - elif isinstance(obj, decimal.Decimal): - return str(obj) - - elif isinstance(obj, dict): - obj_dict = obj - else: - # Convert model obj to dict except - # attributes `openapi_types`, `attribute_map` - # and attributes which value is not None. - # Convert attribute name to json key in - # model definition for request. - if hasattr(obj, 'to_dict') and callable(getattr(obj, 'to_dict')): - obj_dict = obj.to_dict() - else: - obj_dict = obj.__dict__ - - return { - key: self.sanitize_for_serialization(val) - for key, val in obj_dict.items() - } - - def deserialize(self, response_text: str, response_type: str, content_type: Optional[str]): + elif isinstance(obj, ModelSimple): + return cls.sanitize_for_serialization(obj.value) + elif isinstance(obj, (list, tuple)): + return [cls.sanitize_for_serialization(item) for item in obj] + if isinstance(obj, dict): + return {key: cls.sanitize_for_serialization(val) for key, val in obj.items()} + raise ApiValueError( + 'Unable to prepare type {} for serialization'.format( + obj.__class__.__name__)) + + def deserialize(self, response, response_type, _check_type): """Deserializes response into an object. :param response: RESTResponse object to be deserialized. - :param response_type: class literal for - deserialized object, or string of class name. - :param content_type: content type of response. + :param response_type: For the response, a tuple containing: + valid classes + a list containing valid classes (for list schemas) + a dict containing a tuple of valid classes as the value + Example values: + (str,) + (Pet,) + (float, none_type) + ([int, none_type],) + ({str: (bool, str, int, float, date, datetime, str, none_type)},) + :param _check_type: boolean, whether to check the types of the data + received from the server + :type _check_type: bool :return: deserialized object. """ + # handle file downloading + # save response body into a tmp file and return the instance + if response_type == (file_type,): + content_disposition = response.getheader("Content-Disposition") + return deserialize_file(response.data, self.configuration, + content_disposition=content_disposition) # fetch data from response object - if content_type is None: - try: - data = json.loads(response_text) - except ValueError: - data = response_text - elif re.match(r'^application/(json|[\w!#$&.+-^_]+\+json)\s*(;|$)', content_type, re.IGNORECASE): - if response_text == "": - data = "" - else: - data = json.loads(response_text) - elif re.match(r'^text\/[a-z.+-]+\s*(;|$)', content_type, re.IGNORECASE): - data = response_text - else: - raise ApiException( - status=0, - reason="Unsupported content type: {0}".format(content_type) - ) - - return self.__deserialize(data, response_type) + try: + received_data = json.loads(response.data) + except ValueError: + received_data = response.data + + # store our data under the key of 'received_data' so users have some + # context if they are deserializing a string and the data type is wrong + deserialized_data = validate_and_convert_types( + received_data, + response_type, + ['received_data'], + True, + _check_type, + configuration=self.configuration + ) + return deserialized_data - def __deserialize(self, data, klass): - """Deserializes dict, list, str into an object. + def call_api( + self, + resource_path: str, + method: str, + path_params: typing.Optional[typing.Dict[str, typing.Any]] = None, + query_params: typing.Optional[typing.List[typing.Tuple[str, typing.Any]]] = None, + header_params: typing.Optional[typing.Dict[str, typing.Any]] = None, + body: typing.Optional[typing.Any] = None, + post_params: typing.Optional[typing.List[typing.Tuple[str, typing.Any]]] = None, + files: typing.Optional[typing.Dict[str, typing.List[io.IOBase]]] = None, + response_type: typing.Optional[typing.Tuple[typing.Any]] = None, + auth_settings: typing.Optional[typing.List[str]] = None, + async_req: typing.Optional[bool] = None, + _return_http_data_only: typing.Optional[bool] = None, + collection_formats: typing.Optional[typing.Dict[str, str]] = None, + _preload_content: bool = True, + _request_timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + _host: typing.Optional[str] = None, + _check_type: typing.Optional[bool] = None, + _request_auths: typing.Optional[typing.List[typing.Dict[str, typing.Any]]] = None + ): + """Makes the HTTP request (synchronous) and returns deserialized data. - :param data: dict, list or str. - :param klass: class literal, or string of class name. + To make an async_req request, set the async_req parameter. - :return: object. + :param resource_path: Path to method endpoint. + :param method: Method to call. + :param path_params: Path parameters in the url. + :param query_params: Query parameters in the url. + :param header_params: Header parameters to be + placed in the request header. + :param body: Request body. + :param post_params dict: Request post form parameters, + for `application/x-www-form-urlencoded`, `multipart/form-data`. + :param auth_settings list: Auth Settings names for the request. + :param response_type: For the response, a tuple containing: + valid classes + a list containing valid classes (for list schemas) + a dict containing a tuple of valid classes as the value + Example values: + (str,) + (Pet,) + (float, none_type) + ([int, none_type],) + ({str: (bool, str, int, float, date, datetime, str, none_type)},) + :param files: key -> field name, value -> a list of open file + objects for `multipart/form-data`. + :type files: dict + :param async_req bool: execute request asynchronously + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param collection_formats: dict of collection formats for path, query, + header, and post parameters. + :type collection_formats: dict, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _check_type: boolean describing if the data back from the server + should have its type checked. + :type _check_type: bool, optional + :param _request_auths: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auths: list, optional + :return: + If async_req parameter is True, + the request will be called asynchronously. + The method will return the request thread. + If parameter async_req is False or missing, + then the method will return the response directly. """ - if data is None: - return None - - if isinstance(klass, str): - if klass.startswith('List['): - m = re.match(r'List\[(.*)]', klass) - assert m is not None, "Malformed List type definition" - sub_kls = m.group(1) - return [self.__deserialize(sub_data, sub_kls) - for sub_data in data] - - if klass.startswith('Dict['): - m = re.match(r'Dict\[([^,]*), (.*)]', klass) - assert m is not None, "Malformed Dict type definition" - sub_kls = m.group(2) - return {k: self.__deserialize(v, sub_kls) - for k, v in data.items()} - - # convert str to class - if klass in self.NATIVE_TYPES_MAPPING: - klass = self.NATIVE_TYPES_MAPPING[klass] - else: - klass = getattr(Monei.models, klass) - - if klass in self.PRIMITIVE_TYPES: - return self.__deserialize_primitive(data, klass) - elif klass == object: - return self.__deserialize_object(data) - elif klass == datetime.date: - return self.__deserialize_date(data) - elif klass == datetime.datetime: - return self.__deserialize_datetime(data) - elif klass == decimal.Decimal: - return decimal.Decimal(data) - elif issubclass(klass, Enum): - return self.__deserialize_enum(data, klass) + if not async_req: + return self.__call_api(resource_path, method, + path_params, query_params, header_params, + body, post_params, files, + response_type, auth_settings, + _return_http_data_only, collection_formats, + _preload_content, _request_timeout, _host, + _check_type, _request_auths=_request_auths) + + return self.pool.apply_async(self.__call_api, (resource_path, + method, path_params, + query_params, + header_params, body, + post_params, files, + response_type, + auth_settings, + _return_http_data_only, + collection_formats, + _preload_content, + _request_timeout, + _host, _check_type, None, _request_auths)) + + def request(self, method, url, query_params=None, headers=None, + post_params=None, body=None, _preload_content=True, + _request_timeout=None): + """Makes the HTTP request using RESTClient.""" + if method == "GET": + return self.rest_client.GET(url, + query_params=query_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + headers=headers) + elif method == "HEAD": + return self.rest_client.HEAD(url, + query_params=query_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + headers=headers) + elif method == "OPTIONS": + return self.rest_client.OPTIONS(url, + query_params=query_params, + headers=headers, + post_params=post_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + body=body) + elif method == "POST": + return self.rest_client.POST(url, + query_params=query_params, + headers=headers, + post_params=post_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + body=body) + elif method == "PUT": + return self.rest_client.PUT(url, + query_params=query_params, + headers=headers, + post_params=post_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + body=body) + elif method == "PATCH": + return self.rest_client.PATCH(url, + query_params=query_params, + headers=headers, + post_params=post_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + body=body) + elif method == "DELETE": + return self.rest_client.DELETE(url, + query_params=query_params, + headers=headers, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + body=body) else: - return self.__deserialize_model(data, klass) + raise ApiValueError( + "http method must be `GET`, `HEAD`, `OPTIONS`," + " `POST`, `PATCH`, `PUT` or `DELETE`." + ) def parameters_to_tuples(self, params, collection_formats): """Get parameters as list of tuples, formatting collections. @@ -473,10 +507,10 @@ def parameters_to_tuples(self, params, collection_formats): :param dict collection_formats: Parameter collection formats :return: Parameters as list of tuples, collections formatted """ - new_params: List[Tuple[str, str]] = [] + new_params = [] if collection_formats is None: collection_formats = {} - for k, v in params.items() if isinstance(params, dict) else params: + for k, v in params.items() if isinstance(params, dict) else params: # noqa: E501 if k in collection_formats: collection_format = collection_formats[k] if collection_format == 'multi': @@ -496,178 +530,118 @@ def parameters_to_tuples(self, params, collection_formats): new_params.append((k, v)) return new_params - def parameters_to_url_query(self, params, collection_formats): - """Get parameters as list of tuples, formatting collections. - - :param params: Parameters as dict or list of two-tuples - :param dict collection_formats: Parameter collection formats - :return: URL query string (e.g. a=Hello%20World&b=123) - """ - new_params: List[Tuple[str, str]] = [] - if collection_formats is None: - collection_formats = {} - for k, v in params.items() if isinstance(params, dict) else params: - if isinstance(v, bool): - v = str(v).lower() - if isinstance(v, (int, float)): - v = str(v) - if isinstance(v, dict): - v = json.dumps(v) - - if k in collection_formats: - collection_format = collection_formats[k] - if collection_format == 'multi': - new_params.extend((k, quote(str(value))) for value in v) - else: - if collection_format == 'ssv': - delimiter = ' ' - elif collection_format == 'tsv': - delimiter = '\t' - elif collection_format == 'pipes': - delimiter = '|' - else: # csv is the default - delimiter = ',' - new_params.append( - (k, delimiter.join(quote(str(value)) for value in v)) - ) - else: - new_params.append((k, quote(str(v)))) - - return "&".join(["=".join(map(str, item)) for item in new_params]) + @staticmethod + def get_file_data_and_close_file(file_instance: io.IOBase) -> bytes: + file_data = file_instance.read() + file_instance.close() + return file_data - def files_parameters( - self, - files: Dict[str, Union[str, bytes, List[str], List[bytes], Tuple[str, bytes]]], - ): + def files_parameters(self, + files: typing.Optional[typing.Dict[str, + typing.List[io.IOBase]]] = None): """Builds form parameters. - :param files: File parameters. - :return: Form parameters with files. + :param files: None or a dict with key=param_name and + value is a list of open file objects + :return: List of tuples of form parameters with file data """ + if files is None: + return [] + params = [] - for k, v in files.items(): - if isinstance(v, str): - with open(v, 'rb') as f: - filename = os.path.basename(f.name) - filedata = f.read() - elif isinstance(v, bytes): - filename = k - filedata = v - elif isinstance(v, tuple): - filename, filedata = v - elif isinstance(v, list): - for file_param in v: - params.extend(self.files_parameters({k: file_param})) + for param_name, file_instances in files.items(): + if file_instances is None: + # if the file field is nullable, skip None values continue - else: - raise ValueError("Unsupported file value") - mimetype = ( - mimetypes.guess_type(filename)[0] - or 'application/octet-stream' - ) - params.append( - tuple([k, tuple([filename, filedata, mimetype])]) - ) + for file_instance in file_instances: + if file_instance is None: + # if the file field is nullable, skip None values + continue + if file_instance.closed is True: + raise ApiValueError( + "Cannot read a closed file. The passed in file_type " + "for %s must be open." % param_name + ) + filename = os.path.basename(file_instance.name) + filedata = self.get_file_data_and_close_file(file_instance) + mimetype = (mimetypes.guess_type(filename)[0] or + 'application/octet-stream') + params.append( + tuple([param_name, tuple([filename, filedata, mimetype])])) + return params - def select_header_accept(self, accepts: List[str]) -> Optional[str]: + def select_header_accept(self, accepts): """Returns `Accept` based on an array of accepts provided. :param accepts: List of headers. :return: Accept (e.g. application/json). """ if not accepts: - return None + return - for accept in accepts: - if re.search('json', accept, re.IGNORECASE): - return accept + accepts = [x.lower() for x in accepts] - return accepts[0] + if 'application/json' in accepts: + return 'application/json' + else: + return ', '.join(accepts) - def select_header_content_type(self, content_types): + def select_header_content_type(self, content_types, method=None, body=None): """Returns `Content-Type` based on an array of content_types provided. :param content_types: List of content-types. + :param method: http method (e.g. POST, PATCH). + :param body: http body to send. :return: Content-Type (e.g. application/json). """ if not content_types: return None - for content_type in content_types: - if re.search('json', content_type, re.IGNORECASE): - return content_type + content_types = [x.lower() for x in content_types] - return content_types[0] + if (method == 'PATCH' and + 'application/json-patch+json' in content_types and + isinstance(body, list)): + return 'application/json-patch+json' - def update_params_for_auth( - self, - headers, - queries, - auth_settings, - resource_path, - method, - body, - request_auth=None - ) -> None: + if 'application/json' in content_types or '*/*' in content_types: + return 'application/json' + else: + return content_types[0] + + def update_params_for_auth(self, headers, queries, auth_settings, + resource_path, method, body, request_auths=None): """Updates header and query params based on authentication setting. :param headers: Header parameters dict to be updated. :param queries: Query parameters tuple list to be updated. :param auth_settings: Authentication setting identifiers list. - :resource_path: A string representation of the HTTP request resource path. - :method: A string representation of the HTTP request method. - :body: A object representing the body of the HTTP request. - The object type is the return value of sanitize_for_serialization(). - :param request_auth: if set, the provided settings will - override the token in the configuration. + :param resource_path: A string representation of the HTTP request resource path. + :param method: A string representation of the HTTP request method. + :param body: A object representing the body of the HTTP request. + The object type is the return value of _encoder.default(). + :param request_auths: if set, the provided settings will + override the token in the configuration. """ if not auth_settings: return - if request_auth: - self._apply_auth_params( - headers, - queries, - resource_path, - method, - body, - request_auth - ) - else: - for auth in auth_settings: - auth_setting = self.configuration.auth_settings().get(auth) - if auth_setting: - self._apply_auth_params( - headers, - queries, - resource_path, - method, - body, - auth_setting - ) + if request_auths: + for auth_setting in request_auths: + self._apply_auth_params( + headers, queries, resource_path, method, body, auth_setting) + return - def _apply_auth_params( - self, - headers, - queries, - resource_path, - method, - body, - auth_setting - ) -> None: - """Updates the request parameters based on a single auth_setting + for auth in auth_settings: + auth_setting = self.configuration.auth_settings().get(auth) + if auth_setting: + self._apply_auth_params( + headers, queries, resource_path, method, body, auth_setting) - :param headers: Header parameters dict to be updated. - :param queries: Query parameters tuple list to be updated. - :resource_path: A string representation of the HTTP request resource path. - :method: A string representation of the HTTP request method. - :body: A object representing the body of the HTTP request. - The object type is the return value of sanitize_for_serialization(). - :param auth_setting: auth settings for the endpoint - """ + def _apply_auth_params(self, headers, queries, resource_path, method, body, auth_setting): if auth_setting['in'] == 'cookie': - headers['Cookie'] = auth_setting['value'] + headers['Cookie'] = auth_setting['key'] + "=" + auth_setting['value'] elif auth_setting['in'] == 'header': if auth_setting['type'] != 'http-signature': headers[auth_setting['key']] = auth_setting['value'] @@ -678,120 +652,245 @@ def _apply_auth_params( 'Authentication token must be in `query` or `header`' ) - def __deserialize_file(self, response): - """Deserializes body to file - - Saves response body into a file in a temporary folder, - using the filename from the `Content-Disposition` header if provided. - - handle file downloading - save response body into a tmp file and return the instance - :param response: RESTResponse. - :return: file path. +class Endpoint(object): + def __init__(self, settings=None, params_map=None, root_map=None, + headers_map=None, api_client=None, callable=None): + """Creates an endpoint + + Args: + settings (dict): see below key value pairs + 'response_type' (tuple/None): response type + 'auth' (list): a list of auth type keys + 'endpoint_path' (str): the endpoint path + 'operation_id' (str): endpoint string identifier + 'http_method' (str): POST/PUT/PATCH/GET etc + 'servers' (list): list of str servers that this endpoint is at + params_map (dict): see below key value pairs + 'all' (list): list of str endpoint parameter names + 'required' (list): list of required parameter names + 'nullable' (list): list of nullable parameter names + 'enum' (list): list of parameters with enum values + 'validation' (list): list of parameters with validations + root_map + 'validations' (dict): the dict mapping endpoint parameter tuple + paths to their validation dictionaries + 'allowed_values' (dict): the dict mapping endpoint parameter + tuple paths to their allowed_values (enum) dictionaries + 'openapi_types' (dict): param_name to openapi type + 'attribute_map' (dict): param_name to camelCase name + 'location_map' (dict): param_name to 'body', 'file', 'form', + 'header', 'path', 'query' + collection_format_map (dict): param_name to `csv` etc. + headers_map (dict): see below key value pairs + 'accept' (list): list of Accept header strings + 'content_type' (list): list of Content-Type header strings + api_client (ApiClient) api client instance + callable (function): the function which is invoked when the + Endpoint is called """ - fd, path = tempfile.mkstemp(dir=self.configuration.temp_folder_path) - os.close(fd) - os.remove(path) - - content_disposition = response.getheader("Content-Disposition") - if content_disposition: - m = re.search( - r'filename=[\'"]?([^\'"\s]+)[\'"]?', - content_disposition - ) - assert m is not None, "Unexpected 'content-disposition' header value" - filename = m.group(1) - path = os.path.join(os.path.dirname(path), filename) - - with open(path, "wb") as f: - f.write(response.data) + self.settings = settings + self.params_map = params_map + self.params_map['all'].extend([ + 'async_req', + '_host_index', + '_preload_content', + '_request_timeout', + '_return_http_data_only', + '_check_input_type', + '_check_return_type', + '_content_type', + '_spec_property_naming', + '_request_auths' + ]) + self.params_map['nullable'].extend(['_request_timeout']) + self.validations = root_map['validations'] + self.allowed_values = root_map['allowed_values'] + self.openapi_types = root_map['openapi_types'] + extra_types = { + 'async_req': (bool,), + '_host_index': (none_type, int), + '_preload_content': (bool,), + '_request_timeout': (none_type, float, (float,), [float], int, (int,), [int]), + '_return_http_data_only': (bool,), + '_check_input_type': (bool,), + '_check_return_type': (bool,), + '_spec_property_naming': (bool,), + '_content_type': (none_type, str), + '_request_auths': (none_type, list) + } + self.openapi_types.update(extra_types) + self.attribute_map = root_map['attribute_map'] + self.location_map = root_map['location_map'] + self.collection_format_map = root_map['collection_format_map'] + self.headers_map = headers_map + self.api_client = api_client + self.callable = callable + + def __validate_inputs(self, kwargs): + for param in self.params_map['enum']: + if param in kwargs: + check_allowed_values( + self.allowed_values, + (param,), + kwargs[param] + ) - return path + for param in self.params_map['validation']: + if param in kwargs: + check_validations( + self.validations, + (param,), + kwargs[param], + configuration=self.api_client.configuration + ) - def __deserialize_primitive(self, data, klass): - """Deserializes string to primitive type. + if kwargs['_check_input_type'] is False: + return - :param data: str. - :param klass: class literal. + for key, value in kwargs.items(): + fixed_val = validate_and_convert_types( + value, + self.openapi_types[key], + [key], + kwargs['_spec_property_naming'], + kwargs['_check_input_type'], + configuration=self.api_client.configuration + ) + kwargs[key] = fixed_val + + def __gather_params(self, kwargs): + params = { + 'body': None, + 'collection_format': {}, + 'file': {}, + 'form': [], + 'header': {}, + 'path': {}, + 'query': [] + } - :return: int, long, float, str, bool. - """ - try: - return klass(data) - except UnicodeEncodeError: - return str(data) - except TypeError: - return data + for param_name, param_value in kwargs.items(): + param_location = self.location_map.get(param_name) + if param_location is None: + continue + if param_location: + if param_location == 'body': + params['body'] = param_value + continue + base_name = self.attribute_map[param_name] + if (param_location == 'form' and + self.openapi_types[param_name] == (file_type,)): + params['file'][base_name] = [param_value] + elif (param_location == 'form' and + self.openapi_types[param_name] == ([file_type],)): + # param_value is already a list + params['file'][base_name] = param_value + elif param_location in {'form', 'query'}: + param_value_full = (base_name, param_value) + params[param_location].append(param_value_full) + if param_location not in {'form', 'query'}: + params[param_location][base_name] = param_value + collection_format = self.collection_format_map.get(param_name) + if collection_format: + params['collection_format'][base_name] = collection_format - def __deserialize_object(self, value): - """Return an original value. + return params - :return: object. - """ - return value + def __call__(self, *args, **kwargs): + """ This method is invoked when endpoints are called + Example: - def __deserialize_date(self, string): - """Deserializes string to date. + api_instance = ApplePayDomainApi() + api_instance.register # this is an instance of the class Endpoint + api_instance.register() # this invokes api_instance.register.__call__() + which then invokes the callable functions stored in that endpoint at + api_instance.register.callable or self.callable in this class - :param string: str. - :return: date. """ - try: - return parse(string).date() - except ImportError: - return string - except ValueError: - raise rest.ApiException( - status=0, - reason="Failed to parse `{0}` as date object".format(string) - ) + return self.callable(self, *args, **kwargs) - def __deserialize_datetime(self, string): - """Deserializes string to datetime. + def call_with_http_info(self, **kwargs): - The string should be in iso8601 datetime format. - - :param string: str. - :return: datetime. - """ try: - return parse(string) - except ImportError: - return string - except ValueError: - raise rest.ApiException( - status=0, - reason=( - "Failed to parse `{0}` as datetime object" - .format(string) - ) + index = self.api_client.configuration.server_operation_index.get( + self.settings['operation_id'], self.api_client.configuration.server_index + ) if kwargs['_host_index'] is None else kwargs['_host_index'] + server_variables = self.api_client.configuration.server_operation_variables.get( + self.settings['operation_id'], self.api_client.configuration.server_variables ) + _host = self.api_client.configuration.get_host_from_settings( + index, variables=server_variables, servers=self.settings['servers'] + ) + except IndexError: + if self.settings['servers']: + raise ApiValueError( + "Invalid host index. Must be 0 <= index < %s" % + len(self.settings['servers']) + ) + _host = None + + for key, value in kwargs.items(): + if key not in self.params_map['all']: + raise ApiTypeError( + "Got an unexpected parameter '%s'" + " to method `%s`" % + (key, self.settings['operation_id']) + ) + # only throw this nullable ApiValueError if _check_input_type + # is False, if _check_input_type==True we catch this case + # in self.__validate_inputs + if (key not in self.params_map['nullable'] and value is None + and kwargs['_check_input_type'] is False): + raise ApiValueError( + "Value may not be None for non-nullable parameter `%s`" + " when calling `%s`" % + (key, self.settings['operation_id']) + ) - def __deserialize_enum(self, data, klass): - """Deserializes primitive type to enum. - - :param data: primitive type. - :param klass: class literal. - :return: enum value. - """ - try: - return klass(data) - except ValueError: - raise rest.ApiException( - status=0, - reason=( - "Failed to parse `{0}` as `{1}`" - .format(data, klass) + for key in self.params_map['required']: + if key not in kwargs.keys(): + raise ApiValueError( + "Missing the required parameter `%s` when calling " + "`%s`" % (key, self.settings['operation_id']) ) - ) - def __deserialize_model(self, data, klass): - """Deserializes list or dict to model. + self.__validate_inputs(kwargs) - :param data: dict, list. - :param klass: class literal. - :return: model object. - """ + params = self.__gather_params(kwargs) + + accept_headers_list = self.headers_map['accept'] + if accept_headers_list: + params['header']['Accept'] = self.api_client.select_header_accept( + accept_headers_list) - return klass.from_dict(data) + if kwargs.get('_content_type'): + params['header']['Content-Type'] = kwargs['_content_type'] + else: + content_type_headers_list = self.headers_map['content_type'] + if content_type_headers_list: + if params['body'] != "": + content_types_list = self.api_client.select_header_content_type( + content_type_headers_list, self.settings['http_method'], + params['body']) + if content_types_list: + params['header']['Content-Type'] = content_types_list + + return self.api_client.call_api( + self.settings['endpoint_path'], self.settings['http_method'], + params['path'], + params['query'], + params['header'], + body=params['body'], + post_params=params['form'], + files=params['file'], + response_type=self.settings['response_type'], + auth_settings=self.settings['auth'], + async_req=kwargs['async_req'], + _check_type=kwargs['_check_return_type'], + _return_http_data_only=kwargs['_return_http_data_only'], + _preload_content=kwargs['_preload_content'], + _request_timeout=kwargs['_request_timeout'], + _host=_host, + _request_auths=kwargs['_request_auths'], + collection_formats=params['collection_format']) diff --git a/Monei/apis/__init__.py b/Monei/apis/__init__.py new file mode 100644 index 0000000..1011fd6 --- /dev/null +++ b/Monei/apis/__init__.py @@ -0,0 +1,21 @@ + +# flake8: noqa + +# Import all APIs into this package. +# If you have many APIs here with many many models used in each API this may +# raise a `RecursionError`. +# In order to avoid this, import only the API that you directly need like: +# +# from Monei.api.apple_pay_domain_api import ApplePayDomainApi +# +# or import this package, but before doing it, use: +# +# import sys +# sys.setrecursionlimit(n) + +# Import APIs into API package: +from Monei.api.apple_pay_domain_api import ApplePayDomainApi +from Monei.api.bizum_api import BizumApi +from Monei.api.payment_methods_api import PaymentMethodsApi +from Monei.api.payments_api import PaymentsApi +from Monei.api.subscriptions_api import SubscriptionsApi diff --git a/Monei/configuration.py b/Monei/configuration.py index 53d2830..fc74583 100644 --- a/Monei/configuration.py +++ b/Monei/configuration.py @@ -1,28 +1,22 @@ -# coding: utf-8 - """ MONEI API v1 -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

- - The version of the OpenAPI document: 1.5.1 - Generated by OpenAPI Generator (https://openapi-generator.tech) +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - Do not edit the class manually. -""" # noqa: E501 + The version of the OpenAPI document: 1.5.3 + Generated by: https://openapi-generator.tech +""" import copy -import http.client as httplib import logging -from logging import FileHandler import multiprocessing import sys -from typing import Any, ClassVar, Dict, List, Literal, Optional, TypedDict, Union -from typing_extensions import NotRequired, Self - import urllib3 +from http import client as http_client +from Monei.exceptions import ApiValueError + JSON_SCHEMA_VALIDATION_KEYWORDS = { 'multipleOf', 'maximum', 'exclusiveMaximum', @@ -30,125 +24,46 @@ 'minLength', 'pattern', 'maxItems', 'minItems' } -ServerVariablesT = Dict[str, str] - -GenericAuthSetting = TypedDict( - "GenericAuthSetting", - { - "type": str, - "in": str, - "key": str, - "value": str, - }, -) - - -OAuth2AuthSetting = TypedDict( - "OAuth2AuthSetting", - { - "type": Literal["oauth2"], - "in": Literal["header"], - "key": Literal["Authorization"], - "value": str, - }, -) - - -APIKeyAuthSetting = TypedDict( - "APIKeyAuthSetting", - { - "type": Literal["api_key"], - "in": str, - "key": str, - "value": Optional[str], - }, -) - - -BasicAuthSetting = TypedDict( - "BasicAuthSetting", - { - "type": Literal["basic"], - "in": Literal["header"], - "key": Literal["Authorization"], - "value": Optional[str], - }, -) - - -BearerFormatAuthSetting = TypedDict( - "BearerFormatAuthSetting", - { - "type": Literal["bearer"], - "in": Literal["header"], - "format": Literal["JWT"], - "key": Literal["Authorization"], - "value": str, - }, -) - +class Configuration(object): + """NOTE: This class is auto generated by OpenAPI Generator -BearerAuthSetting = TypedDict( - "BearerAuthSetting", - { - "type": Literal["bearer"], - "in": Literal["header"], - "key": Literal["Authorization"], - "value": str, - }, -) - - -HTTPSignatureAuthSetting = TypedDict( - "HTTPSignatureAuthSetting", - { - "type": Literal["http-signature"], - "in": Literal["header"], - "key": Literal["Authorization"], - "value": None, - }, -) - - -AuthSettings = TypedDict( - "AuthSettings", - { - "APIKey": APIKeyAuthSetting, - "AccountId": APIKeyAuthSetting, - }, - total=False, -) - - -class HostSettingVariable(TypedDict): - description: str - default_value: str - enum_values: List[str] - - -class HostSetting(TypedDict): - url: str - description: str - variables: NotRequired[Dict[str, HostSettingVariable]] - - -class Configuration: - """This class contains various settings of the API client. + Ref: https://openapi-generator.tech + Do not edit the class manually. - :param host: Base url. - :param ignore_operation_servers - Boolean to ignore operation servers for the API client. - Config will use `host` as the base url regardless of the operation servers. + :param host: Base url :param api_key: Dict to store API key(s). Each entry in the dict specifies an API key. The dict key is the name of the security scheme in the OAS specification. The dict value is the API key secret. - :param api_key_prefix: Dict to store API prefix (e.g. Bearer). + :param api_key_prefix: Dict to store API prefix (e.g. Bearer) The dict key is the name of the security scheme in the OAS specification. The dict value is an API key prefix when generating the auth data. - :param username: Username for HTTP basic authentication. - :param password: Password for HTTP basic authentication. - :param access_token: Access token. + :param username: Username for HTTP basic authentication + :param password: Password for HTTP basic authentication + :param discard_unknown_keys: Boolean value indicating whether to discard + unknown properties. A server may send a response that includes additional + properties that are not known by the client in the following scenarios: + 1. The OpenAPI document is incomplete, i.e. it does not match the server + implementation. + 2. The client was generated using an older version of the OpenAPI document + and the server has been upgraded since then. + If a schema in the OpenAPI document defines the additionalProperties attribute, + then all undeclared properties received by the server are injected into the + additional properties map. In that case, there are undeclared properties, and + nothing to discard. + :param disabled_client_side_validations (string): Comma-separated list of + JSON schema validation keywords to disable JSON schema structural validation + rules. The following keywords may be specified: multipleOf, maximum, + exclusiveMaximum, minimum, exclusiveMinimum, maxLength, minLength, pattern, + maxItems, minItems. + By default, the validation is performed for data generated locally by the client + and data received from the server, independent of any validation performed by + the server side. If the input data does not satisfy the JSON schema validation + rules specified in the OpenAPI document, an exception is raised. + If disabled_client_side_validations is set, structural validation is + disabled. This can be useful to troubleshoot data validation problem, such as + when the OpenAPI document validation rules do not match the actual API data + received by the server. :param server_index: Index to servers configuration. :param server_variables: Mapping with string values to replace variables in templated server configuration. The validation of enums is performed for @@ -157,13 +72,9 @@ class Configuration: configuration. :param server_operation_variables: Mapping from operation ID to a mapping with string values to replace variables in templated server configuration. - The validation of enums is performed for variables with defined enum - values before. + The validation of enums is performed for variables with defined enum values before. :param ssl_ca_cert: str - the path to a file of concatenated CA certificates - in PEM format. - :param retries: Number of retries for API requests. - :param ca_cert_data: verify the peer using concatenated CA certificate data - in PEM (str) or DER (bytes) format. + in PEM format :Example: @@ -187,27 +98,18 @@ class Configuration: Cookie: JSESSIONID abc123 """ - _default: ClassVar[Optional[Self]] = None - - def __init__( - self, - host: Optional[str]=None, - api_key: Optional[Dict[str, str]]=None, - api_key_prefix: Optional[Dict[str, str]]=None, - username: Optional[str]=None, - password: Optional[str]=None, - access_token: Optional[str]=None, - server_index: Optional[int]=None, - server_variables: Optional[ServerVariablesT]=None, - server_operation_index: Optional[Dict[int, int]]=None, - server_operation_variables: Optional[Dict[int, ServerVariablesT]]=None, - ignore_operation_servers: bool=False, - ssl_ca_cert: Optional[str]=None, - retries: Optional[int] = None, - ca_cert_data: Optional[Union[str, bytes]] = None, - *, - debug: Optional[bool] = None, - ) -> None: + _default = None + + def __init__(self, host=None, + api_key=None, api_key_prefix=None, + access_token=None, + username=None, password=None, + discard_unknown_keys=False, + disabled_client_side_validations="", + server_index=None, server_variables=None, + server_operation_index=None, server_operation_variables=None, + ssl_ca_cert=None, + ): """Constructor """ self._base_path = "https://api.monei.com/v1" if host is None else host @@ -221,13 +123,11 @@ def __init__( self.server_operation_variables = server_operation_variables or {} """Default server variables """ - self.ignore_operation_servers = ignore_operation_servers - """Ignore operation servers - """ self.temp_folder_path = None """Temp file folder for downloading files """ # Authentication Settings + self.access_token = access_token self.api_key = {} if api_key: self.api_key = api_key @@ -247,9 +147,8 @@ def __init__( self.password = password """Password for HTTP basic authentication """ - self.access_token = access_token - """Access token - """ + self.discard_unknown_keys = discard_unknown_keys + self.disabled_client_side_validations = disabled_client_side_validations self.logger = {} """Logging Settings """ @@ -261,16 +160,13 @@ def __init__( self.logger_stream_handler = None """Log stream handler """ - self.logger_file_handler: Optional[FileHandler] = None + self.logger_file_handler = None """Log file handler """ self.logger_file = None """Debug file location """ - if debug is not None: - self.debug = debug - else: - self.__debug = False + self.debug = False """Debug switch """ @@ -282,10 +178,6 @@ def __init__( self.ssl_ca_cert = ssl_ca_cert """Set this to customize the certificate file to verify the peer. """ - self.ca_cert_data = ca_cert_data - """Set this to verify the peer using PEM (str) or DER (bytes) - certificate data. - """ self.cert_file = None """client certificate file """ @@ -295,10 +187,6 @@ def __init__( self.assert_hostname = None """Set this to True/False to enable/disable SSL hostname verification. """ - self.tls_server_name = None - """SSL/TLS Server Name Indication (SNI) - Set this to the SNI value expected by the server. - """ self.connection_pool_maxsize = multiprocessing.cpu_count() * 5 """urllib3 connection pool's maximum number of connections saved @@ -308,34 +196,28 @@ def __init__( cpu_count * 5 is used as default value to increase performance. """ - self.proxy: Optional[str] = None + self.proxy = None """Proxy URL """ + self.no_proxy = None + """bypass proxy for host in the no_proxy list. + """ self.proxy_headers = None """Proxy headers """ self.safe_chars_for_path_param = '' """Safe chars for path_param """ - self.retries = retries + self.retries = None """Adding retries to override urllib3 default value 3 """ # Enable client side validation self.client_side_validation = True + # Options to pass down to the underlying urllib3 socket self.socket_options = None - """Options to pass down to the underlying urllib3 socket - """ - - self.datetime_format = "%Y-%m-%dT%H:%M:%S.%f%z" - """datetime format - """ - self.date_format = "%Y-%m-%d" - """date format - """ - - def __deepcopy__(self, memo: Dict[int, Any]) -> Self: + def __deepcopy__(self, memo): cls = self.__class__ result = cls.__new__(cls) memo[id(self)] = result @@ -349,11 +231,18 @@ def __deepcopy__(self, memo: Dict[int, Any]) -> Self: result.debug = self.debug return result - def __setattr__(self, name: str, value: Any) -> None: + def __setattr__(self, name, value): object.__setattr__(self, name, value) + if name == 'disabled_client_side_validations': + s = set(filter(None, value.split(','))) + for v in s: + if v not in JSON_SCHEMA_VALIDATION_KEYWORDS: + raise ApiValueError( + "Invalid keyword: '{0}''".format(v)) + self._disabled_client_side_validations = s @classmethod - def set_default(cls, default: Optional[Self]) -> None: + def set_default(cls, default): """Set default instance of configuration. It stores default configuration, which can be @@ -361,34 +250,24 @@ def set_default(cls, default: Optional[Self]) -> None: :param default: object of Configuration """ - cls._default = default + cls._default = copy.deepcopy(default) @classmethod - def get_default_copy(cls) -> Self: - """Deprecated. Please use `get_default` instead. - - Deprecated. Please use `get_default` instead. - - :return: The configuration object. - """ - return cls.get_default() - - @classmethod - def get_default(cls) -> Self: - """Return the default configuration. + def get_default_copy(cls): + """Return new instance of configuration. This method returns newly created, based on default constructor, object of Configuration class or returns a copy of default - configuration. + configuration passed by the set_default method. :return: The configuration object. """ - if cls._default is None: - cls._default = cls() - return cls._default + if cls._default is not None: + return copy.deepcopy(cls._default) + return Configuration() @property - def logger_file(self) -> Optional[str]: + def logger_file(self): """The logger file. If the logger_file is None, then add stream handler and remove file @@ -400,7 +279,7 @@ def logger_file(self) -> Optional[str]: return self.__logger_file @logger_file.setter - def logger_file(self, value: Optional[str]) -> None: + def logger_file(self, value): """The logger file. If the logger_file is None, then add stream handler and remove file @@ -419,7 +298,7 @@ def logger_file(self, value: Optional[str]) -> None: logger.addHandler(self.logger_file_handler) @property - def debug(self) -> bool: + def debug(self): """Debug status :param value: The debug status, True or False. @@ -428,7 +307,7 @@ def debug(self) -> bool: return self.__debug @debug.setter - def debug(self, value: bool) -> None: + def debug(self, value): """Debug status :param value: The debug status, True or False. @@ -439,18 +318,18 @@ def debug(self, value: bool) -> None: # if debug status is True, turn on debug logging for _, logger in self.logger.items(): logger.setLevel(logging.DEBUG) - # turn on httplib debug - httplib.HTTPConnection.debuglevel = 1 + # turn on http_client debug + http_client.HTTPConnection.debuglevel = 1 else: # if debug status is False, turn off debug logging, # setting log level to default `logging.WARNING` for _, logger in self.logger.items(): logger.setLevel(logging.WARNING) - # turn off httplib debug - httplib.HTTPConnection.debuglevel = 0 + # turn off http_client debug + http_client.HTTPConnection.debuglevel = 0 @property - def logger_format(self) -> str: + def logger_format(self): """The logger format. The logger_formatter will be updated when sets logger_format. @@ -461,7 +340,7 @@ def logger_format(self) -> str: return self.__logger_format @logger_format.setter - def logger_format(self, value: str) -> None: + def logger_format(self, value): """The logger format. The logger_formatter will be updated when sets logger_format. @@ -472,7 +351,7 @@ def logger_format(self, value: str) -> None: self.__logger_format = value self.logger_formatter = logging.Formatter(self.__logger_format) - def get_api_key_with_prefix(self, identifier: str, alias: Optional[str]=None) -> Optional[str]: + def get_api_key_with_prefix(self, identifier, alias=None): """Gets API key (with prefix if set). :param identifier: The identifier of apiKey. @@ -489,9 +368,7 @@ def get_api_key_with_prefix(self, identifier: str, alias: Optional[str]=None) -> else: return key - return None - - def get_basic_auth_token(self) -> Optional[str]: + def get_basic_auth_token(self): """Gets HTTP basic authentication header (string). :return: The token for basic HTTP authentication. @@ -506,12 +383,12 @@ def get_basic_auth_token(self) -> Optional[str]: basic_auth=username + ':' + password ).get('authorization') - def auth_settings(self)-> AuthSettings: + def auth_settings(self): """Gets Auth Settings dict for api client. :return: The Auth Settings information dict. """ - auth: AuthSettings = {} + auth = {} if 'APIKey' in self.api_key: auth['APIKey'] = { 'type': 'api_key', @@ -532,7 +409,7 @@ def auth_settings(self)-> AuthSettings: } return auth - def to_debug_report(self) -> str: + def to_debug_report(self): """Gets the essential information for debugging. :return: The report for debugging. @@ -540,11 +417,11 @@ def to_debug_report(self) -> str: return "Python SDK Debug Report:\n"\ "OS: {env}\n"\ "Python Version: {pyversion}\n"\ - "Version of the API: 1.5.1\n"\ + "Version of the API: 1.5.3\n"\ "SDK Package Version: 1.2.6".\ format(env=sys.platform, pyversion=sys.version) - def get_host_settings(self) -> List[HostSetting]: + def get_host_settings(self): """Gets an array of host settings :return: An array of host settings @@ -556,12 +433,7 @@ def get_host_settings(self) -> List[HostSetting]: } ] - def get_host_from_settings( - self, - index: Optional[int], - variables: Optional[ServerVariablesT]=None, - servers: Optional[List[HostSetting]]=None, - ) -> str: + def get_host_from_settings(self, index, variables=None, servers=None): """Gets host URL based on the index and variables :param index: array index of the host settings :param variables: hash of variable and the corresponding value @@ -601,12 +473,12 @@ def get_host_from_settings( return url @property - def host(self) -> str: + def host(self): """Return generated host.""" return self.get_host_from_settings(self.server_index, variables=self.server_variables) @host.setter - def host(self, value: str) -> None: + def host(self, value): """Fix base path.""" self._base_path = value self.server_index = None diff --git a/Monei/exceptions.py b/Monei/exceptions.py index 4ca1124..2c82922 100644 --- a/Monei/exceptions.py +++ b/Monei/exceptions.py @@ -1,18 +1,12 @@ -# coding: utf-8 - """ MONEI API v1 -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

- - The version of the OpenAPI document: 1.5.1 - Generated by OpenAPI Generator (https://openapi-generator.tech) +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - Do not edit the class manually. -""" # noqa: E501 + The version of the OpenAPI document: 1.5.3 + Generated by: https://openapi-generator.tech +""" -from typing import Any, Optional -from typing_extensions import Self class OpenApiException(Exception): """The base exception class for all OpenAPIExceptions""" @@ -20,7 +14,7 @@ class OpenApiException(Exception): class ApiTypeError(OpenApiException, TypeError): def __init__(self, msg, path_to_item=None, valid_classes=None, - key_type=None) -> None: + key_type=None): """ Raises an exception for TypeErrors Args: @@ -48,7 +42,7 @@ def __init__(self, msg, path_to_item=None, valid_classes=None, class ApiValueError(OpenApiException, ValueError): - def __init__(self, msg, path_to_item=None) -> None: + def __init__(self, msg, path_to_item=None): """ Args: msg (str): the exception message @@ -66,7 +60,7 @@ def __init__(self, msg, path_to_item=None) -> None: class ApiAttributeError(OpenApiException, AttributeError): - def __init__(self, msg, path_to_item=None) -> None: + def __init__(self, msg, path_to_item=None): """ Raised when an attribute reference or assignment fails. @@ -85,7 +79,7 @@ def __init__(self, msg, path_to_item=None) -> None: class ApiKeyError(OpenApiException, KeyError): - def __init__(self, msg, path_to_item=None) -> None: + def __init__(self, msg, path_to_item=None): """ Args: msg (str): the exception message @@ -103,106 +97,54 @@ def __init__(self, msg, path_to_item=None) -> None: class ApiException(OpenApiException): - def __init__( - self, - status=None, - reason=None, - http_resp=None, - *, - body: Optional[str] = None, - data: Optional[Any] = None, - ) -> None: - self.status = status - self.reason = reason - self.body = body - self.data = data - self.headers = None - + def __init__(self, status=None, reason=None, http_resp=None): if http_resp: - if self.status is None: - self.status = http_resp.status - if self.reason is None: - self.reason = http_resp.reason - if self.body is None: - try: - self.body = http_resp.data.decode('utf-8') - except Exception: - pass + self.status = http_resp.status + self.reason = http_resp.reason + self.body = http_resp.data self.headers = http_resp.getheaders() - - @classmethod - def from_response( - cls, - *, - http_resp, - body: Optional[str], - data: Optional[Any], - ) -> Self: - if http_resp.status == 400: - raise BadRequestException(http_resp=http_resp, body=body, data=data) - - if http_resp.status == 401: - raise UnauthorizedException(http_resp=http_resp, body=body, data=data) - - if http_resp.status == 403: - raise ForbiddenException(http_resp=http_resp, body=body, data=data) - - if http_resp.status == 404: - raise NotFoundException(http_resp=http_resp, body=body, data=data) - - # Added new conditions for 409 and 422 - if http_resp.status == 409: - raise ConflictException(http_resp=http_resp, body=body, data=data) - - if http_resp.status == 422: - raise UnprocessableEntityException(http_resp=http_resp, body=body, data=data) - - if 500 <= http_resp.status <= 599: - raise ServiceException(http_resp=http_resp, body=body, data=data) - raise ApiException(http_resp=http_resp, body=body, data=data) + else: + self.status = status + self.reason = reason + self.body = None + self.headers = None def __str__(self): """Custom error messages for exception""" - error_message = "({0})\n"\ + 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.data or self.body: - error_message += "HTTP response body: {0}\n".format(self.data or self.body) + if self.body: + error_message += "HTTP response body: {0}\n".format(self.body) return error_message -class BadRequestException(ApiException): - pass - - class NotFoundException(ApiException): - pass + def __init__(self, status=None, reason=None, http_resp=None): + super(NotFoundException, self).__init__(status, reason, http_resp) -class UnauthorizedException(ApiException): - pass +class UnauthorizedException(ApiException): -class ForbiddenException(ApiException): - pass + def __init__(self, status=None, reason=None, http_resp=None): + super(UnauthorizedException, self).__init__(status, reason, http_resp) -class ServiceException(ApiException): - pass +class ForbiddenException(ApiException): + def __init__(self, status=None, reason=None, http_resp=None): + super(ForbiddenException, self).__init__(status, reason, http_resp) -class ConflictException(ApiException): - """Exception for HTTP 409 Conflict.""" - pass +class ServiceException(ApiException): -class UnprocessableEntityException(ApiException): - """Exception for HTTP 422 Unprocessable Entity.""" - pass + def __init__(self, status=None, reason=None, http_resp=None): + super(ServiceException, self).__init__(status, reason, http_resp) def render_path(path_to_item): diff --git a/Monei/model/__init__.py b/Monei/model/__init__.py new file mode 100644 index 0000000..9e13e35 --- /dev/null +++ b/Monei/model/__init__.py @@ -0,0 +1,5 @@ +# we can not import model classes here because that would create a circular +# reference which would not work in python2 +# do not import all models into this module because that uses a lot of memory and stack frames +# if you need the ability to import all models from one package, import them with +# from Monei.models import ModelA, ModelB diff --git a/Monei/model/activate_subscription_request.py b/Monei/model/activate_subscription_request.py new file mode 100644 index 0000000..adab4b3 --- /dev/null +++ b/Monei/model/activate_subscription_request.py @@ -0,0 +1,291 @@ +""" + MONEI API v1 + +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 + + The version of the OpenAPI document: 1.5.3 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from Monei.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from Monei.exceptions import ApiAttributeError + + + +class ActivateSubscriptionRequest(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'payment_token': (bool, date, datetime, dict, float, int, list, str, none_type,), # noqa: E501 + 'session_id': (str,), # noqa: E501 + 'add_amount': (bool, date, datetime, dict, float, int, list, str, none_type,), # noqa: E501 + 'sequence_id': (str,), # noqa: E501 + 'complete_url': (str,), # noqa: E501 + 'fail_url': (str,), # noqa: E501 + 'cancel_url': (str,), # noqa: E501 + 'metadata': ({str: (bool, date, datetime, dict, float, int, list, str, none_type)},), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'payment_token': 'paymentToken', # noqa: E501 + 'session_id': 'sessionId', # noqa: E501 + 'add_amount': 'addAmount', # noqa: E501 + 'sequence_id': 'sequenceId', # noqa: E501 + 'complete_url': 'completeUrl', # noqa: E501 + 'fail_url': 'failUrl', # noqa: E501 + 'cancel_url': 'cancelUrl', # noqa: E501 + 'metadata': 'metadata', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """ActivateSubscriptionRequest - 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 + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + payment_token (bool, date, datetime, dict, float, int, list, str, none_type): A payment token generated by monei.js [Components](https://docs.monei.com/docs/monei-js-overview) or a paymentToken [saved after a previous successful payment](https://docs.monei.com/docs/save-payment-method). In case of the first one, you will also need to send the `sessionId` used to generate the token in the first place. . [optional] # noqa: E501 + session_id (str): A unique identifier within your system that adds security to the payment process. You need to pass the same session ID as the one used on the frontend to initialize MONEI Component (if you needed to). This is required if a payment token (not permanent) was already generated in the frontend. . [optional] # noqa: E501 + add_amount (bool, date, datetime, dict, float, int, list, str, none_type): The amount to be added to the subscription's initial payment. A positive integer representing how much to charge in the smallest currency unit (e.g., 100 cents to charge 1.00 USD). . [optional] # noqa: E501 + sequence_id (str): A permanent identifier that refers to the initial payment of a sequence of payments. This value needs to be sent in the path for `RECURRING` payments. . [optional] # noqa: E501 + complete_url (str): The URL the customer will be directed to after transaction completed (successful or failed - except if `failUrl` is provided). . [optional] # noqa: E501 + fail_url (str): The URL the customer will be directed to after transaction has failed, instead of `completeUrl` (used in hosted payment page). This allows to provide two different URLs for successful and failed payments. . [optional] # noqa: E501 + cancel_url (str): The URL the customer will be directed to if they decide to cancel payment and return to your website (used in hosted payment page). . [optional] # noqa: E501 + metadata ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}): A set of key-value pairs that you can attach to a resource. This can be useful for storing additional information about the resource in a structured format.. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """ActivateSubscriptionRequest - 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 + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + payment_token (bool, date, datetime, dict, float, int, list, str, none_type): A payment token generated by monei.js [Components](https://docs.monei.com/docs/monei-js-overview) or a paymentToken [saved after a previous successful payment](https://docs.monei.com/docs/save-payment-method). In case of the first one, you will also need to send the `sessionId` used to generate the token in the first place. . [optional] # noqa: E501 + session_id (str): A unique identifier within your system that adds security to the payment process. You need to pass the same session ID as the one used on the frontend to initialize MONEI Component (if you needed to). This is required if a payment token (not permanent) was already generated in the frontend. . [optional] # noqa: E501 + add_amount (bool, date, datetime, dict, float, int, list, str, none_type): The amount to be added to the subscription's initial payment. A positive integer representing how much to charge in the smallest currency unit (e.g., 100 cents to charge 1.00 USD). . [optional] # noqa: E501 + sequence_id (str): A permanent identifier that refers to the initial payment of a sequence of payments. This value needs to be sent in the path for `RECURRING` payments. . [optional] # noqa: E501 + complete_url (str): The URL the customer will be directed to after transaction completed (successful or failed - except if `failUrl` is provided). . [optional] # noqa: E501 + fail_url (str): The URL the customer will be directed to after transaction has failed, instead of `completeUrl` (used in hosted payment page). This allows to provide two different URLs for successful and failed payments. . [optional] # noqa: E501 + cancel_url (str): The URL the customer will be directed to if they decide to cancel payment and return to your website (used in hosted payment page). . [optional] # noqa: E501 + metadata ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}): A set of key-value pairs that you can attach to a resource. This can be useful for storing additional information about the resource in a structured format.. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/Monei/model/address.py b/Monei/model/address.py new file mode 100644 index 0000000..ed41eb4 --- /dev/null +++ b/Monei/model/address.py @@ -0,0 +1,283 @@ +""" + MONEI API v1 + +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 + + The version of the OpenAPI document: 1.5.3 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from Monei.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from Monei.exceptions import ApiAttributeError + + + +class Address(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'country': (str,), # noqa: E501 + 'city': (str,), # noqa: E501 + 'line1': (str,), # noqa: E501 + 'line2': (str,), # noqa: E501 + 'zip': (str,), # noqa: E501 + 'state': (str,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'country': 'country', # noqa: E501 + 'city': 'city', # noqa: E501 + 'line1': 'line1', # noqa: E501 + 'line2': 'line2', # noqa: E501 + 'zip': 'zip', # noqa: E501 + 'state': 'state', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """Address - 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 + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + country (str): Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).. [optional] # noqa: E501 + city (str): City, district, suburb, town, or village.. [optional] # noqa: E501 + line1 (str): Address line 1 (e.g., street, PO Box, or company name).. [optional] # noqa: E501 + line2 (str): Address line 2 (e.g., apartment, suite, unit, or building).. [optional] # noqa: E501 + zip (str): ZIP or postal code.. [optional] # noqa: E501 + state (str): State, county, province, or region.. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """Address - 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 + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + country (str): Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).. [optional] # noqa: E501 + city (str): City, district, suburb, town, or village.. [optional] # noqa: E501 + line1 (str): Address line 1 (e.g., street, PO Box, or company name).. [optional] # noqa: E501 + line2 (str): Address line 2 (e.g., apartment, suite, unit, or building).. [optional] # noqa: E501 + zip (str): ZIP or postal code.. [optional] # noqa: E501 + state (str): State, county, province, or region.. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/Monei/model/apple_pay_domain_register200_response.py b/Monei/model/apple_pay_domain_register200_response.py new file mode 100644 index 0000000..9001e3f --- /dev/null +++ b/Monei/model/apple_pay_domain_register200_response.py @@ -0,0 +1,263 @@ +""" + MONEI API v1 + +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 + + The version of the OpenAPI document: 1.5.3 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from Monei.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from Monei.exceptions import ApiAttributeError + + + +class ApplePayDomainRegister200Response(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'success': (bool,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'success': 'success', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """ApplePayDomainRegister200Response - 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 + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + success (bool): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """ApplePayDomainRegister200Response - 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 + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + success (bool): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/Monei/model/apple_pay_domain_register400_response.py b/Monei/model/apple_pay_domain_register400_response.py new file mode 100644 index 0000000..03e885a --- /dev/null +++ b/Monei/model/apple_pay_domain_register400_response.py @@ -0,0 +1,335 @@ +""" + MONEI API v1 + +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 + + The version of the OpenAPI document: 1.5.3 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from Monei.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from Monei.exceptions import ApiAttributeError + + +def lazy_import(): + from Monei.model.error import Error + globals()['Error'] = Error + + +class ApplePayDomainRegister400Response(ModelComposed): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'status': (str,), # noqa: E501 + 'status_code': (int,), # noqa: E501 + 'message': (str,), # noqa: E501 + 'request_id': (str,), # noqa: E501 + 'request_time': (datetime,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'status': 'status', # noqa: E501 + 'status_code': 'statusCode', # noqa: E501 + 'message': 'message', # noqa: E501 + 'request_id': 'requestId', # noqa: E501 + 'request_time': 'requestTime', # noqa: E501 + } + + read_only_vars = { + } + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """ApplePayDomainRegister400Response - a model defined in OpenAPI + + Keyword Args: + status (str): Error type identifier + status_code (int): HTTP status code + message (str): Human-readable error message + request_id (str): Unique identifier for the request + request_time (datetime): Timestamp when the request was processed + _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. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + constant_args = { + '_check_type': _check_type, + '_path_to_item': _path_to_item, + '_spec_property_naming': _spec_property_naming, + '_configuration': _configuration, + '_visited_composed_classes': self._visited_composed_classes, + } + composed_info = validate_get_composed_info( + constant_args, kwargs, self) + self._composed_instances = composed_info[0] + self._var_name_to_model_instances = composed_info[1] + self._additional_properties_model_instances = composed_info[2] + discarded_args = composed_info[3] + + for var_name, var_value in kwargs.items(): + if var_name in discarded_args and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self._additional_properties_model_instances: + # discard variable. + continue + setattr(self, var_name, var_value) + + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + '_composed_instances', + '_var_name_to_model_instances', + '_additional_properties_model_instances', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """ApplePayDomainRegister400Response - a model defined in OpenAPI + + Keyword Args: + status (str): Error type identifier + status_code (int): HTTP status code + message (str): Human-readable error message + request_id (str): Unique identifier for the request + request_time (datetime): Timestamp when the request was processed + _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. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + constant_args = { + '_check_type': _check_type, + '_path_to_item': _path_to_item, + '_spec_property_naming': _spec_property_naming, + '_configuration': _configuration, + '_visited_composed_classes': self._visited_composed_classes, + } + composed_info = validate_get_composed_info( + constant_args, kwargs, self) + self._composed_instances = composed_info[0] + self._var_name_to_model_instances = composed_info[1] + self._additional_properties_model_instances = composed_info[2] + discarded_args = composed_info[3] + + for var_name, var_value in kwargs.items(): + if var_name in discarded_args and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self._additional_properties_model_instances: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") + + @cached_property + def _composed_schemas(): + # we need this here to make our import statements work + # we must store _composed_schemas in here so the code is only run + # when we invoke this method. If we kept this at the class + # level we would get an error because the class level + # code would be run when this module is imported, and these composed + # classes don't exist yet because their module has not finished + # loading + lazy_import() + return { + 'anyOf': [ + ], + 'allOf': [ + Error, + ], + 'oneOf': [ + ], + } diff --git a/Monei/model/apple_pay_domain_register401_response.py b/Monei/model/apple_pay_domain_register401_response.py new file mode 100644 index 0000000..5224055 --- /dev/null +++ b/Monei/model/apple_pay_domain_register401_response.py @@ -0,0 +1,335 @@ +""" + MONEI API v1 + +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 + + The version of the OpenAPI document: 1.5.3 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from Monei.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from Monei.exceptions import ApiAttributeError + + +def lazy_import(): + from Monei.model.error import Error + globals()['Error'] = Error + + +class ApplePayDomainRegister401Response(ModelComposed): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'status': (str,), # noqa: E501 + 'status_code': (int,), # noqa: E501 + 'message': (str,), # noqa: E501 + 'request_id': (str,), # noqa: E501 + 'request_time': (datetime,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'status': 'status', # noqa: E501 + 'status_code': 'statusCode', # noqa: E501 + 'message': 'message', # noqa: E501 + 'request_id': 'requestId', # noqa: E501 + 'request_time': 'requestTime', # noqa: E501 + } + + read_only_vars = { + } + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """ApplePayDomainRegister401Response - a model defined in OpenAPI + + Keyword Args: + status (str): Error type identifier + status_code (int): HTTP status code + message (str): Human-readable error message + request_id (str): Unique identifier for the request + request_time (datetime): Timestamp when the request was processed + _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. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + constant_args = { + '_check_type': _check_type, + '_path_to_item': _path_to_item, + '_spec_property_naming': _spec_property_naming, + '_configuration': _configuration, + '_visited_composed_classes': self._visited_composed_classes, + } + composed_info = validate_get_composed_info( + constant_args, kwargs, self) + self._composed_instances = composed_info[0] + self._var_name_to_model_instances = composed_info[1] + self._additional_properties_model_instances = composed_info[2] + discarded_args = composed_info[3] + + for var_name, var_value in kwargs.items(): + if var_name in discarded_args and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self._additional_properties_model_instances: + # discard variable. + continue + setattr(self, var_name, var_value) + + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + '_composed_instances', + '_var_name_to_model_instances', + '_additional_properties_model_instances', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """ApplePayDomainRegister401Response - a model defined in OpenAPI + + Keyword Args: + status (str): Error type identifier + status_code (int): HTTP status code + message (str): Human-readable error message + request_id (str): Unique identifier for the request + request_time (datetime): Timestamp when the request was processed + _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. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + constant_args = { + '_check_type': _check_type, + '_path_to_item': _path_to_item, + '_spec_property_naming': _spec_property_naming, + '_configuration': _configuration, + '_visited_composed_classes': self._visited_composed_classes, + } + composed_info = validate_get_composed_info( + constant_args, kwargs, self) + self._composed_instances = composed_info[0] + self._var_name_to_model_instances = composed_info[1] + self._additional_properties_model_instances = composed_info[2] + discarded_args = composed_info[3] + + for var_name, var_value in kwargs.items(): + if var_name in discarded_args and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self._additional_properties_model_instances: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") + + @cached_property + def _composed_schemas(): + # we need this here to make our import statements work + # we must store _composed_schemas in here so the code is only run + # when we invoke this method. If we kept this at the class + # level we would get an error because the class level + # code would be run when this module is imported, and these composed + # classes don't exist yet because their module has not finished + # loading + lazy_import() + return { + 'anyOf': [ + ], + 'allOf': [ + Error, + ], + 'oneOf': [ + ], + } diff --git a/Monei/model/apple_pay_domain_register404_response.py b/Monei/model/apple_pay_domain_register404_response.py new file mode 100644 index 0000000..7dbc579 --- /dev/null +++ b/Monei/model/apple_pay_domain_register404_response.py @@ -0,0 +1,335 @@ +""" + MONEI API v1 + +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 + + The version of the OpenAPI document: 1.5.3 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from Monei.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from Monei.exceptions import ApiAttributeError + + +def lazy_import(): + from Monei.model.error import Error + globals()['Error'] = Error + + +class ApplePayDomainRegister404Response(ModelComposed): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'status': (str,), # noqa: E501 + 'status_code': (int,), # noqa: E501 + 'message': (str,), # noqa: E501 + 'request_id': (str,), # noqa: E501 + 'request_time': (datetime,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'status': 'status', # noqa: E501 + 'status_code': 'statusCode', # noqa: E501 + 'message': 'message', # noqa: E501 + 'request_id': 'requestId', # noqa: E501 + 'request_time': 'requestTime', # noqa: E501 + } + + read_only_vars = { + } + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """ApplePayDomainRegister404Response - a model defined in OpenAPI + + Keyword Args: + status (str): Error type identifier + status_code (int): HTTP status code + message (str): Human-readable error message + request_id (str): Unique identifier for the request + request_time (datetime): Timestamp when the request was processed + _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. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + constant_args = { + '_check_type': _check_type, + '_path_to_item': _path_to_item, + '_spec_property_naming': _spec_property_naming, + '_configuration': _configuration, + '_visited_composed_classes': self._visited_composed_classes, + } + composed_info = validate_get_composed_info( + constant_args, kwargs, self) + self._composed_instances = composed_info[0] + self._var_name_to_model_instances = composed_info[1] + self._additional_properties_model_instances = composed_info[2] + discarded_args = composed_info[3] + + for var_name, var_value in kwargs.items(): + if var_name in discarded_args and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self._additional_properties_model_instances: + # discard variable. + continue + setattr(self, var_name, var_value) + + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + '_composed_instances', + '_var_name_to_model_instances', + '_additional_properties_model_instances', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """ApplePayDomainRegister404Response - a model defined in OpenAPI + + Keyword Args: + status (str): Error type identifier + status_code (int): HTTP status code + message (str): Human-readable error message + request_id (str): Unique identifier for the request + request_time (datetime): Timestamp when the request was processed + _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. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + constant_args = { + '_check_type': _check_type, + '_path_to_item': _path_to_item, + '_spec_property_naming': _spec_property_naming, + '_configuration': _configuration, + '_visited_composed_classes': self._visited_composed_classes, + } + composed_info = validate_get_composed_info( + constant_args, kwargs, self) + self._composed_instances = composed_info[0] + self._var_name_to_model_instances = composed_info[1] + self._additional_properties_model_instances = composed_info[2] + discarded_args = composed_info[3] + + for var_name, var_value in kwargs.items(): + if var_name in discarded_args and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self._additional_properties_model_instances: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") + + @cached_property + def _composed_schemas(): + # we need this here to make our import statements work + # we must store _composed_schemas in here so the code is only run + # when we invoke this method. If we kept this at the class + # level we would get an error because the class level + # code would be run when this module is imported, and these composed + # classes don't exist yet because their module has not finished + # loading + lazy_import() + return { + 'anyOf': [ + ], + 'allOf': [ + Error, + ], + 'oneOf': [ + ], + } diff --git a/Monei/model/apple_pay_domain_register422_response.py b/Monei/model/apple_pay_domain_register422_response.py new file mode 100644 index 0000000..8129a11 --- /dev/null +++ b/Monei/model/apple_pay_domain_register422_response.py @@ -0,0 +1,335 @@ +""" + MONEI API v1 + +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 + + The version of the OpenAPI document: 1.5.3 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from Monei.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from Monei.exceptions import ApiAttributeError + + +def lazy_import(): + from Monei.model.error import Error + globals()['Error'] = Error + + +class ApplePayDomainRegister422Response(ModelComposed): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'status': (str,), # noqa: E501 + 'status_code': (int,), # noqa: E501 + 'message': (str,), # noqa: E501 + 'request_id': (str,), # noqa: E501 + 'request_time': (datetime,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'status': 'status', # noqa: E501 + 'status_code': 'statusCode', # noqa: E501 + 'message': 'message', # noqa: E501 + 'request_id': 'requestId', # noqa: E501 + 'request_time': 'requestTime', # noqa: E501 + } + + read_only_vars = { + } + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """ApplePayDomainRegister422Response - a model defined in OpenAPI + + Keyword Args: + status (str): Error type identifier + status_code (int): HTTP status code + message (str): Human-readable error message + request_id (str): Unique identifier for the request + request_time (datetime): Timestamp when the request was processed + _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. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + constant_args = { + '_check_type': _check_type, + '_path_to_item': _path_to_item, + '_spec_property_naming': _spec_property_naming, + '_configuration': _configuration, + '_visited_composed_classes': self._visited_composed_classes, + } + composed_info = validate_get_composed_info( + constant_args, kwargs, self) + self._composed_instances = composed_info[0] + self._var_name_to_model_instances = composed_info[1] + self._additional_properties_model_instances = composed_info[2] + discarded_args = composed_info[3] + + for var_name, var_value in kwargs.items(): + if var_name in discarded_args and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self._additional_properties_model_instances: + # discard variable. + continue + setattr(self, var_name, var_value) + + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + '_composed_instances', + '_var_name_to_model_instances', + '_additional_properties_model_instances', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """ApplePayDomainRegister422Response - a model defined in OpenAPI + + Keyword Args: + status (str): Error type identifier + status_code (int): HTTP status code + message (str): Human-readable error message + request_id (str): Unique identifier for the request + request_time (datetime): Timestamp when the request was processed + _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. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + constant_args = { + '_check_type': _check_type, + '_path_to_item': _path_to_item, + '_spec_property_naming': _spec_property_naming, + '_configuration': _configuration, + '_visited_composed_classes': self._visited_composed_classes, + } + composed_info = validate_get_composed_info( + constant_args, kwargs, self) + self._composed_instances = composed_info[0] + self._var_name_to_model_instances = composed_info[1] + self._additional_properties_model_instances = composed_info[2] + discarded_args = composed_info[3] + + for var_name, var_value in kwargs.items(): + if var_name in discarded_args and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self._additional_properties_model_instances: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") + + @cached_property + def _composed_schemas(): + # we need this here to make our import statements work + # we must store _composed_schemas in here so the code is only run + # when we invoke this method. If we kept this at the class + # level we would get an error because the class level + # code would be run when this module is imported, and these composed + # classes don't exist yet because their module has not finished + # loading + lazy_import() + return { + 'anyOf': [ + ], + 'allOf': [ + Error, + ], + 'oneOf': [ + ], + } diff --git a/Monei/model/apple_pay_domain_register500_response.py b/Monei/model/apple_pay_domain_register500_response.py new file mode 100644 index 0000000..19176a3 --- /dev/null +++ b/Monei/model/apple_pay_domain_register500_response.py @@ -0,0 +1,335 @@ +""" + MONEI API v1 + +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 + + The version of the OpenAPI document: 1.5.3 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from Monei.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from Monei.exceptions import ApiAttributeError + + +def lazy_import(): + from Monei.model.error import Error + globals()['Error'] = Error + + +class ApplePayDomainRegister500Response(ModelComposed): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'status': (str,), # noqa: E501 + 'status_code': (int,), # noqa: E501 + 'message': (str,), # noqa: E501 + 'request_id': (str,), # noqa: E501 + 'request_time': (datetime,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'status': 'status', # noqa: E501 + 'status_code': 'statusCode', # noqa: E501 + 'message': 'message', # noqa: E501 + 'request_id': 'requestId', # noqa: E501 + 'request_time': 'requestTime', # noqa: E501 + } + + read_only_vars = { + } + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """ApplePayDomainRegister500Response - a model defined in OpenAPI + + Keyword Args: + status (str): Error type identifier + status_code (int): HTTP status code + message (str): Human-readable error message + request_id (str): Unique identifier for the request + request_time (datetime): Timestamp when the request was processed + _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. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + constant_args = { + '_check_type': _check_type, + '_path_to_item': _path_to_item, + '_spec_property_naming': _spec_property_naming, + '_configuration': _configuration, + '_visited_composed_classes': self._visited_composed_classes, + } + composed_info = validate_get_composed_info( + constant_args, kwargs, self) + self._composed_instances = composed_info[0] + self._var_name_to_model_instances = composed_info[1] + self._additional_properties_model_instances = composed_info[2] + discarded_args = composed_info[3] + + for var_name, var_value in kwargs.items(): + if var_name in discarded_args and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self._additional_properties_model_instances: + # discard variable. + continue + setattr(self, var_name, var_value) + + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + '_composed_instances', + '_var_name_to_model_instances', + '_additional_properties_model_instances', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """ApplePayDomainRegister500Response - a model defined in OpenAPI + + Keyword Args: + status (str): Error type identifier + status_code (int): HTTP status code + message (str): Human-readable error message + request_id (str): Unique identifier for the request + request_time (datetime): Timestamp when the request was processed + _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. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + constant_args = { + '_check_type': _check_type, + '_path_to_item': _path_to_item, + '_spec_property_naming': _spec_property_naming, + '_configuration': _configuration, + '_visited_composed_classes': self._visited_composed_classes, + } + composed_info = validate_get_composed_info( + constant_args, kwargs, self) + self._composed_instances = composed_info[0] + self._var_name_to_model_instances = composed_info[1] + self._additional_properties_model_instances = composed_info[2] + discarded_args = composed_info[3] + + for var_name, var_value in kwargs.items(): + if var_name in discarded_args and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self._additional_properties_model_instances: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") + + @cached_property + def _composed_schemas(): + # we need this here to make our import statements work + # we must store _composed_schemas in here so the code is only run + # when we invoke this method. If we kept this at the class + # level we would get an error because the class level + # code would be run when this module is imported, and these composed + # classes don't exist yet because their module has not finished + # loading + lazy_import() + return { + 'anyOf': [ + ], + 'allOf': [ + Error, + ], + 'oneOf': [ + ], + } diff --git a/Monei/model/apple_pay_domain_register503_response.py b/Monei/model/apple_pay_domain_register503_response.py new file mode 100644 index 0000000..3d875eb --- /dev/null +++ b/Monei/model/apple_pay_domain_register503_response.py @@ -0,0 +1,335 @@ +""" + MONEI API v1 + +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 + + The version of the OpenAPI document: 1.5.3 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from Monei.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from Monei.exceptions import ApiAttributeError + + +def lazy_import(): + from Monei.model.error import Error + globals()['Error'] = Error + + +class ApplePayDomainRegister503Response(ModelComposed): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'status': (str,), # noqa: E501 + 'status_code': (int,), # noqa: E501 + 'message': (str,), # noqa: E501 + 'request_id': (str,), # noqa: E501 + 'request_time': (datetime,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'status': 'status', # noqa: E501 + 'status_code': 'statusCode', # noqa: E501 + 'message': 'message', # noqa: E501 + 'request_id': 'requestId', # noqa: E501 + 'request_time': 'requestTime', # noqa: E501 + } + + read_only_vars = { + } + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """ApplePayDomainRegister503Response - a model defined in OpenAPI + + Keyword Args: + status (str): Error type identifier + status_code (int): HTTP status code + message (str): Human-readable error message + request_id (str): Unique identifier for the request + request_time (datetime): Timestamp when the request was processed + _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. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + constant_args = { + '_check_type': _check_type, + '_path_to_item': _path_to_item, + '_spec_property_naming': _spec_property_naming, + '_configuration': _configuration, + '_visited_composed_classes': self._visited_composed_classes, + } + composed_info = validate_get_composed_info( + constant_args, kwargs, self) + self._composed_instances = composed_info[0] + self._var_name_to_model_instances = composed_info[1] + self._additional_properties_model_instances = composed_info[2] + discarded_args = composed_info[3] + + for var_name, var_value in kwargs.items(): + if var_name in discarded_args and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self._additional_properties_model_instances: + # discard variable. + continue + setattr(self, var_name, var_value) + + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + '_composed_instances', + '_var_name_to_model_instances', + '_additional_properties_model_instances', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """ApplePayDomainRegister503Response - a model defined in OpenAPI + + Keyword Args: + status (str): Error type identifier + status_code (int): HTTP status code + message (str): Human-readable error message + request_id (str): Unique identifier for the request + request_time (datetime): Timestamp when the request was processed + _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. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + constant_args = { + '_check_type': _check_type, + '_path_to_item': _path_to_item, + '_spec_property_naming': _spec_property_naming, + '_configuration': _configuration, + '_visited_composed_classes': self._visited_composed_classes, + } + composed_info = validate_get_composed_info( + constant_args, kwargs, self) + self._composed_instances = composed_info[0] + self._var_name_to_model_instances = composed_info[1] + self._additional_properties_model_instances = composed_info[2] + discarded_args = composed_info[3] + + for var_name, var_value in kwargs.items(): + if var_name in discarded_args and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self._additional_properties_model_instances: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") + + @cached_property + def _composed_schemas(): + # we need this here to make our import statements work + # we must store _composed_schemas in here so the code is only run + # when we invoke this method. If we kept this at the class + # level we would get an error because the class level + # code would be run when this module is imported, and these composed + # classes don't exist yet because their module has not finished + # loading + lazy_import() + return { + 'anyOf': [ + ], + 'allOf': [ + Error, + ], + 'oneOf': [ + ], + } diff --git a/Monei/model/bizum_validate_phone200_response.py b/Monei/model/bizum_validate_phone200_response.py new file mode 100644 index 0000000..c21f6ef --- /dev/null +++ b/Monei/model/bizum_validate_phone200_response.py @@ -0,0 +1,263 @@ +""" + MONEI API v1 + +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 + + The version of the OpenAPI document: 1.5.3 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from Monei.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from Monei.exceptions import ApiAttributeError + + + +class BizumValidatePhone200Response(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'is_valid': (bool,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'is_valid': 'isValid', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """BizumValidatePhone200Response - 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 + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + is_valid (bool): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """BizumValidatePhone200Response - 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 + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + is_valid (bool): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/Monei/model/cancel_payment_request.py b/Monei/model/cancel_payment_request.py new file mode 100644 index 0000000..e2a3910 --- /dev/null +++ b/Monei/model/cancel_payment_request.py @@ -0,0 +1,269 @@ +""" + MONEI API v1 + +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 + + The version of the OpenAPI document: 1.5.3 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from Monei.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from Monei.exceptions import ApiAttributeError + + +def lazy_import(): + from Monei.model.payment_cancellation_reason import PaymentCancellationReason + globals()['PaymentCancellationReason'] = PaymentCancellationReason + + +class CancelPaymentRequest(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'cancellation_reason': (PaymentCancellationReason,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'cancellation_reason': 'cancellationReason', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """CancelPaymentRequest - 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 + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + cancellation_reason (PaymentCancellationReason): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """CancelPaymentRequest - 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 + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + cancellation_reason (PaymentCancellationReason): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/Monei/model/cancel_subscription_request.py b/Monei/model/cancel_subscription_request.py new file mode 100644 index 0000000..54edd03 --- /dev/null +++ b/Monei/model/cancel_subscription_request.py @@ -0,0 +1,263 @@ +""" + MONEI API v1 + +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 + + The version of the OpenAPI document: 1.5.3 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from Monei.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from Monei.exceptions import ApiAttributeError + + + +class CancelSubscriptionRequest(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'cancel_at_period_end': (bool,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'cancel_at_period_end': 'cancelAtPeriodEnd', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """CancelSubscriptionRequest - 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 + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + cancel_at_period_end (bool): If true, the subscription will be canceled at the end of the current period. . [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """CancelSubscriptionRequest - 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 + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + cancel_at_period_end (bool): If true, the subscription will be canceled at the end of the current period. . [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/Monei/model/capture_payment_request.py b/Monei/model/capture_payment_request.py new file mode 100644 index 0000000..4dfe2f0 --- /dev/null +++ b/Monei/model/capture_payment_request.py @@ -0,0 +1,263 @@ +""" + MONEI API v1 + +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 + + The version of the OpenAPI document: 1.5.3 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from Monei.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from Monei.exceptions import ApiAttributeError + + + +class CapturePaymentRequest(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'amount': (bool, date, datetime, dict, float, int, list, str, none_type,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'amount': 'amount', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """CapturePaymentRequest - 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 + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + amount (bool, date, datetime, dict, float, int, list, str, none_type): The amount to capture, which must be less than or equal to the original amount. Any additional amount will be automatically refunded. . [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """CapturePaymentRequest - 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 + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + amount (bool, date, datetime, dict, float, int, list, str, none_type): The amount to capture, which must be less than or equal to the original amount. Any additional amount will be automatically refunded. . [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/Monei/model/confirm_payment_request.py b/Monei/model/confirm_payment_request.py new file mode 100644 index 0000000..9b45bc0 --- /dev/null +++ b/Monei/model/confirm_payment_request.py @@ -0,0 +1,305 @@ +""" + MONEI API v1 + +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 + + The version of the OpenAPI document: 1.5.3 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from Monei.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from Monei.exceptions import ApiAttributeError + + +def lazy_import(): + from Monei.model.confirm_payment_request_payment_method import ConfirmPaymentRequestPaymentMethod + from Monei.model.payment_billing_details import PaymentBillingDetails + from Monei.model.payment_customer import PaymentCustomer + from Monei.model.payment_shipping_details import PaymentShippingDetails + globals()['ConfirmPaymentRequestPaymentMethod'] = ConfirmPaymentRequestPaymentMethod + globals()['PaymentBillingDetails'] = PaymentBillingDetails + globals()['PaymentCustomer'] = PaymentCustomer + globals()['PaymentShippingDetails'] = PaymentShippingDetails + + +class ConfirmPaymentRequest(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'payment_token': (bool, date, datetime, dict, float, int, list, str, none_type,), # noqa: E501 + 'payment_method': (ConfirmPaymentRequestPaymentMethod,), # noqa: E501 + 'generate_payment_token': (bool,), # noqa: E501 + 'customer': (PaymentCustomer,), # noqa: E501 + 'billing_details': (PaymentBillingDetails,), # noqa: E501 + 'shipping_details': (PaymentShippingDetails,), # noqa: E501 + 'metadata': ({str: (bool, date, datetime, dict, float, int, list, str, none_type)},), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'payment_token': 'paymentToken', # noqa: E501 + 'payment_method': 'paymentMethod', # noqa: E501 + 'generate_payment_token': 'generatePaymentToken', # noqa: E501 + 'customer': 'customer', # noqa: E501 + 'billing_details': 'billingDetails', # noqa: E501 + 'shipping_details': 'shippingDetails', # noqa: E501 + 'metadata': 'metadata', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, payment_token, *args, **kwargs): # noqa: E501 + """ConfirmPaymentRequest - a model defined in OpenAPI + + Args: + payment_token (bool, date, datetime, dict, float, int, list, str, none_type): A payment token generated by monei.js [Components](https://docs.monei.com/docs/monei-js-overview) or a paymentToken [saved after a previous successful payment](https://docs.monei.com/docs/save-payment-method). + + Keyword Args: + _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. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + payment_method (ConfirmPaymentRequestPaymentMethod): [optional] # noqa: E501 + generate_payment_token (bool): If set to true a permanent token that represents a payment method used in the payment will be generated. . [optional] if omitted the server will use the default value of False # noqa: E501 + customer (PaymentCustomer): [optional] # noqa: E501 + billing_details (PaymentBillingDetails): [optional] # noqa: E501 + shipping_details (PaymentShippingDetails): [optional] # noqa: E501 + metadata ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}): A set of key-value pairs that you can attach to a resource. This can be useful for storing additional information about the resource in a structured format.. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.payment_token = payment_token + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, payment_token, *args, **kwargs): # noqa: E501 + """ConfirmPaymentRequest - a model defined in OpenAPI + + Args: + payment_token (bool, date, datetime, dict, float, int, list, str, none_type): A payment token generated by monei.js [Components](https://docs.monei.com/docs/monei-js-overview) or a paymentToken [saved after a previous successful payment](https://docs.monei.com/docs/save-payment-method). + + Keyword Args: + _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. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + payment_method (ConfirmPaymentRequestPaymentMethod): [optional] # noqa: E501 + generate_payment_token (bool): If set to true a permanent token that represents a payment method used in the payment will be generated. . [optional] if omitted the server will use the default value of False # noqa: E501 + customer (PaymentCustomer): [optional] # noqa: E501 + billing_details (PaymentBillingDetails): [optional] # noqa: E501 + shipping_details (PaymentShippingDetails): [optional] # noqa: E501 + metadata ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}): A set of key-value pairs that you can attach to a resource. This can be useful for storing additional information about the resource in a structured format.. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.payment_token = payment_token + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/Monei/model/confirm_payment_request_payment_method.py b/Monei/model/confirm_payment_request_payment_method.py new file mode 100644 index 0000000..354e4d1 --- /dev/null +++ b/Monei/model/confirm_payment_request_payment_method.py @@ -0,0 +1,269 @@ +""" + MONEI API v1 + +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 + + The version of the OpenAPI document: 1.5.3 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from Monei.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from Monei.exceptions import ApiAttributeError + + +def lazy_import(): + from Monei.model.confirm_payment_request_payment_method_card import ConfirmPaymentRequestPaymentMethodCard + globals()['ConfirmPaymentRequestPaymentMethodCard'] = ConfirmPaymentRequestPaymentMethodCard + + +class ConfirmPaymentRequestPaymentMethod(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'card': (ConfirmPaymentRequestPaymentMethodCard,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'card': 'card', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """ConfirmPaymentRequestPaymentMethod - 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 + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + card (ConfirmPaymentRequestPaymentMethodCard): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """ConfirmPaymentRequestPaymentMethod - 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 + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + card (ConfirmPaymentRequestPaymentMethodCard): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/Monei/model/confirm_payment_request_payment_method_card.py b/Monei/model/confirm_payment_request_payment_method_card.py new file mode 100644 index 0000000..76856f3 --- /dev/null +++ b/Monei/model/confirm_payment_request_payment_method_card.py @@ -0,0 +1,267 @@ +""" + MONEI API v1 + +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 + + The version of the OpenAPI document: 1.5.3 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from Monei.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from Monei.exceptions import ApiAttributeError + + + +class ConfirmPaymentRequestPaymentMethodCard(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'cardholder_name': (str,), # noqa: E501 + 'cardholder_email': (str,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'cardholder_name': 'cardholderName', # noqa: E501 + 'cardholder_email': 'cardholderEmail', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """ConfirmPaymentRequestPaymentMethodCard - 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 + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + cardholder_name (str): The cardholder's name, as stated in the credit card.. [optional] # noqa: E501 + cardholder_email (str): The cardholder's email address.. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """ConfirmPaymentRequestPaymentMethodCard - 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 + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + cardholder_name (str): The cardholder's name, as stated in the credit card.. [optional] # noqa: E501 + cardholder_email (str): The cardholder's email address.. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/Monei/model/create_payment_request.py b/Monei/model/create_payment_request.py new file mode 100644 index 0000000..54bb7f2 --- /dev/null +++ b/Monei/model/create_payment_request.py @@ -0,0 +1,389 @@ +""" + MONEI API v1 + +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 + + The version of the OpenAPI document: 1.5.3 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from Monei.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from Monei.exceptions import ApiAttributeError + + +def lazy_import(): + from Monei.model.payment_billing_details import PaymentBillingDetails + from Monei.model.payment_customer import PaymentCustomer + from Monei.model.payment_payment_method_input import PaymentPaymentMethodInput + from Monei.model.payment_payment_methods import PaymentPaymentMethods + from Monei.model.payment_sequence import PaymentSequence + from Monei.model.payment_session_details import PaymentSessionDetails + from Monei.model.payment_shipping_details import PaymentShippingDetails + from Monei.model.payment_transaction_type import PaymentTransactionType + globals()['PaymentBillingDetails'] = PaymentBillingDetails + globals()['PaymentCustomer'] = PaymentCustomer + globals()['PaymentPaymentMethodInput'] = PaymentPaymentMethodInput + globals()['PaymentPaymentMethods'] = PaymentPaymentMethods + globals()['PaymentSequence'] = PaymentSequence + globals()['PaymentSessionDetails'] = PaymentSessionDetails + globals()['PaymentShippingDetails'] = PaymentShippingDetails + globals()['PaymentTransactionType'] = PaymentTransactionType + + +class CreatePaymentRequest(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'amount': (int,), # noqa: E501 + 'currency': (str,), # noqa: E501 + 'order_id': (str,), # noqa: E501 + 'callback_url': (str,), # noqa: E501 + 'complete_url': (str,), # noqa: E501 + 'fail_url': (str,), # noqa: E501 + 'cancel_url': (str,), # noqa: E501 + 'payment_token': (bool, date, datetime, dict, float, int, list, str, none_type,), # noqa: E501 + 'session_id': (str,), # noqa: E501 + 'generate_payment_token': (bool,), # noqa: E501 + 'payment_method': (PaymentPaymentMethodInput,), # noqa: E501 + 'allowed_payment_methods': (PaymentPaymentMethods,), # noqa: E501 + 'transaction_type': (PaymentTransactionType,), # noqa: E501 + 'sequence': (PaymentSequence,), # noqa: E501 + 'store_id': (str,), # noqa: E501 + 'point_of_sale_id': (str,), # noqa: E501 + 'subscription_id': (str,), # noqa: E501 + 'auto_recover': (bool,), # noqa: E501 + 'description': (str,), # noqa: E501 + 'customer': (PaymentCustomer,), # noqa: E501 + 'billing_details': (PaymentBillingDetails,), # noqa: E501 + 'shipping_details': (PaymentShippingDetails,), # noqa: E501 + 'session_details': (PaymentSessionDetails,), # noqa: E501 + 'expire_at': (float,), # noqa: E501 + 'metadata': ({str: (bool, date, datetime, dict, float, int, list, str, none_type)},), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'amount': 'amount', # noqa: E501 + 'currency': 'currency', # noqa: E501 + 'order_id': 'orderId', # noqa: E501 + 'callback_url': 'callbackUrl', # noqa: E501 + 'complete_url': 'completeUrl', # noqa: E501 + 'fail_url': 'failUrl', # noqa: E501 + 'cancel_url': 'cancelUrl', # noqa: E501 + 'payment_token': 'paymentToken', # noqa: E501 + 'session_id': 'sessionId', # noqa: E501 + 'generate_payment_token': 'generatePaymentToken', # noqa: E501 + 'payment_method': 'paymentMethod', # noqa: E501 + 'allowed_payment_methods': 'allowedPaymentMethods', # noqa: E501 + 'transaction_type': 'transactionType', # noqa: E501 + 'sequence': 'sequence', # noqa: E501 + 'store_id': 'storeId', # noqa: E501 + 'point_of_sale_id': 'pointOfSaleId', # noqa: E501 + 'subscription_id': 'subscriptionId', # noqa: E501 + 'auto_recover': 'autoRecover', # noqa: E501 + 'description': 'description', # noqa: E501 + 'customer': 'customer', # noqa: E501 + 'billing_details': 'billingDetails', # noqa: E501 + 'shipping_details': 'shippingDetails', # noqa: E501 + 'session_details': 'sessionDetails', # noqa: E501 + 'expire_at': 'expireAt', # noqa: E501 + 'metadata': 'metadata', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, amount, currency, order_id, *args, **kwargs): # noqa: E501 + """CreatePaymentRequest - a model defined in OpenAPI + + Args: + amount (int): Amount intended to be collected by this payment. A positive integer representing how much to charge in the smallest currency unit (e.g., 100 cents to charge 1.00 USD). + currency (str): Three-letter [ISO currency code](https://en.wikipedia.org/wiki/ISO_4217), in uppercase. Must be a supported currency. + order_id (str): An order ID from your system. A unique identifier that can be used to reconcile the payment with your internal system. + + Keyword Args: + _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. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + callback_url (str): The URL to which a payment result should be sent asynchronously. . [optional] # noqa: E501 + complete_url (str): The URL the customer will be directed to after transaction completed (successful or failed - except if `failUrl` is provided). . [optional] # noqa: E501 + fail_url (str): The URL the customer will be directed to after transaction has failed, instead of `completeUrl` (used in hosted payment page). This allows to provide two different URLs for successful and failed payments. . [optional] # noqa: E501 + cancel_url (str): The URL the customer will be directed to if they decide to cancel payment and return to your website (used in hosted payment page). . [optional] # noqa: E501 + payment_token (bool, date, datetime, dict, float, int, list, str, none_type): A payment token generated by monei.js [Components](https://docs.monei.com/docs/monei-js-overview) or a paymentToken [saved after a previous successful payment](https://docs.monei.com/docs/save-payment-method). In case of the first one, you will also need to send the `sessionId` used to generate the token in the first place. . [optional] # noqa: E501 + session_id (str): A unique identifier within your system that adds security to the payment process. You need to pass the same session ID as the one used on the frontend to initialize MONEI Component (if you needed to). This is required if a payment token (not permanent) was already generated in the frontend. . [optional] # noqa: E501 + generate_payment_token (bool): If set to true a permanent token that represents a payment method used in the payment will be generated. . [optional] if omitted the server will use the default value of False # noqa: E501 + payment_method (PaymentPaymentMethodInput): [optional] # noqa: E501 + allowed_payment_methods (PaymentPaymentMethods): [optional] # noqa: E501 + transaction_type (PaymentTransactionType): [optional] # noqa: E501 + sequence (PaymentSequence): [optional] # noqa: E501 + store_id (str): A unique identifier of the Store. If specified the payment is attached to this Store. . [optional] # noqa: E501 + point_of_sale_id (str): A unique identifier of the Point of Sale. If specified the payment is attached to this Point of Sale. If there is a QR code attached to the same Point of Sale, this payment will be available by scanning the QR code. . [optional] # noqa: E501 + subscription_id (str): A unique identifier of the Subscription. If specified the payment is attached to this Subscription. . [optional] # noqa: E501 + auto_recover (bool): If set to `true`, the new payment will be automatically created when customer visits the payment link of the previously failed payment. Is automatically set to `true` if `completeUrl` is not provided.(set this value to `true` to create \"Pay By Link\" payments).. [optional] # noqa: E501 + description (str): An arbitrary string attached to the payment. Often useful for displaying to users. . [optional] # noqa: E501 + customer (PaymentCustomer): [optional] # noqa: E501 + billing_details (PaymentBillingDetails): [optional] # noqa: E501 + shipping_details (PaymentShippingDetails): [optional] # noqa: E501 + session_details (PaymentSessionDetails): [optional] # noqa: E501 + expire_at (float): Payment expiration time.. [optional] # noqa: E501 + metadata ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}): A set of key-value pairs that you can attach to a resource. This can be useful for storing additional information about the resource in a structured format.. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.amount = amount + self.currency = currency + self.order_id = order_id + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, amount, currency, order_id, *args, **kwargs): # noqa: E501 + """CreatePaymentRequest - a model defined in OpenAPI + + Args: + amount (int): Amount intended to be collected by this payment. A positive integer representing how much to charge in the smallest currency unit (e.g., 100 cents to charge 1.00 USD). + currency (str): Three-letter [ISO currency code](https://en.wikipedia.org/wiki/ISO_4217), in uppercase. Must be a supported currency. + order_id (str): An order ID from your system. A unique identifier that can be used to reconcile the payment with your internal system. + + Keyword Args: + _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. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + callback_url (str): The URL to which a payment result should be sent asynchronously. . [optional] # noqa: E501 + complete_url (str): The URL the customer will be directed to after transaction completed (successful or failed - except if `failUrl` is provided). . [optional] # noqa: E501 + fail_url (str): The URL the customer will be directed to after transaction has failed, instead of `completeUrl` (used in hosted payment page). This allows to provide two different URLs for successful and failed payments. . [optional] # noqa: E501 + cancel_url (str): The URL the customer will be directed to if they decide to cancel payment and return to your website (used in hosted payment page). . [optional] # noqa: E501 + payment_token (bool, date, datetime, dict, float, int, list, str, none_type): A payment token generated by monei.js [Components](https://docs.monei.com/docs/monei-js-overview) or a paymentToken [saved after a previous successful payment](https://docs.monei.com/docs/save-payment-method). In case of the first one, you will also need to send the `sessionId` used to generate the token in the first place. . [optional] # noqa: E501 + session_id (str): A unique identifier within your system that adds security to the payment process. You need to pass the same session ID as the one used on the frontend to initialize MONEI Component (if you needed to). This is required if a payment token (not permanent) was already generated in the frontend. . [optional] # noqa: E501 + generate_payment_token (bool): If set to true a permanent token that represents a payment method used in the payment will be generated. . [optional] if omitted the server will use the default value of False # noqa: E501 + payment_method (PaymentPaymentMethodInput): [optional] # noqa: E501 + allowed_payment_methods (PaymentPaymentMethods): [optional] # noqa: E501 + transaction_type (PaymentTransactionType): [optional] # noqa: E501 + sequence (PaymentSequence): [optional] # noqa: E501 + store_id (str): A unique identifier of the Store. If specified the payment is attached to this Store. . [optional] # noqa: E501 + point_of_sale_id (str): A unique identifier of the Point of Sale. If specified the payment is attached to this Point of Sale. If there is a QR code attached to the same Point of Sale, this payment will be available by scanning the QR code. . [optional] # noqa: E501 + subscription_id (str): A unique identifier of the Subscription. If specified the payment is attached to this Subscription. . [optional] # noqa: E501 + auto_recover (bool): If set to `true`, the new payment will be automatically created when customer visits the payment link of the previously failed payment. Is automatically set to `true` if `completeUrl` is not provided.(set this value to `true` to create \"Pay By Link\" payments).. [optional] # noqa: E501 + description (str): An arbitrary string attached to the payment. Often useful for displaying to users. . [optional] # noqa: E501 + customer (PaymentCustomer): [optional] # noqa: E501 + billing_details (PaymentBillingDetails): [optional] # noqa: E501 + shipping_details (PaymentShippingDetails): [optional] # noqa: E501 + session_details (PaymentSessionDetails): [optional] # noqa: E501 + expire_at (float): Payment expiration time.. [optional] # noqa: E501 + metadata ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}): A set of key-value pairs that you can attach to a resource. This can be useful for storing additional information about the resource in a structured format.. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.amount = amount + self.currency = currency + self.order_id = order_id + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/Monei/model/create_subscription_request.py b/Monei/model/create_subscription_request.py new file mode 100644 index 0000000..7ca0a85 --- /dev/null +++ b/Monei/model/create_subscription_request.py @@ -0,0 +1,339 @@ +""" + MONEI API v1 + +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 + + The version of the OpenAPI document: 1.5.3 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from Monei.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from Monei.exceptions import ApiAttributeError + + +def lazy_import(): + from Monei.model.payment_billing_details import PaymentBillingDetails + from Monei.model.payment_customer import PaymentCustomer + from Monei.model.payment_shipping_details import PaymentShippingDetails + from Monei.model.subscription_interval import SubscriptionInterval + from Monei.model.subscription_retry_schedule import SubscriptionRetrySchedule + globals()['PaymentBillingDetails'] = PaymentBillingDetails + globals()['PaymentCustomer'] = PaymentCustomer + globals()['PaymentShippingDetails'] = PaymentShippingDetails + globals()['SubscriptionInterval'] = SubscriptionInterval + globals()['SubscriptionRetrySchedule'] = SubscriptionRetrySchedule + + +class CreateSubscriptionRequest(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'amount': (int,), # noqa: E501 + 'currency': (str,), # noqa: E501 + 'interval': (SubscriptionInterval,), # noqa: E501 + 'interval_count': (int,), # noqa: E501 + 'description': (str,), # noqa: E501 + 'customer': (PaymentCustomer,), # noqa: E501 + 'billing_details': (PaymentBillingDetails,), # noqa: E501 + 'shipping_details': (PaymentShippingDetails,), # noqa: E501 + 'trial_period_end': (float,), # noqa: E501 + 'trial_period_days': (int,), # noqa: E501 + 'retry_schedule': (SubscriptionRetrySchedule,), # noqa: E501 + 'callback_url': (str,), # noqa: E501 + 'payment_callback_url': (str,), # noqa: E501 + 'metadata': ({str: (bool, date, datetime, dict, float, int, list, str, none_type)},), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'amount': 'amount', # noqa: E501 + 'currency': 'currency', # noqa: E501 + 'interval': 'interval', # noqa: E501 + 'interval_count': 'intervalCount', # noqa: E501 + 'description': 'description', # noqa: E501 + 'customer': 'customer', # noqa: E501 + 'billing_details': 'billingDetails', # noqa: E501 + 'shipping_details': 'shippingDetails', # noqa: E501 + 'trial_period_end': 'trialPeriodEnd', # noqa: E501 + 'trial_period_days': 'trialPeriodDays', # noqa: E501 + 'retry_schedule': 'retrySchedule', # noqa: E501 + 'callback_url': 'callbackUrl', # noqa: E501 + 'payment_callback_url': 'paymentCallbackUrl', # noqa: E501 + 'metadata': 'metadata', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, amount, currency, interval, *args, **kwargs): # noqa: E501 + """CreateSubscriptionRequest - a model defined in OpenAPI + + Args: + amount (int): Amount intended to be collected by this payment. A positive integer representing how much to charge in the smallest currency unit (e.g., 100 cents to charge 1.00 USD). + currency (str): Three-letter [ISO currency code](https://en.wikipedia.org/wiki/ISO_4217), in uppercase. Must be a supported currency. + interval (SubscriptionInterval): + + Keyword Args: + _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. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + interval_count (int): Number of intervals between subscription payments.. [optional] # noqa: E501 + description (str): An arbitrary string attached to the subscription. Often useful for displaying to users. . [optional] # noqa: E501 + customer (PaymentCustomer): [optional] # noqa: E501 + billing_details (PaymentBillingDetails): [optional] # noqa: E501 + shipping_details (PaymentShippingDetails): [optional] # noqa: E501 + trial_period_end (float): The end date of the trial period. Measured in seconds since the Unix epoch.. [optional] # noqa: E501 + trial_period_days (int): Number of days the trial period lasts.. [optional] # noqa: E501 + retry_schedule (SubscriptionRetrySchedule): [optional] # noqa: E501 + callback_url (str): The URL will be called each time subscription status changes. You will receive a subscription object in the body of the request. . [optional] # noqa: E501 + payment_callback_url (str): The URL will be called each time subscription creates a new payments. You will receive the payment object in the body of the request. . [optional] # noqa: E501 + metadata ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}): A set of key-value pairs that you can attach to a resource. This can be useful for storing additional information about the resource in a structured format.. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.amount = amount + self.currency = currency + self.interval = interval + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, amount, currency, interval, *args, **kwargs): # noqa: E501 + """CreateSubscriptionRequest - a model defined in OpenAPI + + Args: + amount (int): Amount intended to be collected by this payment. A positive integer representing how much to charge in the smallest currency unit (e.g., 100 cents to charge 1.00 USD). + currency (str): Three-letter [ISO currency code](https://en.wikipedia.org/wiki/ISO_4217), in uppercase. Must be a supported currency. + interval (SubscriptionInterval): + + Keyword Args: + _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. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + interval_count (int): Number of intervals between subscription payments.. [optional] # noqa: E501 + description (str): An arbitrary string attached to the subscription. Often useful for displaying to users. . [optional] # noqa: E501 + customer (PaymentCustomer): [optional] # noqa: E501 + billing_details (PaymentBillingDetails): [optional] # noqa: E501 + shipping_details (PaymentShippingDetails): [optional] # noqa: E501 + trial_period_end (float): The end date of the trial period. Measured in seconds since the Unix epoch.. [optional] # noqa: E501 + trial_period_days (int): Number of days the trial period lasts.. [optional] # noqa: E501 + retry_schedule (SubscriptionRetrySchedule): [optional] # noqa: E501 + callback_url (str): The URL will be called each time subscription status changes. You will receive a subscription object in the body of the request. . [optional] # noqa: E501 + payment_callback_url (str): The URL will be called each time subscription creates a new payments. You will receive the payment object in the body of the request. . [optional] # noqa: E501 + metadata ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}): A set of key-value pairs that you can attach to a resource. This can be useful for storing additional information about the resource in a structured format.. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.amount = amount + self.currency = currency + self.interval = interval + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/Monei/model/error.py b/Monei/model/error.py new file mode 100644 index 0000000..c3203e4 --- /dev/null +++ b/Monei/model/error.py @@ -0,0 +1,293 @@ +""" + MONEI API v1 + +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 + + The version of the OpenAPI document: 1.5.3 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from Monei.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from Monei.exceptions import ApiAttributeError + + + +class Error(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'status': (str,), # noqa: E501 + 'status_code': (int,), # noqa: E501 + 'message': (str,), # noqa: E501 + 'request_id': (str,), # noqa: E501 + 'request_time': (datetime,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'status': 'status', # noqa: E501 + 'status_code': 'statusCode', # noqa: E501 + 'message': 'message', # noqa: E501 + 'request_id': 'requestId', # noqa: E501 + 'request_time': 'requestTime', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, status, status_code, message, request_id, request_time, *args, **kwargs): # noqa: E501 + """Error - a model defined in OpenAPI + + Args: + status (str): Error type identifier + status_code (int): HTTP status code + message (str): Human-readable error message + request_id (str): Unique identifier for the request + request_time (datetime): Timestamp when the request was processed + + Keyword Args: + _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. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.status = status + self.status_code = status_code + self.message = message + self.request_id = request_id + self.request_time = request_time + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, status, status_code, message, request_id, request_time, *args, **kwargs): # noqa: E501 + """Error - a model defined in OpenAPI + + Args: + status (str): Error type identifier + status_code (int): HTTP status code + message (str): Human-readable error message + request_id (str): Unique identifier for the request + request_time (datetime): Timestamp when the request was processed + + Keyword Args: + _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. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.status = status + self.status_code = status_code + self.message = message + self.request_id = request_id + self.request_time = request_time + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/Monei/model/pause_subscription_request.py b/Monei/model/pause_subscription_request.py new file mode 100644 index 0000000..134fb80 --- /dev/null +++ b/Monei/model/pause_subscription_request.py @@ -0,0 +1,267 @@ +""" + MONEI API v1 + +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 + + The version of the OpenAPI document: 1.5.3 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from Monei.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from Monei.exceptions import ApiAttributeError + + + +class PauseSubscriptionRequest(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'pause_at_period_end': (bool,), # noqa: E501 + 'pause_interval_count': (int,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'pause_at_period_end': 'pauseAtPeriodEnd', # noqa: E501 + 'pause_interval_count': 'pauseIntervalCount', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """PauseSubscriptionRequest - 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 + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + pause_at_period_end (bool): If true, the subscription will be paused at the end of the current period. . [optional] # noqa: E501 + pause_interval_count (int): Number of intervals when subscription will be paused before it activates again.. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """PauseSubscriptionRequest - 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 + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + pause_at_period_end (bool): If true, the subscription will be paused at the end of the current period. . [optional] # noqa: E501 + pause_interval_count (int): Number of intervals when subscription will be paused before it activates again.. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/Monei/model/payment.py b/Monei/model/payment.py new file mode 100644 index 0000000..205311d --- /dev/null +++ b/Monei/model/payment.py @@ -0,0 +1,411 @@ +""" + MONEI API v1 + +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 + + The version of the OpenAPI document: 1.5.3 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from Monei.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from Monei.exceptions import ApiAttributeError + + +def lazy_import(): + from Monei.model.payment_billing_details import PaymentBillingDetails + from Monei.model.payment_cancellation_reason import PaymentCancellationReason + from Monei.model.payment_customer import PaymentCustomer + from Monei.model.payment_last_refund_reason import PaymentLastRefundReason + from Monei.model.payment_next_action import PaymentNextAction + from Monei.model.payment_payment_method import PaymentPaymentMethod + from Monei.model.payment_sequence import PaymentSequence + from Monei.model.payment_session_details import PaymentSessionDetails + from Monei.model.payment_shipping_details import PaymentShippingDetails + from Monei.model.payment_shop import PaymentShop + from Monei.model.payment_status import PaymentStatus + from Monei.model.payment_trace_details import PaymentTraceDetails + globals()['PaymentBillingDetails'] = PaymentBillingDetails + globals()['PaymentCancellationReason'] = PaymentCancellationReason + globals()['PaymentCustomer'] = PaymentCustomer + globals()['PaymentLastRefundReason'] = PaymentLastRefundReason + globals()['PaymentNextAction'] = PaymentNextAction + globals()['PaymentPaymentMethod'] = PaymentPaymentMethod + globals()['PaymentSequence'] = PaymentSequence + globals()['PaymentSessionDetails'] = PaymentSessionDetails + globals()['PaymentShippingDetails'] = PaymentShippingDetails + globals()['PaymentShop'] = PaymentShop + globals()['PaymentStatus'] = PaymentStatus + globals()['PaymentTraceDetails'] = PaymentTraceDetails + + +class Payment(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'id': (str,), # noqa: E501 + 'amount': (int,), # noqa: E501 + 'currency': (str,), # noqa: E501 + 'order_id': (str,), # noqa: E501 + 'description': (str,), # noqa: E501 + 'account_id': (str,), # noqa: E501 + 'authorization_code': (str,), # noqa: E501 + 'livemode': (bool,), # noqa: E501 + 'status': (PaymentStatus,), # noqa: E501 + 'status_code': (str,), # noqa: E501 + 'status_message': (str,), # noqa: E501 + 'customer': (PaymentCustomer,), # noqa: E501 + 'shop': (PaymentShop,), # noqa: E501 + 'billing_details': (PaymentBillingDetails,), # noqa: E501 + 'shipping_details': (PaymentShippingDetails,), # noqa: E501 + 'refunded_amount': (int,), # noqa: E501 + 'last_refund_amount': (int,), # noqa: E501 + 'last_refund_reason': (PaymentLastRefundReason,), # noqa: E501 + 'cancellation_reason': (PaymentCancellationReason,), # noqa: E501 + 'session_details': (PaymentSessionDetails,), # noqa: E501 + 'trace_details': (PaymentTraceDetails,), # noqa: E501 + 'payment_token': (str,), # noqa: E501 + 'payment_method': (PaymentPaymentMethod,), # noqa: E501 + 'sequence': (PaymentSequence,), # noqa: E501 + 'sequence_id': (str,), # noqa: E501 + 'store_id': (str,), # noqa: E501 + 'point_of_sale_id': (str,), # noqa: E501 + 'metadata': ({str: (bool, date, datetime, dict, float, int, list, str, none_type)},), # noqa: E501 + 'next_action': (PaymentNextAction,), # noqa: E501 + 'created_at': (int,), # noqa: E501 + 'updated_at': (int,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'id': 'id', # noqa: E501 + 'amount': 'amount', # noqa: E501 + 'currency': 'currency', # noqa: E501 + 'order_id': 'orderId', # noqa: E501 + 'description': 'description', # noqa: E501 + 'account_id': 'accountId', # noqa: E501 + 'authorization_code': 'authorizationCode', # noqa: E501 + 'livemode': 'livemode', # noqa: E501 + 'status': 'status', # noqa: E501 + 'status_code': 'statusCode', # noqa: E501 + 'status_message': 'statusMessage', # noqa: E501 + 'customer': 'customer', # noqa: E501 + 'shop': 'shop', # noqa: E501 + 'billing_details': 'billingDetails', # noqa: E501 + 'shipping_details': 'shippingDetails', # noqa: E501 + 'refunded_amount': 'refundedAmount', # noqa: E501 + 'last_refund_amount': 'lastRefundAmount', # noqa: E501 + 'last_refund_reason': 'lastRefundReason', # noqa: E501 + 'cancellation_reason': 'cancellationReason', # noqa: E501 + 'session_details': 'sessionDetails', # noqa: E501 + 'trace_details': 'traceDetails', # noqa: E501 + 'payment_token': 'paymentToken', # noqa: E501 + 'payment_method': 'paymentMethod', # noqa: E501 + 'sequence': 'sequence', # noqa: E501 + 'sequence_id': 'sequenceId', # noqa: E501 + 'store_id': 'storeId', # noqa: E501 + 'point_of_sale_id': 'pointOfSaleId', # noqa: E501 + 'metadata': 'metadata', # noqa: E501 + 'next_action': 'nextAction', # noqa: E501 + 'created_at': 'createdAt', # noqa: E501 + 'updated_at': 'updatedAt', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """Payment - 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 + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + id (str): Unique identifier for the payment.. [optional] # noqa: E501 + amount (int): Amount intended to be collected by this payment. A positive integer representing how much to charge in the smallest currency unit (e.g., 100 cents to charge 1.00 USD). . [optional] # noqa: E501 + currency (str): Three-letter [ISO currency code](https://en.wikipedia.org/wiki/ISO_4217), in uppercase. Must be a supported currency. . [optional] # noqa: E501 + order_id (str): An order ID from your system. A unique identifier that can be used to reconcile the payment with your internal system. . [optional] # noqa: E501 + description (str): An arbitrary string attached to the payment. Often useful for displaying to users. . [optional] # noqa: E501 + account_id (str): MONEI Account identifier.. [optional] # noqa: E501 + authorization_code (str): Unique identifier provided by the bank performing transaction. . [optional] # noqa: E501 + livemode (bool): Has the value `true` if the resource exists in live mode or the value `false` if the resource exists in test mode.. [optional] # noqa: E501 + status (PaymentStatus): [optional] # noqa: E501 + status_code (str): Payment status code. . [optional] # noqa: E501 + status_message (str): Human readable status message, can be displayed to a user. . [optional] # noqa: E501 + customer (PaymentCustomer): [optional] # noqa: E501 + shop (PaymentShop): [optional] # noqa: E501 + billing_details (PaymentBillingDetails): [optional] # noqa: E501 + shipping_details (PaymentShippingDetails): [optional] # noqa: E501 + refunded_amount (int): Amount in cents refunded (can be less than the amount attribute on the payment if a partial refund was issued). . [optional] # noqa: E501 + last_refund_amount (int): Amount in cents refunded in the last transaction.. [optional] # noqa: E501 + last_refund_reason (PaymentLastRefundReason): [optional] # noqa: E501 + cancellation_reason (PaymentCancellationReason): [optional] # noqa: E501 + session_details (PaymentSessionDetails): [optional] # noqa: E501 + trace_details (PaymentTraceDetails): [optional] # noqa: E501 + payment_token (str): A permanent token represents a payment method used in the payment. Pass `generatePaymentToken: true` when you creating a payment to generate it. You can pass it as `paymentToken` parameter to create other payments with the same payment method. This token does not expire, and should only be used server-side. . [optional] # noqa: E501 + payment_method (PaymentPaymentMethod): [optional] # noqa: E501 + sequence (PaymentSequence): [optional] # noqa: E501 + sequence_id (str): A permanent identifier that refers to the initial payment of a sequence of payments. This value needs to be sent in the path for `RECURRING` payments. . [optional] # noqa: E501 + store_id (str): A unique identifier of the Store. If specified the payment is attached to this Store. . [optional] # noqa: E501 + point_of_sale_id (str): A unique identifier of the Point of Sale. If specified the payment is attached to this Point of Sale. If there is a QR code attached to the same Point of Sale, this payment will be available by scanning the QR code. . [optional] # noqa: E501 + metadata ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}): A set of key-value pairs that you can attach to a resource. This can be useful for storing additional information about the resource in a structured format.. [optional] # noqa: E501 + next_action (PaymentNextAction): [optional] # noqa: E501 + created_at (int): Time at which the resource was created. Measured in seconds since the Unix epoch.. [optional] # noqa: E501 + updated_at (int): Time at which the resource updated last time. Measured in seconds since the Unix epoch.. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """Payment - 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 + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + id (str): Unique identifier for the payment.. [optional] # noqa: E501 + amount (int): Amount intended to be collected by this payment. A positive integer representing how much to charge in the smallest currency unit (e.g., 100 cents to charge 1.00 USD). . [optional] # noqa: E501 + currency (str): Three-letter [ISO currency code](https://en.wikipedia.org/wiki/ISO_4217), in uppercase. Must be a supported currency. . [optional] # noqa: E501 + order_id (str): An order ID from your system. A unique identifier that can be used to reconcile the payment with your internal system. . [optional] # noqa: E501 + description (str): An arbitrary string attached to the payment. Often useful for displaying to users. . [optional] # noqa: E501 + account_id (str): MONEI Account identifier.. [optional] # noqa: E501 + authorization_code (str): Unique identifier provided by the bank performing transaction. . [optional] # noqa: E501 + livemode (bool): Has the value `true` if the resource exists in live mode or the value `false` if the resource exists in test mode.. [optional] # noqa: E501 + status (PaymentStatus): [optional] # noqa: E501 + status_code (str): Payment status code. . [optional] # noqa: E501 + status_message (str): Human readable status message, can be displayed to a user. . [optional] # noqa: E501 + customer (PaymentCustomer): [optional] # noqa: E501 + shop (PaymentShop): [optional] # noqa: E501 + billing_details (PaymentBillingDetails): [optional] # noqa: E501 + shipping_details (PaymentShippingDetails): [optional] # noqa: E501 + refunded_amount (int): Amount in cents refunded (can be less than the amount attribute on the payment if a partial refund was issued). . [optional] # noqa: E501 + last_refund_amount (int): Amount in cents refunded in the last transaction.. [optional] # noqa: E501 + last_refund_reason (PaymentLastRefundReason): [optional] # noqa: E501 + cancellation_reason (PaymentCancellationReason): [optional] # noqa: E501 + session_details (PaymentSessionDetails): [optional] # noqa: E501 + trace_details (PaymentTraceDetails): [optional] # noqa: E501 + payment_token (str): A permanent token represents a payment method used in the payment. Pass `generatePaymentToken: true` when you creating a payment to generate it. You can pass it as `paymentToken` parameter to create other payments with the same payment method. This token does not expire, and should only be used server-side. . [optional] # noqa: E501 + payment_method (PaymentPaymentMethod): [optional] # noqa: E501 + sequence (PaymentSequence): [optional] # noqa: E501 + sequence_id (str): A permanent identifier that refers to the initial payment of a sequence of payments. This value needs to be sent in the path for `RECURRING` payments. . [optional] # noqa: E501 + store_id (str): A unique identifier of the Store. If specified the payment is attached to this Store. . [optional] # noqa: E501 + point_of_sale_id (str): A unique identifier of the Point of Sale. If specified the payment is attached to this Point of Sale. If there is a QR code attached to the same Point of Sale, this payment will be available by scanning the QR code. . [optional] # noqa: E501 + metadata ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}): A set of key-value pairs that you can attach to a resource. This can be useful for storing additional information about the resource in a structured format.. [optional] # noqa: E501 + next_action (PaymentNextAction): [optional] # noqa: E501 + created_at (int): Time at which the resource was created. Measured in seconds since the Unix epoch.. [optional] # noqa: E501 + updated_at (int): Time at which the resource updated last time. Measured in seconds since the Unix epoch.. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/Monei/model/payment_billing_details.py b/Monei/model/payment_billing_details.py new file mode 100644 index 0000000..0398e69 --- /dev/null +++ b/Monei/model/payment_billing_details.py @@ -0,0 +1,289 @@ +""" + MONEI API v1 + +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 + + The version of the OpenAPI document: 1.5.3 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from Monei.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from Monei.exceptions import ApiAttributeError + + +def lazy_import(): + from Monei.model.address import Address + globals()['Address'] = Address + + +class PaymentBillingDetails(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'name': (str,), # noqa: E501 + 'email': (str,), # noqa: E501 + 'phone': (str,), # noqa: E501 + 'company': (str,), # noqa: E501 + 'tax_id': (str,), # noqa: E501 + 'address': (Address,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'name': 'name', # noqa: E501 + 'email': 'email', # noqa: E501 + 'phone': 'phone', # noqa: E501 + 'company': 'company', # noqa: E501 + 'tax_id': 'taxId', # noqa: E501 + 'address': 'address', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """PaymentBillingDetails - 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 + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + name (str): The customer's billing full name.. [optional] # noqa: E501 + email (str): The customer's billing email address.. [optional] # noqa: E501 + phone (str): The customer's billing phone number in E.164 format.. [optional] # noqa: E501 + company (str): Billing company name.. [optional] # noqa: E501 + tax_id (str): Company tax ID.. [optional] # noqa: E501 + address (Address): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """PaymentBillingDetails - 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 + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + name (str): The customer's billing full name.. [optional] # noqa: E501 + email (str): The customer's billing email address.. [optional] # noqa: E501 + phone (str): The customer's billing phone number in E.164 format.. [optional] # noqa: E501 + company (str): Billing company name.. [optional] # noqa: E501 + tax_id (str): Company tax ID.. [optional] # noqa: E501 + address (Address): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/Monei/model/payment_cancellation_reason.py b/Monei/model/payment_cancellation_reason.py new file mode 100644 index 0000000..b84412b --- /dev/null +++ b/Monei/model/payment_cancellation_reason.py @@ -0,0 +1,291 @@ +""" + MONEI API v1 + +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 + + The version of the OpenAPI document: 1.5.3 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from Monei.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from Monei.exceptions import ApiAttributeError + + + +class PaymentCancellationReason(ModelSimple): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + ('value',): { + 'DUPLICATED': "duplicated", + 'FRAUDULENT': "fraudulent", + 'REQUESTED_BY_CUSTOMER': "requested_by_customer", + }, + } + + validations = { + } + + additional_properties_type = None + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'value': (str,), + } + + @cached_property + def discriminator(): + return None + + + attribute_map = {} + + read_only_vars = set() + + _composed_schemas = None + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): + """PaymentCancellationReason - a model defined in OpenAPI + + Note that value can be passed either in args or in kwargs, but not in both. + + Args: + args[0] (str): The reason for canceling the Payment.., must be one of ["duplicated", "fraudulent", "requested_by_customer", ] # noqa: E501 + + Keyword Args: + value (str): The reason for canceling the Payment.., must be one of ["duplicated", "fraudulent", "requested_by_customer", ] # 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. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + # required up here when default value is not given + _path_to_item = kwargs.pop('_path_to_item', ()) + + if 'value' in kwargs: + value = kwargs.pop('value') + elif args: + args = list(args) + value = args.pop(0) + else: + raise ApiTypeError( + "value is required, but not passed in args or kwargs and doesn't have default", + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + self.value = value + if kwargs: + raise ApiTypeError( + "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( + kwargs, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): + """PaymentCancellationReason - a model defined in OpenAPI + + Note that value can be passed either in args or in kwargs, but not in both. + + Args: + args[0] (str): The reason for canceling the Payment.., must be one of ["duplicated", "fraudulent", "requested_by_customer", ] # noqa: E501 + + Keyword Args: + value (str): The reason for canceling the Payment.., must be one of ["duplicated", "fraudulent", "requested_by_customer", ] # 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. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + # required up here when default value is not given + _path_to_item = kwargs.pop('_path_to_item', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if 'value' in kwargs: + value = kwargs.pop('value') + elif args: + args = list(args) + value = args.pop(0) + else: + raise ApiTypeError( + "value is required, but not passed in args or kwargs and doesn't have default", + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + self.value = value + if kwargs: + raise ApiTypeError( + "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( + kwargs, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + return self diff --git a/Monei/model/payment_customer.py b/Monei/model/payment_customer.py new file mode 100644 index 0000000..6caad93 --- /dev/null +++ b/Monei/model/payment_customer.py @@ -0,0 +1,271 @@ +""" + MONEI API v1 + +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 + + The version of the OpenAPI document: 1.5.3 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from Monei.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from Monei.exceptions import ApiAttributeError + + + +class PaymentCustomer(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'email': (str,), # noqa: E501 + 'name': (str,), # noqa: E501 + 'phone': (str,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'email': 'email', # noqa: E501 + 'name': 'name', # noqa: E501 + 'phone': 'phone', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """PaymentCustomer - 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 + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + email (str): The customer's email address.. [optional] # noqa: E501 + name (str): The customer's full name or business name.. [optional] # noqa: E501 + phone (str): The customer's phone number in E.164 format.. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """PaymentCustomer - 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 + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + email (str): The customer's email address.. [optional] # noqa: E501 + name (str): The customer's full name or business name.. [optional] # noqa: E501 + phone (str): The customer's phone number in E.164 format.. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/Monei/model/payment_last_refund_reason.py b/Monei/model/payment_last_refund_reason.py new file mode 100644 index 0000000..ec72522 --- /dev/null +++ b/Monei/model/payment_last_refund_reason.py @@ -0,0 +1,291 @@ +""" + MONEI API v1 + +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 + + The version of the OpenAPI document: 1.5.3 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from Monei.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from Monei.exceptions import ApiAttributeError + + + +class PaymentLastRefundReason(ModelSimple): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + ('value',): { + 'DUPLICATED': "duplicated", + 'FRAUDULENT': "fraudulent", + 'REQUESTED_BY_CUSTOMER': "requested_by_customer", + }, + } + + validations = { + } + + additional_properties_type = None + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'value': (str,), + } + + @cached_property + def discriminator(): + return None + + + attribute_map = {} + + read_only_vars = set() + + _composed_schemas = None + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): + """PaymentLastRefundReason - a model defined in OpenAPI + + Note that value can be passed either in args or in kwargs, but not in both. + + Args: + args[0] (str): The reason of the last refund transaction.., must be one of ["duplicated", "fraudulent", "requested_by_customer", ] # noqa: E501 + + Keyword Args: + value (str): The reason of the last refund transaction.., must be one of ["duplicated", "fraudulent", "requested_by_customer", ] # 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. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + # required up here when default value is not given + _path_to_item = kwargs.pop('_path_to_item', ()) + + if 'value' in kwargs: + value = kwargs.pop('value') + elif args: + args = list(args) + value = args.pop(0) + else: + raise ApiTypeError( + "value is required, but not passed in args or kwargs and doesn't have default", + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + self.value = value + if kwargs: + raise ApiTypeError( + "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( + kwargs, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): + """PaymentLastRefundReason - a model defined in OpenAPI + + Note that value can be passed either in args or in kwargs, but not in both. + + Args: + args[0] (str): The reason of the last refund transaction.., must be one of ["duplicated", "fraudulent", "requested_by_customer", ] # noqa: E501 + + Keyword Args: + value (str): The reason of the last refund transaction.., must be one of ["duplicated", "fraudulent", "requested_by_customer", ] # 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. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + # required up here when default value is not given + _path_to_item = kwargs.pop('_path_to_item', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if 'value' in kwargs: + value = kwargs.pop('value') + elif args: + args = list(args) + value = args.pop(0) + else: + raise ApiTypeError( + "value is required, but not passed in args or kwargs and doesn't have default", + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + self.value = value + if kwargs: + raise ApiTypeError( + "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( + kwargs, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + return self diff --git a/Monei/model/payment_message_channel.py b/Monei/model/payment_message_channel.py new file mode 100644 index 0000000..0031125 --- /dev/null +++ b/Monei/model/payment_message_channel.py @@ -0,0 +1,291 @@ +""" + MONEI API v1 + +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 + + The version of the OpenAPI document: 1.5.3 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from Monei.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from Monei.exceptions import ApiAttributeError + + + +class PaymentMessageChannel(ModelSimple): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + ('value',): { + 'EMAIL': "EMAIL", + 'WHATSAPP': "WHATSAPP", + 'SMS': "SMS", + }, + } + + validations = { + } + + additional_properties_type = None + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'value': (str,), + } + + @cached_property + def discriminator(): + return None + + + attribute_map = {} + + read_only_vars = set() + + _composed_schemas = None + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): + """PaymentMessageChannel - a model defined in OpenAPI + + Note that value can be passed either in args or in kwargs, but not in both. + + Args: + args[0] (str): The channel used to send the payment message. ., must be one of ["EMAIL", "WHATSAPP", "SMS", ] # noqa: E501 + + Keyword Args: + value (str): The channel used to send the payment message. ., must be one of ["EMAIL", "WHATSAPP", "SMS", ] # 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. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + # required up here when default value is not given + _path_to_item = kwargs.pop('_path_to_item', ()) + + if 'value' in kwargs: + value = kwargs.pop('value') + elif args: + args = list(args) + value = args.pop(0) + else: + raise ApiTypeError( + "value is required, but not passed in args or kwargs and doesn't have default", + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + self.value = value + if kwargs: + raise ApiTypeError( + "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( + kwargs, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): + """PaymentMessageChannel - a model defined in OpenAPI + + Note that value can be passed either in args or in kwargs, but not in both. + + Args: + args[0] (str): The channel used to send the payment message. ., must be one of ["EMAIL", "WHATSAPP", "SMS", ] # noqa: E501 + + Keyword Args: + value (str): The channel used to send the payment message. ., must be one of ["EMAIL", "WHATSAPP", "SMS", ] # 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. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + # required up here when default value is not given + _path_to_item = kwargs.pop('_path_to_item', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if 'value' in kwargs: + value = kwargs.pop('value') + elif args: + args = list(args) + value = args.pop(0) + else: + raise ApiTypeError( + "value is required, but not passed in args or kwargs and doesn't have default", + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + self.value = value + if kwargs: + raise ApiTypeError( + "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( + kwargs, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + return self diff --git a/Monei/model/payment_message_language.py b/Monei/model/payment_message_language.py new file mode 100644 index 0000000..54395fc --- /dev/null +++ b/Monei/model/payment_message_language.py @@ -0,0 +1,295 @@ +""" + MONEI API v1 + +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 + + The version of the OpenAPI document: 1.5.3 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from Monei.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from Monei.exceptions import ApiAttributeError + + + +class PaymentMessageLanguage(ModelSimple): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + ('value',): { + 'EN': "en", + 'ES': "es", + 'CA': "ca", + 'PT': "pt", + 'DE': "de", + 'IT': "it", + 'FR': "fr", + }, + } + + validations = { + } + + additional_properties_type = None + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'value': (str,), + } + + @cached_property + def discriminator(): + return None + + + attribute_map = {} + + read_only_vars = set() + + _composed_schemas = None + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): + """PaymentMessageLanguage - a model defined in OpenAPI + + Note that value can be passed either in args or in kwargs, but not in both. + + Args: + args[0] (str): The language of message sent to the customer. If not provided the default customer language is used if available.., must be one of ["en", "es", "ca", "pt", "de", "it", "fr", ] # noqa: E501 + + Keyword Args: + value (str): The language of message sent to the customer. If not provided the default customer language is used if available.., must be one of ["en", "es", "ca", "pt", "de", "it", "fr", ] # 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. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + # required up here when default value is not given + _path_to_item = kwargs.pop('_path_to_item', ()) + + if 'value' in kwargs: + value = kwargs.pop('value') + elif args: + args = list(args) + value = args.pop(0) + else: + raise ApiTypeError( + "value is required, but not passed in args or kwargs and doesn't have default", + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + self.value = value + if kwargs: + raise ApiTypeError( + "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( + kwargs, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): + """PaymentMessageLanguage - a model defined in OpenAPI + + Note that value can be passed either in args or in kwargs, but not in both. + + Args: + args[0] (str): The language of message sent to the customer. If not provided the default customer language is used if available.., must be one of ["en", "es", "ca", "pt", "de", "it", "fr", ] # noqa: E501 + + Keyword Args: + value (str): The language of message sent to the customer. If not provided the default customer language is used if available.., must be one of ["en", "es", "ca", "pt", "de", "it", "fr", ] # 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. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + # required up here when default value is not given + _path_to_item = kwargs.pop('_path_to_item', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if 'value' in kwargs: + value = kwargs.pop('value') + elif args: + args = list(args) + value = args.pop(0) + else: + raise ApiTypeError( + "value is required, but not passed in args or kwargs and doesn't have default", + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + self.value = value + if kwargs: + raise ApiTypeError( + "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( + kwargs, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + return self diff --git a/Monei/model/payment_methods.py b/Monei/model/payment_methods.py new file mode 100644 index 0000000..38c6c7c --- /dev/null +++ b/Monei/model/payment_methods.py @@ -0,0 +1,303 @@ +""" + MONEI API v1 + +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 + + The version of the OpenAPI document: 1.5.3 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from Monei.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from Monei.exceptions import ApiAttributeError + + +def lazy_import(): + from Monei.model.payment_methods_metadata import PaymentMethodsMetadata + from Monei.model.payment_methods_methods import PaymentMethodsMethods + globals()['PaymentMethodsMetadata'] = PaymentMethodsMetadata + globals()['PaymentMethodsMethods'] = PaymentMethodsMethods + + +class PaymentMethods(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'livemode': (bool,), # noqa: E501 + 'payment_methods': (PaymentMethodsMethods,), # noqa: E501 + 'metadata': (PaymentMethodsMetadata,), # noqa: E501 + 'merchant_name': (str,), # noqa: E501 + 'merchant_url': (str,), # noqa: E501 + 'country_code': (str,), # noqa: E501 + 'account_id': (str,), # noqa: E501 + 'amount': (int,), # noqa: E501 + 'currency': (str,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'livemode': 'livemode', # noqa: E501 + 'payment_methods': 'paymentMethods', # noqa: E501 + 'metadata': 'metadata', # noqa: E501 + 'merchant_name': 'merchantName', # noqa: E501 + 'merchant_url': 'merchantUrl', # noqa: E501 + 'country_code': 'countryCode', # noqa: E501 + 'account_id': 'accountId', # noqa: E501 + 'amount': 'amount', # noqa: E501 + 'currency': 'currency', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """PaymentMethods - 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 + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + livemode (bool): Has the value `true` if the resource exists in live mode or the value `false` if the resource exists in test mode.. [optional] # noqa: E501 + payment_methods (PaymentMethodsMethods): [optional] # noqa: E501 + metadata (PaymentMethodsMetadata): [optional] # noqa: E501 + merchant_name (str): The name of the merchant. [optional] # noqa: E501 + merchant_url (str): The URL of the merchant's website. [optional] # noqa: E501 + country_code (str): Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).. [optional] # noqa: E501 + account_id (str): MONEI Account identifier.. [optional] # noqa: E501 + amount (int): The amount of the payment in the smallest currency unit. For example, 10 EUR = 1000 cents. Only present when querying by paymentId. . [optional] # noqa: E501 + currency (str): Three-letter ISO currency code, in uppercase. Only present when querying by paymentId. . [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """PaymentMethods - 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 + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + livemode (bool): Has the value `true` if the resource exists in live mode or the value `false` if the resource exists in test mode.. [optional] # noqa: E501 + payment_methods (PaymentMethodsMethods): [optional] # noqa: E501 + metadata (PaymentMethodsMetadata): [optional] # noqa: E501 + merchant_name (str): The name of the merchant. [optional] # noqa: E501 + merchant_url (str): The URL of the merchant's website. [optional] # noqa: E501 + country_code (str): Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).. [optional] # noqa: E501 + account_id (str): MONEI Account identifier.. [optional] # noqa: E501 + amount (int): The amount of the payment in the smallest currency unit. For example, 10 EUR = 1000 cents. Only present when querying by paymentId. . [optional] # noqa: E501 + currency (str): Three-letter ISO currency code, in uppercase. Only present when querying by paymentId. . [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/Monei/model/payment_methods_metadata.py b/Monei/model/payment_methods_metadata.py new file mode 100644 index 0000000..3378846 --- /dev/null +++ b/Monei/model/payment_methods_metadata.py @@ -0,0 +1,363 @@ +""" + MONEI API v1 + +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 + + The version of the OpenAPI document: 1.5.3 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from Monei.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from Monei.exceptions import ApiAttributeError + + +def lazy_import(): + from Monei.model.payment_methods_metadata_alipay import PaymentMethodsMetadataAlipay + from Monei.model.payment_methods_metadata_apple_pay import PaymentMethodsMetadataApplePay + from Monei.model.payment_methods_metadata_bancontact import PaymentMethodsMetadataBancontact + from Monei.model.payment_methods_metadata_bizum import PaymentMethodsMetadataBizum + from Monei.model.payment_methods_metadata_blik import PaymentMethodsMetadataBlik + from Monei.model.payment_methods_metadata_card import PaymentMethodsMetadataCard + from Monei.model.payment_methods_metadata_click_to_pay import PaymentMethodsMetadataClickToPay + from Monei.model.payment_methods_metadata_eps import PaymentMethodsMetadataEps + from Monei.model.payment_methods_metadata_giropay import PaymentMethodsMetadataGiropay + from Monei.model.payment_methods_metadata_google_pay import PaymentMethodsMetadataGooglePay + from Monei.model.payment_methods_metadata_i_deal import PaymentMethodsMetadataIDeal + from Monei.model.payment_methods_metadata_klarna import PaymentMethodsMetadataKlarna + from Monei.model.payment_methods_metadata_mbway import PaymentMethodsMetadataMbway + from Monei.model.payment_methods_metadata_sepa import PaymentMethodsMetadataSepa + from Monei.model.payment_methods_metadata_sofort import PaymentMethodsMetadataSofort + from Monei.model.payment_methods_metadata_trustly import PaymentMethodsMetadataTrustly + globals()['PaymentMethodsMetadataAlipay'] = PaymentMethodsMetadataAlipay + globals()['PaymentMethodsMetadataApplePay'] = PaymentMethodsMetadataApplePay + globals()['PaymentMethodsMetadataBancontact'] = PaymentMethodsMetadataBancontact + globals()['PaymentMethodsMetadataBizum'] = PaymentMethodsMetadataBizum + globals()['PaymentMethodsMetadataBlik'] = PaymentMethodsMetadataBlik + globals()['PaymentMethodsMetadataCard'] = PaymentMethodsMetadataCard + globals()['PaymentMethodsMetadataClickToPay'] = PaymentMethodsMetadataClickToPay + globals()['PaymentMethodsMetadataEps'] = PaymentMethodsMetadataEps + globals()['PaymentMethodsMetadataGiropay'] = PaymentMethodsMetadataGiropay + globals()['PaymentMethodsMetadataGooglePay'] = PaymentMethodsMetadataGooglePay + globals()['PaymentMethodsMetadataIDeal'] = PaymentMethodsMetadataIDeal + globals()['PaymentMethodsMetadataKlarna'] = PaymentMethodsMetadataKlarna + globals()['PaymentMethodsMetadataMbway'] = PaymentMethodsMetadataMbway + globals()['PaymentMethodsMetadataSepa'] = PaymentMethodsMetadataSepa + globals()['PaymentMethodsMetadataSofort'] = PaymentMethodsMetadataSofort + globals()['PaymentMethodsMetadataTrustly'] = PaymentMethodsMetadataTrustly + + +class PaymentMethodsMetadata(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'alipay': (PaymentMethodsMetadataAlipay,), # noqa: E501 + 'bancontact': (PaymentMethodsMetadataBancontact,), # noqa: E501 + 'bizum': (PaymentMethodsMetadataBizum,), # noqa: E501 + 'blik': (PaymentMethodsMetadataBlik,), # noqa: E501 + 'card': (PaymentMethodsMetadataCard,), # noqa: E501 + 'eps': (PaymentMethodsMetadataEps,), # noqa: E501 + 'i_deal': (PaymentMethodsMetadataIDeal,), # noqa: E501 + 'mbway': (PaymentMethodsMetadataMbway,), # noqa: E501 + 'multibanco': (PaymentMethodsMetadataMbway,), # noqa: E501 + 'sofort': (PaymentMethodsMetadataSofort,), # noqa: E501 + 'trustly': (PaymentMethodsMetadataTrustly,), # noqa: E501 + 'sepa': (PaymentMethodsMetadataSepa,), # noqa: E501 + 'klarna': (PaymentMethodsMetadataKlarna,), # noqa: E501 + 'giropay': (PaymentMethodsMetadataGiropay,), # noqa: E501 + 'google_pay': (PaymentMethodsMetadataGooglePay,), # noqa: E501 + 'apple_pay': (PaymentMethodsMetadataApplePay,), # noqa: E501 + 'click_to_pay': (PaymentMethodsMetadataClickToPay,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'alipay': 'alipay', # noqa: E501 + 'bancontact': 'bancontact', # noqa: E501 + 'bizum': 'bizum', # noqa: E501 + 'blik': 'blik', # noqa: E501 + 'card': 'card', # noqa: E501 + 'eps': 'eps', # noqa: E501 + 'i_deal': 'iDeal', # noqa: E501 + 'mbway': 'mbway', # noqa: E501 + 'multibanco': 'multibanco', # noqa: E501 + 'sofort': 'sofort', # noqa: E501 + 'trustly': 'trustly', # noqa: E501 + 'sepa': 'sepa', # noqa: E501 + 'klarna': 'klarna', # noqa: E501 + 'giropay': 'giropay', # noqa: E501 + 'google_pay': 'googlePay', # noqa: E501 + 'apple_pay': 'applePay', # noqa: E501 + 'click_to_pay': 'clickToPay', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """PaymentMethodsMetadata - 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 + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + alipay (PaymentMethodsMetadataAlipay): [optional] # noqa: E501 + bancontact (PaymentMethodsMetadataBancontact): [optional] # noqa: E501 + bizum (PaymentMethodsMetadataBizum): [optional] # noqa: E501 + blik (PaymentMethodsMetadataBlik): [optional] # noqa: E501 + card (PaymentMethodsMetadataCard): [optional] # noqa: E501 + eps (PaymentMethodsMetadataEps): [optional] # noqa: E501 + i_deal (PaymentMethodsMetadataIDeal): [optional] # noqa: E501 + mbway (PaymentMethodsMetadataMbway): [optional] # noqa: E501 + multibanco (PaymentMethodsMetadataMbway): [optional] # noqa: E501 + sofort (PaymentMethodsMetadataSofort): [optional] # noqa: E501 + trustly (PaymentMethodsMetadataTrustly): [optional] # noqa: E501 + sepa (PaymentMethodsMetadataSepa): [optional] # noqa: E501 + klarna (PaymentMethodsMetadataKlarna): [optional] # noqa: E501 + giropay (PaymentMethodsMetadataGiropay): [optional] # noqa: E501 + google_pay (PaymentMethodsMetadataGooglePay): [optional] # noqa: E501 + apple_pay (PaymentMethodsMetadataApplePay): [optional] # noqa: E501 + click_to_pay (PaymentMethodsMetadataClickToPay): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """PaymentMethodsMetadata - 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 + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + alipay (PaymentMethodsMetadataAlipay): [optional] # noqa: E501 + bancontact (PaymentMethodsMetadataBancontact): [optional] # noqa: E501 + bizum (PaymentMethodsMetadataBizum): [optional] # noqa: E501 + blik (PaymentMethodsMetadataBlik): [optional] # noqa: E501 + card (PaymentMethodsMetadataCard): [optional] # noqa: E501 + eps (PaymentMethodsMetadataEps): [optional] # noqa: E501 + i_deal (PaymentMethodsMetadataIDeal): [optional] # noqa: E501 + mbway (PaymentMethodsMetadataMbway): [optional] # noqa: E501 + multibanco (PaymentMethodsMetadataMbway): [optional] # noqa: E501 + sofort (PaymentMethodsMetadataSofort): [optional] # noqa: E501 + trustly (PaymentMethodsMetadataTrustly): [optional] # noqa: E501 + sepa (PaymentMethodsMetadataSepa): [optional] # noqa: E501 + klarna (PaymentMethodsMetadataKlarna): [optional] # noqa: E501 + giropay (PaymentMethodsMetadataGiropay): [optional] # noqa: E501 + google_pay (PaymentMethodsMetadataGooglePay): [optional] # noqa: E501 + apple_pay (PaymentMethodsMetadataApplePay): [optional] # noqa: E501 + click_to_pay (PaymentMethodsMetadataClickToPay): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/Monei/model/payment_methods_metadata_alipay.py b/Monei/model/payment_methods_metadata_alipay.py new file mode 100644 index 0000000..8c972c1 --- /dev/null +++ b/Monei/model/payment_methods_metadata_alipay.py @@ -0,0 +1,263 @@ +""" + MONEI API v1 + +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 + + The version of the OpenAPI document: 1.5.3 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from Monei.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from Monei.exceptions import ApiAttributeError + + + +class PaymentMethodsMetadataAlipay(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'countries': ([str],), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'countries': 'countries', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """PaymentMethodsMetadataAlipay - 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 + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + countries ([str]): List of countries where the payment method is available. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """PaymentMethodsMetadataAlipay - 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 + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + countries ([str]): List of countries where the payment method is available. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/Monei/model/payment_methods_metadata_apple_pay.py b/Monei/model/payment_methods_metadata_apple_pay.py new file mode 100644 index 0000000..fc59ccb --- /dev/null +++ b/Monei/model/payment_methods_metadata_apple_pay.py @@ -0,0 +1,263 @@ +""" + MONEI API v1 + +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 + + The version of the OpenAPI document: 1.5.3 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from Monei.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from Monei.exceptions import ApiAttributeError + + + +class PaymentMethodsMetadataApplePay(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'merchant_id': (str,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'merchant_id': 'merchantId', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """PaymentMethodsMetadataApplePay - 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 + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + merchant_id (str): Apple Pay merchant ID. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """PaymentMethodsMetadataApplePay - 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 + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + merchant_id (str): Apple Pay merchant ID. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/Monei/model/payment_methods_metadata_bancontact.py b/Monei/model/payment_methods_metadata_bancontact.py new file mode 100644 index 0000000..858b387 --- /dev/null +++ b/Monei/model/payment_methods_metadata_bancontact.py @@ -0,0 +1,263 @@ +""" + MONEI API v1 + +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 + + The version of the OpenAPI document: 1.5.3 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from Monei.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from Monei.exceptions import ApiAttributeError + + + +class PaymentMethodsMetadataBancontact(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'countries': ([str],), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'countries': 'countries', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """PaymentMethodsMetadataBancontact - 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 + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + countries ([str]): List of countries where the payment method is available. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """PaymentMethodsMetadataBancontact - 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 + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + countries ([str]): List of countries where the payment method is available. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/Monei/model/payment_methods_metadata_bizum.py b/Monei/model/payment_methods_metadata_bizum.py new file mode 100644 index 0000000..d5da320 --- /dev/null +++ b/Monei/model/payment_methods_metadata_bizum.py @@ -0,0 +1,263 @@ +""" + MONEI API v1 + +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 + + The version of the OpenAPI document: 1.5.3 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from Monei.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from Monei.exceptions import ApiAttributeError + + + +class PaymentMethodsMetadataBizum(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'countries': ([str],), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'countries': 'countries', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """PaymentMethodsMetadataBizum - 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 + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + countries ([str]): List of countries where the payment method is available. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """PaymentMethodsMetadataBizum - 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 + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + countries ([str]): List of countries where the payment method is available. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/Monei/model/payment_methods_metadata_blik.py b/Monei/model/payment_methods_metadata_blik.py new file mode 100644 index 0000000..0e7c878 --- /dev/null +++ b/Monei/model/payment_methods_metadata_blik.py @@ -0,0 +1,263 @@ +""" + MONEI API v1 + +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 + + The version of the OpenAPI document: 1.5.3 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from Monei.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from Monei.exceptions import ApiAttributeError + + + +class PaymentMethodsMetadataBlik(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'countries': ([str],), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'countries': 'countries', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """PaymentMethodsMetadataBlik - 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 + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + countries ([str]): List of countries where the payment method is available. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """PaymentMethodsMetadataBlik - 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 + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + countries ([str]): List of countries where the payment method is available. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/Monei/model/payment_methods_metadata_card.py b/Monei/model/payment_methods_metadata_card.py new file mode 100644 index 0000000..37de01f --- /dev/null +++ b/Monei/model/payment_methods_metadata_card.py @@ -0,0 +1,263 @@ +""" + MONEI API v1 + +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 + + The version of the OpenAPI document: 1.5.3 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from Monei.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from Monei.exceptions import ApiAttributeError + + + +class PaymentMethodsMetadataCard(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'brands': ([str],), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'brands': 'brands', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """PaymentMethodsMetadataCard - 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 + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + brands ([str]): List of card brands supported. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """PaymentMethodsMetadataCard - 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 + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + brands ([str]): List of card brands supported. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/Monei/model/payment_methods_metadata_click_to_pay.py b/Monei/model/payment_methods_metadata_click_to_pay.py new file mode 100644 index 0000000..fdc3f00 --- /dev/null +++ b/Monei/model/payment_methods_metadata_click_to_pay.py @@ -0,0 +1,289 @@ +""" + MONEI API v1 + +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 + + The version of the OpenAPI document: 1.5.3 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from Monei.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from Monei.exceptions import ApiAttributeError + + +def lazy_import(): + from Monei.model.payment_methods_metadata_click_to_pay_discover import PaymentMethodsMetadataClickToPayDiscover + from Monei.model.payment_methods_metadata_click_to_pay_mastercard import PaymentMethodsMetadataClickToPayMastercard + from Monei.model.payment_methods_metadata_click_to_pay_visa import PaymentMethodsMetadataClickToPayVisa + globals()['PaymentMethodsMetadataClickToPayDiscover'] = PaymentMethodsMetadataClickToPayDiscover + globals()['PaymentMethodsMetadataClickToPayMastercard'] = PaymentMethodsMetadataClickToPayMastercard + globals()['PaymentMethodsMetadataClickToPayVisa'] = PaymentMethodsMetadataClickToPayVisa + + +class PaymentMethodsMetadataClickToPay(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'token_support': (bool,), # noqa: E501 + 'preselected': (bool,), # noqa: E501 + 'visa': (PaymentMethodsMetadataClickToPayVisa,), # noqa: E501 + 'mastercard': (PaymentMethodsMetadataClickToPayMastercard,), # noqa: E501 + 'discover': (PaymentMethodsMetadataClickToPayDiscover,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'token_support': 'tokenSupport', # noqa: E501 + 'preselected': 'preselected', # noqa: E501 + 'visa': 'visa', # noqa: E501 + 'mastercard': 'mastercard', # noqa: E501 + 'discover': 'discover', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """PaymentMethodsMetadataClickToPay - 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 + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + token_support (bool): Whether token support is enabled. [optional] # noqa: E501 + preselected (bool): Whether the method is preselected. [optional] # noqa: E501 + visa (PaymentMethodsMetadataClickToPayVisa): [optional] # noqa: E501 + mastercard (PaymentMethodsMetadataClickToPayMastercard): [optional] # noqa: E501 + discover (PaymentMethodsMetadataClickToPayDiscover): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """PaymentMethodsMetadataClickToPay - 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 + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + token_support (bool): Whether token support is enabled. [optional] # noqa: E501 + preselected (bool): Whether the method is preselected. [optional] # noqa: E501 + visa (PaymentMethodsMetadataClickToPayVisa): [optional] # noqa: E501 + mastercard (PaymentMethodsMetadataClickToPayMastercard): [optional] # noqa: E501 + discover (PaymentMethodsMetadataClickToPayDiscover): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/Monei/model/payment_methods_metadata_click_to_pay_discover.py b/Monei/model/payment_methods_metadata_click_to_pay_discover.py new file mode 100644 index 0000000..0dcc4b5 --- /dev/null +++ b/Monei/model/payment_methods_metadata_click_to_pay_discover.py @@ -0,0 +1,267 @@ +""" + MONEI API v1 + +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 + + The version of the OpenAPI document: 1.5.3 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from Monei.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from Monei.exceptions import ApiAttributeError + + + +class PaymentMethodsMetadataClickToPayDiscover(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'srci_dpa_id': (str,), # noqa: E501 + 'src_initiator_id': (str,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'srci_dpa_id': 'srciDpaId', # noqa: E501 + 'src_initiator_id': 'srcInitiatorId', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """PaymentMethodsMetadataClickToPayDiscover - 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 + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + srci_dpa_id (str): [optional] # noqa: E501 + src_initiator_id (str): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """PaymentMethodsMetadataClickToPayDiscover - 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 + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + srci_dpa_id (str): [optional] # noqa: E501 + src_initiator_id (str): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/Monei/model/payment_methods_metadata_click_to_pay_mastercard.py b/Monei/model/payment_methods_metadata_click_to_pay_mastercard.py new file mode 100644 index 0000000..3820153 --- /dev/null +++ b/Monei/model/payment_methods_metadata_click_to_pay_mastercard.py @@ -0,0 +1,267 @@ +""" + MONEI API v1 + +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 + + The version of the OpenAPI document: 1.5.3 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from Monei.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from Monei.exceptions import ApiAttributeError + + + +class PaymentMethodsMetadataClickToPayMastercard(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'srci_dpa_id': (str,), # noqa: E501 + 'src_initiator_id': (str,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'srci_dpa_id': 'srciDpaId', # noqa: E501 + 'src_initiator_id': 'srcInitiatorId', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """PaymentMethodsMetadataClickToPayMastercard - 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 + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + srci_dpa_id (str): [optional] # noqa: E501 + src_initiator_id (str): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """PaymentMethodsMetadataClickToPayMastercard - 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 + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + srci_dpa_id (str): [optional] # noqa: E501 + src_initiator_id (str): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/Monei/model/payment_methods_metadata_click_to_pay_visa.py b/Monei/model/payment_methods_metadata_click_to_pay_visa.py new file mode 100644 index 0000000..e7fc4e8 --- /dev/null +++ b/Monei/model/payment_methods_metadata_click_to_pay_visa.py @@ -0,0 +1,267 @@ +""" + MONEI API v1 + +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 + + The version of the OpenAPI document: 1.5.3 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from Monei.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from Monei.exceptions import ApiAttributeError + + + +class PaymentMethodsMetadataClickToPayVisa(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'srci_dpa_id': (str,), # noqa: E501 + 'src_initiator_id': (str,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'srci_dpa_id': 'srciDpaId', # noqa: E501 + 'src_initiator_id': 'srcInitiatorId', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """PaymentMethodsMetadataClickToPayVisa - 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 + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + srci_dpa_id (str): [optional] # noqa: E501 + src_initiator_id (str): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """PaymentMethodsMetadataClickToPayVisa - 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 + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + srci_dpa_id (str): [optional] # noqa: E501 + src_initiator_id (str): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/Monei/model/payment_methods_metadata_eps.py b/Monei/model/payment_methods_metadata_eps.py new file mode 100644 index 0000000..6a461ff --- /dev/null +++ b/Monei/model/payment_methods_metadata_eps.py @@ -0,0 +1,263 @@ +""" + MONEI API v1 + +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 + + The version of the OpenAPI document: 1.5.3 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from Monei.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from Monei.exceptions import ApiAttributeError + + + +class PaymentMethodsMetadataEps(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'countries': ([str],), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'countries': 'countries', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """PaymentMethodsMetadataEps - 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 + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + countries ([str]): List of countries where the payment method is available. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """PaymentMethodsMetadataEps - 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 + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + countries ([str]): List of countries where the payment method is available. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/Monei/model/payment_methods_metadata_giropay.py b/Monei/model/payment_methods_metadata_giropay.py new file mode 100644 index 0000000..b54467f --- /dev/null +++ b/Monei/model/payment_methods_metadata_giropay.py @@ -0,0 +1,263 @@ +""" + MONEI API v1 + +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 + + The version of the OpenAPI document: 1.5.3 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from Monei.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from Monei.exceptions import ApiAttributeError + + + +class PaymentMethodsMetadataGiropay(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'countries': ([str],), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'countries': 'countries', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """PaymentMethodsMetadataGiropay - 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 + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + countries ([str]): List of countries where the payment method is available. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """PaymentMethodsMetadataGiropay - 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 + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + countries ([str]): List of countries where the payment method is available. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/Monei/model/payment_methods_metadata_google_pay.py b/Monei/model/payment_methods_metadata_google_pay.py new file mode 100644 index 0000000..72ce6c0 --- /dev/null +++ b/Monei/model/payment_methods_metadata_google_pay.py @@ -0,0 +1,267 @@ +""" + MONEI API v1 + +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 + + The version of the OpenAPI document: 1.5.3 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from Monei.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from Monei.exceptions import ApiAttributeError + + + +class PaymentMethodsMetadataGooglePay(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'merchant_id': (str,), # noqa: E501 + 'cvc_required': (bool,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'merchant_id': 'merchantId', # noqa: E501 + 'cvc_required': 'cvcRequired', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """PaymentMethodsMetadataGooglePay - 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 + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + merchant_id (str): Google Pay merchant ID. [optional] # noqa: E501 + cvc_required (bool): Whether CVC is required for Google Pay transactions. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """PaymentMethodsMetadataGooglePay - 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 + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + merchant_id (str): Google Pay merchant ID. [optional] # noqa: E501 + cvc_required (bool): Whether CVC is required for Google Pay transactions. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/Monei/model/payment_methods_metadata_i_deal.py b/Monei/model/payment_methods_metadata_i_deal.py new file mode 100644 index 0000000..9f0ba92 --- /dev/null +++ b/Monei/model/payment_methods_metadata_i_deal.py @@ -0,0 +1,263 @@ +""" + MONEI API v1 + +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 + + The version of the OpenAPI document: 1.5.3 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from Monei.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from Monei.exceptions import ApiAttributeError + + + +class PaymentMethodsMetadataIDeal(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'countries': ([str],), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'countries': 'countries', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """PaymentMethodsMetadataIDeal - 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 + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + countries ([str]): List of countries where the payment method is available. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """PaymentMethodsMetadataIDeal - 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 + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + countries ([str]): List of countries where the payment method is available. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/Monei/model/payment_methods_metadata_klarna.py b/Monei/model/payment_methods_metadata_klarna.py new file mode 100644 index 0000000..31fc440 --- /dev/null +++ b/Monei/model/payment_methods_metadata_klarna.py @@ -0,0 +1,263 @@ +""" + MONEI API v1 + +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 + + The version of the OpenAPI document: 1.5.3 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from Monei.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from Monei.exceptions import ApiAttributeError + + + +class PaymentMethodsMetadataKlarna(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'countries': ([str],), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'countries': 'countries', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """PaymentMethodsMetadataKlarna - 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 + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + countries ([str]): List of countries where the payment method is available. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """PaymentMethodsMetadataKlarna - 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 + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + countries ([str]): List of countries where the payment method is available. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/Monei/model/payment_methods_metadata_mbway.py b/Monei/model/payment_methods_metadata_mbway.py new file mode 100644 index 0000000..c1d9e53 --- /dev/null +++ b/Monei/model/payment_methods_metadata_mbway.py @@ -0,0 +1,263 @@ +""" + MONEI API v1 + +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 + + The version of the OpenAPI document: 1.5.3 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from Monei.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from Monei.exceptions import ApiAttributeError + + + +class PaymentMethodsMetadataMbway(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'countries': ([str],), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'countries': 'countries', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """PaymentMethodsMetadataMbway - 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 + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + countries ([str]): List of countries where the payment method is available. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """PaymentMethodsMetadataMbway - 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 + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + countries ([str]): List of countries where the payment method is available. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/Monei/model/payment_methods_metadata_sepa.py b/Monei/model/payment_methods_metadata_sepa.py new file mode 100644 index 0000000..d8c0007 --- /dev/null +++ b/Monei/model/payment_methods_metadata_sepa.py @@ -0,0 +1,263 @@ +""" + MONEI API v1 + +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 + + The version of the OpenAPI document: 1.5.3 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from Monei.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from Monei.exceptions import ApiAttributeError + + + +class PaymentMethodsMetadataSepa(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'countries': ([str],), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'countries': 'countries', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """PaymentMethodsMetadataSepa - 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 + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + countries ([str]): List of countries where the payment method is available. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """PaymentMethodsMetadataSepa - 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 + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + countries ([str]): List of countries where the payment method is available. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/Monei/model/payment_methods_metadata_sofort.py b/Monei/model/payment_methods_metadata_sofort.py new file mode 100644 index 0000000..e010d29 --- /dev/null +++ b/Monei/model/payment_methods_metadata_sofort.py @@ -0,0 +1,263 @@ +""" + MONEI API v1 + +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 + + The version of the OpenAPI document: 1.5.3 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from Monei.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from Monei.exceptions import ApiAttributeError + + + +class PaymentMethodsMetadataSofort(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'countries': ([str],), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'countries': 'countries', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """PaymentMethodsMetadataSofort - 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 + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + countries ([str]): List of countries where the payment method is available. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """PaymentMethodsMetadataSofort - 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 + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + countries ([str]): List of countries where the payment method is available. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/Monei/model/payment_methods_metadata_trustly.py b/Monei/model/payment_methods_metadata_trustly.py new file mode 100644 index 0000000..22c05ca --- /dev/null +++ b/Monei/model/payment_methods_metadata_trustly.py @@ -0,0 +1,263 @@ +""" + MONEI API v1 + +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 + + The version of the OpenAPI document: 1.5.3 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from Monei.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from Monei.exceptions import ApiAttributeError + + + +class PaymentMethodsMetadataTrustly(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'countries': ([str],), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'countries': 'countries', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """PaymentMethodsMetadataTrustly - 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 + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + countries ([str]): List of countries where the payment method is available. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """PaymentMethodsMetadataTrustly - 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 + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + countries ([str]): List of countries where the payment method is available. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/Monei/model/payment_methods_methods.py b/Monei/model/payment_methods_methods.py new file mode 100644 index 0000000..a7ce245 --- /dev/null +++ b/Monei/model/payment_methods_methods.py @@ -0,0 +1,286 @@ +""" + MONEI API v1 + +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 + + The version of the OpenAPI document: 1.5.3 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from Monei.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from Monei.exceptions import ApiAttributeError + + + +class PaymentMethodsMethods(ModelSimple): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + additional_properties_type = None + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'value': ([str],), + } + + @cached_property + def discriminator(): + return None + + + attribute_map = {} + + read_only_vars = set() + + _composed_schemas = None + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): + """PaymentMethodsMethods - a model defined in OpenAPI + + Note that value can be passed either in args or in kwargs, but not in both. + + Args: + args[0] ([str]): An array of available payment methods for the account or payment. Possible values include: - `alipay` - Alipay - `applePay` - Apple Pay - `bancontact` - Bancontact - `bizum` - Bizum - `blik` - BLIK - `card` - Credit or debit card - `cardPresent` - Card present (physical POS) - `clickToPay` - Click to Pay - `cofidis` - Cofidis - `cofidisLoan` - Cofidis Loan - `eps` - EPS - `giropay` - Giropay - `googlePay` - Google Pay - `iDeal` - iDEAL - `klarna` - Klarna - `mbway` - MB WAY - `multibanco` - Multibanco - `paypal` - PayPal - `sepa` - SEPA Direct Debit - `sofort` - Sofort - `trustly` - Trustly . # noqa: E501 + + Keyword Args: + value ([str]): An array of available payment methods for the account or payment. Possible values include: - `alipay` - Alipay - `applePay` - Apple Pay - `bancontact` - Bancontact - `bizum` - Bizum - `blik` - BLIK - `card` - Credit or debit card - `cardPresent` - Card present (physical POS) - `clickToPay` - Click to Pay - `cofidis` - Cofidis - `cofidisLoan` - Cofidis Loan - `eps` - EPS - `giropay` - Giropay - `googlePay` - Google Pay - `iDeal` - iDEAL - `klarna` - Klarna - `mbway` - MB WAY - `multibanco` - Multibanco - `paypal` - PayPal - `sepa` - SEPA Direct Debit - `sofort` - Sofort - `trustly` - Trustly . # 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. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + # required up here when default value is not given + _path_to_item = kwargs.pop('_path_to_item', ()) + + if 'value' in kwargs: + value = kwargs.pop('value') + elif args: + args = list(args) + value = args.pop(0) + else: + raise ApiTypeError( + "value is required, but not passed in args or kwargs and doesn't have default", + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + self.value = value + if kwargs: + raise ApiTypeError( + "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( + kwargs, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): + """PaymentMethodsMethods - a model defined in OpenAPI + + Note that value can be passed either in args or in kwargs, but not in both. + + Args: + args[0] ([str]): An array of available payment methods for the account or payment. Possible values include: - `alipay` - Alipay - `applePay` - Apple Pay - `bancontact` - Bancontact - `bizum` - Bizum - `blik` - BLIK - `card` - Credit or debit card - `cardPresent` - Card present (physical POS) - `clickToPay` - Click to Pay - `cofidis` - Cofidis - `cofidisLoan` - Cofidis Loan - `eps` - EPS - `giropay` - Giropay - `googlePay` - Google Pay - `iDeal` - iDEAL - `klarna` - Klarna - `mbway` - MB WAY - `multibanco` - Multibanco - `paypal` - PayPal - `sepa` - SEPA Direct Debit - `sofort` - Sofort - `trustly` - Trustly . # noqa: E501 + + Keyword Args: + value ([str]): An array of available payment methods for the account or payment. Possible values include: - `alipay` - Alipay - `applePay` - Apple Pay - `bancontact` - Bancontact - `bizum` - Bizum - `blik` - BLIK - `card` - Credit or debit card - `cardPresent` - Card present (physical POS) - `clickToPay` - Click to Pay - `cofidis` - Cofidis - `cofidisLoan` - Cofidis Loan - `eps` - EPS - `giropay` - Giropay - `googlePay` - Google Pay - `iDeal` - iDEAL - `klarna` - Klarna - `mbway` - MB WAY - `multibanco` - Multibanco - `paypal` - PayPal - `sepa` - SEPA Direct Debit - `sofort` - Sofort - `trustly` - Trustly . # 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. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + # required up here when default value is not given + _path_to_item = kwargs.pop('_path_to_item', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if 'value' in kwargs: + value = kwargs.pop('value') + elif args: + args = list(args) + value = args.pop(0) + else: + raise ApiTypeError( + "value is required, but not passed in args or kwargs and doesn't have default", + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + self.value = value + if kwargs: + raise ApiTypeError( + "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( + kwargs, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + return self diff --git a/Monei/model/payment_next_action.py b/Monei/model/payment_next_action.py new file mode 100644 index 0000000..8b37a58 --- /dev/null +++ b/Monei/model/payment_next_action.py @@ -0,0 +1,278 @@ +""" + MONEI API v1 + +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 + + The version of the OpenAPI document: 1.5.3 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from Monei.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from Monei.exceptions import ApiAttributeError + + + +class PaymentNextAction(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + ('type',): { + 'CONFIRM': "CONFIRM", + 'CHALLENGE': "CHALLENGE", + 'FRICTIONLESS_CHALLENGE': "FRICTIONLESS_CHALLENGE", + 'BIZUM_CHALLENGE': "BIZUM_CHALLENGE", + 'COMPLETE': "COMPLETE", + }, + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'type': (str,), # noqa: E501 + 'must_redirect': (bool,), # noqa: E501 + 'redirect_url': (str,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'type': 'type', # noqa: E501 + 'must_redirect': 'mustRedirect', # noqa: E501 + 'redirect_url': 'redirectUrl', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """PaymentNextAction - 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 + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + type (str): - `CONFIRM` - Your customer needs to be redirected to a [hosted payment page](https://docs.monei.com/docs/use-prebuilt-payment-page) or confirm payment using [payment token](https://docs.monei.com/docs/accept-card-payment#3-submitting-the-payment-to-monei-client-side). The **redirectUrl** will point to the hosted payment page. - `FRICTIONLESS_CHALLENGE` - Your customer needs to be redirected to the frictionless 3d secure challenge page provided by the bank. The **redirectUrl** will point to the frictionless 3d secure challenge page provided by the bank. - `CHALLENGE` - Your customer needs to be redirected to the 3d secure challenge page provided by the bank. The **redirectUrl** will point to the 3d secure challenge page provided by the bank. - `COMPLETE` - The payment is completed. The **redirectUrl** will be the **completeUrl** if it was provided when the payment was created. - `BIZUM_CHALLENGE` - Your customer will be redirected to the Bizum hosted payment page. . [optional] # noqa: E501 + must_redirect (bool): If `true` you have to redirect your customer to the **redirectUrl** to continue payment process. . [optional] # noqa: E501 + redirect_url (str): Redirect your customer to this url to continue payment process. . [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """PaymentNextAction - 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 + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + type (str): - `CONFIRM` - Your customer needs to be redirected to a [hosted payment page](https://docs.monei.com/docs/use-prebuilt-payment-page) or confirm payment using [payment token](https://docs.monei.com/docs/accept-card-payment#3-submitting-the-payment-to-monei-client-side). The **redirectUrl** will point to the hosted payment page. - `FRICTIONLESS_CHALLENGE` - Your customer needs to be redirected to the frictionless 3d secure challenge page provided by the bank. The **redirectUrl** will point to the frictionless 3d secure challenge page provided by the bank. - `CHALLENGE` - Your customer needs to be redirected to the 3d secure challenge page provided by the bank. The **redirectUrl** will point to the 3d secure challenge page provided by the bank. - `COMPLETE` - The payment is completed. The **redirectUrl** will be the **completeUrl** if it was provided when the payment was created. - `BIZUM_CHALLENGE` - Your customer will be redirected to the Bizum hosted payment page. . [optional] # noqa: E501 + must_redirect (bool): If `true` you have to redirect your customer to the **redirectUrl** to continue payment process. . [optional] # noqa: E501 + redirect_url (str): Redirect your customer to this url to continue payment process. . [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/Monei/model/payment_payment_method.py b/Monei/model/payment_payment_method.py new file mode 100644 index 0000000..7729be5 --- /dev/null +++ b/Monei/model/payment_payment_method.py @@ -0,0 +1,338 @@ +""" + MONEI API v1 + +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 + + The version of the OpenAPI document: 1.5.3 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from Monei.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from Monei.exceptions import ApiAttributeError + + +def lazy_import(): + from Monei.model.payment_payment_method_bizum import PaymentPaymentMethodBizum + from Monei.model.payment_payment_method_card import PaymentPaymentMethodCard + from Monei.model.payment_payment_method_cofidis import PaymentPaymentMethodCofidis + from Monei.model.payment_payment_method_klarna import PaymentPaymentMethodKlarna + from Monei.model.payment_payment_method_mbway import PaymentPaymentMethodMbway + from Monei.model.payment_payment_method_paypal import PaymentPaymentMethodPaypal + from Monei.model.payment_payment_method_sepa import PaymentPaymentMethodSepa + from Monei.model.payment_payment_method_trustly import PaymentPaymentMethodTrustly + globals()['PaymentPaymentMethodBizum'] = PaymentPaymentMethodBizum + globals()['PaymentPaymentMethodCard'] = PaymentPaymentMethodCard + globals()['PaymentPaymentMethodCofidis'] = PaymentPaymentMethodCofidis + globals()['PaymentPaymentMethodKlarna'] = PaymentPaymentMethodKlarna + globals()['PaymentPaymentMethodMbway'] = PaymentPaymentMethodMbway + globals()['PaymentPaymentMethodPaypal'] = PaymentPaymentMethodPaypal + globals()['PaymentPaymentMethodSepa'] = PaymentPaymentMethodSepa + globals()['PaymentPaymentMethodTrustly'] = PaymentPaymentMethodTrustly + + +class PaymentPaymentMethod(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + ('method',): { + 'ALIPAY': "alipay", + 'CARD': "card", + 'BIZUM': "bizum", + 'PAYPAL': "paypal", + 'COFIDIS': "cofidis", + 'COFIDISLOAN': "cofidisLoan", + 'MBWAY': "mbway", + 'MULTIBANCO': "multibanco", + 'IDEAL': "iDeal", + 'BANCONTACT': "bancontact", + 'SOFORT': "sofort", + 'TRUSTLY': "trustly", + 'SEPA': "sepa", + 'KLARNA': "klarna", + 'GIROPAY': "giropay", + 'EPS': "eps", + 'BLIK': "blik", + }, + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'method': (str,), # noqa: E501 + 'card': (PaymentPaymentMethodCard,), # noqa: E501 + 'bizum': (PaymentPaymentMethodBizum,), # noqa: E501 + 'paypal': (PaymentPaymentMethodPaypal,), # noqa: E501 + 'cofidis': (PaymentPaymentMethodCofidis,), # noqa: E501 + 'cofidis_loan': (PaymentPaymentMethodCofidis,), # noqa: E501 + 'mbway': (PaymentPaymentMethodMbway,), # noqa: E501 + 'trustly': (PaymentPaymentMethodTrustly,), # noqa: E501 + 'sepa': (PaymentPaymentMethodSepa,), # noqa: E501 + 'klarna': (PaymentPaymentMethodKlarna,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'method': 'method', # noqa: E501 + 'card': 'card', # noqa: E501 + 'bizum': 'bizum', # noqa: E501 + 'paypal': 'paypal', # noqa: E501 + 'cofidis': 'cofidis', # noqa: E501 + 'cofidis_loan': 'cofidisLoan', # noqa: E501 + 'mbway': 'mbway', # noqa: E501 + 'trustly': 'trustly', # noqa: E501 + 'sepa': 'sepa', # noqa: E501 + 'klarna': 'klarna', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """PaymentPaymentMethod - 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 + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + method (str): Payment method type.. [optional] # noqa: E501 + card (PaymentPaymentMethodCard): [optional] # noqa: E501 + bizum (PaymentPaymentMethodBizum): [optional] # noqa: E501 + paypal (PaymentPaymentMethodPaypal): [optional] # noqa: E501 + cofidis (PaymentPaymentMethodCofidis): [optional] # noqa: E501 + cofidis_loan (PaymentPaymentMethodCofidis): [optional] # noqa: E501 + mbway (PaymentPaymentMethodMbway): [optional] # noqa: E501 + trustly (PaymentPaymentMethodTrustly): [optional] # noqa: E501 + sepa (PaymentPaymentMethodSepa): [optional] # noqa: E501 + klarna (PaymentPaymentMethodKlarna): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """PaymentPaymentMethod - 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 + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + method (str): Payment method type.. [optional] # noqa: E501 + card (PaymentPaymentMethodCard): [optional] # noqa: E501 + bizum (PaymentPaymentMethodBizum): [optional] # noqa: E501 + paypal (PaymentPaymentMethodPaypal): [optional] # noqa: E501 + cofidis (PaymentPaymentMethodCofidis): [optional] # noqa: E501 + cofidis_loan (PaymentPaymentMethodCofidis): [optional] # noqa: E501 + mbway (PaymentPaymentMethodMbway): [optional] # noqa: E501 + trustly (PaymentPaymentMethodTrustly): [optional] # noqa: E501 + sepa (PaymentPaymentMethodSepa): [optional] # noqa: E501 + klarna (PaymentPaymentMethodKlarna): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/Monei/model/payment_payment_method_bizum.py b/Monei/model/payment_payment_method_bizum.py new file mode 100644 index 0000000..9bc1619 --- /dev/null +++ b/Monei/model/payment_payment_method_bizum.py @@ -0,0 +1,263 @@ +""" + MONEI API v1 + +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 + + The version of the OpenAPI document: 1.5.3 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from Monei.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from Monei.exceptions import ApiAttributeError + + + +class PaymentPaymentMethodBizum(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'phone_number': (str,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'phone_number': 'phoneNumber', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """PaymentPaymentMethodBizum - 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 + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + phone_number (str): Phone number in E.164 format used to pay with `bizum`.. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """PaymentPaymentMethodBizum - 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 + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + phone_number (str): Phone number in E.164 format used to pay with `bizum`.. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/Monei/model/payment_payment_method_bizum_input.py b/Monei/model/payment_payment_method_bizum_input.py new file mode 100644 index 0000000..9735295 --- /dev/null +++ b/Monei/model/payment_payment_method_bizum_input.py @@ -0,0 +1,263 @@ +""" + MONEI API v1 + +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 + + The version of the OpenAPI document: 1.5.3 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from Monei.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from Monei.exceptions import ApiAttributeError + + + +class PaymentPaymentMethodBizumInput(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'phone_number': (str,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'phone_number': 'phoneNumber', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """PaymentPaymentMethodBizumInput - 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 + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + phone_number (str): Phone number in E.164 format used to pay with `bizum`.. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """PaymentPaymentMethodBizumInput - 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 + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + phone_number (str): Phone number in E.164 format used to pay with `bizum`.. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/Monei/model/payment_payment_method_card.py b/Monei/model/payment_payment_method_card.py new file mode 100644 index 0000000..64a45de --- /dev/null +++ b/Monei/model/payment_payment_method_card.py @@ -0,0 +1,327 @@ +""" + MONEI API v1 + +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 + + The version of the OpenAPI document: 1.5.3 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from Monei.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from Monei.exceptions import ApiAttributeError + + + +class PaymentPaymentMethodCard(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + ('brand',): { + 'VISA': "visa", + 'MASTERCARD': "mastercard", + 'DINERS': "diners", + 'AMEX': "amex", + 'JCB': "jcb", + 'UNIONPAY': "unionpay", + 'UNKNOWN': "unknown", + }, + ('type',): { + 'DEBIT': "debit", + 'CREDIT': "credit", + }, + ('three_d_secure_flow',): { + 'CHALLENGE': "CHALLENGE", + 'FRICTIONLESS': "FRICTIONLESS", + 'FRICTIONLESS_CHALLENGE': "FRICTIONLESS_CHALLENGE", + 'DIRECT': "DIRECT", + }, + ('tokenization_method',): { + 'APPLEPAY': "applePay", + 'GOOGLEPAY': "googlePay", + 'CLICKTOPAY': "clickToPay", + }, + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'country': (str,), # noqa: E501 + 'brand': (str,), # noqa: E501 + 'type': (str,), # noqa: E501 + 'three_d_secure': (bool,), # noqa: E501 + 'three_d_secure_version': (str,), # noqa: E501 + 'three_d_secure_flow': (str,), # noqa: E501 + 'expiration': (int,), # noqa: E501 + 'last4': (str,), # noqa: E501 + 'tokenization_method': (str,), # noqa: E501 + 'cardholder_name': (str,), # noqa: E501 + 'cardholder_email': (str,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'country': 'country', # noqa: E501 + 'brand': 'brand', # noqa: E501 + 'type': 'type', # noqa: E501 + 'three_d_secure': 'threeDSecure', # noqa: E501 + 'three_d_secure_version': 'threeDSecureVersion', # noqa: E501 + 'three_d_secure_flow': 'threeDSecureFlow', # noqa: E501 + 'expiration': 'expiration', # noqa: E501 + 'last4': 'last4', # noqa: E501 + 'tokenization_method': 'tokenizationMethod', # noqa: E501 + 'cardholder_name': 'cardholderName', # noqa: E501 + 'cardholder_email': 'cardholderEmail', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """PaymentPaymentMethodCard - 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 + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + country (str): Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).. [optional] # noqa: E501 + brand (str): Card brand.. [optional] # noqa: E501 + type (str): Card type `debit` or `credit`.. [optional] # noqa: E501 + three_d_secure (bool): Whether this transaction used 3D Secure authentication.. [optional] # noqa: E501 + three_d_secure_version (str): The protocol version of the 3DS challenge.. [optional] # noqa: E501 + three_d_secure_flow (str): The flow used for 3DS authentication. - `CHALLENGE` - In a challenge flow, the issuer requires additional shopper interaction, either through biometrics, two-factor authentication, or similar methods based on [Strong Customer Authentication (SCA)](https://en.wikipedia.org/wiki/Strong_customer_authentication) factors. - `FRICTIONLESS` - In a frictionless flow, the acquirer, issuer, and card scheme exchange all necessary information in the background through passive authentication using the shopper's device fingerprint. The transaction is completed without further shopper interaction. - `FRICTIONLESS_CHALLENGE` - This flow is the complete 3DS flow. It is similar to the 3DS frictionless flow but includes an additional authentication step (challenge) that will be invoked if the information provided in the data collection step does not suffice to determine the risk-level of the transaction. - `DIRECT` - This transaction did not require [Strong Customer Authentication (SCA)](https://en.wikipedia.org/wiki/Strong_customer_authentication) due to the low risk . [optional] # noqa: E501 + expiration (int): Time at which the card will expire. Measured in seconds since the Unix epoch. . [optional] # noqa: E501 + last4 (str): The last four digits of the card.. [optional] # noqa: E501 + tokenization_method (str): The digital wallet used to tokenize the card.. [optional] # noqa: E501 + cardholder_name (str): The name of the cardholder.. [optional] # noqa: E501 + cardholder_email (str): The email of the cardholder.. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """PaymentPaymentMethodCard - 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 + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + country (str): Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).. [optional] # noqa: E501 + brand (str): Card brand.. [optional] # noqa: E501 + type (str): Card type `debit` or `credit`.. [optional] # noqa: E501 + three_d_secure (bool): Whether this transaction used 3D Secure authentication.. [optional] # noqa: E501 + three_d_secure_version (str): The protocol version of the 3DS challenge.. [optional] # noqa: E501 + three_d_secure_flow (str): The flow used for 3DS authentication. - `CHALLENGE` - In a challenge flow, the issuer requires additional shopper interaction, either through biometrics, two-factor authentication, or similar methods based on [Strong Customer Authentication (SCA)](https://en.wikipedia.org/wiki/Strong_customer_authentication) factors. - `FRICTIONLESS` - In a frictionless flow, the acquirer, issuer, and card scheme exchange all necessary information in the background through passive authentication using the shopper's device fingerprint. The transaction is completed without further shopper interaction. - `FRICTIONLESS_CHALLENGE` - This flow is the complete 3DS flow. It is similar to the 3DS frictionless flow but includes an additional authentication step (challenge) that will be invoked if the information provided in the data collection step does not suffice to determine the risk-level of the transaction. - `DIRECT` - This transaction did not require [Strong Customer Authentication (SCA)](https://en.wikipedia.org/wiki/Strong_customer_authentication) due to the low risk . [optional] # noqa: E501 + expiration (int): Time at which the card will expire. Measured in seconds since the Unix epoch. . [optional] # noqa: E501 + last4 (str): The last four digits of the card.. [optional] # noqa: E501 + tokenization_method (str): The digital wallet used to tokenize the card.. [optional] # noqa: E501 + cardholder_name (str): The name of the cardholder.. [optional] # noqa: E501 + cardholder_email (str): The email of the cardholder.. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/Monei/model/payment_payment_method_card_input.py b/Monei/model/payment_payment_method_card_input.py new file mode 100644 index 0000000..adaac82 --- /dev/null +++ b/Monei/model/payment_payment_method_card_input.py @@ -0,0 +1,283 @@ +""" + MONEI API v1 + +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 + + The version of the OpenAPI document: 1.5.3 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from Monei.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from Monei.exceptions import ApiAttributeError + + + +class PaymentPaymentMethodCardInput(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'number': (str,), # noqa: E501 + 'cvc': (str,), # noqa: E501 + 'exp_month': (str,), # noqa: E501 + 'exp_year': (str,), # noqa: E501 + 'cardholder_name': (str,), # noqa: E501 + 'cardholder_email': (str,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'number': 'number', # noqa: E501 + 'cvc': 'cvc', # noqa: E501 + 'exp_month': 'expMonth', # noqa: E501 + 'exp_year': 'expYear', # noqa: E501 + 'cardholder_name': 'cardholderName', # noqa: E501 + 'cardholder_email': 'cardholderEmail', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """PaymentPaymentMethodCardInput - 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 + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + number (str): The card number, as a string without any separators.. [optional] # noqa: E501 + cvc (str): Card security code.. [optional] # noqa: E501 + exp_month (str): Two-digit number representing the card's expiration month.. [optional] # noqa: E501 + exp_year (str): Two-digit number representing the card's expiration year.. [optional] # noqa: E501 + cardholder_name (str): The cardholder's name, as stated in the credit card.. [optional] # noqa: E501 + cardholder_email (str): The cardholder's email address.. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """PaymentPaymentMethodCardInput - 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 + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + number (str): The card number, as a string without any separators.. [optional] # noqa: E501 + cvc (str): Card security code.. [optional] # noqa: E501 + exp_month (str): Two-digit number representing the card's expiration month.. [optional] # noqa: E501 + exp_year (str): Two-digit number representing the card's expiration year.. [optional] # noqa: E501 + cardholder_name (str): The cardholder's name, as stated in the credit card.. [optional] # noqa: E501 + cardholder_email (str): The cardholder's email address.. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/Monei/model/payment_payment_method_cofidis.py b/Monei/model/payment_payment_method_cofidis.py new file mode 100644 index 0000000..95601c6 --- /dev/null +++ b/Monei/model/payment_payment_method_cofidis.py @@ -0,0 +1,263 @@ +""" + MONEI API v1 + +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 + + The version of the OpenAPI document: 1.5.3 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from Monei.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from Monei.exceptions import ApiAttributeError + + + +class PaymentPaymentMethodCofidis(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'order_id': (str,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'order_id': 'orderId', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """PaymentPaymentMethodCofidis - 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 + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + order_id (str): The Cofidis' order ID.. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """PaymentPaymentMethodCofidis - 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 + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + order_id (str): The Cofidis' order ID.. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/Monei/model/payment_payment_method_input.py b/Monei/model/payment_payment_method_input.py new file mode 100644 index 0000000..e3a129e --- /dev/null +++ b/Monei/model/payment_payment_method_input.py @@ -0,0 +1,275 @@ +""" + MONEI API v1 + +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 + + The version of the OpenAPI document: 1.5.3 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from Monei.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from Monei.exceptions import ApiAttributeError + + +def lazy_import(): + from Monei.model.payment_payment_method_bizum_input import PaymentPaymentMethodBizumInput + from Monei.model.payment_payment_method_card_input import PaymentPaymentMethodCardInput + globals()['PaymentPaymentMethodBizumInput'] = PaymentPaymentMethodBizumInput + globals()['PaymentPaymentMethodCardInput'] = PaymentPaymentMethodCardInput + + +class PaymentPaymentMethodInput(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'card': (PaymentPaymentMethodCardInput,), # noqa: E501 + 'bizum': (PaymentPaymentMethodBizumInput,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'card': 'card', # noqa: E501 + 'bizum': 'bizum', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """PaymentPaymentMethodInput - 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 + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + card (PaymentPaymentMethodCardInput): [optional] # noqa: E501 + bizum (PaymentPaymentMethodBizumInput): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """PaymentPaymentMethodInput - 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 + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + card (PaymentPaymentMethodCardInput): [optional] # noqa: E501 + bizum (PaymentPaymentMethodBizumInput): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/Monei/model/payment_payment_method_klarna.py b/Monei/model/payment_payment_method_klarna.py new file mode 100644 index 0000000..fa1eb97 --- /dev/null +++ b/Monei/model/payment_payment_method_klarna.py @@ -0,0 +1,285 @@ +""" + MONEI API v1 + +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 + + The version of the OpenAPI document: 1.5.3 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from Monei.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from Monei.exceptions import ApiAttributeError + + + +class PaymentPaymentMethodKlarna(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + ('billing_category',): { + 'PAY_LATER': "PAY_LATER", + 'PAY_NOW': "PAY_NOW", + 'SLICE_IT': "SLICE_IT", + 'SLICE_IT_BY_CARD': "SLICE_IT_BY_CARD", + }, + ('auth_payment_method',): { + 'INVOICE': "invoice", + 'FIXED_AMOUNT': "fixed_amount", + 'PIX': "pix", + 'BASE_ACCOUNT': "base_account", + 'DEFERRED_INTEREST': "deferred_interest", + 'DIRECT_DEBIT': "direct_debit", + 'DIRECT_BANK_TRANSFER': "direct_bank_transfer", + 'B2B_INVOICE': "b2b_invoice", + 'CARD': "card", + 'SLICE_IT_BY_CARD': "slice_it_by_card", + }, + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'billing_category': (str,), # noqa: E501 + 'auth_payment_method': (str,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'billing_category': 'billingCategory', # noqa: E501 + 'auth_payment_method': 'authPaymentMethod', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """PaymentPaymentMethodKlarna - 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 + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + billing_category (str): [optional] # noqa: E501 + auth_payment_method (str): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """PaymentPaymentMethodKlarna - 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 + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + billing_category (str): [optional] # noqa: E501 + auth_payment_method (str): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/Monei/model/payment_payment_method_mbway.py b/Monei/model/payment_payment_method_mbway.py new file mode 100644 index 0000000..6410c53 --- /dev/null +++ b/Monei/model/payment_payment_method_mbway.py @@ -0,0 +1,263 @@ +""" + MONEI API v1 + +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 + + The version of the OpenAPI document: 1.5.3 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from Monei.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from Monei.exceptions import ApiAttributeError + + + +class PaymentPaymentMethodMbway(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'phone_number': (str,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'phone_number': 'phoneNumber', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """PaymentPaymentMethodMbway - 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 + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + phone_number (str): Phone number in E.164 format used to pay with `mbway`.. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """PaymentPaymentMethodMbway - 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 + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + phone_number (str): Phone number in E.164 format used to pay with `mbway`.. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/Monei/model/payment_payment_method_paypal.py b/Monei/model/payment_payment_method_paypal.py new file mode 100644 index 0000000..d56bed8 --- /dev/null +++ b/Monei/model/payment_payment_method_paypal.py @@ -0,0 +1,263 @@ +""" + MONEI API v1 + +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 + + The version of the OpenAPI document: 1.5.3 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from Monei.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from Monei.exceptions import ApiAttributeError + + + +class PaymentPaymentMethodPaypal(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'order_id': (str,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'order_id': 'orderId', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """PaymentPaymentMethodPaypal - 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 + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + order_id (str): The Paypal's order ID.. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """PaymentPaymentMethodPaypal - 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 + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + order_id (str): The Paypal's order ID.. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/Monei/model/payment_payment_method_sepa.py b/Monei/model/payment_payment_method_sepa.py new file mode 100644 index 0000000..56f91e3 --- /dev/null +++ b/Monei/model/payment_payment_method_sepa.py @@ -0,0 +1,295 @@ +""" + MONEI API v1 + +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 + + The version of the OpenAPI document: 1.5.3 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from Monei.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from Monei.exceptions import ApiAttributeError + + + +class PaymentPaymentMethodSepa(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'accountholder_address': (str,), # noqa: E501 + 'accountholder_email': (str,), # noqa: E501 + 'accountholder_name': (str,), # noqa: E501 + 'country_code': (str,), # noqa: E501 + 'bank_address': (str,), # noqa: E501 + 'bank_code': (str,), # noqa: E501 + 'bank_name': (str,), # noqa: E501 + 'bic': (str,), # noqa: E501 + 'last4': (str,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'accountholder_address': 'accountholderAddress', # noqa: E501 + 'accountholder_email': 'accountholderEmail', # noqa: E501 + 'accountholder_name': 'accountholderName', # noqa: E501 + 'country_code': 'countryCode', # noqa: E501 + 'bank_address': 'bankAddress', # noqa: E501 + 'bank_code': 'bankCode', # noqa: E501 + 'bank_name': 'bankName', # noqa: E501 + 'bic': 'bic', # noqa: E501 + 'last4': 'last4', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """PaymentPaymentMethodSepa - 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 + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + accountholder_address (str): The address of the account holder.. [optional] # noqa: E501 + accountholder_email (str): The email of the account holder.. [optional] # noqa: E501 + accountholder_name (str): The name of the account holder.. [optional] # noqa: E501 + country_code (str): The country code of the account holder.. [optional] # noqa: E501 + bank_address (str): The address of the bank.. [optional] # noqa: E501 + bank_code (str): The code of the bank.. [optional] # noqa: E501 + bank_name (str): The name of the bank.. [optional] # noqa: E501 + bic (str): The BIC of the bank.. [optional] # noqa: E501 + last4 (str): The last 4 digits of the IBAN.. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """PaymentPaymentMethodSepa - 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 + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + accountholder_address (str): The address of the account holder.. [optional] # noqa: E501 + accountholder_email (str): The email of the account holder.. [optional] # noqa: E501 + accountholder_name (str): The name of the account holder.. [optional] # noqa: E501 + country_code (str): The country code of the account holder.. [optional] # noqa: E501 + bank_address (str): The address of the bank.. [optional] # noqa: E501 + bank_code (str): The code of the bank.. [optional] # noqa: E501 + bank_name (str): The name of the bank.. [optional] # noqa: E501 + bic (str): The BIC of the bank.. [optional] # noqa: E501 + last4 (str): The last 4 digits of the IBAN.. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/Monei/model/payment_payment_method_trustly.py b/Monei/model/payment_payment_method_trustly.py new file mode 100644 index 0000000..0b6c0da --- /dev/null +++ b/Monei/model/payment_payment_method_trustly.py @@ -0,0 +1,263 @@ +""" + MONEI API v1 + +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 + + The version of the OpenAPI document: 1.5.3 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from Monei.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from Monei.exceptions import ApiAttributeError + + + +class PaymentPaymentMethodTrustly(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'customer_id': (str,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'customer_id': 'customerId', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """PaymentPaymentMethodTrustly - 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 + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + customer_id (str): The Trustly's customer ID.. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """PaymentPaymentMethodTrustly - 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 + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + customer_id (str): The Trustly's customer ID.. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/Monei/model/payment_payment_methods.py b/Monei/model/payment_payment_methods.py new file mode 100644 index 0000000..7ad83b7 --- /dev/null +++ b/Monei/model/payment_payment_methods.py @@ -0,0 +1,286 @@ +""" + MONEI API v1 + +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 + + The version of the OpenAPI document: 1.5.3 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from Monei.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from Monei.exceptions import ApiAttributeError + + + +class PaymentPaymentMethods(ModelSimple): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + additional_properties_type = None + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'value': ([str],), + } + + @cached_property + def discriminator(): + return None + + + attribute_map = {} + + read_only_vars = set() + + _composed_schemas = None + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): + """PaymentPaymentMethods - a model defined in OpenAPI + + Note that value can be passed either in args or in kwargs, but not in both. + + Args: + args[0] ([str]): An array of allowed payment methods (used in hosted payment page). Must be enabled payment methods. Possible values: - `alipay` - `card` - `bizum` - `paypal` - `cofidis` - `cofidisLoan` - `mbway` - `multibanco` - `iDeal` - `bancontact` - `sofort` - `trustly` - `sepa` - `klarna` - `giropay` - `eps` - `blik` . # noqa: E501 + + Keyword Args: + value ([str]): An array of allowed payment methods (used in hosted payment page). Must be enabled payment methods. Possible values: - `alipay` - `card` - `bizum` - `paypal` - `cofidis` - `cofidisLoan` - `mbway` - `multibanco` - `iDeal` - `bancontact` - `sofort` - `trustly` - `sepa` - `klarna` - `giropay` - `eps` - `blik` . # 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. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + # required up here when default value is not given + _path_to_item = kwargs.pop('_path_to_item', ()) + + if 'value' in kwargs: + value = kwargs.pop('value') + elif args: + args = list(args) + value = args.pop(0) + else: + raise ApiTypeError( + "value is required, but not passed in args or kwargs and doesn't have default", + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + self.value = value + if kwargs: + raise ApiTypeError( + "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( + kwargs, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): + """PaymentPaymentMethods - a model defined in OpenAPI + + Note that value can be passed either in args or in kwargs, but not in both. + + Args: + args[0] ([str]): An array of allowed payment methods (used in hosted payment page). Must be enabled payment methods. Possible values: - `alipay` - `card` - `bizum` - `paypal` - `cofidis` - `cofidisLoan` - `mbway` - `multibanco` - `iDeal` - `bancontact` - `sofort` - `trustly` - `sepa` - `klarna` - `giropay` - `eps` - `blik` . # noqa: E501 + + Keyword Args: + value ([str]): An array of allowed payment methods (used in hosted payment page). Must be enabled payment methods. Possible values: - `alipay` - `card` - `bizum` - `paypal` - `cofidis` - `cofidisLoan` - `mbway` - `multibanco` - `iDeal` - `bancontact` - `sofort` - `trustly` - `sepa` - `klarna` - `giropay` - `eps` - `blik` . # 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. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + # required up here when default value is not given + _path_to_item = kwargs.pop('_path_to_item', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if 'value' in kwargs: + value = kwargs.pop('value') + elif args: + args = list(args) + value = args.pop(0) + else: + raise ApiTypeError( + "value is required, but not passed in args or kwargs and doesn't have default", + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + self.value = value + if kwargs: + raise ApiTypeError( + "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( + kwargs, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + return self diff --git a/Monei/model/payment_refund_reason.py b/Monei/model/payment_refund_reason.py new file mode 100644 index 0000000..353c751 --- /dev/null +++ b/Monei/model/payment_refund_reason.py @@ -0,0 +1,291 @@ +""" + MONEI API v1 + +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 + + The version of the OpenAPI document: 1.5.3 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from Monei.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from Monei.exceptions import ApiAttributeError + + + +class PaymentRefundReason(ModelSimple): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + ('value',): { + 'DUPLICATED': "duplicated", + 'FRAUDULENT': "fraudulent", + 'REQUESTED_BY_CUSTOMER': "requested_by_customer", + }, + } + + validations = { + } + + additional_properties_type = None + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'value': (str,), + } + + @cached_property + def discriminator(): + return None + + + attribute_map = {} + + read_only_vars = set() + + _composed_schemas = None + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): + """PaymentRefundReason - a model defined in OpenAPI + + Note that value can be passed either in args or in kwargs, but not in both. + + Args: + args[0] (str): The reason for refunding the Payment.., must be one of ["duplicated", "fraudulent", "requested_by_customer", ] # noqa: E501 + + Keyword Args: + value (str): The reason for refunding the Payment.., must be one of ["duplicated", "fraudulent", "requested_by_customer", ] # 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. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + # required up here when default value is not given + _path_to_item = kwargs.pop('_path_to_item', ()) + + if 'value' in kwargs: + value = kwargs.pop('value') + elif args: + args = list(args) + value = args.pop(0) + else: + raise ApiTypeError( + "value is required, but not passed in args or kwargs and doesn't have default", + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + self.value = value + if kwargs: + raise ApiTypeError( + "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( + kwargs, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): + """PaymentRefundReason - a model defined in OpenAPI + + Note that value can be passed either in args or in kwargs, but not in both. + + Args: + args[0] (str): The reason for refunding the Payment.., must be one of ["duplicated", "fraudulent", "requested_by_customer", ] # noqa: E501 + + Keyword Args: + value (str): The reason for refunding the Payment.., must be one of ["duplicated", "fraudulent", "requested_by_customer", ] # 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. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + # required up here when default value is not given + _path_to_item = kwargs.pop('_path_to_item', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if 'value' in kwargs: + value = kwargs.pop('value') + elif args: + args = list(args) + value = args.pop(0) + else: + raise ApiTypeError( + "value is required, but not passed in args or kwargs and doesn't have default", + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + self.value = value + if kwargs: + raise ApiTypeError( + "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( + kwargs, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + return self diff --git a/Monei/model/payment_sequence.py b/Monei/model/payment_sequence.py new file mode 100644 index 0000000..2610ed4 --- /dev/null +++ b/Monei/model/payment_sequence.py @@ -0,0 +1,284 @@ +""" + MONEI API v1 + +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 + + The version of the OpenAPI document: 1.5.3 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from Monei.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from Monei.exceptions import ApiAttributeError + + +def lazy_import(): + from Monei.model.payment_sequence_recurring import PaymentSequenceRecurring + globals()['PaymentSequenceRecurring'] = PaymentSequenceRecurring + + +class PaymentSequence(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + ('type',): { + 'RECURRING': "recurring", + }, + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'type': (str,), # noqa: E501 + 'recurring': (PaymentSequenceRecurring,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'type': 'type', # noqa: E501 + 'recurring': 'recurring', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """PaymentSequence - a model defined in OpenAPI + + Args: + + Keyword Args: + type (str): defaults to "recurring", must be one of ["recurring", ] # 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. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + recurring (PaymentSequenceRecurring): [optional] # noqa: E501 + """ + + type = kwargs.get('type', "recurring") + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + 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 \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """PaymentSequence - a model defined in OpenAPI + + Args: + + Keyword Args: + type (str): defaults to "recurring", must be one of ["recurring", ] # 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. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + recurring (PaymentSequenceRecurring): [optional] # noqa: E501 + """ + + type = kwargs.get('type', "recurring") + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + 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 \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/Monei/model/payment_sequence_recurring.py b/Monei/model/payment_sequence_recurring.py new file mode 100644 index 0000000..2270026 --- /dev/null +++ b/Monei/model/payment_sequence_recurring.py @@ -0,0 +1,267 @@ +""" + MONEI API v1 + +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 + + The version of the OpenAPI document: 1.5.3 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from Monei.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from Monei.exceptions import ApiAttributeError + + + +class PaymentSequenceRecurring(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'expiry': (str,), # noqa: E501 + 'frequency': (int,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'expiry': 'expiry', # noqa: E501 + 'frequency': 'frequency', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """PaymentSequenceRecurring - 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 + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + expiry (str): Date after which no further recurring payments will be performed. Must be formatted as `YYYYMMDD`. . [optional] if omitted the server will use the default value of "*(The payment method or card expiration)*" # noqa: E501 + frequency (int): The minimum number of **days** between the different recurring payments. . [optional] if omitted the server will use the default value of 25 # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """PaymentSequenceRecurring - 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 + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + expiry (str): Date after which no further recurring payments will be performed. Must be formatted as `YYYYMMDD`. . [optional] if omitted the server will use the default value of "*(The payment method or card expiration)*" # noqa: E501 + frequency (int): The minimum number of **days** between the different recurring payments. . [optional] if omitted the server will use the default value of 25 # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/Monei/model/payment_session_details.py b/Monei/model/payment_session_details.py new file mode 100644 index 0000000..ae6e825 --- /dev/null +++ b/Monei/model/payment_session_details.py @@ -0,0 +1,327 @@ +""" + MONEI API v1 + +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 + + The version of the OpenAPI document: 1.5.3 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from Monei.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from Monei.exceptions import ApiAttributeError + + + +class PaymentSessionDetails(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'ip': (str,), # noqa: E501 + 'country_code': (str,), # noqa: E501 + 'lang': (str,), # noqa: E501 + 'device_type': (str,), # noqa: E501 + 'device_model': (str,), # noqa: E501 + 'browser': (str,), # noqa: E501 + 'browser_version': (str,), # noqa: E501 + 'os': (str,), # noqa: E501 + 'os_version': (str,), # noqa: E501 + 'source': (str,), # noqa: E501 + 'source_version': (str,), # noqa: E501 + 'user_agent': (str,), # noqa: E501 + 'browser_accept': (str,), # noqa: E501 + 'browser_color_depth': (int,), # noqa: E501 + 'browser_screen_height': (int,), # noqa: E501 + 'browser_screen_width': (int,), # noqa: E501 + 'browser_timezone_offset': (str,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'ip': 'ip', # noqa: E501 + 'country_code': 'countryCode', # noqa: E501 + 'lang': 'lang', # noqa: E501 + 'device_type': 'deviceType', # noqa: E501 + 'device_model': 'deviceModel', # noqa: E501 + 'browser': 'browser', # noqa: E501 + 'browser_version': 'browserVersion', # noqa: E501 + 'os': 'os', # noqa: E501 + 'os_version': 'osVersion', # noqa: E501 + 'source': 'source', # noqa: E501 + 'source_version': 'sourceVersion', # noqa: E501 + 'user_agent': 'userAgent', # noqa: E501 + 'browser_accept': 'browserAccept', # noqa: E501 + 'browser_color_depth': 'browserColorDepth', # noqa: E501 + 'browser_screen_height': 'browserScreenHeight', # noqa: E501 + 'browser_screen_width': 'browserScreenWidth', # noqa: E501 + 'browser_timezone_offset': 'browserTimezoneOffset', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """PaymentSessionDetails - 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 + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + ip (str): The IP address where the operation originated.. [optional] # noqa: E501 + country_code (str): Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).. [optional] # noqa: E501 + lang (str): Two-letter language code ([ISO 639-1](https://en.wikipedia.org/wiki/ISO_639-1)).. [optional] # noqa: E501 + device_type (str): Device type, could be `desktop`, `mobile`, `smartTV`, `tablet`.. [optional] # noqa: E501 + device_model (str): Information about the device used for the browser session (e.g., `iPhone`).. [optional] # noqa: E501 + browser (str): The browser used in this browser session (e.g., `Mobile Safari`).. [optional] # noqa: E501 + browser_version (str): The version for the browser session (e.g., `13.1.1`).. [optional] # noqa: E501 + os (str): Operation system (e.g., `iOS`).. [optional] # noqa: E501 + os_version (str): Operation system version (e.g., `13.5.1`).. [optional] # noqa: E501 + source (str): The source component from where the operation was generated (mostly for our SDK's).. [optional] # noqa: E501 + source_version (str): The source component version from where the operation was generated (mostly for our SDK's).. [optional] # noqa: E501 + user_agent (str): Full user agent string of the browser session.. [optional] # noqa: E501 + browser_accept (str): Browser accept header.. [optional] # noqa: E501 + browser_color_depth (int): The color depth of the browser session (e.g., `24`).. [optional] # noqa: E501 + browser_screen_height (int): The screen height of the browser session (e.g., `1152`).. [optional] # noqa: E501 + browser_screen_width (int): The screen width of the browser session (e.g., `2048`).. [optional] # noqa: E501 + browser_timezone_offset (str): The timezone offset of the browser session (e.g., `-120`).. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """PaymentSessionDetails - 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 + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + ip (str): The IP address where the operation originated.. [optional] # noqa: E501 + country_code (str): Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).. [optional] # noqa: E501 + lang (str): Two-letter language code ([ISO 639-1](https://en.wikipedia.org/wiki/ISO_639-1)).. [optional] # noqa: E501 + device_type (str): Device type, could be `desktop`, `mobile`, `smartTV`, `tablet`.. [optional] # noqa: E501 + device_model (str): Information about the device used for the browser session (e.g., `iPhone`).. [optional] # noqa: E501 + browser (str): The browser used in this browser session (e.g., `Mobile Safari`).. [optional] # noqa: E501 + browser_version (str): The version for the browser session (e.g., `13.1.1`).. [optional] # noqa: E501 + os (str): Operation system (e.g., `iOS`).. [optional] # noqa: E501 + os_version (str): Operation system version (e.g., `13.5.1`).. [optional] # noqa: E501 + source (str): The source component from where the operation was generated (mostly for our SDK's).. [optional] # noqa: E501 + source_version (str): The source component version from where the operation was generated (mostly for our SDK's).. [optional] # noqa: E501 + user_agent (str): Full user agent string of the browser session.. [optional] # noqa: E501 + browser_accept (str): Browser accept header.. [optional] # noqa: E501 + browser_color_depth (int): The color depth of the browser session (e.g., `24`).. [optional] # noqa: E501 + browser_screen_height (int): The screen height of the browser session (e.g., `1152`).. [optional] # noqa: E501 + browser_screen_width (int): The screen width of the browser session (e.g., `2048`).. [optional] # noqa: E501 + browser_timezone_offset (str): The timezone offset of the browser session (e.g., `-120`).. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/Monei/model/payment_shipping_details.py b/Monei/model/payment_shipping_details.py new file mode 100644 index 0000000..1f9fff4 --- /dev/null +++ b/Monei/model/payment_shipping_details.py @@ -0,0 +1,289 @@ +""" + MONEI API v1 + +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 + + The version of the OpenAPI document: 1.5.3 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from Monei.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from Monei.exceptions import ApiAttributeError + + +def lazy_import(): + from Monei.model.address import Address + globals()['Address'] = Address + + +class PaymentShippingDetails(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'name': (str,), # noqa: E501 + 'email': (str,), # noqa: E501 + 'phone': (str,), # noqa: E501 + 'company': (str,), # noqa: E501 + 'tax_id': (str,), # noqa: E501 + 'address': (Address,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'name': 'name', # noqa: E501 + 'email': 'email', # noqa: E501 + 'phone': 'phone', # noqa: E501 + 'company': 'company', # noqa: E501 + 'tax_id': 'taxId', # noqa: E501 + 'address': 'address', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """PaymentShippingDetails - 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 + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + name (str): The shipping customer's full name.. [optional] # noqa: E501 + email (str): The shipping customer's email address.. [optional] # noqa: E501 + phone (str): The shipping customer's phone number in E.164 format.. [optional] # noqa: E501 + company (str): Name of the company where the shipment is going.. [optional] # noqa: E501 + tax_id (str): Company tax ID.. [optional] # noqa: E501 + address (Address): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """PaymentShippingDetails - 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 + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + name (str): The shipping customer's full name.. [optional] # noqa: E501 + email (str): The shipping customer's email address.. [optional] # noqa: E501 + phone (str): The shipping customer's phone number in E.164 format.. [optional] # noqa: E501 + company (str): Name of the company where the shipment is going.. [optional] # noqa: E501 + tax_id (str): Company tax ID.. [optional] # noqa: E501 + address (Address): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/Monei/model/payment_shop.py b/Monei/model/payment_shop.py new file mode 100644 index 0000000..0f4032e --- /dev/null +++ b/Monei/model/payment_shop.py @@ -0,0 +1,267 @@ +""" + MONEI API v1 + +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 + + The version of the OpenAPI document: 1.5.3 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from Monei.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from Monei.exceptions import ApiAttributeError + + + +class PaymentShop(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'name': (str,), # noqa: E501 + 'country': (str,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'name': 'name', # noqa: E501 + 'country': 'country', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """PaymentShop - 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 + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + name (str): The shop name.. [optional] # noqa: E501 + country (str): Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """PaymentShop - 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 + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + name (str): The shop name.. [optional] # noqa: E501 + country (str): Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/Monei/model/payment_status.py b/Monei/model/payment_status.py new file mode 100644 index 0000000..99a5210 --- /dev/null +++ b/Monei/model/payment_status.py @@ -0,0 +1,296 @@ +""" + MONEI API v1 + +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 + + The version of the OpenAPI document: 1.5.3 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from Monei.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from Monei.exceptions import ApiAttributeError + + + +class PaymentStatus(ModelSimple): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + ('value',): { + 'SUCCEEDED': "SUCCEEDED", + 'PENDING': "PENDING", + 'FAILED': "FAILED", + 'CANCELED': "CANCELED", + 'REFUNDED': "REFUNDED", + 'PARTIALLY_REFUNDED': "PARTIALLY_REFUNDED", + 'AUTHORIZED': "AUTHORIZED", + 'EXPIRED': "EXPIRED", + }, + } + + validations = { + } + + additional_properties_type = None + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'value': (str,), + } + + @cached_property + def discriminator(): + return None + + + attribute_map = {} + + read_only_vars = set() + + _composed_schemas = None + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): + """PaymentStatus - a model defined in OpenAPI + + Note that value can be passed either in args or in kwargs, but not in both. + + Args: + args[0] (str): The status of the payment.., must be one of ["SUCCEEDED", "PENDING", "FAILED", "CANCELED", "REFUNDED", "PARTIALLY_REFUNDED", "AUTHORIZED", "EXPIRED", ] # noqa: E501 + + Keyword Args: + value (str): The status of the payment.., must be one of ["SUCCEEDED", "PENDING", "FAILED", "CANCELED", "REFUNDED", "PARTIALLY_REFUNDED", "AUTHORIZED", "EXPIRED", ] # 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. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + # required up here when default value is not given + _path_to_item = kwargs.pop('_path_to_item', ()) + + if 'value' in kwargs: + value = kwargs.pop('value') + elif args: + args = list(args) + value = args.pop(0) + else: + raise ApiTypeError( + "value is required, but not passed in args or kwargs and doesn't have default", + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + self.value = value + if kwargs: + raise ApiTypeError( + "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( + kwargs, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): + """PaymentStatus - a model defined in OpenAPI + + Note that value can be passed either in args or in kwargs, but not in both. + + Args: + args[0] (str): The status of the payment.., must be one of ["SUCCEEDED", "PENDING", "FAILED", "CANCELED", "REFUNDED", "PARTIALLY_REFUNDED", "AUTHORIZED", "EXPIRED", ] # noqa: E501 + + Keyword Args: + value (str): The status of the payment.., must be one of ["SUCCEEDED", "PENDING", "FAILED", "CANCELED", "REFUNDED", "PARTIALLY_REFUNDED", "AUTHORIZED", "EXPIRED", ] # 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. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + # required up here when default value is not given + _path_to_item = kwargs.pop('_path_to_item', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if 'value' in kwargs: + value = kwargs.pop('value') + elif args: + args = list(args) + value = args.pop(0) + else: + raise ApiTypeError( + "value is required, but not passed in args or kwargs and doesn't have default", + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + self.value = value + if kwargs: + raise ApiTypeError( + "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( + kwargs, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + return self diff --git a/Monei/model/payment_trace_details.py b/Monei/model/payment_trace_details.py new file mode 100644 index 0000000..45199cd --- /dev/null +++ b/Monei/model/payment_trace_details.py @@ -0,0 +1,335 @@ +""" + MONEI API v1 + +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 + + The version of the OpenAPI document: 1.5.3 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from Monei.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from Monei.exceptions import ApiAttributeError + + + +class PaymentTraceDetails(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'ip': (str,), # noqa: E501 + 'country_code': (str,), # noqa: E501 + 'lang': (str,), # noqa: E501 + 'device_type': (str,), # noqa: E501 + 'device_model': (str,), # noqa: E501 + 'browser': (str,), # noqa: E501 + 'browser_version': (str,), # noqa: E501 + 'os': (str,), # noqa: E501 + 'os_version': (str,), # noqa: E501 + 'source': (str,), # noqa: E501 + 'source_version': (str,), # noqa: E501 + 'user_agent': (str,), # noqa: E501 + 'browser_accept': (str,), # noqa: E501 + 'browser_color_depth': (int,), # noqa: E501 + 'browser_screen_height': (int,), # noqa: E501 + 'browser_screen_width': (int,), # noqa: E501 + 'browser_timezone_offset': (str,), # noqa: E501 + 'user_id': (str,), # noqa: E501 + 'user_email': (str,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'ip': 'ip', # noqa: E501 + 'country_code': 'countryCode', # noqa: E501 + 'lang': 'lang', # noqa: E501 + 'device_type': 'deviceType', # noqa: E501 + 'device_model': 'deviceModel', # noqa: E501 + 'browser': 'browser', # noqa: E501 + 'browser_version': 'browserVersion', # noqa: E501 + 'os': 'os', # noqa: E501 + 'os_version': 'osVersion', # noqa: E501 + 'source': 'source', # noqa: E501 + 'source_version': 'sourceVersion', # noqa: E501 + 'user_agent': 'userAgent', # noqa: E501 + 'browser_accept': 'browserAccept', # noqa: E501 + 'browser_color_depth': 'browserColorDepth', # noqa: E501 + 'browser_screen_height': 'browserScreenHeight', # noqa: E501 + 'browser_screen_width': 'browserScreenWidth', # noqa: E501 + 'browser_timezone_offset': 'browserTimezoneOffset', # noqa: E501 + 'user_id': 'userId', # noqa: E501 + 'user_email': 'userEmail', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """PaymentTraceDetails - 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 + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + ip (str): The IP address where the operation originated.. [optional] # noqa: E501 + country_code (str): Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).. [optional] # noqa: E501 + lang (str): Two-letter language code ([ISO 639-1](https://en.wikipedia.org/wiki/ISO_639-1)).. [optional] # noqa: E501 + device_type (str): Device type, could be `desktop`, `mobile`, `smartTV`, `tablet`.. [optional] # noqa: E501 + device_model (str): Information about the device used for the browser session (e.g., `iPhone`).. [optional] # noqa: E501 + browser (str): The browser used in this browser session (e.g., `Mobile Safari`).. [optional] # noqa: E501 + browser_version (str): The version for the browser session (e.g., `13.1.1`).. [optional] # noqa: E501 + os (str): Operation system (e.g., `iOS`).. [optional] # noqa: E501 + os_version (str): Operation system version (e.g., `13.5.1`).. [optional] # noqa: E501 + source (str): The source component from where the operation was generated (mostly for our SDK's).. [optional] # noqa: E501 + source_version (str): The source component version from where the operation was generated (mostly for our SDK's).. [optional] # noqa: E501 + user_agent (str): Full user agent string of the browser session.. [optional] # noqa: E501 + browser_accept (str): Browser accept header.. [optional] # noqa: E501 + browser_color_depth (int): The color depth of the browser session (e.g., `24`).. [optional] # noqa: E501 + browser_screen_height (int): The screen height of the browser session (e.g., `1152`).. [optional] # noqa: E501 + browser_screen_width (int): The screen width of the browser session (e.g., `2048`).. [optional] # noqa: E501 + browser_timezone_offset (str): The timezone offset of the browser session (e.g., `-120`).. [optional] # noqa: E501 + user_id (str): The ID of the user that started the operation.. [optional] # noqa: E501 + user_email (str): The email of the user that started the operation.. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """PaymentTraceDetails - 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 + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + ip (str): The IP address where the operation originated.. [optional] # noqa: E501 + country_code (str): Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).. [optional] # noqa: E501 + lang (str): Two-letter language code ([ISO 639-1](https://en.wikipedia.org/wiki/ISO_639-1)).. [optional] # noqa: E501 + device_type (str): Device type, could be `desktop`, `mobile`, `smartTV`, `tablet`.. [optional] # noqa: E501 + device_model (str): Information about the device used for the browser session (e.g., `iPhone`).. [optional] # noqa: E501 + browser (str): The browser used in this browser session (e.g., `Mobile Safari`).. [optional] # noqa: E501 + browser_version (str): The version for the browser session (e.g., `13.1.1`).. [optional] # noqa: E501 + os (str): Operation system (e.g., `iOS`).. [optional] # noqa: E501 + os_version (str): Operation system version (e.g., `13.5.1`).. [optional] # noqa: E501 + source (str): The source component from where the operation was generated (mostly for our SDK's).. [optional] # noqa: E501 + source_version (str): The source component version from where the operation was generated (mostly for our SDK's).. [optional] # noqa: E501 + user_agent (str): Full user agent string of the browser session.. [optional] # noqa: E501 + browser_accept (str): Browser accept header.. [optional] # noqa: E501 + browser_color_depth (int): The color depth of the browser session (e.g., `24`).. [optional] # noqa: E501 + browser_screen_height (int): The screen height of the browser session (e.g., `1152`).. [optional] # noqa: E501 + browser_screen_width (int): The screen width of the browser session (e.g., `2048`).. [optional] # noqa: E501 + browser_timezone_offset (str): The timezone offset of the browser session (e.g., `-120`).. [optional] # noqa: E501 + user_id (str): The ID of the user that started the operation.. [optional] # noqa: E501 + user_email (str): The email of the user that started the operation.. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/Monei/model/payment_transaction_type.py b/Monei/model/payment_transaction_type.py new file mode 100644 index 0000000..2765f46 --- /dev/null +++ b/Monei/model/payment_transaction_type.py @@ -0,0 +1,284 @@ +""" + MONEI API v1 + +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 + + The version of the OpenAPI document: 1.5.3 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from Monei.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from Monei.exceptions import ApiAttributeError + + + +class PaymentTransactionType(ModelSimple): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + ('value',): { + 'SALE': "SALE", + 'AUTH': "AUTH", + 'PAYOUT': "PAYOUT", + 'VERIF': "VERIF", + }, + } + + validations = { + } + + additional_properties_type = None + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'value': (str,), + } + + @cached_property + def discriminator(): + return None + + + attribute_map = {} + + read_only_vars = set() + + _composed_schemas = None + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): + """PaymentTransactionType - a model defined in OpenAPI + + Note that value can be passed either in args or in kwargs, but not in both. + + Args: + args[0] (str): Controls when the funds will be captured. - `SALE` - **Default**. MONEI automatically captures funds when the customer authorizes the payment. - `AUTH` - Place a hold on the funds when the customer authorizes the payment, but don't capture the funds until later. - `PAYOUT` - Send funds to the customer - `VERIF` - Verify the card without placing a hold or capturing funds. . if omitted defaults to "SALE", must be one of ["SALE", "AUTH", "PAYOUT", "VERIF", ] # noqa: E501 + + Keyword Args: + value (str): Controls when the funds will be captured. - `SALE` - **Default**. MONEI automatically captures funds when the customer authorizes the payment. - `AUTH` - Place a hold on the funds when the customer authorizes the payment, but don't capture the funds until later. - `PAYOUT` - Send funds to the customer - `VERIF` - Verify the card without placing a hold or capturing funds. . if omitted defaults to "SALE", must be one of ["SALE", "AUTH", "PAYOUT", "VERIF", ] # 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. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + # required up here when default value is not given + _path_to_item = kwargs.pop('_path_to_item', ()) + + if 'value' in kwargs: + value = kwargs.pop('value') + elif args: + args = list(args) + value = args.pop(0) + else: + value = "SALE" + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + self.value = value + if kwargs: + raise ApiTypeError( + "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( + kwargs, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): + """PaymentTransactionType - a model defined in OpenAPI + + Note that value can be passed either in args or in kwargs, but not in both. + + Args: + args[0] (str): Controls when the funds will be captured. - `SALE` - **Default**. MONEI automatically captures funds when the customer authorizes the payment. - `AUTH` - Place a hold on the funds when the customer authorizes the payment, but don't capture the funds until later. - `PAYOUT` - Send funds to the customer - `VERIF` - Verify the card without placing a hold or capturing funds. . if omitted defaults to "SALE", must be one of ["SALE", "AUTH", "PAYOUT", "VERIF", ] # noqa: E501 + + Keyword Args: + value (str): Controls when the funds will be captured. - `SALE` - **Default**. MONEI automatically captures funds when the customer authorizes the payment. - `AUTH` - Place a hold on the funds when the customer authorizes the payment, but don't capture the funds until later. - `PAYOUT` - Send funds to the customer - `VERIF` - Verify the card without placing a hold or capturing funds. . if omitted defaults to "SALE", must be one of ["SALE", "AUTH", "PAYOUT", "VERIF", ] # 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. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + # required up here when default value is not given + _path_to_item = kwargs.pop('_path_to_item', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if 'value' in kwargs: + value = kwargs.pop('value') + elif args: + args = list(args) + value = args.pop(0) + else: + value = "SALE" + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + self.value = value + if kwargs: + raise ApiTypeError( + "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( + kwargs, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + return self diff --git a/Monei/model/recurring_payment_request.py b/Monei/model/recurring_payment_request.py new file mode 100644 index 0000000..0a42f04 --- /dev/null +++ b/Monei/model/recurring_payment_request.py @@ -0,0 +1,313 @@ +""" + MONEI API v1 + +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 + + The version of the OpenAPI document: 1.5.3 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from Monei.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from Monei.exceptions import ApiAttributeError + + +def lazy_import(): + from Monei.model.payment_billing_details import PaymentBillingDetails + from Monei.model.payment_customer import PaymentCustomer + from Monei.model.payment_shipping_details import PaymentShippingDetails + from Monei.model.payment_transaction_type import PaymentTransactionType + globals()['PaymentBillingDetails'] = PaymentBillingDetails + globals()['PaymentCustomer'] = PaymentCustomer + globals()['PaymentShippingDetails'] = PaymentShippingDetails + globals()['PaymentTransactionType'] = PaymentTransactionType + + +class RecurringPaymentRequest(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'order_id': (str,), # noqa: E501 + 'amount': (bool, date, datetime, dict, float, int, list, str, none_type,), # noqa: E501 + 'transaction_type': (bool, date, datetime, dict, float, int, list, str, none_type,), # noqa: E501 + 'description': (str,), # noqa: E501 + 'customer': (PaymentCustomer,), # noqa: E501 + 'billing_details': (PaymentBillingDetails,), # noqa: E501 + 'shipping_details': (PaymentShippingDetails,), # noqa: E501 + 'callback_url': (str,), # noqa: E501 + 'metadata': ({str: (bool, date, datetime, dict, float, int, list, str, none_type)},), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'order_id': 'orderId', # noqa: E501 + 'amount': 'amount', # noqa: E501 + 'transaction_type': 'transactionType', # noqa: E501 + 'description': 'description', # noqa: E501 + 'customer': 'customer', # noqa: E501 + 'billing_details': 'billingDetails', # noqa: E501 + 'shipping_details': 'shippingDetails', # noqa: E501 + 'callback_url': 'callbackUrl', # noqa: E501 + 'metadata': 'metadata', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, order_id, *args, **kwargs): # noqa: E501 + """RecurringPaymentRequest - a model defined in OpenAPI + + Args: + order_id (str): An order ID from your system. A unique identifier that can be used to reconcile the payment with your internal system. + + Keyword Args: + _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. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + amount (bool, date, datetime, dict, float, int, list, str, none_type): The amount to collected by this subsequent payment. A positive integer representing how much to charge in the smallest currency unit (e.g., 100 cents to charge 1.00 USD). . [optional] # noqa: E501 + transaction_type (bool, date, datetime, dict, float, int, list, str, none_type): Same as the `transactionType` parameter from [create payment](https://docs.monei.com/api/#operation/payments_create). If not sent, it will default in the same transaction type used in the initial payment. . [optional] # noqa: E501 + description (str): An arbitrary string attached to the payment. Often useful for displaying to users. . [optional] # noqa: E501 + customer (PaymentCustomer): [optional] # noqa: E501 + billing_details (PaymentBillingDetails): [optional] # noqa: E501 + shipping_details (PaymentShippingDetails): [optional] # noqa: E501 + callback_url (str): The URL to which a payment result should be sent asynchronously. . [optional] # noqa: E501 + metadata ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}): A set of key-value pairs that you can attach to a resource. This can be useful for storing additional information about the resource in a structured format.. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.order_id = order_id + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, order_id, *args, **kwargs): # noqa: E501 + """RecurringPaymentRequest - a model defined in OpenAPI + + Args: + order_id (str): An order ID from your system. A unique identifier that can be used to reconcile the payment with your internal system. + + Keyword Args: + _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. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + amount (bool, date, datetime, dict, float, int, list, str, none_type): The amount to collected by this subsequent payment. A positive integer representing how much to charge in the smallest currency unit (e.g., 100 cents to charge 1.00 USD). . [optional] # noqa: E501 + transaction_type (bool, date, datetime, dict, float, int, list, str, none_type): Same as the `transactionType` parameter from [create payment](https://docs.monei.com/api/#operation/payments_create). If not sent, it will default in the same transaction type used in the initial payment. . [optional] # noqa: E501 + description (str): An arbitrary string attached to the payment. Often useful for displaying to users. . [optional] # noqa: E501 + customer (PaymentCustomer): [optional] # noqa: E501 + billing_details (PaymentBillingDetails): [optional] # noqa: E501 + shipping_details (PaymentShippingDetails): [optional] # noqa: E501 + callback_url (str): The URL to which a payment result should be sent asynchronously. . [optional] # noqa: E501 + metadata ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}): A set of key-value pairs that you can attach to a resource. This can be useful for storing additional information about the resource in a structured format.. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.order_id = order_id + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/Monei/model/refund_payment_request.py b/Monei/model/refund_payment_request.py new file mode 100644 index 0000000..c8ee586 --- /dev/null +++ b/Monei/model/refund_payment_request.py @@ -0,0 +1,273 @@ +""" + MONEI API v1 + +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 + + The version of the OpenAPI document: 1.5.3 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from Monei.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from Monei.exceptions import ApiAttributeError + + +def lazy_import(): + from Monei.model.payment_refund_reason import PaymentRefundReason + globals()['PaymentRefundReason'] = PaymentRefundReason + + +class RefundPaymentRequest(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'amount': (bool, date, datetime, dict, float, int, list, str, none_type,), # noqa: E501 + 'refund_reason': (PaymentRefundReason,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'amount': 'amount', # noqa: E501 + 'refund_reason': 'refundReason', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """RefundPaymentRequest - 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 + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + amount (bool, date, datetime, dict, float, int, list, str, none_type): The amount to refund, which must be less than or equal to the original amount. . [optional] # noqa: E501 + refund_reason (PaymentRefundReason): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """RefundPaymentRequest - 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 + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + amount (bool, date, datetime, dict, float, int, list, str, none_type): The amount to refund, which must be less than or equal to the original amount. . [optional] # noqa: E501 + refund_reason (PaymentRefundReason): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/Monei/model/register_apple_pay_domain_request.py b/Monei/model/register_apple_pay_domain_request.py new file mode 100644 index 0000000..51b2f65 --- /dev/null +++ b/Monei/model/register_apple_pay_domain_request.py @@ -0,0 +1,269 @@ +""" + MONEI API v1 + +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 + + The version of the OpenAPI document: 1.5.3 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from Monei.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from Monei.exceptions import ApiAttributeError + + + +class RegisterApplePayDomainRequest(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'domain_name': (str,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'domain_name': 'domainName', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, domain_name, *args, **kwargs): # noqa: E501 + """RegisterApplePayDomainRequest - a model defined in OpenAPI + + Args: + domain_name (str): The domain name to register for Apple Pay. + + Keyword Args: + _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. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.domain_name = domain_name + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, domain_name, *args, **kwargs): # noqa: E501 + """RegisterApplePayDomainRequest - a model defined in OpenAPI + + Args: + domain_name (str): The domain name to register for Apple Pay. + + Keyword Args: + _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. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.domain_name = domain_name + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/Monei/model/send_payment_link_request.py b/Monei/model/send_payment_link_request.py new file mode 100644 index 0000000..4c01f98 --- /dev/null +++ b/Monei/model/send_payment_link_request.py @@ -0,0 +1,283 @@ +""" + MONEI API v1 + +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 + + The version of the OpenAPI document: 1.5.3 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from Monei.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from Monei.exceptions import ApiAttributeError + + +def lazy_import(): + from Monei.model.payment_message_channel import PaymentMessageChannel + from Monei.model.payment_message_language import PaymentMessageLanguage + globals()['PaymentMessageChannel'] = PaymentMessageChannel + globals()['PaymentMessageLanguage'] = PaymentMessageLanguage + + +class SendPaymentLinkRequest(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'customer_email': (str,), # noqa: E501 + 'customer_phone': (str,), # noqa: E501 + 'channel': (PaymentMessageChannel,), # noqa: E501 + 'language': (PaymentMessageLanguage,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'customer_email': 'customerEmail', # noqa: E501 + 'customer_phone': 'customerPhone', # noqa: E501 + 'channel': 'channel', # noqa: E501 + 'language': 'language', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """SendPaymentLinkRequest - 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 + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + customer_email (str): The customer will receive payment link on this email address.. [optional] # noqa: E501 + customer_phone (str): Phone number in E.164 format. The customer will receive payment link on this phone number.. [optional] # noqa: E501 + channel (PaymentMessageChannel): [optional] # noqa: E501 + language (PaymentMessageLanguage): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """SendPaymentLinkRequest - 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 + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + customer_email (str): The customer will receive payment link on this email address.. [optional] # noqa: E501 + customer_phone (str): Phone number in E.164 format. The customer will receive payment link on this phone number.. [optional] # noqa: E501 + channel (PaymentMessageChannel): [optional] # noqa: E501 + language (PaymentMessageLanguage): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/Monei/model/send_payment_receipt_request.py b/Monei/model/send_payment_receipt_request.py new file mode 100644 index 0000000..74024d1 --- /dev/null +++ b/Monei/model/send_payment_receipt_request.py @@ -0,0 +1,283 @@ +""" + MONEI API v1 + +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 + + The version of the OpenAPI document: 1.5.3 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from Monei.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from Monei.exceptions import ApiAttributeError + + +def lazy_import(): + from Monei.model.payment_message_channel import PaymentMessageChannel + from Monei.model.payment_message_language import PaymentMessageLanguage + globals()['PaymentMessageChannel'] = PaymentMessageChannel + globals()['PaymentMessageLanguage'] = PaymentMessageLanguage + + +class SendPaymentReceiptRequest(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'customer_email': (str,), # noqa: E501 + 'customer_phone': (str,), # noqa: E501 + 'channel': (PaymentMessageChannel,), # noqa: E501 + 'language': (PaymentMessageLanguage,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'customer_email': 'customerEmail', # noqa: E501 + 'customer_phone': 'customerPhone', # noqa: E501 + 'channel': 'channel', # noqa: E501 + 'language': 'language', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """SendPaymentReceiptRequest - 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 + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + customer_email (str): The customer will receive payment receipt on this email address.. [optional] # noqa: E501 + customer_phone (str): Phone number in E.164 format. The customer will receive payment receipt link on this phone number.. [optional] # noqa: E501 + channel (PaymentMessageChannel): [optional] # noqa: E501 + language (PaymentMessageLanguage): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """SendPaymentReceiptRequest - 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 + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + customer_email (str): The customer will receive payment receipt on this email address.. [optional] # noqa: E501 + customer_phone (str): Phone number in E.164 format. The customer will receive payment receipt link on this phone number.. [optional] # noqa: E501 + channel (PaymentMessageChannel): [optional] # noqa: E501 + language (PaymentMessageLanguage): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/Monei/model/send_payment_request_request.py b/Monei/model/send_payment_request_request.py new file mode 100644 index 0000000..b0e9dea --- /dev/null +++ b/Monei/model/send_payment_request_request.py @@ -0,0 +1,279 @@ +""" + MONEI API v1 + +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 + + The version of the OpenAPI document: 1.5.3 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from Monei.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from Monei.exceptions import ApiAttributeError + + +def lazy_import(): + from Monei.model.payment_message_language import PaymentMessageLanguage + globals()['PaymentMessageLanguage'] = PaymentMessageLanguage + + +class SendPaymentRequestRequest(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'phone_number': (str,), # noqa: E501 + 'language': (PaymentMessageLanguage,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'phone_number': 'phoneNumber', # noqa: E501 + 'language': 'language', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, phone_number, *args, **kwargs): # noqa: E501 + """SendPaymentRequestRequest - a model defined in OpenAPI + + Args: + phone_number (str): Phone number in E.164 format. The customer will receive payment link on this phone number. + + Keyword Args: + _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. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + language (PaymentMessageLanguage): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.phone_number = phone_number + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, phone_number, *args, **kwargs): # noqa: E501 + """SendPaymentRequestRequest - a model defined in OpenAPI + + Args: + phone_number (str): Phone number in E.164 format. The customer will receive payment link on this phone number. + + Keyword Args: + _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. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + language (PaymentMessageLanguage): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.phone_number = phone_number + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/Monei/model/send_subscription_link_request.py b/Monei/model/send_subscription_link_request.py new file mode 100644 index 0000000..76c2b9f --- /dev/null +++ b/Monei/model/send_subscription_link_request.py @@ -0,0 +1,280 @@ +""" + MONEI API v1 + +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 + + The version of the OpenAPI document: 1.5.3 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from Monei.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from Monei.exceptions import ApiAttributeError + + + +class SendSubscriptionLinkRequest(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + ('channel',): { + 'EMAIL': "EMAIL", + 'WHATSAPP': "WHATSAPP", + 'SMS': "SMS", + }, + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'customer_email': (str,), # noqa: E501 + 'customer_phone': (str,), # noqa: E501 + 'channel': (str,), # noqa: E501 + 'language': (str,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'customer_email': 'customerEmail', # noqa: E501 + 'customer_phone': 'customerPhone', # noqa: E501 + 'channel': 'channel', # noqa: E501 + 'language': 'language', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """SendSubscriptionLinkRequest - 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 + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + customer_email (str): Customer email to send the subscription link to. [optional] # noqa: E501 + customer_phone (str): Customer phone number to send the subscription link to. [optional] # noqa: E501 + channel (str): Channel to use for sending the subscription link. [optional] # noqa: E501 + language (str): Language to use for the subscription link message. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """SendSubscriptionLinkRequest - 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 + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + customer_email (str): Customer email to send the subscription link to. [optional] # noqa: E501 + customer_phone (str): Customer phone number to send the subscription link to. [optional] # noqa: E501 + channel (str): Channel to use for sending the subscription link. [optional] # noqa: E501 + language (str): Language to use for the subscription link message. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/Monei/model/send_subscription_status_request.py b/Monei/model/send_subscription_status_request.py new file mode 100644 index 0000000..e6b7e84 --- /dev/null +++ b/Monei/model/send_subscription_status_request.py @@ -0,0 +1,280 @@ +""" + MONEI API v1 + +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 + + The version of the OpenAPI document: 1.5.3 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from Monei.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from Monei.exceptions import ApiAttributeError + + + +class SendSubscriptionStatusRequest(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + ('channel',): { + 'EMAIL': "EMAIL", + 'WHATSAPP': "WHATSAPP", + 'SMS': "SMS", + }, + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'customer_email': (str,), # noqa: E501 + 'customer_phone': (str,), # noqa: E501 + 'channel': (str,), # noqa: E501 + 'language': (str,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'customer_email': 'customerEmail', # noqa: E501 + 'customer_phone': 'customerPhone', # noqa: E501 + 'channel': 'channel', # noqa: E501 + 'language': 'language', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """SendSubscriptionStatusRequest - 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 + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + customer_email (str): Customer email to send the subscription status to. [optional] # noqa: E501 + customer_phone (str): Customer phone number to send the subscription status to. [optional] # noqa: E501 + channel (str): Channel to use for sending the subscription status. [optional] # noqa: E501 + language (str): Language to use for the subscription status message. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """SendSubscriptionStatusRequest - 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 + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + customer_email (str): Customer email to send the subscription status to. [optional] # noqa: E501 + customer_phone (str): Customer phone number to send the subscription status to. [optional] # noqa: E501 + channel (str): Channel to use for sending the subscription status. [optional] # noqa: E501 + language (str): Language to use for the subscription status message. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/Monei/model/subscription.py b/Monei/model/subscription.py new file mode 100644 index 0000000..7b72568 --- /dev/null +++ b/Monei/model/subscription.py @@ -0,0 +1,405 @@ +""" + MONEI API v1 + +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 + + The version of the OpenAPI document: 1.5.3 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from Monei.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from Monei.exceptions import ApiAttributeError + + +def lazy_import(): + from Monei.model.payment_billing_details import PaymentBillingDetails + from Monei.model.payment_customer import PaymentCustomer + from Monei.model.payment_shipping_details import PaymentShippingDetails + from Monei.model.payment_trace_details import PaymentTraceDetails + from Monei.model.subscription_interval import SubscriptionInterval + from Monei.model.subscription_last_payment import SubscriptionLastPayment + from Monei.model.subscription_payment_method import SubscriptionPaymentMethod + from Monei.model.subscription_retry_schedule import SubscriptionRetrySchedule + from Monei.model.subscription_status import SubscriptionStatus + globals()['PaymentBillingDetails'] = PaymentBillingDetails + globals()['PaymentCustomer'] = PaymentCustomer + globals()['PaymentShippingDetails'] = PaymentShippingDetails + globals()['PaymentTraceDetails'] = PaymentTraceDetails + globals()['SubscriptionInterval'] = SubscriptionInterval + globals()['SubscriptionLastPayment'] = SubscriptionLastPayment + globals()['SubscriptionPaymentMethod'] = SubscriptionPaymentMethod + globals()['SubscriptionRetrySchedule'] = SubscriptionRetrySchedule + globals()['SubscriptionStatus'] = SubscriptionStatus + + +class Subscription(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'id': (str,), # noqa: E501 + 'amount': (int,), # noqa: E501 + 'currency': (str,), # noqa: E501 + 'description': (str,), # noqa: E501 + 'account_id': (str,), # noqa: E501 + 'livemode': (bool,), # noqa: E501 + 'status': (SubscriptionStatus,), # noqa: E501 + 'customer': (PaymentCustomer,), # noqa: E501 + 'billing_details': (PaymentBillingDetails,), # noqa: E501 + 'shipping_details': (PaymentShippingDetails,), # noqa: E501 + 'interval': (SubscriptionInterval,), # noqa: E501 + 'interval_count': (int,), # noqa: E501 + 'pause_interval_count': (int,), # noqa: E501 + 'last_order_id': (str,), # noqa: E501 + 'last_payment': (SubscriptionLastPayment,), # noqa: E501 + 'payment_method': (SubscriptionPaymentMethod,), # noqa: E501 + 'current_period_start': (float,), # noqa: E501 + 'current_period_end': (float,), # noqa: E501 + 'trial_period_end': (float,), # noqa: E501 + 'next_payment_at': (int,), # noqa: E501 + 'retry_count': (int,), # noqa: E501 + 'retry_schedule': (SubscriptionRetrySchedule,), # noqa: E501 + 'cancel_at_period_end': (bool,), # noqa: E501 + 'pause_at_period_end': (bool,), # noqa: E501 + 'trace_details': (PaymentTraceDetails,), # noqa: E501 + 'sequence_id': (str,), # noqa: E501 + 'callback_url': (str,), # noqa: E501 + 'payment_callback_url': (str,), # noqa: E501 + 'metadata': ({str: (bool, date, datetime, dict, float, int, list, str, none_type)},), # noqa: E501 + 'created_at': (int,), # noqa: E501 + 'updated_at': (int,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'id': 'id', # noqa: E501 + 'amount': 'amount', # noqa: E501 + 'currency': 'currency', # noqa: E501 + 'description': 'description', # noqa: E501 + 'account_id': 'accountId', # noqa: E501 + 'livemode': 'livemode', # noqa: E501 + 'status': 'status', # noqa: E501 + 'customer': 'customer', # noqa: E501 + 'billing_details': 'billingDetails', # noqa: E501 + 'shipping_details': 'shippingDetails', # noqa: E501 + 'interval': 'interval', # noqa: E501 + 'interval_count': 'intervalCount', # noqa: E501 + 'pause_interval_count': 'pauseIntervalCount', # noqa: E501 + 'last_order_id': 'lastOrderId', # noqa: E501 + 'last_payment': 'lastPayment', # noqa: E501 + 'payment_method': 'paymentMethod', # noqa: E501 + 'current_period_start': 'currentPeriodStart', # noqa: E501 + 'current_period_end': 'currentPeriodEnd', # noqa: E501 + 'trial_period_end': 'trialPeriodEnd', # noqa: E501 + 'next_payment_at': 'nextPaymentAt', # noqa: E501 + 'retry_count': 'retryCount', # noqa: E501 + 'retry_schedule': 'retrySchedule', # noqa: E501 + 'cancel_at_period_end': 'cancelAtPeriodEnd', # noqa: E501 + 'pause_at_period_end': 'pauseAtPeriodEnd', # noqa: E501 + 'trace_details': 'traceDetails', # noqa: E501 + 'sequence_id': 'sequenceId', # noqa: E501 + 'callback_url': 'callbackUrl', # noqa: E501 + 'payment_callback_url': 'paymentCallbackUrl', # noqa: E501 + 'metadata': 'metadata', # noqa: E501 + 'created_at': 'createdAt', # noqa: E501 + 'updated_at': 'updatedAt', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """Subscription - 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 + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + id (str): Unique identifier for the subscription.. [optional] # noqa: E501 + amount (int): Amount intended to be collected by this payment. A positive integer representing how much to charge in the smallest currency unit (e.g., 100 cents to charge 1.00 USD). . [optional] # noqa: E501 + currency (str): Three-letter [ISO currency code](https://en.wikipedia.org/wiki/ISO_4217), in uppercase. Must be a supported currency. . [optional] # noqa: E501 + description (str): An arbitrary string attached to the subscription. Often useful for displaying to users. . [optional] # noqa: E501 + account_id (str): MONEI Account identifier.. [optional] # noqa: E501 + livemode (bool): Has the value `true` if the resource exists in live mode or the value `false` if the resource exists in test mode.. [optional] # noqa: E501 + status (SubscriptionStatus): [optional] # noqa: E501 + customer (PaymentCustomer): [optional] # noqa: E501 + billing_details (PaymentBillingDetails): [optional] # noqa: E501 + shipping_details (PaymentShippingDetails): [optional] # noqa: E501 + interval (SubscriptionInterval): [optional] # noqa: E501 + interval_count (int): Number of intervals between subscription payments.. [optional] # noqa: E501 + pause_interval_count (int): Number of intervals when subscription will be paused before it activates again.. [optional] # noqa: E501 + last_order_id (str): An order ID from your system. A unique identifier that can be used to reconcile the payment with your internal system. . [optional] # noqa: E501 + last_payment (SubscriptionLastPayment): [optional] # noqa: E501 + payment_method (SubscriptionPaymentMethod): [optional] # noqa: E501 + current_period_start (float): The start date of the current subscription period. Measured in seconds since the Unix epoch.. [optional] # noqa: E501 + current_period_end (float): The end date of the current subscription period. Measured in seconds since the Unix epoch.. [optional] # noqa: E501 + trial_period_end (float): The end date of the trial period. Measured in seconds since the Unix epoch.. [optional] # noqa: E501 + next_payment_at (int): The date when the next payment will be made.. [optional] # noqa: E501 + retry_count (int): Number of retries left for the subscription.. [optional] # noqa: E501 + retry_schedule (SubscriptionRetrySchedule): [optional] # noqa: E501 + cancel_at_period_end (bool): If true, the subscription will be canceled at the end of the current period. . [optional] # noqa: E501 + pause_at_period_end (bool): If true, the subscription will be paused at the end of the current period. . [optional] # noqa: E501 + trace_details (PaymentTraceDetails): [optional] # noqa: E501 + sequence_id (str): A permanent identifier that refers to the initial payment of a sequence of payments. This value needs to be sent in the path for `RECURRING` payments. . [optional] # noqa: E501 + callback_url (str): The URL will be called each time subscription status changes. You will receive a subscription object in the body of the request. . [optional] # noqa: E501 + payment_callback_url (str): The URL will be called each time subscription creates a new payments. You will receive the payment object in the body of the request. . [optional] # noqa: E501 + metadata ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}): A set of key-value pairs that you can attach to a resource. This can be useful for storing additional information about the resource in a structured format.. [optional] # noqa: E501 + created_at (int): Time at which the resource was created. Measured in seconds since the Unix epoch.. [optional] # noqa: E501 + updated_at (int): Time at which the resource updated last time. Measured in seconds since the Unix epoch.. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """Subscription - 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 + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + id (str): Unique identifier for the subscription.. [optional] # noqa: E501 + amount (int): Amount intended to be collected by this payment. A positive integer representing how much to charge in the smallest currency unit (e.g., 100 cents to charge 1.00 USD). . [optional] # noqa: E501 + currency (str): Three-letter [ISO currency code](https://en.wikipedia.org/wiki/ISO_4217), in uppercase. Must be a supported currency. . [optional] # noqa: E501 + description (str): An arbitrary string attached to the subscription. Often useful for displaying to users. . [optional] # noqa: E501 + account_id (str): MONEI Account identifier.. [optional] # noqa: E501 + livemode (bool): Has the value `true` if the resource exists in live mode or the value `false` if the resource exists in test mode.. [optional] # noqa: E501 + status (SubscriptionStatus): [optional] # noqa: E501 + customer (PaymentCustomer): [optional] # noqa: E501 + billing_details (PaymentBillingDetails): [optional] # noqa: E501 + shipping_details (PaymentShippingDetails): [optional] # noqa: E501 + interval (SubscriptionInterval): [optional] # noqa: E501 + interval_count (int): Number of intervals between subscription payments.. [optional] # noqa: E501 + pause_interval_count (int): Number of intervals when subscription will be paused before it activates again.. [optional] # noqa: E501 + last_order_id (str): An order ID from your system. A unique identifier that can be used to reconcile the payment with your internal system. . [optional] # noqa: E501 + last_payment (SubscriptionLastPayment): [optional] # noqa: E501 + payment_method (SubscriptionPaymentMethod): [optional] # noqa: E501 + current_period_start (float): The start date of the current subscription period. Measured in seconds since the Unix epoch.. [optional] # noqa: E501 + current_period_end (float): The end date of the current subscription period. Measured in seconds since the Unix epoch.. [optional] # noqa: E501 + trial_period_end (float): The end date of the trial period. Measured in seconds since the Unix epoch.. [optional] # noqa: E501 + next_payment_at (int): The date when the next payment will be made.. [optional] # noqa: E501 + retry_count (int): Number of retries left for the subscription.. [optional] # noqa: E501 + retry_schedule (SubscriptionRetrySchedule): [optional] # noqa: E501 + cancel_at_period_end (bool): If true, the subscription will be canceled at the end of the current period. . [optional] # noqa: E501 + pause_at_period_end (bool): If true, the subscription will be paused at the end of the current period. . [optional] # noqa: E501 + trace_details (PaymentTraceDetails): [optional] # noqa: E501 + sequence_id (str): A permanent identifier that refers to the initial payment of a sequence of payments. This value needs to be sent in the path for `RECURRING` payments. . [optional] # noqa: E501 + callback_url (str): The URL will be called each time subscription status changes. You will receive a subscription object in the body of the request. . [optional] # noqa: E501 + payment_callback_url (str): The URL will be called each time subscription creates a new payments. You will receive the payment object in the body of the request. . [optional] # noqa: E501 + metadata ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}): A set of key-value pairs that you can attach to a resource. This can be useful for storing additional information about the resource in a structured format.. [optional] # noqa: E501 + created_at (int): Time at which the resource was created. Measured in seconds since the Unix epoch.. [optional] # noqa: E501 + updated_at (int): Time at which the resource updated last time. Measured in seconds since the Unix epoch.. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/Monei/model/subscription_interval.py b/Monei/model/subscription_interval.py new file mode 100644 index 0000000..62c5c23 --- /dev/null +++ b/Monei/model/subscription_interval.py @@ -0,0 +1,292 @@ +""" + MONEI API v1 + +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 + + The version of the OpenAPI document: 1.5.3 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from Monei.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from Monei.exceptions import ApiAttributeError + + + +class SubscriptionInterval(ModelSimple): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + ('value',): { + 'DAY': "day", + 'WEEK': "week", + 'MONTH': "month", + 'YEAR': "year", + }, + } + + validations = { + } + + additional_properties_type = None + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'value': (str,), + } + + @cached_property + def discriminator(): + return None + + + attribute_map = {} + + read_only_vars = set() + + _composed_schemas = None + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): + """SubscriptionInterval - a model defined in OpenAPI + + Note that value can be passed either in args or in kwargs, but not in both. + + Args: + args[0] (str): Subscription interval.., must be one of ["day", "week", "month", "year", ] # noqa: E501 + + Keyword Args: + value (str): Subscription interval.., must be one of ["day", "week", "month", "year", ] # 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. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + # required up here when default value is not given + _path_to_item = kwargs.pop('_path_to_item', ()) + + if 'value' in kwargs: + value = kwargs.pop('value') + elif args: + args = list(args) + value = args.pop(0) + else: + raise ApiTypeError( + "value is required, but not passed in args or kwargs and doesn't have default", + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + self.value = value + if kwargs: + raise ApiTypeError( + "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( + kwargs, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): + """SubscriptionInterval - a model defined in OpenAPI + + Note that value can be passed either in args or in kwargs, but not in both. + + Args: + args[0] (str): Subscription interval.., must be one of ["day", "week", "month", "year", ] # noqa: E501 + + Keyword Args: + value (str): Subscription interval.., must be one of ["day", "week", "month", "year", ] # 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. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + # required up here when default value is not given + _path_to_item = kwargs.pop('_path_to_item', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if 'value' in kwargs: + value = kwargs.pop('value') + elif args: + args = list(args) + value = args.pop(0) + else: + raise ApiTypeError( + "value is required, but not passed in args or kwargs and doesn't have default", + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + self.value = value + if kwargs: + raise ApiTypeError( + "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( + kwargs, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + return self diff --git a/Monei/model/subscription_last_payment.py b/Monei/model/subscription_last_payment.py new file mode 100644 index 0000000..9920b22 --- /dev/null +++ b/Monei/model/subscription_last_payment.py @@ -0,0 +1,281 @@ +""" + MONEI API v1 + +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 + + The version of the OpenAPI document: 1.5.3 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from Monei.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from Monei.exceptions import ApiAttributeError + + +def lazy_import(): + from Monei.model.payment_status import PaymentStatus + globals()['PaymentStatus'] = PaymentStatus + + +class SubscriptionLastPayment(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'id': (str,), # noqa: E501 + 'status': (PaymentStatus,), # noqa: E501 + 'status_code': (str,), # noqa: E501 + 'status_message': (str,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'id': 'id', # noqa: E501 + 'status': 'status', # noqa: E501 + 'status_code': 'statusCode', # noqa: E501 + 'status_message': 'statusMessage', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """SubscriptionLastPayment - 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 + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + id (str): Unique identifier for the payment.. [optional] # noqa: E501 + status (PaymentStatus): [optional] # noqa: E501 + status_code (str): Payment status code. . [optional] # noqa: E501 + status_message (str): Human readable status message, can be displayed to a user. . [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """SubscriptionLastPayment - 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 + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + id (str): Unique identifier for the payment.. [optional] # noqa: E501 + status (PaymentStatus): [optional] # noqa: E501 + status_code (str): Payment status code. . [optional] # noqa: E501 + status_message (str): Human readable status message, can be displayed to a user. . [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/Monei/model/subscription_payment_method.py b/Monei/model/subscription_payment_method.py new file mode 100644 index 0000000..3f0b758 --- /dev/null +++ b/Monei/model/subscription_payment_method.py @@ -0,0 +1,276 @@ +""" + MONEI API v1 + +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 + + The version of the OpenAPI document: 1.5.3 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from Monei.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from Monei.exceptions import ApiAttributeError + + +def lazy_import(): + from Monei.model.payment_payment_method_card import PaymentPaymentMethodCard + globals()['PaymentPaymentMethodCard'] = PaymentPaymentMethodCard + + +class SubscriptionPaymentMethod(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + ('method',): { + 'CARD': "card", + }, + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'method': (str,), # noqa: E501 + 'card': (PaymentPaymentMethodCard,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'method': 'method', # noqa: E501 + 'card': 'card', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """SubscriptionPaymentMethod - 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 + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + method (str): Subscription method type.. [optional] if omitted the server will use the default value of "card" # noqa: E501 + card (PaymentPaymentMethodCard): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """SubscriptionPaymentMethod - 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 + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + method (str): Subscription method type.. [optional] if omitted the server will use the default value of "card" # noqa: E501 + card (PaymentPaymentMethodCard): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/Monei/model/subscription_payment_method_card.py b/Monei/model/subscription_payment_method_card.py new file mode 100644 index 0000000..8b82fe0 --- /dev/null +++ b/Monei/model/subscription_payment_method_card.py @@ -0,0 +1,300 @@ +""" + MONEI API v1 + +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 + + The version of the OpenAPI document: 1.5.3 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from Monei.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from Monei.exceptions import ApiAttributeError + + + +class SubscriptionPaymentMethodCard(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + ('brand',): { + 'VISA': "visa", + 'MASTERCARD': "mastercard", + 'DINERS': "diners", + 'AMEX': "amex", + 'JCB': "jcb", + 'UNIONPAY': "unionpay", + 'UNKNOWN': "unknown", + }, + ('type',): { + 'DEBIT': "debit", + 'CREDIT': "credit", + }, + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'country': (str,), # noqa: E501 + 'brand': (str,), # noqa: E501 + 'type': (str,), # noqa: E501 + 'three_d_secure': (bool,), # noqa: E501 + 'three_d_secure_version': (str,), # noqa: E501 + 'expiration': (int,), # noqa: E501 + 'last4': (str,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'country': 'country', # noqa: E501 + 'brand': 'brand', # noqa: E501 + 'type': 'type', # noqa: E501 + 'three_d_secure': 'threeDSecure', # noqa: E501 + 'three_d_secure_version': 'threeDSecureVersion', # noqa: E501 + 'expiration': 'expiration', # noqa: E501 + 'last4': 'last4', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """SubscriptionPaymentMethodCard - 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 + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + country (str): Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).. [optional] # noqa: E501 + brand (str): Card brand.. [optional] # noqa: E501 + type (str): Card type `debit` or `credit`.. [optional] # noqa: E501 + three_d_secure (bool): Wether this transaction used 3D Secure authentication.. [optional] # noqa: E501 + three_d_secure_version (str): The protocol version of the 3DS challenge.. [optional] # noqa: E501 + expiration (int): Time at which the card will expire. Measured in seconds since the Unix epoch. . [optional] # noqa: E501 + last4 (str): The last four digits of the card.. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """SubscriptionPaymentMethodCard - 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 + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + country (str): Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).. [optional] # noqa: E501 + brand (str): Card brand.. [optional] # noqa: E501 + type (str): Card type `debit` or `credit`.. [optional] # noqa: E501 + three_d_secure (bool): Wether this transaction used 3D Secure authentication.. [optional] # noqa: E501 + three_d_secure_version (str): The protocol version of the 3DS challenge.. [optional] # noqa: E501 + expiration (int): Time at which the card will expire. Measured in seconds since the Unix epoch. . [optional] # noqa: E501 + last4 (str): The last four digits of the card.. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/Monei/model/subscription_retry_schedule.py b/Monei/model/subscription_retry_schedule.py new file mode 100644 index 0000000..bfed196 --- /dev/null +++ b/Monei/model/subscription_retry_schedule.py @@ -0,0 +1,291 @@ +""" + MONEI API v1 + +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 + + The version of the OpenAPI document: 1.5.3 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from Monei.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from Monei.exceptions import ApiAttributeError + + +def lazy_import(): + from Monei.model.subscription_retry_schedule_inner import SubscriptionRetryScheduleInner + globals()['SubscriptionRetryScheduleInner'] = SubscriptionRetryScheduleInner + + +class SubscriptionRetrySchedule(ModelSimple): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + additional_properties_type = None + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'value': ([SubscriptionRetryScheduleInner],), + } + + @cached_property + def discriminator(): + return None + + + attribute_map = {} + + read_only_vars = set() + + _composed_schemas = None + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): + """SubscriptionRetrySchedule - a model defined in OpenAPI + + Note that value can be passed either in args or in kwargs, but not in both. + + Args: + args[0] ([SubscriptionRetryScheduleInner]): Defines a custom schedule for retrying failed subscription payments. Each entry in the array specifies how long to wait before attempting the next payment retry. If not specified, the system's default retry schedule will be used. . # noqa: E501 + + Keyword Args: + value ([SubscriptionRetryScheduleInner]): Defines a custom schedule for retrying failed subscription payments. Each entry in the array specifies how long to wait before attempting the next payment retry. If not specified, the system's default retry schedule will be used. . # 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. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + # required up here when default value is not given + _path_to_item = kwargs.pop('_path_to_item', ()) + + if 'value' in kwargs: + value = kwargs.pop('value') + elif args: + args = list(args) + value = args.pop(0) + else: + raise ApiTypeError( + "value is required, but not passed in args or kwargs and doesn't have default", + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + self.value = value + if kwargs: + raise ApiTypeError( + "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( + kwargs, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): + """SubscriptionRetrySchedule - a model defined in OpenAPI + + Note that value can be passed either in args or in kwargs, but not in both. + + Args: + args[0] ([SubscriptionRetryScheduleInner]): Defines a custom schedule for retrying failed subscription payments. Each entry in the array specifies how long to wait before attempting the next payment retry. If not specified, the system's default retry schedule will be used. . # noqa: E501 + + Keyword Args: + value ([SubscriptionRetryScheduleInner]): Defines a custom schedule for retrying failed subscription payments. Each entry in the array specifies how long to wait before attempting the next payment retry. If not specified, the system's default retry schedule will be used. . # 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. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + # required up here when default value is not given + _path_to_item = kwargs.pop('_path_to_item', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if 'value' in kwargs: + value = kwargs.pop('value') + elif args: + args = list(args) + value = args.pop(0) + else: + raise ApiTypeError( + "value is required, but not passed in args or kwargs and doesn't have default", + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + self.value = value + if kwargs: + raise ApiTypeError( + "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( + kwargs, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + return self diff --git a/Monei/model/subscription_retry_schedule_inner.py b/Monei/model/subscription_retry_schedule_inner.py new file mode 100644 index 0000000..d457eef --- /dev/null +++ b/Monei/model/subscription_retry_schedule_inner.py @@ -0,0 +1,285 @@ +""" + MONEI API v1 + +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 + + The version of the OpenAPI document: 1.5.3 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from Monei.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from Monei.exceptions import ApiAttributeError + + + +class SubscriptionRetryScheduleInner(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + ('interval',): { + 'DAY': "day", + 'WEEK': "week", + 'MONTH': "month", + 'YEAR': "year", + }, + } + + validations = { + ('interval_count',): { + 'inclusive_maximum': 31, + 'inclusive_minimum': 1, + }, + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'interval': (str,), # noqa: E501 + 'interval_count': (int,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'interval': 'interval', # noqa: E501 + 'interval_count': 'intervalCount', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, interval, interval_count, *args, **kwargs): # noqa: E501 + """SubscriptionRetryScheduleInner - a model defined in OpenAPI + + Args: + interval (str): The unit of time to wait before the retry attempt. + interval_count (int): The number of intervals to wait before the retry attempt. + + Keyword Args: + _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. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.interval = interval + self.interval_count = interval_count + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, interval, interval_count, *args, **kwargs): # noqa: E501 + """SubscriptionRetryScheduleInner - a model defined in OpenAPI + + Args: + interval (str): The unit of time to wait before the retry attempt. + interval_count (int): The number of intervals to wait before the retry attempt. + + Keyword Args: + _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. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.interval = interval + self.interval_count = interval_count + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/Monei/model/subscription_status.py b/Monei/model/subscription_status.py new file mode 100644 index 0000000..4961717 --- /dev/null +++ b/Monei/model/subscription_status.py @@ -0,0 +1,295 @@ +""" + MONEI API v1 + +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 + + The version of the OpenAPI document: 1.5.3 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from Monei.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from Monei.exceptions import ApiAttributeError + + + +class SubscriptionStatus(ModelSimple): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + ('value',): { + 'PENDING': "PENDING", + 'EXPIRED': "EXPIRED", + 'TRIALING': "TRIALING", + 'ACTIVE': "ACTIVE", + 'PAST_DUE': "PAST_DUE", + 'PAUSED': "PAUSED", + 'CANCELED': "CANCELED", + }, + } + + validations = { + } + + additional_properties_type = None + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'value': (str,), + } + + @cached_property + def discriminator(): + return None + + + attribute_map = {} + + read_only_vars = set() + + _composed_schemas = None + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): + """SubscriptionStatus - a model defined in OpenAPI + + Note that value can be passed either in args or in kwargs, but not in both. + + Args: + args[0] (str): The status of the subscription.., must be one of ["PENDING", "EXPIRED", "TRIALING", "ACTIVE", "PAST_DUE", "PAUSED", "CANCELED", ] # noqa: E501 + + Keyword Args: + value (str): The status of the subscription.., must be one of ["PENDING", "EXPIRED", "TRIALING", "ACTIVE", "PAST_DUE", "PAUSED", "CANCELED", ] # 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. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + # required up here when default value is not given + _path_to_item = kwargs.pop('_path_to_item', ()) + + if 'value' in kwargs: + value = kwargs.pop('value') + elif args: + args = list(args) + value = args.pop(0) + else: + raise ApiTypeError( + "value is required, but not passed in args or kwargs and doesn't have default", + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + self.value = value + if kwargs: + raise ApiTypeError( + "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( + kwargs, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): + """SubscriptionStatus - a model defined in OpenAPI + + Note that value can be passed either in args or in kwargs, but not in both. + + Args: + args[0] (str): The status of the subscription.., must be one of ["PENDING", "EXPIRED", "TRIALING", "ACTIVE", "PAST_DUE", "PAUSED", "CANCELED", ] # noqa: E501 + + Keyword Args: + value (str): The status of the subscription.., must be one of ["PENDING", "EXPIRED", "TRIALING", "ACTIVE", "PAST_DUE", "PAUSED", "CANCELED", ] # 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. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + # required up here when default value is not given + _path_to_item = kwargs.pop('_path_to_item', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if 'value' in kwargs: + value = kwargs.pop('value') + elif args: + args = list(args) + value = args.pop(0) + else: + raise ApiTypeError( + "value is required, but not passed in args or kwargs and doesn't have default", + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + self.value = value + if kwargs: + raise ApiTypeError( + "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( + kwargs, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + return self diff --git a/Monei/model/update_subscription_request.py b/Monei/model/update_subscription_request.py new file mode 100644 index 0000000..135b49f --- /dev/null +++ b/Monei/model/update_subscription_request.py @@ -0,0 +1,333 @@ +""" + MONEI API v1 + +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 + + The version of the OpenAPI document: 1.5.3 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from Monei.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from Monei.exceptions import ApiAttributeError + + +def lazy_import(): + from Monei.model.payment_billing_details import PaymentBillingDetails + from Monei.model.payment_customer import PaymentCustomer + from Monei.model.payment_shipping_details import PaymentShippingDetails + from Monei.model.subscription_interval import SubscriptionInterval + from Monei.model.subscription_retry_schedule import SubscriptionRetrySchedule + globals()['PaymentBillingDetails'] = PaymentBillingDetails + globals()['PaymentCustomer'] = PaymentCustomer + globals()['PaymentShippingDetails'] = PaymentShippingDetails + globals()['SubscriptionInterval'] = SubscriptionInterval + globals()['SubscriptionRetrySchedule'] = SubscriptionRetrySchedule + + +class UpdateSubscriptionRequest(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'amount': (int,), # noqa: E501 + 'interval': (SubscriptionInterval,), # noqa: E501 + 'interval_count': (int,), # noqa: E501 + 'description': (str,), # noqa: E501 + 'customer': (PaymentCustomer,), # noqa: E501 + 'billing_details': (PaymentBillingDetails,), # noqa: E501 + 'shipping_details': (PaymentShippingDetails,), # noqa: E501 + 'trial_period_end': (float,), # noqa: E501 + 'callback_url': (str,), # noqa: E501 + 'payment_callback_url': (str,), # noqa: E501 + 'pause_at_period_end': (bool,), # noqa: E501 + 'cancel_at_period_end': (bool,), # noqa: E501 + 'pause_interval_count': (int,), # noqa: E501 + 'retry_schedule': (SubscriptionRetrySchedule,), # noqa: E501 + 'metadata': ({str: (bool, date, datetime, dict, float, int, list, str, none_type)},), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'amount': 'amount', # noqa: E501 + 'interval': 'interval', # noqa: E501 + 'interval_count': 'intervalCount', # noqa: E501 + 'description': 'description', # noqa: E501 + 'customer': 'customer', # noqa: E501 + 'billing_details': 'billingDetails', # noqa: E501 + 'shipping_details': 'shippingDetails', # noqa: E501 + 'trial_period_end': 'trialPeriodEnd', # noqa: E501 + 'callback_url': 'callbackUrl', # noqa: E501 + 'payment_callback_url': 'paymentCallbackUrl', # noqa: E501 + 'pause_at_period_end': 'pauseAtPeriodEnd', # noqa: E501 + 'cancel_at_period_end': 'cancelAtPeriodEnd', # noqa: E501 + 'pause_interval_count': 'pauseIntervalCount', # noqa: E501 + 'retry_schedule': 'retrySchedule', # noqa: E501 + 'metadata': 'metadata', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """UpdateSubscriptionRequest - 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 + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + amount (int): Amount intended to be collected by this payment. A positive integer representing how much to charge in the smallest currency unit (e.g., 100 cents to charge 1.00 USD). . [optional] # noqa: E501 + interval (SubscriptionInterval): [optional] # noqa: E501 + interval_count (int): Number of intervals between subscription payments.. [optional] # noqa: E501 + description (str): An arbitrary string attached to the subscription. Often useful for displaying to users. . [optional] # noqa: E501 + customer (PaymentCustomer): [optional] # noqa: E501 + billing_details (PaymentBillingDetails): [optional] # noqa: E501 + shipping_details (PaymentShippingDetails): [optional] # noqa: E501 + trial_period_end (float): The end date of the trial period. Measured in seconds since the Unix epoch.. [optional] # noqa: E501 + callback_url (str): The URL will be called each time subscription status changes. You will receive a subscription object in the body of the request. . [optional] # noqa: E501 + payment_callback_url (str): The URL will be called each time subscription creates a new payments. You will receive the payment object in the body of the request. . [optional] # noqa: E501 + pause_at_period_end (bool): If true, the subscription will be paused at the end of the current period. . [optional] # noqa: E501 + cancel_at_period_end (bool): If true, the subscription will be canceled at the end of the current period. . [optional] # noqa: E501 + pause_interval_count (int): Number of intervals when subscription will be paused before it activates again.. [optional] # noqa: E501 + retry_schedule (SubscriptionRetrySchedule): [optional] # noqa: E501 + metadata ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}): A set of key-value pairs that you can attach to a resource. This can be useful for storing additional information about the resource in a structured format.. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """UpdateSubscriptionRequest - 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 + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + amount (int): Amount intended to be collected by this payment. A positive integer representing how much to charge in the smallest currency unit (e.g., 100 cents to charge 1.00 USD). . [optional] # noqa: E501 + interval (SubscriptionInterval): [optional] # noqa: E501 + interval_count (int): Number of intervals between subscription payments.. [optional] # noqa: E501 + description (str): An arbitrary string attached to the subscription. Often useful for displaying to users. . [optional] # noqa: E501 + customer (PaymentCustomer): [optional] # noqa: E501 + billing_details (PaymentBillingDetails): [optional] # noqa: E501 + shipping_details (PaymentShippingDetails): [optional] # noqa: E501 + trial_period_end (float): The end date of the trial period. Measured in seconds since the Unix epoch.. [optional] # noqa: E501 + callback_url (str): The URL will be called each time subscription status changes. You will receive a subscription object in the body of the request. . [optional] # noqa: E501 + payment_callback_url (str): The URL will be called each time subscription creates a new payments. You will receive the payment object in the body of the request. . [optional] # noqa: E501 + pause_at_period_end (bool): If true, the subscription will be paused at the end of the current period. . [optional] # noqa: E501 + cancel_at_period_end (bool): If true, the subscription will be canceled at the end of the current period. . [optional] # noqa: E501 + pause_interval_count (int): Number of intervals when subscription will be paused before it activates again.. [optional] # noqa: E501 + retry_schedule (SubscriptionRetrySchedule): [optional] # noqa: E501 + metadata ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}): A set of key-value pairs that you can attach to a resource. This can be useful for storing additional information about the resource in a structured format.. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/Monei/model/validate_bizum_phone_request.py b/Monei/model/validate_bizum_phone_request.py new file mode 100644 index 0000000..c87b9ad --- /dev/null +++ b/Monei/model/validate_bizum_phone_request.py @@ -0,0 +1,279 @@ +""" + MONEI API v1 + +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 + + The version of the OpenAPI document: 1.5.3 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from Monei.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from Monei.exceptions import ApiAttributeError + + + +class ValidateBizumPhoneRequest(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'account_id': (str,), # noqa: E501 + 'phone_number': (str,), # noqa: E501 + 'payment_id': (str,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'account_id': 'accountId', # noqa: E501 + 'phone_number': 'phoneNumber', # noqa: E501 + 'payment_id': 'paymentId', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, account_id, phone_number, *args, **kwargs): # noqa: E501 + """ValidateBizumPhoneRequest - a model defined in OpenAPI + + Args: + account_id (str): MONEI Account identifier. + phone_number (str): Phone number in E.164 format. + + Keyword Args: + _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. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + payment_id (str): Unique identifier for the payment.. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.account_id = account_id + self.phone_number = phone_number + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, account_id, phone_number, *args, **kwargs): # noqa: E501 + """ValidateBizumPhoneRequest - a model defined in OpenAPI + + Args: + account_id (str): MONEI Account identifier. + phone_number (str): Phone number in E.164 format. + + Keyword Args: + _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. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + payment_id (str): Unique identifier for the payment.. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.account_id = account_id + self.phone_number = phone_number + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/Monei/model_utils.py b/Monei/model_utils.py new file mode 100644 index 0000000..81575dc --- /dev/null +++ b/Monei/model_utils.py @@ -0,0 +1,2058 @@ +""" + MONEI API v1 + +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 + + The version of the OpenAPI document: 1.5.3 + Generated by: https://openapi-generator.tech +""" + + +from datetime import date, datetime # noqa: F401 +from copy import deepcopy +import inspect +import io +import os +import pprint +import re +import tempfile +import uuid + +from dateutil.parser import parse + +from Monei.exceptions import ( + ApiKeyError, + ApiAttributeError, + ApiTypeError, + ApiValueError, +) + +none_type = type(None) +file_type = io.IOBase + + +def convert_js_args_to_python_args(fn): + from functools import wraps + @wraps(fn) + def wrapped_init(_self, *args, **kwargs): + """ + An attribute named `self` received from the api will conflicts with the reserved `self` + parameter of a class method. During generation, `self` attributes are mapped + to `_self` in models. Here, we name `_self` instead of `self` to avoid conflicts. + """ + spec_property_naming = kwargs.get('_spec_property_naming', False) + if spec_property_naming: + kwargs = change_keys_js_to_python( + kwargs, _self if isinstance( + _self, type) else _self.__class__) + return fn(_self, *args, **kwargs) + return wrapped_init + + +class cached_property(object): + # this caches the result of the function call for fn with no inputs + # use this as a decorator on function methods that you want converted + # into cached properties + result_key = '_results' + + def __init__(self, fn): + self._fn = fn + + def __get__(self, instance, cls=None): + if self.result_key in vars(self): + return vars(self)[self.result_key] + else: + result = self._fn() + setattr(self, self.result_key, result) + return result + + +PRIMITIVE_TYPES = (list, float, int, bool, datetime, date, str, file_type) + + +def allows_single_value_input(cls): + """ + This function returns True if the input composed schema model or any + descendant model allows a value only input + This is true for cases where oneOf contains items like: + oneOf: + - float + - NumberWithValidation + - StringEnum + - ArrayModel + - null + TODO: lru_cache this + """ + if ( + issubclass(cls, ModelSimple) or + cls in PRIMITIVE_TYPES + ): + return True + elif issubclass(cls, ModelComposed): + if not cls._composed_schemas['oneOf']: + return False + return any(allows_single_value_input(c) for c in cls._composed_schemas['oneOf']) + return False + + +def composed_model_input_classes(cls): + """ + This function returns a list of the possible models that can be accepted as + inputs. + TODO: lru_cache this + """ + if issubclass(cls, ModelSimple) or cls in PRIMITIVE_TYPES: + return [cls] + elif issubclass(cls, ModelNormal): + if cls.discriminator is None: + return [cls] + else: + return get_discriminated_classes(cls) + elif issubclass(cls, ModelComposed): + if not cls._composed_schemas['oneOf']: + return [] + if cls.discriminator is None: + input_classes = [] + for c in cls._composed_schemas['oneOf']: + input_classes.extend(composed_model_input_classes(c)) + return input_classes + else: + return get_discriminated_classes(cls) + return [] + + +class OpenApiModel(object): + """The base class for all OpenAPIModels""" + + def set_attribute(self, name, value): + # this is only used to set properties on self + + path_to_item = [] + if self._path_to_item: + path_to_item.extend(self._path_to_item) + path_to_item.append(name) + + if name in self.openapi_types: + required_types_mixed = self.openapi_types[name] + elif self.additional_properties_type is None: + raise ApiAttributeError( + "{0} has no attribute '{1}'".format( + type(self).__name__, name), + path_to_item + ) + elif self.additional_properties_type is not None: + required_types_mixed = self.additional_properties_type + + if get_simple_class(name) != str: + error_msg = type_error_message( + var_name=name, + var_value=name, + valid_classes=(str,), + key_type=True + ) + raise ApiTypeError( + error_msg, + path_to_item=path_to_item, + valid_classes=(str,), + key_type=True + ) + + if self._check_type: + value = validate_and_convert_types( + value, required_types_mixed, path_to_item, self._spec_property_naming, + self._check_type, configuration=self._configuration) + if (name,) in self.allowed_values: + check_allowed_values( + self.allowed_values, + (name,), + value + ) + if (name,) in self.validations: + check_validations( + self.validations, + (name,), + value, + self._configuration + ) + self.__dict__['_data_store'][name] = value + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other + + def __setattr__(self, attr, value): + """set the value of an attribute using dot notation: `instance.attr = val`""" + self[attr] = value + + def __getattr__(self, attr): + """get the value of an attribute using dot notation: `instance.attr`""" + return self.__getitem__(attr) + + def __copy__(self): + cls = self.__class__ + if self.get("_spec_property_naming", False): + return cls._new_from_openapi_data(**self.__dict__) + else: + return cls.__new__(cls, **self.__dict__) + + def __deepcopy__(self, memo): + cls = self.__class__ + + if self.get("_spec_property_naming", False): + new_inst = cls._new_from_openapi_data() + else: + new_inst = cls.__new__(cls) + + for k, v in self.__dict__.items(): + setattr(new_inst, k, deepcopy(v, memo)) + return new_inst + + + def __new__(cls, *args, **kwargs): + # this function uses the discriminator to + # pick a new schema/class to instantiate because a discriminator + # propertyName value was passed in + + if len(args) == 1: + arg = args[0] + if arg is None and is_type_nullable(cls): + # The input data is the 'null' value and the type is nullable. + return None + + if issubclass(cls, ModelComposed) and allows_single_value_input(cls): + model_kwargs = {} + oneof_instance = get_oneof_instance(cls, model_kwargs, kwargs, model_arg=arg) + return oneof_instance + + visited_composed_classes = kwargs.get('_visited_composed_classes', ()) + if ( + cls.discriminator is None or + cls in visited_composed_classes + ): + # Use case 1: this openapi schema (cls) does not have a discriminator + # Use case 2: we have already visited this class before and are sure that we + # want to instantiate it this time. We have visited this class deserializing + # a payload with a discriminator. During that process we traveled through + # this class but did not make an instance of it. Now we are making an + # instance of a composed class which contains cls in it, so this time make an instance of cls. + # + # Here's an example of use case 2: If Animal has a discriminator + # petType and we pass in "Dog", and the class Dog + # allOf includes Animal, we move through Animal + # once using the discriminator, and pick Dog. + # Then in the composed schema dog Dog, we will make an instance of the + # Animal class (because Dal has allOf: Animal) but this time we won't travel + # through Animal's discriminator because we passed in + # _visited_composed_classes = (Animal,) + + return super(OpenApiModel, cls).__new__(cls) + + # Get the name and value of the discriminator property. + # The discriminator name is obtained from the discriminator meta-data + # and the discriminator value is obtained from the input data. + discr_propertyname_py = list(cls.discriminator.keys())[0] + discr_propertyname_js = cls.attribute_map[discr_propertyname_py] + if discr_propertyname_js in kwargs: + discr_value = kwargs[discr_propertyname_js] + elif discr_propertyname_py in kwargs: + discr_value = kwargs[discr_propertyname_py] + else: + # The input data does not contain the discriminator property. + path_to_item = kwargs.get('_path_to_item', ()) + raise ApiValueError( + "Cannot deserialize input data due to missing discriminator. " + "The discriminator property '%s' is missing at path: %s" % + (discr_propertyname_js, path_to_item) + ) + + # Implementation note: the last argument to get_discriminator_class + # is a list of visited classes. get_discriminator_class may recursively + # call itself and update the list of visited classes, and the initial + # value must be an empty list. Hence not using 'visited_composed_classes' + new_cls = get_discriminator_class( + cls, discr_propertyname_py, discr_value, []) + if new_cls is None: + path_to_item = kwargs.get('_path_to_item', ()) + disc_prop_value = kwargs.get( + discr_propertyname_js, kwargs.get(discr_propertyname_py)) + raise ApiValueError( + "Cannot deserialize input data due to invalid discriminator " + "value. The OpenAPI document has no mapping for discriminator " + "property '%s'='%s' at path: %s" % + (discr_propertyname_js, disc_prop_value, path_to_item) + ) + + if new_cls in visited_composed_classes: + # if we are making an instance of a composed schema Descendent + # which allOf includes Ancestor, then Ancestor contains + # a discriminator that includes Descendent. + # So if we make an instance of Descendent, we have to make an + # instance of Ancestor to hold the allOf properties. + # This code detects that use case and makes the instance of Ancestor + # For example: + # When making an instance of Dog, _visited_composed_classes = (Dog,) + # then we make an instance of Animal to include in dog._composed_instances + # so when we are here, cls is Animal + # cls.discriminator != None + # cls not in _visited_composed_classes + # new_cls = Dog + # but we know we know that we already have Dog + # because it is in visited_composed_classes + # so make Animal here + return super(OpenApiModel, cls).__new__(cls) + + # Build a list containing all oneOf and anyOf descendants. + oneof_anyof_classes = None + if cls._composed_schemas is not None: + oneof_anyof_classes = ( + cls._composed_schemas.get('oneOf', ()) + + cls._composed_schemas.get('anyOf', ())) + oneof_anyof_child = new_cls in oneof_anyof_classes + kwargs['_visited_composed_classes'] = visited_composed_classes + (cls,) + + if cls._composed_schemas.get('allOf') and oneof_anyof_child: + # Validate that we can make self because when we make the + # new_cls it will not include the allOf validations in self + self_inst = super(OpenApiModel, cls).__new__(cls) + self_inst.__init__(*args, **kwargs) + + if kwargs.get("_spec_property_naming", False): + # when true, implies new is from deserialization + new_inst = new_cls._new_from_openapi_data(*args, **kwargs) + else: + new_inst = new_cls.__new__(new_cls, *args, **kwargs) + new_inst.__init__(*args, **kwargs) + + return new_inst + + @classmethod + @convert_js_args_to_python_args + def _new_from_openapi_data(cls, *args, **kwargs): + # this function uses the discriminator to + # pick a new schema/class to instantiate because a discriminator + # propertyName value was passed in + + if len(args) == 1: + arg = args[0] + if arg is None and is_type_nullable(cls): + # The input data is the 'null' value and the type is nullable. + return None + + if issubclass(cls, ModelComposed) and allows_single_value_input(cls): + model_kwargs = {} + oneof_instance = get_oneof_instance(cls, model_kwargs, kwargs, model_arg=arg) + return oneof_instance + + visited_composed_classes = kwargs.get('_visited_composed_classes', ()) + if ( + cls.discriminator is None or + cls in visited_composed_classes + ): + # Use case 1: this openapi schema (cls) does not have a discriminator + # Use case 2: we have already visited this class before and are sure that we + # want to instantiate it this time. We have visited this class deserializing + # a payload with a discriminator. During that process we traveled through + # this class but did not make an instance of it. Now we are making an + # instance of a composed class which contains cls in it, so this time make an instance of cls. + # + # Here's an example of use case 2: If Animal has a discriminator + # petType and we pass in "Dog", and the class Dog + # allOf includes Animal, we move through Animal + # once using the discriminator, and pick Dog. + # Then in the composed schema dog Dog, we will make an instance of the + # Animal class (because Dal has allOf: Animal) but this time we won't travel + # through Animal's discriminator because we passed in + # _visited_composed_classes = (Animal,) + + return cls._from_openapi_data(*args, **kwargs) + + # Get the name and value of the discriminator property. + # The discriminator name is obtained from the discriminator meta-data + # and the discriminator value is obtained from the input data. + discr_propertyname_py = list(cls.discriminator.keys())[0] + discr_propertyname_js = cls.attribute_map[discr_propertyname_py] + if discr_propertyname_js in kwargs: + discr_value = kwargs[discr_propertyname_js] + elif discr_propertyname_py in kwargs: + discr_value = kwargs[discr_propertyname_py] + else: + # The input data does not contain the discriminator property. + path_to_item = kwargs.get('_path_to_item', ()) + raise ApiValueError( + "Cannot deserialize input data due to missing discriminator. " + "The discriminator property '%s' is missing at path: %s" % + (discr_propertyname_js, path_to_item) + ) + + # Implementation note: the last argument to get_discriminator_class + # is a list of visited classes. get_discriminator_class may recursively + # call itself and update the list of visited classes, and the initial + # value must be an empty list. Hence not using 'visited_composed_classes' + new_cls = get_discriminator_class( + cls, discr_propertyname_py, discr_value, []) + if new_cls is None: + path_to_item = kwargs.get('_path_to_item', ()) + disc_prop_value = kwargs.get( + discr_propertyname_js, kwargs.get(discr_propertyname_py)) + raise ApiValueError( + "Cannot deserialize input data due to invalid discriminator " + "value. The OpenAPI document has no mapping for discriminator " + "property '%s'='%s' at path: %s" % + (discr_propertyname_js, disc_prop_value, path_to_item) + ) + + if new_cls in visited_composed_classes: + # if we are making an instance of a composed schema Descendent + # which allOf includes Ancestor, then Ancestor contains + # a discriminator that includes Descendent. + # So if we make an instance of Descendent, we have to make an + # instance of Ancestor to hold the allOf properties. + # This code detects that use case and makes the instance of Ancestor + # For example: + # When making an instance of Dog, _visited_composed_classes = (Dog,) + # then we make an instance of Animal to include in dog._composed_instances + # so when we are here, cls is Animal + # cls.discriminator != None + # cls not in _visited_composed_classes + # new_cls = Dog + # but we know we know that we already have Dog + # because it is in visited_composed_classes + # so make Animal here + return cls._from_openapi_data(*args, **kwargs) + + # Build a list containing all oneOf and anyOf descendants. + oneof_anyof_classes = None + if cls._composed_schemas is not None: + oneof_anyof_classes = ( + cls._composed_schemas.get('oneOf', ()) + + cls._composed_schemas.get('anyOf', ())) + oneof_anyof_child = new_cls in oneof_anyof_classes + kwargs['_visited_composed_classes'] = visited_composed_classes + (cls,) + + if cls._composed_schemas.get('allOf') and oneof_anyof_child: + # Validate that we can make self because when we make the + # new_cls it will not include the allOf validations in self + self_inst = cls._from_openapi_data(*args, **kwargs) + + new_inst = new_cls._new_from_openapi_data(*args, **kwargs) + return new_inst + + +class ModelSimple(OpenApiModel): + """the parent class of models whose type != object in their + swagger/openapi""" + + def __setitem__(self, name, value): + """set the value of an attribute using square-bracket notation: `instance[attr] = val`""" + if name in self.required_properties: + self.__dict__[name] = value + return + + self.set_attribute(name, value) + + def get(self, name, default=None): + """returns the value of an attribute or some default value if the attribute was not set""" + if name in self.required_properties: + return self.__dict__[name] + + return self.__dict__['_data_store'].get(name, default) + + def __getitem__(self, name): + """get the value of an attribute using square-bracket notation: `instance[attr]`""" + if name in self: + return self.get(name) + + raise ApiAttributeError( + "{0} has no attribute '{1}'".format( + type(self).__name__, name), + [e for e in [self._path_to_item, name] if e] + ) + + def __contains__(self, name): + """used by `in` operator to check if an attribute value was set in an instance: `'attr' in instance`""" + if name in self.required_properties: + return name in self.__dict__ + + return name in self.__dict__['_data_store'] + + def to_str(self): + """Returns the string representation of the model""" + return str(self.value) + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, self.__class__): + return False + + this_val = self._data_store['value'] + that_val = other._data_store['value'] + types = set() + types.add(this_val.__class__) + types.add(that_val.__class__) + vals_equal = this_val == that_val + return vals_equal + + +class ModelNormal(OpenApiModel): + """the parent class of models whose type == object in their + swagger/openapi""" + + def __setitem__(self, name, value): + """set the value of an attribute using square-bracket notation: `instance[attr] = val`""" + if name in self.required_properties: + self.__dict__[name] = value + return + + self.set_attribute(name, value) + + def get(self, name, default=None): + """returns the value of an attribute or some default value if the attribute was not set""" + if name in self.required_properties: + return self.__dict__[name] + + return self.__dict__['_data_store'].get(name, default) + + def __getitem__(self, name): + """get the value of an attribute using square-bracket notation: `instance[attr]`""" + if name in self: + return self.get(name) + + raise ApiAttributeError( + "{0} has no attribute '{1}'".format( + type(self).__name__, name), + [e for e in [self._path_to_item, name] if e] + ) + + def __contains__(self, name): + """used by `in` operator to check if an attribute value was set in an instance: `'attr' in instance`""" + if name in self.required_properties: + return name in self.__dict__ + + return name in self.__dict__['_data_store'] + + def to_dict(self): + """Returns the model properties as a dict""" + return model_to_dict(self, serialize=False) + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, self.__class__): + return False + + if not set(self._data_store.keys()) == set(other._data_store.keys()): + return False + for _var_name, this_val in self._data_store.items(): + that_val = other._data_store[_var_name] + types = set() + types.add(this_val.__class__) + types.add(that_val.__class__) + vals_equal = this_val == that_val + if not vals_equal: + return False + return True + + +class ModelComposed(OpenApiModel): + """the parent class of models whose type == object in their + swagger/openapi and have oneOf/allOf/anyOf + + When one sets a property we use var_name_to_model_instances to store the value in + the correct class instances + run any type checking + validation code. + When one gets a property we use var_name_to_model_instances to get the value + from the correct class instances. + This allows multiple composed schemas to contain the same property with additive + constraints on the value. + + _composed_schemas (dict) stores the anyOf/allOf/oneOf classes + key (str): allOf/oneOf/anyOf + value (list): the classes in the XOf definition. + Note: none_type can be included when the openapi document version >= 3.1.0 + _composed_instances (list): stores a list of instances of the composed schemas + defined in _composed_schemas. When properties are accessed in the self instance, + they are returned from the self._data_store or the data stores in the instances + in self._composed_schemas + _var_name_to_model_instances (dict): maps between a variable name on self and + the composed instances (self included) which contain that data + key (str): property name + value (list): list of class instances, self or instances in _composed_instances + which contain the value that the key is referring to. + """ + + def __setitem__(self, name, value): + """set the value of an attribute using square-bracket notation: `instance[attr] = val`""" + if name in self.required_properties: + self.__dict__[name] = value + return + + """ + Use cases: + 1. additional_properties_type is None (additionalProperties == False in spec) + Check for property presence in self.openapi_types + if not present then throw an error + if present set in self, set attribute + always set on composed schemas + 2. additional_properties_type exists + set attribute on self + always set on composed schemas + """ + if self.additional_properties_type is None: + """ + For an attribute to exist on a composed schema it must: + - fulfill schema_requirements in the self composed schema not considering oneOf/anyOf/allOf schemas AND + - fulfill schema_requirements in each oneOf/anyOf/allOf schemas + + schema_requirements: + For an attribute to exist on a schema it must: + - be present in properties at the schema OR + - have additionalProperties unset (defaults additionalProperties = any type) OR + - have additionalProperties set + """ + if name not in self.openapi_types: + raise ApiAttributeError( + "{0} has no attribute '{1}'".format( + type(self).__name__, name), + [e for e in [self._path_to_item, name] if e] + ) + # attribute must be set on self and composed instances + self.set_attribute(name, value) + for model_instance in self._composed_instances: + setattr(model_instance, name, value) + if name not in self._var_name_to_model_instances: + # we assigned an additional property + self.__dict__['_var_name_to_model_instances'][name] = self._composed_instances + [self] + return None + + __unset_attribute_value__ = object() + + def get(self, name, default=None): + """returns the value of an attribute or some default value if the attribute was not set""" + if name in self.required_properties: + return self.__dict__[name] + + # get the attribute from the correct instance + model_instances = self._var_name_to_model_instances.get(name) + values = [] + # A composed model stores self and child (oneof/anyOf/allOf) models under + # self._var_name_to_model_instances. + # Any property must exist in self and all model instances + # The value stored in all model instances must be the same + if model_instances: + for model_instance in model_instances: + if name in model_instance._data_store: + v = model_instance._data_store[name] + if v not in values: + values.append(v) + len_values = len(values) + if len_values == 0: + return default + elif len_values == 1: + return values[0] + elif len_values > 1: + raise ApiValueError( + "Values stored for property {0} in {1} differ when looking " + "at self and self's composed instances. All values must be " + "the same".format(name, type(self).__name__), + [e for e in [self._path_to_item, name] if e] + ) + + def __getitem__(self, name): + """get the value of an attribute using square-bracket notation: `instance[attr]`""" + value = self.get(name, self.__unset_attribute_value__) + if value is self.__unset_attribute_value__: + raise ApiAttributeError( + "{0} has no attribute '{1}'".format( + type(self).__name__, name), + [e for e in [self._path_to_item, name] if e] + ) + return value + + def __contains__(self, name): + """used by `in` operator to check if an attribute value was set in an instance: `'attr' in instance`""" + + if name in self.required_properties: + return name in self.__dict__ + + model_instances = self._var_name_to_model_instances.get( + name, self._additional_properties_model_instances) + + if model_instances: + for model_instance in model_instances: + if name in model_instance._data_store: + return True + + return False + + def to_dict(self): + """Returns the model properties as a dict""" + return model_to_dict(self, serialize=False) + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, self.__class__): + return False + + if not set(self._data_store.keys()) == set(other._data_store.keys()): + return False + for _var_name, this_val in self._data_store.items(): + that_val = other._data_store[_var_name] + types = set() + types.add(this_val.__class__) + types.add(that_val.__class__) + vals_equal = this_val == that_val + if not vals_equal: + return False + return True + + +COERCION_INDEX_BY_TYPE = { + ModelComposed: 0, + ModelNormal: 1, + ModelSimple: 2, + none_type: 3, # The type of 'None'. + list: 4, + dict: 5, + float: 6, + int: 7, + bool: 8, + datetime: 9, + date: 10, + str: 11, + file_type: 12, # 'file_type' is an alias for the built-in 'file' or 'io.IOBase' type. +} + +# these are used to limit what type conversions we try to do +# when we have a valid type already and we want to try converting +# to another type +UPCONVERSION_TYPE_PAIRS = ( + (str, datetime), + (str, date), + # A float may be serialized as an integer, e.g. '3' is a valid serialized float. + (int, float), + (list, ModelComposed), + (dict, ModelComposed), + (str, ModelComposed), + (int, ModelComposed), + (float, ModelComposed), + (list, ModelComposed), + (list, ModelNormal), + (dict, ModelNormal), + (str, ModelSimple), + (int, ModelSimple), + (float, ModelSimple), + (list, ModelSimple), +) + +COERCIBLE_TYPE_PAIRS = { + False: ( # client instantiation of a model with client data + # (dict, ModelComposed), + # (list, ModelComposed), + # (dict, ModelNormal), + # (list, ModelNormal), + # (str, ModelSimple), + # (int, ModelSimple), + # (float, ModelSimple), + # (list, ModelSimple), + # (str, int), + # (str, float), + # (str, datetime), + # (str, date), + # (int, str), + # (float, str), + ), + True: ( # server -> client data + (dict, ModelComposed), + (list, ModelComposed), + (dict, ModelNormal), + (list, ModelNormal), + (str, ModelSimple), + (int, ModelSimple), + (float, ModelSimple), + (list, ModelSimple), + # (str, int), + # (str, float), + (str, datetime), + (str, date), + # (int, str), + # (float, str), + (str, file_type) + ), +} + + +def get_simple_class(input_value): + """Returns an input_value's simple class that we will use for type checking + Python2: + float and int will return int, where int is the python3 int backport + str and unicode will return str, where str is the python3 str backport + Note: float and int ARE both instances of int backport + Note: str_py2 and unicode_py2 are NOT both instances of str backport + + Args: + input_value (class/class_instance): the item for which we will return + the simple class + """ + if isinstance(input_value, type): + # input_value is a class + return input_value + elif isinstance(input_value, tuple): + return tuple + elif isinstance(input_value, list): + return list + elif isinstance(input_value, dict): + return dict + elif isinstance(input_value, none_type): + return none_type + elif isinstance(input_value, file_type): + return file_type + elif isinstance(input_value, bool): + # this must be higher than the int check because + # isinstance(True, int) == True + return bool + elif isinstance(input_value, int): + return int + elif isinstance(input_value, datetime): + # this must be higher than the date check because + # isinstance(datetime_instance, date) == True + return datetime + elif isinstance(input_value, date): + return date + elif isinstance(input_value, str): + return str + return type(input_value) + + +def check_allowed_values(allowed_values, input_variable_path, input_values): + """Raises an exception if the input_values are not allowed + + Args: + allowed_values (dict): the allowed_values dict + input_variable_path (tuple): the path to the input variable + input_values (list/str/int/float/date/datetime): the values that we + are checking to see if they are in allowed_values + """ + these_allowed_values = list(allowed_values[input_variable_path].values()) + if (isinstance(input_values, list) + and not set(input_values).issubset( + set(these_allowed_values))): + invalid_values = ", ".join( + map(str, set(input_values) - set(these_allowed_values))), + raise ApiValueError( + "Invalid values for `%s` [%s], must be a subset of [%s]" % + ( + input_variable_path[0], + invalid_values, + ", ".join(map(str, these_allowed_values)) + ) + ) + elif (isinstance(input_values, dict) + and not set( + input_values.keys()).issubset(set(these_allowed_values))): + invalid_values = ", ".join( + map(str, set(input_values.keys()) - set(these_allowed_values))) + raise ApiValueError( + "Invalid keys in `%s` [%s], must be a subset of [%s]" % + ( + input_variable_path[0], + invalid_values, + ", ".join(map(str, these_allowed_values)) + ) + ) + elif (not isinstance(input_values, (list, dict)) + and input_values not in these_allowed_values): + raise ApiValueError( + "Invalid value for `%s` (%s), must be one of %s" % + ( + input_variable_path[0], + input_values, + these_allowed_values + ) + ) + + +def is_json_validation_enabled(schema_keyword, configuration=None): + """Returns true if JSON schema validation is enabled for the specified + validation keyword. This can be used to skip JSON schema structural validation + as requested in the configuration. + + Args: + schema_keyword (string): the name of a JSON schema validation keyword. + configuration (Configuration): the configuration class. + """ + + return (configuration is None or + not hasattr(configuration, '_disabled_client_side_validations') or + schema_keyword not in configuration._disabled_client_side_validations) + + +def check_validations( + validations, input_variable_path, input_values, + configuration=None): + """Raises an exception if the input_values are invalid + + Args: + validations (dict): the validation dictionary. + input_variable_path (tuple): the path to the input variable. + input_values (list/str/int/float/date/datetime): the values that we + are checking. + configuration (Configuration): the configuration class. + """ + + if input_values is None: + return + + current_validations = validations[input_variable_path] + if (is_json_validation_enabled('multipleOf', configuration) and + 'multiple_of' in current_validations and + isinstance(input_values, (int, float)) and + not (float(input_values) / current_validations['multiple_of']).is_integer()): + # Note 'multipleOf' will be as good as the floating point arithmetic. + raise ApiValueError( + "Invalid value for `%s`, value must be a multiple of " + "`%s`" % ( + input_variable_path[0], + current_validations['multiple_of'] + ) + ) + + if (is_json_validation_enabled('maxLength', configuration) and + 'max_length' in current_validations and + len(input_values) > current_validations['max_length']): + raise ApiValueError( + "Invalid value for `%s`, length must be less than or equal to " + "`%s`" % ( + input_variable_path[0], + current_validations['max_length'] + ) + ) + + if (is_json_validation_enabled('minLength', configuration) and + 'min_length' in current_validations and + len(input_values) < current_validations['min_length']): + raise ApiValueError( + "Invalid value for `%s`, length must be greater than or equal to " + "`%s`" % ( + input_variable_path[0], + current_validations['min_length'] + ) + ) + + if (is_json_validation_enabled('maxItems', configuration) and + 'max_items' in current_validations and + len(input_values) > current_validations['max_items']): + raise ApiValueError( + "Invalid value for `%s`, number of items must be less than or " + "equal to `%s`" % ( + input_variable_path[0], + current_validations['max_items'] + ) + ) + + if (is_json_validation_enabled('minItems', configuration) and + 'min_items' in current_validations and + len(input_values) < current_validations['min_items']): + raise ValueError( + "Invalid value for `%s`, number of items must be greater than or " + "equal to `%s`" % ( + input_variable_path[0], + current_validations['min_items'] + ) + ) + + items = ('exclusive_maximum', 'inclusive_maximum', 'exclusive_minimum', + 'inclusive_minimum') + if (any(item in current_validations for item in items)): + if isinstance(input_values, list): + max_val = max(input_values) + min_val = min(input_values) + elif isinstance(input_values, dict): + max_val = max(input_values.values()) + min_val = min(input_values.values()) + else: + max_val = input_values + min_val = input_values + + if (is_json_validation_enabled('exclusiveMaximum', configuration) and + 'exclusive_maximum' in current_validations and + max_val >= current_validations['exclusive_maximum']): + raise ApiValueError( + "Invalid value for `%s`, must be a value less than `%s`" % ( + input_variable_path[0], + current_validations['exclusive_maximum'] + ) + ) + + if (is_json_validation_enabled('maximum', configuration) and + 'inclusive_maximum' in current_validations and + max_val > current_validations['inclusive_maximum']): + raise ApiValueError( + "Invalid value for `%s`, must be a value less than or equal to " + "`%s`" % ( + input_variable_path[0], + current_validations['inclusive_maximum'] + ) + ) + + if (is_json_validation_enabled('exclusiveMinimum', configuration) and + 'exclusive_minimum' in current_validations and + min_val <= current_validations['exclusive_minimum']): + raise ApiValueError( + "Invalid value for `%s`, must be a value greater than `%s`" % + ( + input_variable_path[0], + current_validations['exclusive_maximum'] + ) + ) + + if (is_json_validation_enabled('minimum', configuration) and + 'inclusive_minimum' in current_validations and + min_val < current_validations['inclusive_minimum']): + raise ApiValueError( + "Invalid value for `%s`, must be a value greater than or equal " + "to `%s`" % ( + input_variable_path[0], + current_validations['inclusive_minimum'] + ) + ) + flags = current_validations.get('regex', {}).get('flags', 0) + if (is_json_validation_enabled('pattern', configuration) and + 'regex' in current_validations and + not re.search(current_validations['regex']['pattern'], + input_values, flags=flags)): + err_msg = r"Invalid value for `%s`, must match regular expression `%s`" % ( + input_variable_path[0], + current_validations['regex']['pattern'] + ) + if flags != 0: + # Don't print the regex flags if the flags are not + # specified in the OAS document. + err_msg = r"%s with flags=`%s`" % (err_msg, flags) + raise ApiValueError(err_msg) + + +def order_response_types(required_types): + """Returns the required types sorted in coercion order + + Args: + required_types (list/tuple): collection of classes or instance of + list or dict with class information inside it. + + Returns: + (list): coercion order sorted collection of classes or instance + of list or dict with class information inside it. + """ + + def index_getter(class_or_instance): + if isinstance(class_or_instance, list): + return COERCION_INDEX_BY_TYPE[list] + elif isinstance(class_or_instance, dict): + return COERCION_INDEX_BY_TYPE[dict] + elif (inspect.isclass(class_or_instance) + and issubclass(class_or_instance, ModelComposed)): + return COERCION_INDEX_BY_TYPE[ModelComposed] + elif (inspect.isclass(class_or_instance) + and issubclass(class_or_instance, ModelNormal)): + return COERCION_INDEX_BY_TYPE[ModelNormal] + elif (inspect.isclass(class_or_instance) + and issubclass(class_or_instance, ModelSimple)): + return COERCION_INDEX_BY_TYPE[ModelSimple] + elif class_or_instance in COERCION_INDEX_BY_TYPE: + return COERCION_INDEX_BY_TYPE[class_or_instance] + raise ApiValueError("Unsupported type: %s" % class_or_instance) + + sorted_types = sorted( + required_types, + key=lambda class_or_instance: index_getter(class_or_instance) + ) + return sorted_types + + +def remove_uncoercible(required_types_classes, current_item, spec_property_naming, + must_convert=True): + """Only keeps the type conversions that are possible + + Args: + required_types_classes (tuple): tuple of classes that are required + these should be ordered by COERCION_INDEX_BY_TYPE + spec_property_naming (bool): True if the variable names in the input + data are serialized names as specified in the OpenAPI document. + False if the variables names in the input data are python + variable names in PEP-8 snake case. + current_item (any): the current item (input data) to be converted + + Keyword Args: + must_convert (bool): if True the item to convert is of the wrong + type and we want a big list of coercibles + if False, we want a limited list of coercibles + + Returns: + (list): the remaining coercible required types, classes only + """ + current_type_simple = get_simple_class(current_item) + + results_classes = [] + for required_type_class in required_types_classes: + # convert our models to OpenApiModel + required_type_class_simplified = required_type_class + if isinstance(required_type_class_simplified, type): + if issubclass(required_type_class_simplified, ModelComposed): + required_type_class_simplified = ModelComposed + elif issubclass(required_type_class_simplified, ModelNormal): + required_type_class_simplified = ModelNormal + elif issubclass(required_type_class_simplified, ModelSimple): + required_type_class_simplified = ModelSimple + + if required_type_class_simplified == current_type_simple: + # don't consider converting to one's own class + continue + + class_pair = (current_type_simple, required_type_class_simplified) + if must_convert and class_pair in COERCIBLE_TYPE_PAIRS[spec_property_naming]: + results_classes.append(required_type_class) + elif class_pair in UPCONVERSION_TYPE_PAIRS: + results_classes.append(required_type_class) + return results_classes + + +def get_discriminated_classes(cls): + """ + Returns all the classes that a discriminator converts to + TODO: lru_cache this + """ + possible_classes = [] + key = list(cls.discriminator.keys())[0] + if is_type_nullable(cls): + possible_classes.append(cls) + for discr_cls in cls.discriminator[key].values(): + if hasattr(discr_cls, 'discriminator') and discr_cls.discriminator is not None: + possible_classes.extend(get_discriminated_classes(discr_cls)) + else: + possible_classes.append(discr_cls) + return possible_classes + + +def get_possible_classes(cls, from_server_context): + # TODO: lru_cache this + possible_classes = [cls] + if from_server_context: + return possible_classes + if hasattr(cls, 'discriminator') and cls.discriminator is not None: + possible_classes = [] + possible_classes.extend(get_discriminated_classes(cls)) + elif issubclass(cls, ModelComposed): + possible_classes.extend(composed_model_input_classes(cls)) + return possible_classes + + +def get_required_type_classes(required_types_mixed, spec_property_naming): + """Converts the tuple required_types into a tuple and a dict described + below + + Args: + required_types_mixed (tuple/list): will contain either classes or + instance of list or dict + spec_property_naming (bool): if True these values came from the + server, and we use the data types in our endpoints. + If False, we are client side and we need to include + oneOf and discriminator classes inside the data types in our endpoints + + Returns: + (valid_classes, dict_valid_class_to_child_types_mixed): + valid_classes (tuple): the valid classes that the current item + should be + dict_valid_class_to_child_types_mixed (dict): + valid_class (class): this is the key + child_types_mixed (list/dict/tuple): describes the valid child + types + """ + valid_classes = [] + child_req_types_by_current_type = {} + for required_type in required_types_mixed: + if isinstance(required_type, list): + valid_classes.append(list) + child_req_types_by_current_type[list] = required_type + elif isinstance(required_type, tuple): + valid_classes.append(tuple) + child_req_types_by_current_type[tuple] = required_type + elif isinstance(required_type, dict): + valid_classes.append(dict) + child_req_types_by_current_type[dict] = required_type[str] + else: + valid_classes.extend(get_possible_classes(required_type, spec_property_naming)) + return tuple(valid_classes), child_req_types_by_current_type + + +def change_keys_js_to_python(input_dict, model_class): + """ + Converts from javascript_key keys in the input_dict to python_keys in + the output dict using the mapping in model_class. + If the input_dict contains a key which does not declared in the model_class, + the key is added to the output dict as is. The assumption is the model_class + may have undeclared properties (additionalProperties attribute in the OAS + document). + """ + + if getattr(model_class, 'attribute_map', None) is None: + return input_dict + output_dict = {} + reversed_attr_map = {value: key for key, value in + model_class.attribute_map.items()} + for javascript_key, value in input_dict.items(): + python_key = reversed_attr_map.get(javascript_key) + if python_key is None: + # if the key is unknown, it is in error or it is an + # additionalProperties variable + python_key = javascript_key + output_dict[python_key] = value + return output_dict + + +def get_type_error(var_value, path_to_item, valid_classes, key_type=False): + error_msg = type_error_message( + var_name=path_to_item[-1], + var_value=var_value, + valid_classes=valid_classes, + key_type=key_type + ) + return ApiTypeError( + error_msg, + path_to_item=path_to_item, + valid_classes=valid_classes, + key_type=key_type + ) + + +def deserialize_primitive(data, klass, path_to_item): + """Deserializes string to primitive type. + + :param data: str/int/float + :param klass: str/class the class to convert to + + :return: int, float, str, bool, date, datetime + """ + additional_message = "" + try: + if klass in {datetime, date}: + additional_message = ( + "If you need your parameter to have a fallback " + "string value, please set its type as `type: {}` in your " + "spec. That allows the value to be any type. " + ) + if klass == datetime: + if len(data) < 8: + raise ValueError("This is not a datetime") + # The string should be in iso8601 datetime format. + parsed_datetime = parse(data) + date_only = ( + parsed_datetime.hour == 0 and + parsed_datetime.minute == 0 and + parsed_datetime.second == 0 and + parsed_datetime.tzinfo is None and + 8 <= len(data) <= 10 + ) + if date_only: + raise ValueError("This is a date, not a datetime") + return parsed_datetime + elif klass == date: + if len(data) < 8: + raise ValueError("This is not a date") + return parse(data).date() + else: + converted_value = klass(data) + if isinstance(data, str) and klass == float: + if str(converted_value) != data: + # '7' -> 7.0 -> '7.0' != '7' + raise ValueError('This is not a float') + return converted_value + except (OverflowError, ValueError) as ex: + # parse can raise OverflowError + raise ApiValueError( + "{0}Failed to parse {1} as {2}".format( + additional_message, repr(data), klass.__name__ + ), + path_to_item=path_to_item + ) from ex + + +def get_discriminator_class(model_class, + discr_name, + discr_value, cls_visited): + """Returns the child class specified by the discriminator. + + Args: + model_class (OpenApiModel): the model class. + discr_name (string): the name of the discriminator property. + discr_value (any): the discriminator value. + cls_visited (list): list of model classes that have been visited. + Used to determine the discriminator class without + visiting circular references indefinitely. + + Returns: + used_model_class (class/None): the chosen child class that will be used + to deserialize the data, for example dog.Dog. + If a class is not found, None is returned. + """ + + if model_class in cls_visited: + # The class has already been visited and no suitable class was found. + return None + cls_visited.append(model_class) + used_model_class = None + if discr_name in model_class.discriminator: + class_name_to_discr_class = model_class.discriminator[discr_name] + used_model_class = class_name_to_discr_class.get(discr_value) + if used_model_class is None: + # We didn't find a discriminated class in class_name_to_discr_class. + # So look in the ancestor or descendant discriminators + # The discriminator mapping may exist in a descendant (anyOf, oneOf) + # or ancestor (allOf). + # Ancestor example: in the GrandparentAnimal -> ParentPet -> ChildCat + # hierarchy, the discriminator mappings may be defined at any level + # in the hierarchy. + # Descendant example: mammal -> whale/zebra/Pig -> BasquePig/DanishPig + # if we try to make BasquePig from mammal, we need to travel through + # the oneOf descendant discriminators to find BasquePig + descendant_classes = model_class._composed_schemas.get('oneOf', ()) + \ + model_class._composed_schemas.get('anyOf', ()) + ancestor_classes = model_class._composed_schemas.get('allOf', ()) + possible_classes = descendant_classes + ancestor_classes + for cls in possible_classes: + # Check if the schema has inherited discriminators. + if hasattr(cls, 'discriminator') and cls.discriminator is not None: + used_model_class = get_discriminator_class( + cls, discr_name, discr_value, cls_visited) + if used_model_class is not None: + return used_model_class + return used_model_class + + +def deserialize_model(model_data, model_class, path_to_item, check_type, + configuration, spec_property_naming): + """Deserializes model_data to model instance. + + Args: + model_data (int/str/float/bool/none_type/list/dict): data to instantiate the model + model_class (OpenApiModel): the model class + path_to_item (list): path to the model in the received data + check_type (bool): whether to check the data tupe for the values in + the model + configuration (Configuration): the instance to use to convert files + spec_property_naming (bool): True if the variable names in the input + data are serialized names as specified in the OpenAPI document. + False if the variables names in the input data are python + variable names in PEP-8 snake case. + + Returns: + model instance + + Raise: + ApiTypeError + ApiValueError + ApiKeyError + """ + + kw_args = dict(_check_type=check_type, + _path_to_item=path_to_item, + _configuration=configuration, + _spec_property_naming=spec_property_naming) + + if issubclass(model_class, ModelSimple): + return model_class._new_from_openapi_data(model_data, **kw_args) + elif isinstance(model_data, list): + return model_class._new_from_openapi_data(*model_data, **kw_args) + if isinstance(model_data, dict): + kw_args.update(model_data) + return model_class._new_from_openapi_data(**kw_args) + elif isinstance(model_data, PRIMITIVE_TYPES): + return model_class._new_from_openapi_data(model_data, **kw_args) + + +def deserialize_file(response_data, configuration, content_disposition=None): + """Deserializes body to file + + Saves response body into a file in a temporary folder, + using the filename from the `Content-Disposition` header if provided. + + Args: + param response_data (str): the file data to write + configuration (Configuration): the instance to use to convert files + + Keyword Args: + content_disposition (str): the value of the Content-Disposition + header + + Returns: + (file_type): the deserialized file which is open + The user is responsible for closing and reading the file + """ + fd, path = tempfile.mkstemp(dir=configuration.temp_folder_path) + os.close(fd) + os.remove(path) + + if content_disposition: + filename = re.search(r'filename=[\'"]?([^\'"\s]+)[\'"]?', + content_disposition, + flags=re.I) + if filename is not None: + filename = filename.group(1) + else: + filename = "default_" + str(uuid.uuid4()) + + path = os.path.join(os.path.dirname(path), filename) + + with open(path, "wb") as f: + if isinstance(response_data, str): + # change str to bytes so we can write it + response_data = response_data.encode('utf-8') + f.write(response_data) + + f = open(path, "rb") + return f + + +def attempt_convert_item(input_value, valid_classes, path_to_item, + configuration, spec_property_naming, key_type=False, + must_convert=False, check_type=True): + """ + Args: + input_value (any): the data to convert + valid_classes (any): the classes that are valid + path_to_item (list): the path to the item to convert + configuration (Configuration): the instance to use to convert files + spec_property_naming (bool): True if the variable names in the input + data are serialized names as specified in the OpenAPI document. + False if the variables names in the input data are python + variable names in PEP-8 snake case. + key_type (bool): if True we need to convert a key type (not supported) + must_convert (bool): if True we must convert + check_type (bool): if True we check the type or the returned data in + ModelComposed/ModelNormal/ModelSimple instances + + Returns: + instance (any) the fixed item + + Raises: + ApiTypeError + ApiValueError + ApiKeyError + """ + valid_classes_ordered = order_response_types(valid_classes) + valid_classes_coercible = remove_uncoercible( + valid_classes_ordered, input_value, spec_property_naming) + if not valid_classes_coercible or key_type: + # we do not handle keytype errors, json will take care + # of this for us + if configuration is None or not configuration.discard_unknown_keys: + raise get_type_error(input_value, path_to_item, valid_classes, + key_type=key_type) + for valid_class in valid_classes_coercible: + try: + if issubclass(valid_class, OpenApiModel): + return deserialize_model(input_value, valid_class, + path_to_item, check_type, + configuration, spec_property_naming) + elif valid_class == file_type: + return deserialize_file(input_value, configuration) + return deserialize_primitive(input_value, valid_class, + path_to_item) + except (ApiTypeError, ApiValueError, ApiKeyError) as conversion_exc: + if must_convert: + raise conversion_exc + # if we have conversion errors when must_convert == False + # we ignore the exception and move on to the next class + continue + # we were unable to convert, must_convert == False + return input_value + + +def is_type_nullable(input_type): + """ + Returns true if None is an allowed value for the specified input_type. + + A type is nullable if at least one of the following conditions is true: + 1. The OAS 'nullable' attribute has been specified, + 1. The type is the 'null' type, + 1. The type is a anyOf/oneOf composed schema, and a child schema is + the 'null' type. + Args: + input_type (type): the class of the input_value that we are + checking + Returns: + bool + """ + if input_type is none_type: + return True + if issubclass(input_type, OpenApiModel) and input_type._nullable: + return True + if issubclass(input_type, ModelComposed): + # If oneOf/anyOf, check if the 'null' type is one of the allowed types. + for t in input_type._composed_schemas.get('oneOf', ()): + if is_type_nullable(t): + return True + for t in input_type._composed_schemas.get('anyOf', ()): + if is_type_nullable(t): + return True + return False + + +def is_valid_type(input_class_simple, valid_classes): + """ + Args: + input_class_simple (class): the class of the input_value that we are + checking + valid_classes (tuple): the valid classes that the current item + should be + Returns: + bool + """ + if issubclass(input_class_simple, OpenApiModel) and \ + valid_classes == (bool, date, datetime, dict, float, int, list, str, none_type,): + return True + valid_type = input_class_simple in valid_classes + if not valid_type and ( + issubclass(input_class_simple, OpenApiModel) or + input_class_simple is none_type): + for valid_class in valid_classes: + if input_class_simple is none_type and is_type_nullable(valid_class): + # Schema is oneOf/anyOf and the 'null' type is one of the allowed types. + return True + if not (issubclass(valid_class, OpenApiModel) and valid_class.discriminator): + continue + discr_propertyname_py = list(valid_class.discriminator.keys())[0] + discriminator_classes = ( + valid_class.discriminator[discr_propertyname_py].values() + ) + valid_type = is_valid_type(input_class_simple, discriminator_classes) + if valid_type: + return True + return valid_type + + +def validate_and_convert_types(input_value, required_types_mixed, path_to_item, + spec_property_naming, _check_type, configuration=None): + """Raises a TypeError is there is a problem, otherwise returns value + + Args: + input_value (any): the data to validate/convert + required_types_mixed (list/dict/tuple): A list of + valid classes, or a list tuples of valid classes, or a dict where + the value is a tuple of value classes + path_to_item: (list) the path to the data being validated + this stores a list of keys or indices to get to the data being + validated + spec_property_naming (bool): True if the variable names in the input + data are serialized names as specified in the OpenAPI document. + False if the variables names in the input data are python + variable names in PEP-8 snake case. + _check_type: (boolean) if true, type will be checked and conversion + will be attempted. + configuration: (Configuration): the configuration class to use + when converting file_type items. + If passed, conversion will be attempted when possible + If not passed, no conversions will be attempted and + exceptions will be raised + + Returns: + the correctly typed value + + Raises: + ApiTypeError + """ + results = get_required_type_classes(required_types_mixed, spec_property_naming) + valid_classes, child_req_types_by_current_type = results + + input_class_simple = get_simple_class(input_value) + valid_type = is_valid_type(input_class_simple, valid_classes) + if not valid_type: + if (configuration + or (input_class_simple == dict + and dict not in valid_classes)): + # if input_value is not valid_type try to convert it + converted_instance = attempt_convert_item( + input_value, + valid_classes, + path_to_item, + configuration, + spec_property_naming, + key_type=False, + must_convert=True, + check_type=_check_type + ) + return converted_instance + else: + raise get_type_error(input_value, path_to_item, valid_classes, + key_type=False) + + # input_value's type is in valid_classes + if len(valid_classes) > 1 and configuration: + # there are valid classes which are not the current class + valid_classes_coercible = remove_uncoercible( + valid_classes, input_value, spec_property_naming, must_convert=False) + if valid_classes_coercible: + converted_instance = attempt_convert_item( + input_value, + valid_classes_coercible, + path_to_item, + configuration, + spec_property_naming, + key_type=False, + must_convert=False, + check_type=_check_type + ) + return converted_instance + + if child_req_types_by_current_type == {}: + # all types are of the required types and there are no more inner + # variables left to look at + return input_value + inner_required_types = child_req_types_by_current_type.get( + type(input_value) + ) + if inner_required_types is None: + # for this type, there are not more inner variables left to look at + return input_value + if isinstance(input_value, list): + if input_value == []: + # allow an empty list + return input_value + for index, inner_value in enumerate(input_value): + inner_path = list(path_to_item) + inner_path.append(index) + input_value[index] = validate_and_convert_types( + inner_value, + inner_required_types, + inner_path, + spec_property_naming, + _check_type, + configuration=configuration + ) + elif isinstance(input_value, dict): + if input_value == {}: + # allow an empty dict + return input_value + for inner_key, inner_val in input_value.items(): + inner_path = list(path_to_item) + inner_path.append(inner_key) + if get_simple_class(inner_key) != str: + raise get_type_error(inner_key, inner_path, valid_classes, + key_type=True) + input_value[inner_key] = validate_and_convert_types( + inner_val, + inner_required_types, + inner_path, + spec_property_naming, + _check_type, + configuration=configuration + ) + return input_value + + +def model_to_dict(model_instance, serialize=True): + """Returns the model properties as a dict + + Args: + model_instance (one of your model instances): the model instance that + will be converted to a dict. + + Keyword Args: + serialize (bool): if True, the keys in the dict will be values from + attribute_map + """ + result = {} + + def extract_item(item): return ( + item[0], model_to_dict( + item[1], serialize=serialize)) if hasattr( + item[1], '_data_store') else item + + model_instances = [model_instance] + if model_instance._composed_schemas: + model_instances.extend(model_instance._composed_instances) + seen_json_attribute_names = set() + used_fallback_python_attribute_names = set() + py_to_json_map = {} + for model_instance in model_instances: + for attr, value in model_instance._data_store.items(): + if serialize: + # we use get here because additional property key names do not + # exist in attribute_map + try: + attr = model_instance.attribute_map[attr] + py_to_json_map.update(model_instance.attribute_map) + seen_json_attribute_names.add(attr) + except KeyError: + used_fallback_python_attribute_names.add(attr) + if isinstance(value, list): + if not value: + # empty list or None + result[attr] = value + else: + res = [] + for v in value: + if isinstance(v, PRIMITIVE_TYPES) or v is None: + res.append(v) + elif isinstance(v, ModelSimple): + res.append(v.value) + elif isinstance(v, dict): + res.append(dict(map( + extract_item, + v.items() + ))) + else: + res.append(model_to_dict(v, serialize=serialize)) + result[attr] = res + elif isinstance(value, dict): + result[attr] = dict(map( + extract_item, + value.items() + )) + elif isinstance(value, ModelSimple): + result[attr] = value.value + elif hasattr(value, '_data_store'): + result[attr] = model_to_dict(value, serialize=serialize) + else: + result[attr] = value + if serialize: + for python_key in used_fallback_python_attribute_names: + json_key = py_to_json_map.get(python_key) + if json_key is None: + continue + if python_key == json_key: + continue + json_key_assigned_no_need_for_python_key = json_key in seen_json_attribute_names + if json_key_assigned_no_need_for_python_key: + del result[python_key] + + return result + + +def type_error_message(var_value=None, var_name=None, valid_classes=None, + key_type=None): + """ + Keyword Args: + var_value (any): the variable which has the type_error + var_name (str): the name of the variable which has the typ error + valid_classes (tuple): the accepted classes for current_item's + value + key_type (bool): False if our value is a value in a dict + True if it is a key in a dict + False if our item is an item in a list + """ + key_or_value = 'value' + if key_type: + key_or_value = 'key' + valid_classes_phrase = get_valid_classes_phrase(valid_classes) + msg = ( + "Invalid type for variable '{0}'. Required {1} type {2} and " + "passed type was {3}".format( + var_name, + key_or_value, + valid_classes_phrase, + type(var_value).__name__, + ) + ) + return msg + + +def get_valid_classes_phrase(input_classes): + """Returns a string phrase describing what types are allowed + """ + all_classes = list(input_classes) + all_classes = sorted(all_classes, key=lambda cls: cls.__name__) + all_class_names = [cls.__name__ for cls in all_classes] + if len(all_class_names) == 1: + return 'is {0}'.format(all_class_names[0]) + return "is one of [{0}]".format(", ".join(all_class_names)) + + +def get_allof_instances(self, model_args, constant_args): + """ + Args: + self: the class we are handling + model_args (dict): var_name to var_value + used to make instances + constant_args (dict): + metadata arguments: + _check_type + _path_to_item + _spec_property_naming + _configuration + _visited_composed_classes + + Returns + composed_instances (list) + """ + composed_instances = [] + for allof_class in self._composed_schemas['allOf']: + + try: + if constant_args.get('_spec_property_naming'): + allof_instance = allof_class._from_openapi_data(**model_args, **constant_args) + else: + allof_instance = allof_class(**model_args, **constant_args) + composed_instances.append(allof_instance) + except Exception as ex: + raise ApiValueError( + "Invalid inputs given to generate an instance of '%s'. The " + "input data was invalid for the allOf schema '%s' in the composed " + "schema '%s'. Error=%s" % ( + allof_class.__name__, + allof_class.__name__, + self.__class__.__name__, + str(ex) + ) + ) from ex + return composed_instances + + +def get_oneof_instance(cls, model_kwargs, constant_kwargs, model_arg=None): + """ + Find the oneOf schema that matches the input data (e.g. payload). + If exactly one schema matches the input data, an instance of that schema + is returned. + If zero or more than one schema match the input data, an exception is raised. + In OAS 3.x, the payload MUST, by validation, match exactly one of the + schemas described by oneOf. + + Args: + cls: the class we are handling + model_kwargs (dict): var_name to var_value + The input data, e.g. the payload that must match a oneOf schema + in the OpenAPI document. + constant_kwargs (dict): var_name to var_value + args that every model requires, including configuration, server + and path to item. + + Kwargs: + model_arg: (int, float, bool, str, date, datetime, ModelSimple, None): + the value to assign to a primitive class or ModelSimple class + Notes: + - this is only passed in when oneOf includes types which are not object + - None is used to suppress handling of model_arg, nullable models are handled in __new__ + + Returns + oneof_instance (instance) + """ + if len(cls._composed_schemas['oneOf']) == 0: + return None + + oneof_instances = [] + # Iterate over each oneOf schema and determine if the input data + # matches the oneOf schemas. + for oneof_class in cls._composed_schemas['oneOf']: + # The composed oneOf schema allows the 'null' type and the input data + # is the null value. This is a OAS >= 3.1 feature. + if oneof_class is none_type: + # skip none_types because we are deserializing dict data. + # none_type deserialization is handled in the __new__ method + continue + + single_value_input = allows_single_value_input(oneof_class) + + try: + if not single_value_input: + if constant_kwargs.get('_spec_property_naming'): + oneof_instance = oneof_class._from_openapi_data( + **model_kwargs, **constant_kwargs) + else: + oneof_instance = oneof_class(**model_kwargs, **constant_kwargs) + else: + if issubclass(oneof_class, ModelSimple): + if constant_kwargs.get('_spec_property_naming'): + oneof_instance = oneof_class._from_openapi_data( + model_arg, **constant_kwargs) + else: + oneof_instance = oneof_class(model_arg, **constant_kwargs) + elif oneof_class in PRIMITIVE_TYPES: + oneof_instance = validate_and_convert_types( + model_arg, + (oneof_class,), + constant_kwargs['_path_to_item'], + constant_kwargs['_spec_property_naming'], + constant_kwargs['_check_type'], + configuration=constant_kwargs['_configuration'] + ) + oneof_instances.append(oneof_instance) + except Exception: + pass + if len(oneof_instances) == 0: + raise ApiValueError( + "Invalid inputs given to generate an instance of %s. None " + "of the oneOf schemas matched the input data." % + cls.__name__ + ) + elif len(oneof_instances) > 1: + raise ApiValueError( + "Invalid inputs given to generate an instance of %s. Multiple " + "oneOf schemas matched the inputs, but a max of one is allowed." % + cls.__name__ + ) + return oneof_instances[0] + + +def get_anyof_instances(self, model_args, constant_args): + """ + Args: + self: the class we are handling + model_args (dict): var_name to var_value + The input data, e.g. the payload that must match at least one + anyOf child schema in the OpenAPI document. + constant_args (dict): var_name to var_value + args that every model requires, including configuration, server + and path to item. + + Returns + anyof_instances (list) + """ + anyof_instances = [] + if len(self._composed_schemas['anyOf']) == 0: + return anyof_instances + + for anyof_class in self._composed_schemas['anyOf']: + # The composed oneOf schema allows the 'null' type and the input data + # is the null value. This is a OAS >= 3.1 feature. + if anyof_class is none_type: + # skip none_types because we are deserializing dict data. + # none_type deserialization is handled in the __new__ method + continue + + try: + if constant_args.get('_spec_property_naming'): + anyof_instance = anyof_class._from_openapi_data(**model_args, **constant_args) + else: + anyof_instance = anyof_class(**model_args, **constant_args) + anyof_instances.append(anyof_instance) + except Exception: + pass + if len(anyof_instances) == 0: + raise ApiValueError( + "Invalid inputs given to generate an instance of %s. None of the " + "anyOf schemas matched the inputs." % + self.__class__.__name__ + ) + return anyof_instances + + +def get_discarded_args(self, composed_instances, model_args): + """ + Gathers the args that were discarded by configuration.discard_unknown_keys + """ + model_arg_keys = model_args.keys() + discarded_args = set() + # arguments passed to self were already converted to python names + # before __init__ was called + for instance in composed_instances: + if instance.__class__ in self._composed_schemas['allOf']: + try: + keys = instance.to_dict().keys() + discarded_keys = model_args - keys + discarded_args.update(discarded_keys) + except Exception: + # allOf integer schema will throw exception + pass + else: + try: + all_keys = set(model_to_dict(instance, serialize=False).keys()) + js_keys = model_to_dict(instance, serialize=True).keys() + all_keys.update(js_keys) + discarded_keys = model_arg_keys - all_keys + discarded_args.update(discarded_keys) + except Exception: + # allOf integer schema will throw exception + pass + return discarded_args + + +def validate_get_composed_info(constant_args, model_args, self): + """ + For composed schemas, generate schema instances for + all schemas in the oneOf/anyOf/allOf definition. If additional + properties are allowed, also assign those properties on + all matched schemas that contain additionalProperties. + Openapi schemas are python classes. + + Exceptions are raised if: + - 0 or > 1 oneOf schema matches the model_args input data + - no anyOf schema matches the model_args input data + - any of the allOf schemas do not match the model_args input data + + Args: + constant_args (dict): these are the args that every model requires + model_args (dict): these are the required and optional spec args that + were passed in to make this model + self (class): the class that we are instantiating + This class contains self._composed_schemas + + Returns: + composed_info (list): length three + composed_instances (list): the composed instances which are not + self + var_name_to_model_instances (dict): a dict going from var_name + to the model_instance which holds that var_name + the model_instance may be self or an instance of one of the + classes in self.composed_instances() + additional_properties_model_instances (list): a list of the + model instances which have the property + additional_properties_type. This list can include self + """ + # create composed_instances + composed_instances = [] + allof_instances = get_allof_instances(self, model_args, constant_args) + composed_instances.extend(allof_instances) + oneof_instance = get_oneof_instance(self.__class__, model_args, constant_args) + if oneof_instance is not None: + composed_instances.append(oneof_instance) + anyof_instances = get_anyof_instances(self, model_args, constant_args) + composed_instances.extend(anyof_instances) + """ + set additional_properties_model_instances + additional properties must be evaluated at the schema level + so self's additional properties are most important + If self is a composed schema with: + - no properties defined in self + - additionalProperties: False + Then for object payloads every property is an additional property + and they are not allowed, so only empty dict is allowed + + Properties must be set on all matching schemas + so when a property is assigned toa composed instance, it must be set on all + composed instances regardless of additionalProperties presence + keeping it to prevent breaking changes in v5.0.1 + TODO remove cls._additional_properties_model_instances in 6.0.0 + """ + additional_properties_model_instances = [] + if self.additional_properties_type is not None: + additional_properties_model_instances = [self] + + """ + no need to set properties on self in here, they will be set in __init__ + By here all composed schema oneOf/anyOf/allOf instances have their properties set using + model_args + """ + discarded_args = get_discarded_args(self, composed_instances, model_args) + + # map variable names to composed_instances + var_name_to_model_instances = {} + for prop_name in model_args: + if prop_name not in discarded_args: + var_name_to_model_instances[prop_name] = [self] + list( + filter( + lambda x: prop_name in x.openapi_types, composed_instances)) + + return [ + composed_instances, + var_name_to_model_instances, + additional_properties_model_instances, + discarded_args + ] diff --git a/Monei/models/__init__.py b/Monei/models/__init__.py index a3288a1..3e176b8 100644 --- a/Monei/models/__init__.py +++ b/Monei/models/__init__.py @@ -1,97 +1,101 @@ -# coding: utf-8 - # flake8: noqa -""" - MONEI API v1 - -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

- - The version of the OpenAPI document: 1.5.1 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 +# import all models into this package +# if you have many models here with many references from one model to another this may +# raise a RecursionError +# to avoid this, import only the models that you directly need like: +# from from Monei.model.pet import Pet +# or import this package, but before doing it, use: +# import sys +# sys.setrecursionlimit(n) -# import models into model package -from Monei.models.activate_subscription_request import ActivateSubscriptionRequest -from Monei.models.address import Address -from Monei.models.apple_pay_domain_register200_response import ApplePayDomainRegister200Response -from Monei.models.bizum_validate_phone200_response import BizumValidatePhone200Response -from Monei.models.cancel_payment_request import CancelPaymentRequest -from Monei.models.cancel_subscription_request import CancelSubscriptionRequest -from Monei.models.capture_payment_request import CapturePaymentRequest -from Monei.models.confirm_payment_request import ConfirmPaymentRequest -from Monei.models.confirm_payment_request_payment_method import ConfirmPaymentRequestPaymentMethod -from Monei.models.confirm_payment_request_payment_method_card import ConfirmPaymentRequestPaymentMethodCard -from Monei.models.create_payment_request import CreatePaymentRequest -from Monei.models.create_subscription_request import CreateSubscriptionRequest -from Monei.models.error import Error -from Monei.models.pause_subscription_request import PauseSubscriptionRequest -from Monei.models.payment import Payment -from Monei.models.payment_billing_details import PaymentBillingDetails -from Monei.models.payment_cancellation_reason import PaymentCancellationReason -from Monei.models.payment_customer import PaymentCustomer -from Monei.models.payment_last_refund_reason import PaymentLastRefundReason -from Monei.models.payment_message_channel import PaymentMessageChannel -from Monei.models.payment_message_language import PaymentMessageLanguage -from Monei.models.payment_methods import PaymentMethods -from Monei.models.payment_methods_metadata import PaymentMethodsMetadata -from Monei.models.payment_methods_metadata_alipay import PaymentMethodsMetadataAlipay -from Monei.models.payment_methods_metadata_apple_pay import PaymentMethodsMetadataApplePay -from Monei.models.payment_methods_metadata_bancontact import PaymentMethodsMetadataBancontact -from Monei.models.payment_methods_metadata_bizum import PaymentMethodsMetadataBizum -from Monei.models.payment_methods_metadata_blik import PaymentMethodsMetadataBlik -from Monei.models.payment_methods_metadata_card import PaymentMethodsMetadataCard -from Monei.models.payment_methods_metadata_click_to_pay import PaymentMethodsMetadataClickToPay -from Monei.models.payment_methods_metadata_click_to_pay_discover import PaymentMethodsMetadataClickToPayDiscover -from Monei.models.payment_methods_metadata_click_to_pay_mastercard import PaymentMethodsMetadataClickToPayMastercard -from Monei.models.payment_methods_metadata_click_to_pay_visa import PaymentMethodsMetadataClickToPayVisa -from Monei.models.payment_methods_metadata_eps import PaymentMethodsMetadataEps -from Monei.models.payment_methods_metadata_giropay import PaymentMethodsMetadataGiropay -from Monei.models.payment_methods_metadata_google_pay import PaymentMethodsMetadataGooglePay -from Monei.models.payment_methods_metadata_i_deal import PaymentMethodsMetadataIDeal -from Monei.models.payment_methods_metadata_klarna import PaymentMethodsMetadataKlarna -from Monei.models.payment_methods_metadata_mbway import PaymentMethodsMetadataMbway -from Monei.models.payment_methods_metadata_sepa import PaymentMethodsMetadataSepa -from Monei.models.payment_methods_metadata_sofort import PaymentMethodsMetadataSofort -from Monei.models.payment_methods_metadata_trustly import PaymentMethodsMetadataTrustly -from Monei.models.payment_next_action import PaymentNextAction -from Monei.models.payment_payment_method import PaymentPaymentMethod -from Monei.models.payment_payment_method_bizum import PaymentPaymentMethodBizum -from Monei.models.payment_payment_method_bizum_input import PaymentPaymentMethodBizumInput -from Monei.models.payment_payment_method_card import PaymentPaymentMethodCard -from Monei.models.payment_payment_method_card_input import PaymentPaymentMethodCardInput -from Monei.models.payment_payment_method_cofidis import PaymentPaymentMethodCofidis -from Monei.models.payment_payment_method_input import PaymentPaymentMethodInput -from Monei.models.payment_payment_method_klarna import PaymentPaymentMethodKlarna -from Monei.models.payment_payment_method_mbway import PaymentPaymentMethodMbway -from Monei.models.payment_payment_method_paypal import PaymentPaymentMethodPaypal -from Monei.models.payment_payment_method_sepa import PaymentPaymentMethodSepa -from Monei.models.payment_payment_method_trustly import PaymentPaymentMethodTrustly -from Monei.models.payment_refund_reason import PaymentRefundReason -from Monei.models.payment_sequence import PaymentSequence -from Monei.models.payment_sequence_recurring import PaymentSequenceRecurring -from Monei.models.payment_session_details import PaymentSessionDetails -from Monei.models.payment_shipping_details import PaymentShippingDetails -from Monei.models.payment_shop import PaymentShop -from Monei.models.payment_status import PaymentStatus -from Monei.models.payment_trace_details import PaymentTraceDetails -from Monei.models.payment_transaction_type import PaymentTransactionType -from Monei.models.recurring_payment_request import RecurringPaymentRequest -from Monei.models.refund_payment_request import RefundPaymentRequest -from Monei.models.register_apple_pay_domain_request import RegisterApplePayDomainRequest -from Monei.models.send_payment_link_request import SendPaymentLinkRequest -from Monei.models.send_payment_receipt_request import SendPaymentReceiptRequest -from Monei.models.send_payment_request_request import SendPaymentRequestRequest -from Monei.models.send_subscription_link_request import SendSubscriptionLinkRequest -from Monei.models.send_subscription_status_request import SendSubscriptionStatusRequest -from Monei.models.subscription import Subscription -from Monei.models.subscription_interval import SubscriptionInterval -from Monei.models.subscription_last_payment import SubscriptionLastPayment -from Monei.models.subscription_payment_method import SubscriptionPaymentMethod -from Monei.models.subscription_payment_method_card import SubscriptionPaymentMethodCard -from Monei.models.subscription_retry_schedule_inner import SubscriptionRetryScheduleInner -from Monei.models.subscription_status import SubscriptionStatus -from Monei.models.update_subscription_request import UpdateSubscriptionRequest -from Monei.models.validate_bizum_phone_request import ValidateBizumPhoneRequest +from Monei.model.activate_subscription_request import ActivateSubscriptionRequest +from Monei.model.address import Address +from Monei.model.apple_pay_domain_register200_response import ApplePayDomainRegister200Response +from Monei.model.apple_pay_domain_register400_response import ApplePayDomainRegister400Response +from Monei.model.apple_pay_domain_register401_response import ApplePayDomainRegister401Response +from Monei.model.apple_pay_domain_register404_response import ApplePayDomainRegister404Response +from Monei.model.apple_pay_domain_register422_response import ApplePayDomainRegister422Response +from Monei.model.apple_pay_domain_register500_response import ApplePayDomainRegister500Response +from Monei.model.apple_pay_domain_register503_response import ApplePayDomainRegister503Response +from Monei.model.bizum_validate_phone200_response import BizumValidatePhone200Response +from Monei.model.cancel_payment_request import CancelPaymentRequest +from Monei.model.cancel_subscription_request import CancelSubscriptionRequest +from Monei.model.capture_payment_request import CapturePaymentRequest +from Monei.model.confirm_payment_request import ConfirmPaymentRequest +from Monei.model.confirm_payment_request_payment_method import ConfirmPaymentRequestPaymentMethod +from Monei.model.confirm_payment_request_payment_method_card import ConfirmPaymentRequestPaymentMethodCard +from Monei.model.create_payment_request import CreatePaymentRequest +from Monei.model.create_subscription_request import CreateSubscriptionRequest +from Monei.model.error import Error +from Monei.model.pause_subscription_request import PauseSubscriptionRequest +from Monei.model.payment import Payment +from Monei.model.payment_billing_details import PaymentBillingDetails +from Monei.model.payment_cancellation_reason import PaymentCancellationReason +from Monei.model.payment_customer import PaymentCustomer +from Monei.model.payment_last_refund_reason import PaymentLastRefundReason +from Monei.model.payment_message_channel import PaymentMessageChannel +from Monei.model.payment_message_language import PaymentMessageLanguage +from Monei.model.payment_methods import PaymentMethods +from Monei.model.payment_methods_metadata import PaymentMethodsMetadata +from Monei.model.payment_methods_metadata_alipay import PaymentMethodsMetadataAlipay +from Monei.model.payment_methods_metadata_apple_pay import PaymentMethodsMetadataApplePay +from Monei.model.payment_methods_metadata_bancontact import PaymentMethodsMetadataBancontact +from Monei.model.payment_methods_metadata_bizum import PaymentMethodsMetadataBizum +from Monei.model.payment_methods_metadata_blik import PaymentMethodsMetadataBlik +from Monei.model.payment_methods_metadata_card import PaymentMethodsMetadataCard +from Monei.model.payment_methods_metadata_click_to_pay import PaymentMethodsMetadataClickToPay +from Monei.model.payment_methods_metadata_click_to_pay_discover import PaymentMethodsMetadataClickToPayDiscover +from Monei.model.payment_methods_metadata_click_to_pay_mastercard import PaymentMethodsMetadataClickToPayMastercard +from Monei.model.payment_methods_metadata_click_to_pay_visa import PaymentMethodsMetadataClickToPayVisa +from Monei.model.payment_methods_metadata_eps import PaymentMethodsMetadataEps +from Monei.model.payment_methods_metadata_giropay import PaymentMethodsMetadataGiropay +from Monei.model.payment_methods_metadata_google_pay import PaymentMethodsMetadataGooglePay +from Monei.model.payment_methods_metadata_i_deal import PaymentMethodsMetadataIDeal +from Monei.model.payment_methods_metadata_klarna import PaymentMethodsMetadataKlarna +from Monei.model.payment_methods_metadata_mbway import PaymentMethodsMetadataMbway +from Monei.model.payment_methods_metadata_sepa import PaymentMethodsMetadataSepa +from Monei.model.payment_methods_metadata_sofort import PaymentMethodsMetadataSofort +from Monei.model.payment_methods_metadata_trustly import PaymentMethodsMetadataTrustly +from Monei.model.payment_methods_methods import PaymentMethodsMethods +from Monei.model.payment_next_action import PaymentNextAction +from Monei.model.payment_payment_method import PaymentPaymentMethod +from Monei.model.payment_payment_method_bizum import PaymentPaymentMethodBizum +from Monei.model.payment_payment_method_bizum_input import PaymentPaymentMethodBizumInput +from Monei.model.payment_payment_method_card import PaymentPaymentMethodCard +from Monei.model.payment_payment_method_card_input import PaymentPaymentMethodCardInput +from Monei.model.payment_payment_method_cofidis import PaymentPaymentMethodCofidis +from Monei.model.payment_payment_method_input import PaymentPaymentMethodInput +from Monei.model.payment_payment_method_klarna import PaymentPaymentMethodKlarna +from Monei.model.payment_payment_method_mbway import PaymentPaymentMethodMbway +from Monei.model.payment_payment_method_paypal import PaymentPaymentMethodPaypal +from Monei.model.payment_payment_method_sepa import PaymentPaymentMethodSepa +from Monei.model.payment_payment_method_trustly import PaymentPaymentMethodTrustly +from Monei.model.payment_payment_methods import PaymentPaymentMethods +from Monei.model.payment_refund_reason import PaymentRefundReason +from Monei.model.payment_sequence import PaymentSequence +from Monei.model.payment_sequence_recurring import PaymentSequenceRecurring +from Monei.model.payment_session_details import PaymentSessionDetails +from Monei.model.payment_shipping_details import PaymentShippingDetails +from Monei.model.payment_shop import PaymentShop +from Monei.model.payment_status import PaymentStatus +from Monei.model.payment_trace_details import PaymentTraceDetails +from Monei.model.payment_transaction_type import PaymentTransactionType +from Monei.model.recurring_payment_request import RecurringPaymentRequest +from Monei.model.refund_payment_request import RefundPaymentRequest +from Monei.model.register_apple_pay_domain_request import RegisterApplePayDomainRequest +from Monei.model.send_payment_link_request import SendPaymentLinkRequest +from Monei.model.send_payment_receipt_request import SendPaymentReceiptRequest +from Monei.model.send_payment_request_request import SendPaymentRequestRequest +from Monei.model.send_subscription_link_request import SendSubscriptionLinkRequest +from Monei.model.send_subscription_status_request import SendSubscriptionStatusRequest +from Monei.model.subscription import Subscription +from Monei.model.subscription_interval import SubscriptionInterval +from Monei.model.subscription_last_payment import SubscriptionLastPayment +from Monei.model.subscription_payment_method import SubscriptionPaymentMethod +from Monei.model.subscription_payment_method_card import SubscriptionPaymentMethodCard +from Monei.model.subscription_retry_schedule import SubscriptionRetrySchedule +from Monei.model.subscription_retry_schedule_inner import SubscriptionRetryScheduleInner +from Monei.model.subscription_status import SubscriptionStatus +from Monei.model.update_subscription_request import UpdateSubscriptionRequest +from Monei.model.validate_bizum_phone_request import ValidateBizumPhoneRequest diff --git a/Monei/models/activate_subscription_request.py b/Monei/models/activate_subscription_request.py deleted file mode 100644 index 2995d82..0000000 --- a/Monei/models/activate_subscription_request.py +++ /dev/null @@ -1,101 +0,0 @@ -# coding: utf-8 - -""" - MONEI API v1 - -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

- - The version of the OpenAPI document: 1.5.1 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set -from typing_extensions import Self - -class ActivateSubscriptionRequest(BaseModel): - """ - ActivateSubscriptionRequest - """ # noqa: E501 - payment_token: Optional[StrictStr] = Field(default=None, description="A payment token generated by monei.js [Components](https://docs.monei.com/docs/monei-js-overview) or a paymentToken [saved after a previous successful payment](https://docs.monei.com/docs/save-payment-method). In case of the first one, you will also need to send the `sessionId` used to generate the token in the first place. ", alias="paymentToken") - session_id: Optional[StrictStr] = Field(default=None, description="A unique identifier within your system that adds security to the payment process. You need to pass the same session ID as the one used on the frontend to initialize MONEI Component (if you needed to). This is required if a payment token (not permanent) was already generated in the frontend. ", alias="sessionId") - add_amount: Optional[StrictInt] = Field(default=None, description="The amount to be added to the subscription's initial payment. A positive integer representing how much to charge in the smallest currency unit (e.g., 100 cents to charge 1.00 USD). ", alias="addAmount") - sequence_id: Optional[StrictStr] = Field(default=None, description="A permanent identifier that refers to the initial payment of a sequence of payments. This value needs to be sent in the path for `RECURRING` payments. ", alias="sequenceId") - complete_url: Optional[StrictStr] = Field(default=None, description="The URL the customer will be directed to after transaction completed (successful or failed - except if `failUrl` is provided). ", alias="completeUrl") - fail_url: Optional[StrictStr] = Field(default=None, description="The URL the customer will be directed to after transaction has failed, instead of `completeUrl` (used in hosted payment page). This allows to provide two different URLs for successful and failed payments. ", alias="failUrl") - cancel_url: Optional[StrictStr] = Field(default=None, description="The URL the customer will be directed to if they decide to cancel payment and return to your website (used in hosted payment page). ", alias="cancelUrl") - metadata: Optional[Dict[str, Any]] = Field(default=None, description="A set of key-value pairs that you can attach to a resource. This can be useful for storing additional information about the resource in a structured format.") - __properties: ClassVar[List[str]] = ["paymentToken", "sessionId", "addAmount", "sequenceId", "completeUrl", "failUrl", "cancelUrl", "metadata"] - - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of ActivateSubscriptionRequest from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of ActivateSubscriptionRequest from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "paymentToken": obj.get("paymentToken"), - "sessionId": obj.get("sessionId"), - "addAmount": obj.get("addAmount"), - "sequenceId": obj.get("sequenceId"), - "completeUrl": obj.get("completeUrl"), - "failUrl": obj.get("failUrl"), - "cancelUrl": obj.get("cancelUrl"), - "metadata": obj.get("metadata") - }) - return _obj - - diff --git a/Monei/models/address.py b/Monei/models/address.py deleted file mode 100644 index 8408b54..0000000 --- a/Monei/models/address.py +++ /dev/null @@ -1,97 +0,0 @@ -# coding: utf-8 - -""" - MONEI API v1 - -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

- - The version of the OpenAPI document: 1.5.1 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set -from typing_extensions import Self - -class Address(BaseModel): - """ - Address - """ # noqa: E501 - country: Optional[StrictStr] = Field(default=None, description="Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).") - city: Optional[StrictStr] = Field(default=None, description="City, district, suburb, town, or village.") - line1: Optional[StrictStr] = Field(default=None, description="Address line 1 (e.g., street, PO Box, or company name).") - line2: Optional[StrictStr] = Field(default=None, description="Address line 2 (e.g., apartment, suite, unit, or building).") - zip: Optional[StrictStr] = Field(default=None, description="ZIP or postal code.") - state: Optional[StrictStr] = Field(default=None, description="State, county, province, or region.") - __properties: ClassVar[List[str]] = ["country", "city", "line1", "line2", "zip", "state"] - - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of Address from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of Address from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "country": obj.get("country"), - "city": obj.get("city"), - "line1": obj.get("line1"), - "line2": obj.get("line2"), - "zip": obj.get("zip"), - "state": obj.get("state") - }) - return _obj - - diff --git a/Monei/models/apple_pay_domain_register200_response.py b/Monei/models/apple_pay_domain_register200_response.py deleted file mode 100644 index 167dad8..0000000 --- a/Monei/models/apple_pay_domain_register200_response.py +++ /dev/null @@ -1,87 +0,0 @@ -# coding: utf-8 - -""" - MONEI API v1 - -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

- - The version of the OpenAPI document: 1.5.1 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict, StrictBool -from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set -from typing_extensions import Self - -class ApplePayDomainRegister200Response(BaseModel): - """ - ApplePayDomainRegister200Response - """ # noqa: E501 - success: Optional[StrictBool] = None - __properties: ClassVar[List[str]] = ["success"] - - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of ApplePayDomainRegister200Response from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of ApplePayDomainRegister200Response from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "success": obj.get("success") - }) - return _obj - - diff --git a/Monei/models/bizum_validate_phone200_response.py b/Monei/models/bizum_validate_phone200_response.py deleted file mode 100644 index 4031bcd..0000000 --- a/Monei/models/bizum_validate_phone200_response.py +++ /dev/null @@ -1,87 +0,0 @@ -# coding: utf-8 - -""" - MONEI API v1 - -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

- - The version of the OpenAPI document: 1.5.1 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict, Field, StrictBool -from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set -from typing_extensions import Self - -class BizumValidatePhone200Response(BaseModel): - """ - BizumValidatePhone200Response - """ # noqa: E501 - is_valid: Optional[StrictBool] = Field(default=None, alias="isValid") - __properties: ClassVar[List[str]] = ["isValid"] - - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of BizumValidatePhone200Response from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of BizumValidatePhone200Response from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "isValid": obj.get("isValid") - }) - return _obj - - diff --git a/Monei/models/cancel_payment_request.py b/Monei/models/cancel_payment_request.py deleted file mode 100644 index 8deaf63..0000000 --- a/Monei/models/cancel_payment_request.py +++ /dev/null @@ -1,88 +0,0 @@ -# coding: utf-8 - -""" - MONEI API v1 - -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

- - The version of the OpenAPI document: 1.5.1 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict, Field -from typing import Any, ClassVar, Dict, List, Optional -from Monei.models.payment_cancellation_reason import PaymentCancellationReason -from typing import Optional, Set -from typing_extensions import Self - -class CancelPaymentRequest(BaseModel): - """ - CancelPaymentRequest - """ # noqa: E501 - cancellation_reason: Optional[PaymentCancellationReason] = Field(default=None, alias="cancellationReason") - __properties: ClassVar[List[str]] = ["cancellationReason"] - - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of CancelPaymentRequest from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of CancelPaymentRequest from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "cancellationReason": obj.get("cancellationReason") - }) - return _obj - - diff --git a/Monei/models/cancel_subscription_request.py b/Monei/models/cancel_subscription_request.py deleted file mode 100644 index daa013b..0000000 --- a/Monei/models/cancel_subscription_request.py +++ /dev/null @@ -1,87 +0,0 @@ -# coding: utf-8 - -""" - MONEI API v1 - -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

- - The version of the OpenAPI document: 1.5.1 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict, Field, StrictBool -from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set -from typing_extensions import Self - -class CancelSubscriptionRequest(BaseModel): - """ - CancelSubscriptionRequest - """ # noqa: E501 - cancel_at_period_end: Optional[StrictBool] = Field(default=None, description="If true, the subscription will be canceled at the end of the current period. ", alias="cancelAtPeriodEnd") - __properties: ClassVar[List[str]] = ["cancelAtPeriodEnd"] - - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of CancelSubscriptionRequest from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of CancelSubscriptionRequest from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "cancelAtPeriodEnd": obj.get("cancelAtPeriodEnd") - }) - return _obj - - diff --git a/Monei/models/capture_payment_request.py b/Monei/models/capture_payment_request.py deleted file mode 100644 index 17a8688..0000000 --- a/Monei/models/capture_payment_request.py +++ /dev/null @@ -1,87 +0,0 @@ -# coding: utf-8 - -""" - MONEI API v1 - -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

- - The version of the OpenAPI document: 1.5.1 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict, Field, StrictInt -from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set -from typing_extensions import Self - -class CapturePaymentRequest(BaseModel): - """ - CapturePaymentRequest - """ # noqa: E501 - amount: Optional[StrictInt] = Field(default=None, description="The amount to capture, which must be less than or equal to the original amount. Any additional amount will be automatically refunded. ") - __properties: ClassVar[List[str]] = ["amount"] - - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of CapturePaymentRequest from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of CapturePaymentRequest from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "amount": obj.get("amount") - }) - return _obj - - diff --git a/Monei/models/confirm_payment_request.py b/Monei/models/confirm_payment_request.py deleted file mode 100644 index 670bbbf..0000000 --- a/Monei/models/confirm_payment_request.py +++ /dev/null @@ -1,115 +0,0 @@ -# coding: utf-8 - -""" - MONEI API v1 - -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

- - The version of the OpenAPI document: 1.5.1 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from Monei.models.confirm_payment_request_payment_method import ConfirmPaymentRequestPaymentMethod -from Monei.models.payment_billing_details import PaymentBillingDetails -from Monei.models.payment_customer import PaymentCustomer -from Monei.models.payment_shipping_details import PaymentShippingDetails -from typing import Optional, Set -from typing_extensions import Self - -class ConfirmPaymentRequest(BaseModel): - """ - ConfirmPaymentRequest - """ # noqa: E501 - payment_token: StrictStr = Field(description="A payment token generated by monei.js [Components](https://docs.monei.com/docs/monei-js-overview) or a paymentToken [saved after a previous successful payment](https://docs.monei.com/docs/save-payment-method). ", alias="paymentToken") - payment_method: Optional[ConfirmPaymentRequestPaymentMethod] = Field(default=None, alias="paymentMethod") - generate_payment_token: Optional[StrictBool] = Field(default=False, description="If set to true a permanent token that represents a payment method used in the payment will be generated. ", alias="generatePaymentToken") - customer: Optional[PaymentCustomer] = None - billing_details: Optional[PaymentBillingDetails] = Field(default=None, alias="billingDetails") - shipping_details: Optional[PaymentShippingDetails] = Field(default=None, alias="shippingDetails") - metadata: Optional[Dict[str, Any]] = Field(default=None, description="A set of key-value pairs that you can attach to a resource. This can be useful for storing additional information about the resource in a structured format.") - __properties: ClassVar[List[str]] = ["paymentToken", "paymentMethod", "generatePaymentToken", "customer", "billingDetails", "shippingDetails", "metadata"] - - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of ConfirmPaymentRequest from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of payment_method - if self.payment_method: - _dict['paymentMethod'] = self.payment_method.to_dict() - # override the default output from pydantic by calling `to_dict()` of customer - if self.customer: - _dict['customer'] = self.customer.to_dict() - # override the default output from pydantic by calling `to_dict()` of billing_details - if self.billing_details: - _dict['billingDetails'] = self.billing_details.to_dict() - # override the default output from pydantic by calling `to_dict()` of shipping_details - if self.shipping_details: - _dict['shippingDetails'] = self.shipping_details.to_dict() - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of ConfirmPaymentRequest from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "paymentToken": obj.get("paymentToken"), - "paymentMethod": ConfirmPaymentRequestPaymentMethod.from_dict(obj["paymentMethod"]) if obj.get("paymentMethod") is not None else None, - "generatePaymentToken": obj.get("generatePaymentToken") if obj.get("generatePaymentToken") is not None else False, - "customer": PaymentCustomer.from_dict(obj["customer"]) if obj.get("customer") is not None else None, - "billingDetails": PaymentBillingDetails.from_dict(obj["billingDetails"]) if obj.get("billingDetails") is not None else None, - "shippingDetails": PaymentShippingDetails.from_dict(obj["shippingDetails"]) if obj.get("shippingDetails") is not None else None, - "metadata": obj.get("metadata") - }) - return _obj - - diff --git a/Monei/models/confirm_payment_request_payment_method.py b/Monei/models/confirm_payment_request_payment_method.py deleted file mode 100644 index 9df4214..0000000 --- a/Monei/models/confirm_payment_request_payment_method.py +++ /dev/null @@ -1,91 +0,0 @@ -# coding: utf-8 - -""" - MONEI API v1 - -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

- - The version of the OpenAPI document: 1.5.1 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict -from typing import Any, ClassVar, Dict, List, Optional -from Monei.models.confirm_payment_request_payment_method_card import ConfirmPaymentRequestPaymentMethodCard -from typing import Optional, Set -from typing_extensions import Self - -class ConfirmPaymentRequestPaymentMethod(BaseModel): - """ - Additional information about the payment method used for this payment. - """ # noqa: E501 - card: Optional[ConfirmPaymentRequestPaymentMethodCard] = None - __properties: ClassVar[List[str]] = ["card"] - - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of ConfirmPaymentRequestPaymentMethod from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of card - if self.card: - _dict['card'] = self.card.to_dict() - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of ConfirmPaymentRequestPaymentMethod from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "card": ConfirmPaymentRequestPaymentMethodCard.from_dict(obj["card"]) if obj.get("card") is not None else None - }) - return _obj - - diff --git a/Monei/models/confirm_payment_request_payment_method_card.py b/Monei/models/confirm_payment_request_payment_method_card.py deleted file mode 100644 index a900caf..0000000 --- a/Monei/models/confirm_payment_request_payment_method_card.py +++ /dev/null @@ -1,89 +0,0 @@ -# coding: utf-8 - -""" - MONEI API v1 - -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

- - The version of the OpenAPI document: 1.5.1 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set -from typing_extensions import Self - -class ConfirmPaymentRequestPaymentMethodCard(BaseModel): - """ - Additional information about the card used for this payment. - """ # noqa: E501 - cardholder_name: Optional[StrictStr] = Field(default=None, description="The cardholder's name, as stated in the credit card.", alias="cardholderName") - cardholder_email: Optional[StrictStr] = Field(default=None, description="The cardholder's email address.", alias="cardholderEmail") - __properties: ClassVar[List[str]] = ["cardholderName", "cardholderEmail"] - - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of ConfirmPaymentRequestPaymentMethodCard from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of ConfirmPaymentRequestPaymentMethodCard from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "cardholderName": obj.get("cardholderName"), - "cardholderEmail": obj.get("cardholderEmail") - }) - return _obj - - diff --git a/Monei/models/create_payment_request.py b/Monei/models/create_payment_request.py deleted file mode 100644 index e1d94c3..0000000 --- a/Monei/models/create_payment_request.py +++ /dev/null @@ -1,160 +0,0 @@ -# coding: utf-8 - -""" - MONEI API v1 - -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

- - The version of the OpenAPI document: 1.5.1 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictFloat, StrictInt, StrictStr -from typing import Any, ClassVar, Dict, List, Optional, Union -from Monei.models.payment_billing_details import PaymentBillingDetails -from Monei.models.payment_customer import PaymentCustomer -from Monei.models.payment_payment_method_input import PaymentPaymentMethodInput -from Monei.models.payment_sequence import PaymentSequence -from Monei.models.payment_session_details import PaymentSessionDetails -from Monei.models.payment_shipping_details import PaymentShippingDetails -from Monei.models.payment_transaction_type import PaymentTransactionType -from typing import Optional, Set -from typing_extensions import Self - -class CreatePaymentRequest(BaseModel): - """ - CreatePaymentRequest - """ # noqa: E501 - amount: StrictInt = Field(description="Amount intended to be collected by this payment. A positive integer representing how much to charge in the smallest currency unit (e.g., 100 cents to charge 1.00 USD). ") - currency: StrictStr = Field(description="Three-letter [ISO currency code](https://en.wikipedia.org/wiki/ISO_4217), in uppercase. Must be a supported currency. ") - order_id: StrictStr = Field(description="An order ID from your system. A unique identifier that can be used to reconcile the payment with your internal system. ", alias="orderId") - callback_url: Optional[StrictStr] = Field(default=None, description="The URL to which a payment result should be sent asynchronously. ", alias="callbackUrl") - complete_url: Optional[StrictStr] = Field(default=None, description="The URL the customer will be directed to after transaction completed (successful or failed - except if `failUrl` is provided). ", alias="completeUrl") - fail_url: Optional[StrictStr] = Field(default=None, description="The URL the customer will be directed to after transaction has failed, instead of `completeUrl` (used in hosted payment page). This allows to provide two different URLs for successful and failed payments. ", alias="failUrl") - cancel_url: Optional[StrictStr] = Field(default=None, description="The URL the customer will be directed to if they decide to cancel payment and return to your website (used in hosted payment page). ", alias="cancelUrl") - payment_token: Optional[StrictStr] = Field(default=None, description="A payment token generated by monei.js [Components](https://docs.monei.com/docs/monei-js-overview) or a paymentToken [saved after a previous successful payment](https://docs.monei.com/docs/save-payment-method). In case of the first one, you will also need to send the `sessionId` used to generate the token in the first place. ", alias="paymentToken") - session_id: Optional[StrictStr] = Field(default=None, description="A unique identifier within your system that adds security to the payment process. You need to pass the same session ID as the one used on the frontend to initialize MONEI Component (if you needed to). This is required if a payment token (not permanent) was already generated in the frontend. ", alias="sessionId") - generate_payment_token: Optional[StrictBool] = Field(default=False, description="If set to true a permanent token that represents a payment method used in the payment will be generated. ", alias="generatePaymentToken") - payment_method: Optional[PaymentPaymentMethodInput] = Field(default=None, alias="paymentMethod") - allowed_payment_methods: Optional[PaymentPaymentMethods] = Field(default=None, alias="allowedPaymentMethods") - transaction_type: Optional[PaymentTransactionType] = Field(default=PaymentTransactionType.SALE, alias="transactionType") - sequence: Optional[PaymentSequence] = None - store_id: Optional[StrictStr] = Field(default=None, description="A unique identifier of the Store. If specified the payment is attached to this Store. ", alias="storeId") - point_of_sale_id: Optional[StrictStr] = Field(default=None, description="A unique identifier of the Point of Sale. If specified the payment is attached to this Point of Sale. If there is a QR code attached to the same Point of Sale, this payment will be available by scanning the QR code. ", alias="pointOfSaleId") - subscription_id: Optional[StrictStr] = Field(default=None, description="A unique identifier of the Subscription. If specified the payment is attached to this Subscription. ", alias="subscriptionId") - auto_recover: Optional[StrictBool] = Field(default=None, description="If set to `true`, the new payment will be automatically created when customer visits the payment link of the previously failed payment. Is automatically set to `true` if `completeUrl` is not provided.(set this value to `true` to create \"Pay By Link\" payments).", alias="autoRecover") - description: Optional[StrictStr] = Field(default=None, description="An arbitrary string attached to the payment. Often useful for displaying to users. ") - customer: Optional[PaymentCustomer] = None - billing_details: Optional[PaymentBillingDetails] = Field(default=None, alias="billingDetails") - shipping_details: Optional[PaymentShippingDetails] = Field(default=None, alias="shippingDetails") - session_details: Optional[PaymentSessionDetails] = Field(default=None, alias="sessionDetails") - expire_at: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Payment expiration time.", alias="expireAt") - metadata: Optional[Dict[str, Any]] = Field(default=None, description="A set of key-value pairs that you can attach to a resource. This can be useful for storing additional information about the resource in a structured format.") - __properties: ClassVar[List[str]] = ["amount", "currency", "orderId", "callbackUrl", "completeUrl", "failUrl", "cancelUrl", "paymentToken", "sessionId", "generatePaymentToken", "paymentMethod", "allowedPaymentMethods", "transactionType", "sequence", "storeId", "pointOfSaleId", "subscriptionId", "autoRecover", "description", "customer", "billingDetails", "shippingDetails", "sessionDetails", "expireAt", "metadata"] - - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of CreatePaymentRequest from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of payment_method - if self.payment_method: - _dict['paymentMethod'] = self.payment_method.to_dict() - # override the default output from pydantic by calling `to_dict()` of sequence - if self.sequence: - _dict['sequence'] = self.sequence.to_dict() - # override the default output from pydantic by calling `to_dict()` of customer - if self.customer: - _dict['customer'] = self.customer.to_dict() - # override the default output from pydantic by calling `to_dict()` of billing_details - if self.billing_details: - _dict['billingDetails'] = self.billing_details.to_dict() - # override the default output from pydantic by calling `to_dict()` of shipping_details - if self.shipping_details: - _dict['shippingDetails'] = self.shipping_details.to_dict() - # override the default output from pydantic by calling `to_dict()` of session_details - if self.session_details: - _dict['sessionDetails'] = self.session_details.to_dict() - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of CreatePaymentRequest from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "amount": obj.get("amount"), - "currency": obj.get("currency"), - "orderId": obj.get("orderId"), - "callbackUrl": obj.get("callbackUrl"), - "completeUrl": obj.get("completeUrl"), - "failUrl": obj.get("failUrl"), - "cancelUrl": obj.get("cancelUrl"), - "paymentToken": obj.get("paymentToken"), - "sessionId": obj.get("sessionId"), - "generatePaymentToken": obj.get("generatePaymentToken") if obj.get("generatePaymentToken") is not None else False, - "paymentMethod": PaymentPaymentMethodInput.from_dict(obj["paymentMethod"]) if obj.get("paymentMethod") is not None else None, - "allowedPaymentMethods": obj.get("allowedPaymentMethods"), - "transactionType": obj.get("transactionType") if obj.get("transactionType") is not None else PaymentTransactionType.SALE, - "sequence": PaymentSequence.from_dict(obj["sequence"]) if obj.get("sequence") is not None else None, - "storeId": obj.get("storeId"), - "pointOfSaleId": obj.get("pointOfSaleId"), - "subscriptionId": obj.get("subscriptionId"), - "autoRecover": obj.get("autoRecover"), - "description": obj.get("description"), - "customer": PaymentCustomer.from_dict(obj["customer"]) if obj.get("customer") is not None else None, - "billingDetails": PaymentBillingDetails.from_dict(obj["billingDetails"]) if obj.get("billingDetails") is not None else None, - "shippingDetails": PaymentShippingDetails.from_dict(obj["shippingDetails"]) if obj.get("shippingDetails") is not None else None, - "sessionDetails": PaymentSessionDetails.from_dict(obj["sessionDetails"]) if obj.get("sessionDetails") is not None else None, - "expireAt": obj.get("expireAt"), - "metadata": obj.get("metadata") - }) - return _obj - - diff --git a/Monei/models/create_subscription_request.py b/Monei/models/create_subscription_request.py deleted file mode 100644 index d95de35..0000000 --- a/Monei/models/create_subscription_request.py +++ /dev/null @@ -1,134 +0,0 @@ -# coding: utf-8 - -""" - MONEI API v1 - -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

- - The version of the OpenAPI document: 1.5.1 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt, StrictStr -from typing import Any, ClassVar, Dict, List, Optional, Union -from Monei.models.payment_billing_details import PaymentBillingDetails -from Monei.models.payment_customer import PaymentCustomer -from Monei.models.payment_shipping_details import PaymentShippingDetails -from Monei.models.subscription_interval import SubscriptionInterval -from Monei.models.subscription_retry_schedule_inner import SubscriptionRetryScheduleInner -from typing import Optional, Set -from typing_extensions import Self - -class CreateSubscriptionRequest(BaseModel): - """ - CreateSubscriptionRequest - """ # noqa: E501 - amount: StrictInt = Field(description="Amount intended to be collected by this payment. A positive integer representing how much to charge in the smallest currency unit (e.g., 100 cents to charge 1.00 USD). ") - currency: StrictStr = Field(description="Three-letter [ISO currency code](https://en.wikipedia.org/wiki/ISO_4217), in uppercase. Must be a supported currency. ") - interval: SubscriptionInterval - interval_count: Optional[StrictInt] = Field(default=None, description="Number of intervals between subscription payments.", alias="intervalCount") - description: Optional[StrictStr] = Field(default=None, description="An arbitrary string attached to the subscription. Often useful for displaying to users. ") - customer: Optional[PaymentCustomer] = None - billing_details: Optional[PaymentBillingDetails] = Field(default=None, alias="billingDetails") - shipping_details: Optional[PaymentShippingDetails] = Field(default=None, alias="shippingDetails") - trial_period_end: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="The end date of the trial period. Measured in seconds since the Unix epoch.", alias="trialPeriodEnd") - trial_period_days: Optional[StrictInt] = Field(default=None, description="Number of days the trial period lasts.", alias="trialPeriodDays") - retry_schedule: Optional[List[SubscriptionRetryScheduleInner]] = Field(default=None, description="Defines a custom schedule for retrying failed subscription payments. Each entry in the array specifies how long to wait before attempting the next payment retry. If not specified, the system's default retry schedule will be used. ", alias="retrySchedule") - callback_url: Optional[StrictStr] = Field(default=None, description="The URL will be called each time subscription status changes. You will receive a subscription object in the body of the request. ", alias="callbackUrl") - payment_callback_url: Optional[StrictStr] = Field(default=None, description="The URL will be called each time subscription creates a new payments. You will receive the payment object in the body of the request. ", alias="paymentCallbackUrl") - metadata: Optional[Dict[str, Any]] = Field(default=None, description="A set of key-value pairs that you can attach to a resource. This can be useful for storing additional information about the resource in a structured format.") - __properties: ClassVar[List[str]] = ["amount", "currency", "interval", "intervalCount", "description", "customer", "billingDetails", "shippingDetails", "trialPeriodEnd", "trialPeriodDays", "retrySchedule", "callbackUrl", "paymentCallbackUrl", "metadata"] - - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of CreateSubscriptionRequest from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of customer - if self.customer: - _dict['customer'] = self.customer.to_dict() - # override the default output from pydantic by calling `to_dict()` of billing_details - if self.billing_details: - _dict['billingDetails'] = self.billing_details.to_dict() - # override the default output from pydantic by calling `to_dict()` of shipping_details - if self.shipping_details: - _dict['shippingDetails'] = self.shipping_details.to_dict() - # override the default output from pydantic by calling `to_dict()` of each item in retry_schedule (list) - _items = [] - if self.retry_schedule: - for _item_retry_schedule in self.retry_schedule: - if _item_retry_schedule: - _items.append(_item_retry_schedule.to_dict()) - _dict['retrySchedule'] = _items - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of CreateSubscriptionRequest from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "amount": obj.get("amount"), - "currency": obj.get("currency"), - "interval": obj.get("interval"), - "intervalCount": obj.get("intervalCount"), - "description": obj.get("description"), - "customer": PaymentCustomer.from_dict(obj["customer"]) if obj.get("customer") is not None else None, - "billingDetails": PaymentBillingDetails.from_dict(obj["billingDetails"]) if obj.get("billingDetails") is not None else None, - "shippingDetails": PaymentShippingDetails.from_dict(obj["shippingDetails"]) if obj.get("shippingDetails") is not None else None, - "trialPeriodEnd": obj.get("trialPeriodEnd"), - "trialPeriodDays": obj.get("trialPeriodDays"), - "retrySchedule": [SubscriptionRetryScheduleInner.from_dict(_item) for _item in obj["retrySchedule"]] if obj.get("retrySchedule") is not None else None, - "callbackUrl": obj.get("callbackUrl"), - "paymentCallbackUrl": obj.get("paymentCallbackUrl"), - "metadata": obj.get("metadata") - }) - return _obj - - diff --git a/Monei/models/error.py b/Monei/models/error.py deleted file mode 100644 index 86a865a..0000000 --- a/Monei/models/error.py +++ /dev/null @@ -1,96 +0,0 @@ -# coding: utf-8 - -""" - MONEI API v1 - -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

- - The version of the OpenAPI document: 1.5.1 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from datetime import datetime -from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr -from typing import Any, ClassVar, Dict, List -from typing import Optional, Set -from typing_extensions import Self - -class Error(BaseModel): - """ - Error - """ # noqa: E501 - status: StrictStr = Field(description="Error type identifier") - status_code: StrictInt = Field(description="HTTP status code", alias="statusCode") - message: StrictStr = Field(description="Human-readable error message") - request_id: StrictStr = Field(description="Unique identifier for the request", alias="requestId") - request_time: datetime = Field(description="Timestamp when the request was processed", alias="requestTime") - __properties: ClassVar[List[str]] = ["status", "statusCode", "message", "requestId", "requestTime"] - - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of Error from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of Error from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "status": obj.get("status"), - "statusCode": obj.get("statusCode"), - "message": obj.get("message"), - "requestId": obj.get("requestId"), - "requestTime": obj.get("requestTime") - }) - return _obj - - diff --git a/Monei/models/pause_subscription_request.py b/Monei/models/pause_subscription_request.py deleted file mode 100644 index 995c9e8..0000000 --- a/Monei/models/pause_subscription_request.py +++ /dev/null @@ -1,89 +0,0 @@ -# coding: utf-8 - -""" - MONEI API v1 - -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

- - The version of the OpenAPI document: 1.5.1 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt -from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set -from typing_extensions import Self - -class PauseSubscriptionRequest(BaseModel): - """ - PauseSubscriptionRequest - """ # noqa: E501 - pause_at_period_end: Optional[StrictBool] = Field(default=None, description="If true, the subscription will be paused at the end of the current period. ", alias="pauseAtPeriodEnd") - pause_interval_count: Optional[StrictInt] = Field(default=None, description="Number of intervals when subscription will be paused before it activates again.", alias="pauseIntervalCount") - __properties: ClassVar[List[str]] = ["pauseAtPeriodEnd", "pauseIntervalCount"] - - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of PauseSubscriptionRequest from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of PauseSubscriptionRequest from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "pauseAtPeriodEnd": obj.get("pauseAtPeriodEnd"), - "pauseIntervalCount": obj.get("pauseIntervalCount") - }) - return _obj - - diff --git a/Monei/models/payment.py b/Monei/models/payment.py deleted file mode 100644 index 46b4d85..0000000 --- a/Monei/models/payment.py +++ /dev/null @@ -1,186 +0,0 @@ -# coding: utf-8 - -""" - MONEI API v1 - -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

- - The version of the OpenAPI document: 1.5.1 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from Monei.models.payment_billing_details import PaymentBillingDetails -from Monei.models.payment_cancellation_reason import PaymentCancellationReason -from Monei.models.payment_customer import PaymentCustomer -from Monei.models.payment_last_refund_reason import PaymentLastRefundReason -from Monei.models.payment_next_action import PaymentNextAction -from Monei.models.payment_payment_method import PaymentPaymentMethod -from Monei.models.payment_sequence import PaymentSequence -from Monei.models.payment_session_details import PaymentSessionDetails -from Monei.models.payment_shipping_details import PaymentShippingDetails -from Monei.models.payment_shop import PaymentShop -from Monei.models.payment_status import PaymentStatus -from Monei.models.payment_trace_details import PaymentTraceDetails -from typing import Optional, Set -from typing_extensions import Self - -class Payment(BaseModel): - """ - Payment - """ # noqa: E501 - id: Optional[StrictStr] = Field(default=None, description="Unique identifier for the payment.") - amount: Optional[StrictInt] = Field(default=None, description="Amount intended to be collected by this payment. A positive integer representing how much to charge in the smallest currency unit (e.g., 100 cents to charge 1.00 USD). ") - currency: Optional[StrictStr] = Field(default=None, description="Three-letter [ISO currency code](https://en.wikipedia.org/wiki/ISO_4217), in uppercase. Must be a supported currency. ") - order_id: Optional[StrictStr] = Field(default=None, description="An order ID from your system. A unique identifier that can be used to reconcile the payment with your internal system. ", alias="orderId") - description: Optional[StrictStr] = Field(default=None, description="An arbitrary string attached to the payment. Often useful for displaying to users. ") - account_id: Optional[StrictStr] = Field(default=None, description="MONEI Account identifier.", alias="accountId") - authorization_code: Optional[StrictStr] = Field(default=None, description="Unique identifier provided by the bank performing transaction. ", alias="authorizationCode") - livemode: Optional[StrictBool] = Field(default=None, description="Has the value `true` if the resource exists in live mode or the value `false` if the resource exists in test mode.") - status: Optional[PaymentStatus] = None - status_code: Optional[StrictStr] = Field(default=None, description="Payment status code. ", alias="statusCode") - status_message: Optional[StrictStr] = Field(default=None, description="Human readable status message, can be displayed to a user. ", alias="statusMessage") - customer: Optional[PaymentCustomer] = None - shop: Optional[PaymentShop] = None - billing_details: Optional[PaymentBillingDetails] = Field(default=None, alias="billingDetails") - shipping_details: Optional[PaymentShippingDetails] = Field(default=None, alias="shippingDetails") - refunded_amount: Optional[StrictInt] = Field(default=None, description="Amount in cents refunded (can be less than the amount attribute on the payment if a partial refund was issued). ", alias="refundedAmount") - last_refund_amount: Optional[StrictInt] = Field(default=None, description="Amount in cents refunded in the last transaction.", alias="lastRefundAmount") - last_refund_reason: Optional[PaymentLastRefundReason] = Field(default=None, alias="lastRefundReason") - cancellation_reason: Optional[PaymentCancellationReason] = Field(default=None, alias="cancellationReason") - session_details: Optional[PaymentSessionDetails] = Field(default=None, alias="sessionDetails") - trace_details: Optional[PaymentTraceDetails] = Field(default=None, alias="traceDetails") - payment_token: Optional[StrictStr] = Field(default=None, description="A permanent token represents a payment method used in the payment. Pass `generatePaymentToken: true` when you creating a payment to generate it. You can pass it as `paymentToken` parameter to create other payments with the same payment method. This token does not expire, and should only be used server-side. ", alias="paymentToken") - payment_method: Optional[PaymentPaymentMethod] = Field(default=None, alias="paymentMethod") - sequence: Optional[PaymentSequence] = None - sequence_id: Optional[StrictStr] = Field(default=None, description="A permanent identifier that refers to the initial payment of a sequence of payments. This value needs to be sent in the path for `RECURRING` payments. ", alias="sequenceId") - store_id: Optional[StrictStr] = Field(default=None, description="A unique identifier of the Store. If specified the payment is attached to this Store. ", alias="storeId") - point_of_sale_id: Optional[StrictStr] = Field(default=None, description="A unique identifier of the Point of Sale. If specified the payment is attached to this Point of Sale. If there is a QR code attached to the same Point of Sale, this payment will be available by scanning the QR code. ", alias="pointOfSaleId") - metadata: Optional[Dict[str, Any]] = Field(default=None, description="A set of key-value pairs that you can attach to a resource. This can be useful for storing additional information about the resource in a structured format.") - next_action: Optional[PaymentNextAction] = Field(default=None, alias="nextAction") - created_at: Optional[StrictInt] = Field(default=None, description="Time at which the resource was created. Measured in seconds since the Unix epoch.", alias="createdAt") - updated_at: Optional[StrictInt] = Field(default=None, description="Time at which the resource updated last time. Measured in seconds since the Unix epoch.", alias="updatedAt") - __properties: ClassVar[List[str]] = ["id", "amount", "currency", "orderId", "description", "accountId", "authorizationCode", "livemode", "status", "statusCode", "statusMessage", "customer", "shop", "billingDetails", "shippingDetails", "refundedAmount", "lastRefundAmount", "lastRefundReason", "cancellationReason", "sessionDetails", "traceDetails", "paymentToken", "paymentMethod", "sequence", "sequenceId", "storeId", "pointOfSaleId", "metadata", "nextAction", "createdAt", "updatedAt"] - - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of Payment from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of customer - if self.customer: - _dict['customer'] = self.customer.to_dict() - # override the default output from pydantic by calling `to_dict()` of shop - if self.shop: - _dict['shop'] = self.shop.to_dict() - # override the default output from pydantic by calling `to_dict()` of billing_details - if self.billing_details: - _dict['billingDetails'] = self.billing_details.to_dict() - # override the default output from pydantic by calling `to_dict()` of shipping_details - if self.shipping_details: - _dict['shippingDetails'] = self.shipping_details.to_dict() - # override the default output from pydantic by calling `to_dict()` of session_details - if self.session_details: - _dict['sessionDetails'] = self.session_details.to_dict() - # override the default output from pydantic by calling `to_dict()` of trace_details - if self.trace_details: - _dict['traceDetails'] = self.trace_details.to_dict() - # override the default output from pydantic by calling `to_dict()` of payment_method - if self.payment_method: - _dict['paymentMethod'] = self.payment_method.to_dict() - # override the default output from pydantic by calling `to_dict()` of sequence - if self.sequence: - _dict['sequence'] = self.sequence.to_dict() - # override the default output from pydantic by calling `to_dict()` of next_action - if self.next_action: - _dict['nextAction'] = self.next_action.to_dict() - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of Payment from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "id": obj.get("id"), - "amount": obj.get("amount"), - "currency": obj.get("currency"), - "orderId": obj.get("orderId"), - "description": obj.get("description"), - "accountId": obj.get("accountId"), - "authorizationCode": obj.get("authorizationCode"), - "livemode": obj.get("livemode"), - "status": obj.get("status"), - "statusCode": obj.get("statusCode"), - "statusMessage": obj.get("statusMessage"), - "customer": PaymentCustomer.from_dict(obj["customer"]) if obj.get("customer") is not None else None, - "shop": PaymentShop.from_dict(obj["shop"]) if obj.get("shop") is not None else None, - "billingDetails": PaymentBillingDetails.from_dict(obj["billingDetails"]) if obj.get("billingDetails") is not None else None, - "shippingDetails": PaymentShippingDetails.from_dict(obj["shippingDetails"]) if obj.get("shippingDetails") is not None else None, - "refundedAmount": obj.get("refundedAmount"), - "lastRefundAmount": obj.get("lastRefundAmount"), - "lastRefundReason": obj.get("lastRefundReason"), - "cancellationReason": obj.get("cancellationReason"), - "sessionDetails": PaymentSessionDetails.from_dict(obj["sessionDetails"]) if obj.get("sessionDetails") is not None else None, - "traceDetails": PaymentTraceDetails.from_dict(obj["traceDetails"]) if obj.get("traceDetails") is not None else None, - "paymentToken": obj.get("paymentToken"), - "paymentMethod": PaymentPaymentMethod.from_dict(obj["paymentMethod"]) if obj.get("paymentMethod") is not None else None, - "sequence": PaymentSequence.from_dict(obj["sequence"]) if obj.get("sequence") is not None else None, - "sequenceId": obj.get("sequenceId"), - "storeId": obj.get("storeId"), - "pointOfSaleId": obj.get("pointOfSaleId"), - "metadata": obj.get("metadata"), - "nextAction": PaymentNextAction.from_dict(obj["nextAction"]) if obj.get("nextAction") is not None else None, - "createdAt": obj.get("createdAt"), - "updatedAt": obj.get("updatedAt") - }) - return _obj - - diff --git a/Monei/models/payment_billing_details.py b/Monei/models/payment_billing_details.py deleted file mode 100644 index b5a95b9..0000000 --- a/Monei/models/payment_billing_details.py +++ /dev/null @@ -1,101 +0,0 @@ -# coding: utf-8 - -""" - MONEI API v1 - -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

- - The version of the OpenAPI document: 1.5.1 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from Monei.models.address import Address -from typing import Optional, Set -from typing_extensions import Self - -class PaymentBillingDetails(BaseModel): - """ - Billing information associated with the payment method at the time of the transaction. - """ # noqa: E501 - name: Optional[StrictStr] = Field(default=None, description="The customer's billing full name.") - email: Optional[StrictStr] = Field(default=None, description="The customer's billing email address.") - phone: Optional[StrictStr] = Field(default=None, description="The customer's billing phone number in E.164 format.") - company: Optional[StrictStr] = Field(default=None, description="Billing company name.") - tax_id: Optional[StrictStr] = Field(default=None, description="Company tax ID.", alias="taxId") - address: Optional[Address] = None - __properties: ClassVar[List[str]] = ["name", "email", "phone", "company", "taxId", "address"] - - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of PaymentBillingDetails from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of address - if self.address: - _dict['address'] = self.address.to_dict() - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of PaymentBillingDetails from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "name": obj.get("name"), - "email": obj.get("email"), - "phone": obj.get("phone"), - "company": obj.get("company"), - "taxId": obj.get("taxId"), - "address": Address.from_dict(obj["address"]) if obj.get("address") is not None else None - }) - return _obj - - diff --git a/Monei/models/payment_customer.py b/Monei/models/payment_customer.py deleted file mode 100644 index e4f9150..0000000 --- a/Monei/models/payment_customer.py +++ /dev/null @@ -1,91 +0,0 @@ -# coding: utf-8 - -""" - MONEI API v1 - -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

- - The version of the OpenAPI document: 1.5.1 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set -from typing_extensions import Self - -class PaymentCustomer(BaseModel): - """ - PaymentCustomer - """ # noqa: E501 - email: Optional[StrictStr] = Field(default=None, description="The customer's email address.") - name: Optional[StrictStr] = Field(default=None, description="The customer's full name or business name.") - phone: Optional[StrictStr] = Field(default=None, description="The customer's phone number in E.164 format.") - __properties: ClassVar[List[str]] = ["email", "name", "phone"] - - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of PaymentCustomer from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of PaymentCustomer from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "email": obj.get("email"), - "name": obj.get("name"), - "phone": obj.get("phone") - }) - return _obj - - diff --git a/Monei/models/payment_methods.py b/Monei/models/payment_methods.py deleted file mode 100644 index 0505ab9..0000000 --- a/Monei/models/payment_methods.py +++ /dev/null @@ -1,118 +0,0 @@ -# coding: utf-8 - -""" - MONEI API v1 - -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

- - The version of the OpenAPI document: 1.5.1 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr, field_validator -from typing import Any, ClassVar, Dict, List, Optional -from Monei.models.payment_methods_metadata import PaymentMethodsMetadata -from typing import Optional, Set -from typing_extensions import Self - -class PaymentMethods(BaseModel): - """ - PaymentMethods - """ # noqa: E501 - livemode: Optional[StrictBool] = Field(default=None, description="Has the value `true` if the resource exists in live mode or the value `false` if the resource exists in test mode.") - payment_methods: Optional[List[StrictStr]] = Field(default=None, description="An array of available payment methods for the account or payment. Possible values include: - `alipay` - Alipay - `applePay` - Apple Pay - `bancontact` - Bancontact - `bizum` - Bizum - `blik` - BLIK - `card` - Credit or debit card - `cardPresent` - Card present (physical POS) - `clickToPay` - Click to Pay - `cofidis` - Cofidis - `cofidisLoan` - Cofidis Loan - `eps` - EPS - `giropay` - Giropay - `googlePay` - Google Pay - `iDeal` - iDEAL - `klarna` - Klarna - `mbway` - MB WAY - `multibanco` - Multibanco - `paypal` - PayPal - `sepa` - SEPA Direct Debit - `sofort` - Sofort - `trustly` - Trustly ", alias="paymentMethods") - metadata: Optional[PaymentMethodsMetadata] = None - merchant_name: Optional[StrictStr] = Field(default=None, description="The name of the merchant", alias="merchantName") - merchant_url: Optional[StrictStr] = Field(default=None, description="The URL of the merchant's website", alias="merchantUrl") - country_code: Optional[StrictStr] = Field(default=None, description="Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).", alias="countryCode") - account_id: Optional[StrictStr] = Field(default=None, description="MONEI Account identifier.", alias="accountId") - amount: Optional[StrictInt] = Field(default=None, description="The amount of the payment in the smallest currency unit. For example, 10 EUR = 1000 cents. Only present when querying by paymentId. ") - currency: Optional[StrictStr] = Field(default=None, description="Three-letter ISO currency code, in uppercase. Only present when querying by paymentId. ") - __properties: ClassVar[List[str]] = ["livemode", "paymentMethods", "metadata", "merchantName", "merchantUrl", "countryCode", "accountId", "amount", "currency"] - - @field_validator('payment_methods') - def payment_methods_validate_enum(cls, value): - """Validates the enum""" - if value is None: - return value - - for i in value: - if i not in set(['alipay', 'applePay', 'bancontact', 'bizum', 'blik', 'card', 'cardPresent', 'clickToPay', 'cofidis', 'cofidisLoan', 'eps', 'giropay', 'googlePay', 'iDeal', 'klarna', 'mbway', 'multibanco', 'paypal', 'sepa', 'sofort', 'trustly']): - raise ValueError("each list item must be one of ('alipay', 'applePay', 'bancontact', 'bizum', 'blik', 'card', 'cardPresent', 'clickToPay', 'cofidis', 'cofidisLoan', 'eps', 'giropay', 'googlePay', 'iDeal', 'klarna', 'mbway', 'multibanco', 'paypal', 'sepa', 'sofort', 'trustly')") - return value - - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of PaymentMethods from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of metadata - if self.metadata: - _dict['metadata'] = self.metadata.to_dict() - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of PaymentMethods from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "livemode": obj.get("livemode"), - "paymentMethods": obj.get("paymentMethods"), - "metadata": PaymentMethodsMetadata.from_dict(obj["metadata"]) if obj.get("metadata") is not None else None, - "merchantName": obj.get("merchantName"), - "merchantUrl": obj.get("merchantUrl"), - "countryCode": obj.get("countryCode"), - "accountId": obj.get("accountId"), - "amount": obj.get("amount"), - "currency": obj.get("currency") - }) - return _obj - - diff --git a/Monei/models/payment_methods_metadata.py b/Monei/models/payment_methods_metadata.py deleted file mode 100644 index a57ac5e..0000000 --- a/Monei/models/payment_methods_metadata.py +++ /dev/null @@ -1,186 +0,0 @@ -# coding: utf-8 - -""" - MONEI API v1 - -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

- - The version of the OpenAPI document: 1.5.1 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict, Field -from typing import Any, ClassVar, Dict, List, Optional -from Monei.models.payment_methods_metadata_alipay import PaymentMethodsMetadataAlipay -from Monei.models.payment_methods_metadata_apple_pay import PaymentMethodsMetadataApplePay -from Monei.models.payment_methods_metadata_bancontact import PaymentMethodsMetadataBancontact -from Monei.models.payment_methods_metadata_bizum import PaymentMethodsMetadataBizum -from Monei.models.payment_methods_metadata_blik import PaymentMethodsMetadataBlik -from Monei.models.payment_methods_metadata_card import PaymentMethodsMetadataCard -from Monei.models.payment_methods_metadata_click_to_pay import PaymentMethodsMetadataClickToPay -from Monei.models.payment_methods_metadata_eps import PaymentMethodsMetadataEps -from Monei.models.payment_methods_metadata_giropay import PaymentMethodsMetadataGiropay -from Monei.models.payment_methods_metadata_google_pay import PaymentMethodsMetadataGooglePay -from Monei.models.payment_methods_metadata_i_deal import PaymentMethodsMetadataIDeal -from Monei.models.payment_methods_metadata_klarna import PaymentMethodsMetadataKlarna -from Monei.models.payment_methods_metadata_mbway import PaymentMethodsMetadataMbway -from Monei.models.payment_methods_metadata_sepa import PaymentMethodsMetadataSepa -from Monei.models.payment_methods_metadata_sofort import PaymentMethodsMetadataSofort -from Monei.models.payment_methods_metadata_trustly import PaymentMethodsMetadataTrustly -from typing import Optional, Set -from typing_extensions import Self - -class PaymentMethodsMetadata(BaseModel): - """ - Additional configuration details for each payment method. - """ # noqa: E501 - alipay: Optional[PaymentMethodsMetadataAlipay] = None - bancontact: Optional[PaymentMethodsMetadataBancontact] = None - bizum: Optional[PaymentMethodsMetadataBizum] = None - blik: Optional[PaymentMethodsMetadataBlik] = None - card: Optional[PaymentMethodsMetadataCard] = None - eps: Optional[PaymentMethodsMetadataEps] = None - i_deal: Optional[PaymentMethodsMetadataIDeal] = Field(default=None, alias="iDeal") - mbway: Optional[PaymentMethodsMetadataMbway] = None - multibanco: Optional[PaymentMethodsMetadataMbway] = None - sofort: Optional[PaymentMethodsMetadataSofort] = None - trustly: Optional[PaymentMethodsMetadataTrustly] = None - sepa: Optional[PaymentMethodsMetadataSepa] = None - klarna: Optional[PaymentMethodsMetadataKlarna] = None - giropay: Optional[PaymentMethodsMetadataGiropay] = None - google_pay: Optional[PaymentMethodsMetadataGooglePay] = Field(default=None, alias="googlePay") - apple_pay: Optional[PaymentMethodsMetadataApplePay] = Field(default=None, alias="applePay") - click_to_pay: Optional[PaymentMethodsMetadataClickToPay] = Field(default=None, alias="clickToPay") - __properties: ClassVar[List[str]] = ["alipay", "bancontact", "bizum", "blik", "card", "eps", "iDeal", "mbway", "multibanco", "sofort", "trustly", "sepa", "klarna", "giropay", "googlePay", "applePay", "clickToPay"] - - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of PaymentMethodsMetadata from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of alipay - if self.alipay: - _dict['alipay'] = self.alipay.to_dict() - # override the default output from pydantic by calling `to_dict()` of bancontact - if self.bancontact: - _dict['bancontact'] = self.bancontact.to_dict() - # override the default output from pydantic by calling `to_dict()` of bizum - if self.bizum: - _dict['bizum'] = self.bizum.to_dict() - # override the default output from pydantic by calling `to_dict()` of blik - if self.blik: - _dict['blik'] = self.blik.to_dict() - # override the default output from pydantic by calling `to_dict()` of card - if self.card: - _dict['card'] = self.card.to_dict() - # override the default output from pydantic by calling `to_dict()` of eps - if self.eps: - _dict['eps'] = self.eps.to_dict() - # override the default output from pydantic by calling `to_dict()` of i_deal - if self.i_deal: - _dict['iDeal'] = self.i_deal.to_dict() - # override the default output from pydantic by calling `to_dict()` of mbway - if self.mbway: - _dict['mbway'] = self.mbway.to_dict() - # override the default output from pydantic by calling `to_dict()` of multibanco - if self.multibanco: - _dict['multibanco'] = self.multibanco.to_dict() - # override the default output from pydantic by calling `to_dict()` of sofort - if self.sofort: - _dict['sofort'] = self.sofort.to_dict() - # override the default output from pydantic by calling `to_dict()` of trustly - if self.trustly: - _dict['trustly'] = self.trustly.to_dict() - # override the default output from pydantic by calling `to_dict()` of sepa - if self.sepa: - _dict['sepa'] = self.sepa.to_dict() - # override the default output from pydantic by calling `to_dict()` of klarna - if self.klarna: - _dict['klarna'] = self.klarna.to_dict() - # override the default output from pydantic by calling `to_dict()` of giropay - if self.giropay: - _dict['giropay'] = self.giropay.to_dict() - # override the default output from pydantic by calling `to_dict()` of google_pay - if self.google_pay: - _dict['googlePay'] = self.google_pay.to_dict() - # override the default output from pydantic by calling `to_dict()` of apple_pay - if self.apple_pay: - _dict['applePay'] = self.apple_pay.to_dict() - # override the default output from pydantic by calling `to_dict()` of click_to_pay - if self.click_to_pay: - _dict['clickToPay'] = self.click_to_pay.to_dict() - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of PaymentMethodsMetadata from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "alipay": PaymentMethodsMetadataAlipay.from_dict(obj["alipay"]) if obj.get("alipay") is not None else None, - "bancontact": PaymentMethodsMetadataBancontact.from_dict(obj["bancontact"]) if obj.get("bancontact") is not None else None, - "bizum": PaymentMethodsMetadataBizum.from_dict(obj["bizum"]) if obj.get("bizum") is not None else None, - "blik": PaymentMethodsMetadataBlik.from_dict(obj["blik"]) if obj.get("blik") is not None else None, - "card": PaymentMethodsMetadataCard.from_dict(obj["card"]) if obj.get("card") is not None else None, - "eps": PaymentMethodsMetadataEps.from_dict(obj["eps"]) if obj.get("eps") is not None else None, - "iDeal": PaymentMethodsMetadataIDeal.from_dict(obj["iDeal"]) if obj.get("iDeal") is not None else None, - "mbway": PaymentMethodsMetadataMbway.from_dict(obj["mbway"]) if obj.get("mbway") is not None else None, - "multibanco": PaymentMethodsMetadataMbway.from_dict(obj["multibanco"]) if obj.get("multibanco") is not None else None, - "sofort": PaymentMethodsMetadataSofort.from_dict(obj["sofort"]) if obj.get("sofort") is not None else None, - "trustly": PaymentMethodsMetadataTrustly.from_dict(obj["trustly"]) if obj.get("trustly") is not None else None, - "sepa": PaymentMethodsMetadataSepa.from_dict(obj["sepa"]) if obj.get("sepa") is not None else None, - "klarna": PaymentMethodsMetadataKlarna.from_dict(obj["klarna"]) if obj.get("klarna") is not None else None, - "giropay": PaymentMethodsMetadataGiropay.from_dict(obj["giropay"]) if obj.get("giropay") is not None else None, - "googlePay": PaymentMethodsMetadataGooglePay.from_dict(obj["googlePay"]) if obj.get("googlePay") is not None else None, - "applePay": PaymentMethodsMetadataApplePay.from_dict(obj["applePay"]) if obj.get("applePay") is not None else None, - "clickToPay": PaymentMethodsMetadataClickToPay.from_dict(obj["clickToPay"]) if obj.get("clickToPay") is not None else None - }) - return _obj - - diff --git a/Monei/models/payment_methods_metadata_alipay.py b/Monei/models/payment_methods_metadata_alipay.py deleted file mode 100644 index 34a19c4..0000000 --- a/Monei/models/payment_methods_metadata_alipay.py +++ /dev/null @@ -1,87 +0,0 @@ -# coding: utf-8 - -""" - MONEI API v1 - -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

- - The version of the OpenAPI document: 1.5.1 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set -from typing_extensions import Self - -class PaymentMethodsMetadataAlipay(BaseModel): - """ - PaymentMethodsMetadataAlipay - """ # noqa: E501 - countries: Optional[List[StrictStr]] = Field(default=None, description="List of countries where the payment method is available") - __properties: ClassVar[List[str]] = ["countries"] - - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of PaymentMethodsMetadataAlipay from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of PaymentMethodsMetadataAlipay from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "countries": obj.get("countries") - }) - return _obj - - diff --git a/Monei/models/payment_methods_metadata_apple_pay.py b/Monei/models/payment_methods_metadata_apple_pay.py deleted file mode 100644 index 5d963dc..0000000 --- a/Monei/models/payment_methods_metadata_apple_pay.py +++ /dev/null @@ -1,87 +0,0 @@ -# coding: utf-8 - -""" - MONEI API v1 - -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

- - The version of the OpenAPI document: 1.5.1 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set -from typing_extensions import Self - -class PaymentMethodsMetadataApplePay(BaseModel): - """ - PaymentMethodsMetadataApplePay - """ # noqa: E501 - merchant_id: Optional[StrictStr] = Field(default=None, description="Apple Pay merchant ID", alias="merchantId") - __properties: ClassVar[List[str]] = ["merchantId"] - - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of PaymentMethodsMetadataApplePay from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of PaymentMethodsMetadataApplePay from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "merchantId": obj.get("merchantId") - }) - return _obj - - diff --git a/Monei/models/payment_methods_metadata_bancontact.py b/Monei/models/payment_methods_metadata_bancontact.py deleted file mode 100644 index bac5edb..0000000 --- a/Monei/models/payment_methods_metadata_bancontact.py +++ /dev/null @@ -1,87 +0,0 @@ -# coding: utf-8 - -""" - MONEI API v1 - -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

- - The version of the OpenAPI document: 1.5.1 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set -from typing_extensions import Self - -class PaymentMethodsMetadataBancontact(BaseModel): - """ - PaymentMethodsMetadataBancontact - """ # noqa: E501 - countries: Optional[List[StrictStr]] = Field(default=None, description="List of countries where the payment method is available") - __properties: ClassVar[List[str]] = ["countries"] - - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of PaymentMethodsMetadataBancontact from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of PaymentMethodsMetadataBancontact from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "countries": obj.get("countries") - }) - return _obj - - diff --git a/Monei/models/payment_methods_metadata_bizum.py b/Monei/models/payment_methods_metadata_bizum.py deleted file mode 100644 index 79a21fa..0000000 --- a/Monei/models/payment_methods_metadata_bizum.py +++ /dev/null @@ -1,87 +0,0 @@ -# coding: utf-8 - -""" - MONEI API v1 - -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

- - The version of the OpenAPI document: 1.5.1 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set -from typing_extensions import Self - -class PaymentMethodsMetadataBizum(BaseModel): - """ - PaymentMethodsMetadataBizum - """ # noqa: E501 - countries: Optional[List[StrictStr]] = Field(default=None, description="List of countries where the payment method is available") - __properties: ClassVar[List[str]] = ["countries"] - - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of PaymentMethodsMetadataBizum from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of PaymentMethodsMetadataBizum from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "countries": obj.get("countries") - }) - return _obj - - diff --git a/Monei/models/payment_methods_metadata_blik.py b/Monei/models/payment_methods_metadata_blik.py deleted file mode 100644 index b156876..0000000 --- a/Monei/models/payment_methods_metadata_blik.py +++ /dev/null @@ -1,87 +0,0 @@ -# coding: utf-8 - -""" - MONEI API v1 - -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

- - The version of the OpenAPI document: 1.5.1 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set -from typing_extensions import Self - -class PaymentMethodsMetadataBlik(BaseModel): - """ - PaymentMethodsMetadataBlik - """ # noqa: E501 - countries: Optional[List[StrictStr]] = Field(default=None, description="List of countries where the payment method is available") - __properties: ClassVar[List[str]] = ["countries"] - - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of PaymentMethodsMetadataBlik from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of PaymentMethodsMetadataBlik from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "countries": obj.get("countries") - }) - return _obj - - diff --git a/Monei/models/payment_methods_metadata_card.py b/Monei/models/payment_methods_metadata_card.py deleted file mode 100644 index 400ca9a..0000000 --- a/Monei/models/payment_methods_metadata_card.py +++ /dev/null @@ -1,87 +0,0 @@ -# coding: utf-8 - -""" - MONEI API v1 - -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

- - The version of the OpenAPI document: 1.5.1 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set -from typing_extensions import Self - -class PaymentMethodsMetadataCard(BaseModel): - """ - PaymentMethodsMetadataCard - """ # noqa: E501 - brands: Optional[List[StrictStr]] = Field(default=None, description="List of card brands supported") - __properties: ClassVar[List[str]] = ["brands"] - - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of PaymentMethodsMetadataCard from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of PaymentMethodsMetadataCard from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "brands": obj.get("brands") - }) - return _obj - - diff --git a/Monei/models/payment_methods_metadata_click_to_pay.py b/Monei/models/payment_methods_metadata_click_to_pay.py deleted file mode 100644 index 99d0c55..0000000 --- a/Monei/models/payment_methods_metadata_click_to_pay.py +++ /dev/null @@ -1,107 +0,0 @@ -# coding: utf-8 - -""" - MONEI API v1 - -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

- - The version of the OpenAPI document: 1.5.1 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict, Field, StrictBool -from typing import Any, ClassVar, Dict, List, Optional -from Monei.models.payment_methods_metadata_click_to_pay_discover import PaymentMethodsMetadataClickToPayDiscover -from Monei.models.payment_methods_metadata_click_to_pay_mastercard import PaymentMethodsMetadataClickToPayMastercard -from Monei.models.payment_methods_metadata_click_to_pay_visa import PaymentMethodsMetadataClickToPayVisa -from typing import Optional, Set -from typing_extensions import Self - -class PaymentMethodsMetadataClickToPay(BaseModel): - """ - PaymentMethodsMetadataClickToPay - """ # noqa: E501 - token_support: Optional[StrictBool] = Field(default=None, description="Whether token support is enabled", alias="tokenSupport") - preselected: Optional[StrictBool] = Field(default=None, description="Whether the method is preselected") - visa: Optional[PaymentMethodsMetadataClickToPayVisa] = None - mastercard: Optional[PaymentMethodsMetadataClickToPayMastercard] = None - discover: Optional[PaymentMethodsMetadataClickToPayDiscover] = None - __properties: ClassVar[List[str]] = ["tokenSupport", "preselected", "visa", "mastercard", "discover"] - - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of PaymentMethodsMetadataClickToPay from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of visa - if self.visa: - _dict['visa'] = self.visa.to_dict() - # override the default output from pydantic by calling `to_dict()` of mastercard - if self.mastercard: - _dict['mastercard'] = self.mastercard.to_dict() - # override the default output from pydantic by calling `to_dict()` of discover - if self.discover: - _dict['discover'] = self.discover.to_dict() - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of PaymentMethodsMetadataClickToPay from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "tokenSupport": obj.get("tokenSupport"), - "preselected": obj.get("preselected"), - "visa": PaymentMethodsMetadataClickToPayVisa.from_dict(obj["visa"]) if obj.get("visa") is not None else None, - "mastercard": PaymentMethodsMetadataClickToPayMastercard.from_dict(obj["mastercard"]) if obj.get("mastercard") is not None else None, - "discover": PaymentMethodsMetadataClickToPayDiscover.from_dict(obj["discover"]) if obj.get("discover") is not None else None - }) - return _obj - - diff --git a/Monei/models/payment_methods_metadata_click_to_pay_discover.py b/Monei/models/payment_methods_metadata_click_to_pay_discover.py deleted file mode 100644 index 5adb2ee..0000000 --- a/Monei/models/payment_methods_metadata_click_to_pay_discover.py +++ /dev/null @@ -1,89 +0,0 @@ -# coding: utf-8 - -""" - MONEI API v1 - -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

- - The version of the OpenAPI document: 1.5.1 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set -from typing_extensions import Self - -class PaymentMethodsMetadataClickToPayDiscover(BaseModel): - """ - PaymentMethodsMetadataClickToPayDiscover - """ # noqa: E501 - srci_dpa_id: Optional[StrictStr] = Field(default=None, alias="srciDpaId") - src_initiator_id: Optional[StrictStr] = Field(default=None, alias="srcInitiatorId") - __properties: ClassVar[List[str]] = ["srciDpaId", "srcInitiatorId"] - - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of PaymentMethodsMetadataClickToPayDiscover from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of PaymentMethodsMetadataClickToPayDiscover from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "srciDpaId": obj.get("srciDpaId"), - "srcInitiatorId": obj.get("srcInitiatorId") - }) - return _obj - - diff --git a/Monei/models/payment_methods_metadata_click_to_pay_mastercard.py b/Monei/models/payment_methods_metadata_click_to_pay_mastercard.py deleted file mode 100644 index 0d388f6..0000000 --- a/Monei/models/payment_methods_metadata_click_to_pay_mastercard.py +++ /dev/null @@ -1,89 +0,0 @@ -# coding: utf-8 - -""" - MONEI API v1 - -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

- - The version of the OpenAPI document: 1.5.1 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set -from typing_extensions import Self - -class PaymentMethodsMetadataClickToPayMastercard(BaseModel): - """ - PaymentMethodsMetadataClickToPayMastercard - """ # noqa: E501 - srci_dpa_id: Optional[StrictStr] = Field(default=None, alias="srciDpaId") - src_initiator_id: Optional[StrictStr] = Field(default=None, alias="srcInitiatorId") - __properties: ClassVar[List[str]] = ["srciDpaId", "srcInitiatorId"] - - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of PaymentMethodsMetadataClickToPayMastercard from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of PaymentMethodsMetadataClickToPayMastercard from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "srciDpaId": obj.get("srciDpaId"), - "srcInitiatorId": obj.get("srcInitiatorId") - }) - return _obj - - diff --git a/Monei/models/payment_methods_metadata_click_to_pay_visa.py b/Monei/models/payment_methods_metadata_click_to_pay_visa.py deleted file mode 100644 index 908b104..0000000 --- a/Monei/models/payment_methods_metadata_click_to_pay_visa.py +++ /dev/null @@ -1,89 +0,0 @@ -# coding: utf-8 - -""" - MONEI API v1 - -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

- - The version of the OpenAPI document: 1.5.1 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set -from typing_extensions import Self - -class PaymentMethodsMetadataClickToPayVisa(BaseModel): - """ - PaymentMethodsMetadataClickToPayVisa - """ # noqa: E501 - srci_dpa_id: Optional[StrictStr] = Field(default=None, alias="srciDpaId") - src_initiator_id: Optional[StrictStr] = Field(default=None, alias="srcInitiatorId") - __properties: ClassVar[List[str]] = ["srciDpaId", "srcInitiatorId"] - - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of PaymentMethodsMetadataClickToPayVisa from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of PaymentMethodsMetadataClickToPayVisa from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "srciDpaId": obj.get("srciDpaId"), - "srcInitiatorId": obj.get("srcInitiatorId") - }) - return _obj - - diff --git a/Monei/models/payment_methods_metadata_eps.py b/Monei/models/payment_methods_metadata_eps.py deleted file mode 100644 index 7a03630..0000000 --- a/Monei/models/payment_methods_metadata_eps.py +++ /dev/null @@ -1,87 +0,0 @@ -# coding: utf-8 - -""" - MONEI API v1 - -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

- - The version of the OpenAPI document: 1.5.1 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set -from typing_extensions import Self - -class PaymentMethodsMetadataEps(BaseModel): - """ - PaymentMethodsMetadataEps - """ # noqa: E501 - countries: Optional[List[StrictStr]] = Field(default=None, description="List of countries where the payment method is available") - __properties: ClassVar[List[str]] = ["countries"] - - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of PaymentMethodsMetadataEps from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of PaymentMethodsMetadataEps from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "countries": obj.get("countries") - }) - return _obj - - diff --git a/Monei/models/payment_methods_metadata_giropay.py b/Monei/models/payment_methods_metadata_giropay.py deleted file mode 100644 index d6a8b97..0000000 --- a/Monei/models/payment_methods_metadata_giropay.py +++ /dev/null @@ -1,87 +0,0 @@ -# coding: utf-8 - -""" - MONEI API v1 - -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

- - The version of the OpenAPI document: 1.5.1 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set -from typing_extensions import Self - -class PaymentMethodsMetadataGiropay(BaseModel): - """ - PaymentMethodsMetadataGiropay - """ # noqa: E501 - countries: Optional[List[StrictStr]] = Field(default=None, description="List of countries where the payment method is available") - __properties: ClassVar[List[str]] = ["countries"] - - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of PaymentMethodsMetadataGiropay from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of PaymentMethodsMetadataGiropay from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "countries": obj.get("countries") - }) - return _obj - - diff --git a/Monei/models/payment_methods_metadata_google_pay.py b/Monei/models/payment_methods_metadata_google_pay.py deleted file mode 100644 index 269ef0b..0000000 --- a/Monei/models/payment_methods_metadata_google_pay.py +++ /dev/null @@ -1,89 +0,0 @@ -# coding: utf-8 - -""" - MONEI API v1 - -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

- - The version of the OpenAPI document: 1.5.1 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set -from typing_extensions import Self - -class PaymentMethodsMetadataGooglePay(BaseModel): - """ - PaymentMethodsMetadataGooglePay - """ # noqa: E501 - merchant_id: Optional[StrictStr] = Field(default=None, description="Google Pay merchant ID", alias="merchantId") - cvc_required: Optional[StrictBool] = Field(default=None, description="Whether CVC is required for Google Pay transactions", alias="cvcRequired") - __properties: ClassVar[List[str]] = ["merchantId", "cvcRequired"] - - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of PaymentMethodsMetadataGooglePay from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of PaymentMethodsMetadataGooglePay from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "merchantId": obj.get("merchantId"), - "cvcRequired": obj.get("cvcRequired") - }) - return _obj - - diff --git a/Monei/models/payment_methods_metadata_i_deal.py b/Monei/models/payment_methods_metadata_i_deal.py deleted file mode 100644 index cae9d0c..0000000 --- a/Monei/models/payment_methods_metadata_i_deal.py +++ /dev/null @@ -1,87 +0,0 @@ -# coding: utf-8 - -""" - MONEI API v1 - -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

- - The version of the OpenAPI document: 1.5.1 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set -from typing_extensions import Self - -class PaymentMethodsMetadataIDeal(BaseModel): - """ - PaymentMethodsMetadataIDeal - """ # noqa: E501 - countries: Optional[List[StrictStr]] = Field(default=None, description="List of countries where the payment method is available") - __properties: ClassVar[List[str]] = ["countries"] - - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of PaymentMethodsMetadataIDeal from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of PaymentMethodsMetadataIDeal from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "countries": obj.get("countries") - }) - return _obj - - diff --git a/Monei/models/payment_methods_metadata_klarna.py b/Monei/models/payment_methods_metadata_klarna.py deleted file mode 100644 index e7fb21f..0000000 --- a/Monei/models/payment_methods_metadata_klarna.py +++ /dev/null @@ -1,87 +0,0 @@ -# coding: utf-8 - -""" - MONEI API v1 - -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

- - The version of the OpenAPI document: 1.5.1 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set -from typing_extensions import Self - -class PaymentMethodsMetadataKlarna(BaseModel): - """ - PaymentMethodsMetadataKlarna - """ # noqa: E501 - countries: Optional[List[StrictStr]] = Field(default=None, description="List of countries where the payment method is available") - __properties: ClassVar[List[str]] = ["countries"] - - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of PaymentMethodsMetadataKlarna from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of PaymentMethodsMetadataKlarna from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "countries": obj.get("countries") - }) - return _obj - - diff --git a/Monei/models/payment_methods_metadata_mbway.py b/Monei/models/payment_methods_metadata_mbway.py deleted file mode 100644 index 24d06f2..0000000 --- a/Monei/models/payment_methods_metadata_mbway.py +++ /dev/null @@ -1,87 +0,0 @@ -# coding: utf-8 - -""" - MONEI API v1 - -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

- - The version of the OpenAPI document: 1.5.1 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set -from typing_extensions import Self - -class PaymentMethodsMetadataMbway(BaseModel): - """ - PaymentMethodsMetadataMbway - """ # noqa: E501 - countries: Optional[List[StrictStr]] = Field(default=None, description="List of countries where the payment method is available") - __properties: ClassVar[List[str]] = ["countries"] - - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of PaymentMethodsMetadataMbway from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of PaymentMethodsMetadataMbway from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "countries": obj.get("countries") - }) - return _obj - - diff --git a/Monei/models/payment_methods_metadata_sepa.py b/Monei/models/payment_methods_metadata_sepa.py deleted file mode 100644 index d133d01..0000000 --- a/Monei/models/payment_methods_metadata_sepa.py +++ /dev/null @@ -1,87 +0,0 @@ -# coding: utf-8 - -""" - MONEI API v1 - -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

- - The version of the OpenAPI document: 1.5.1 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set -from typing_extensions import Self - -class PaymentMethodsMetadataSepa(BaseModel): - """ - PaymentMethodsMetadataSepa - """ # noqa: E501 - countries: Optional[List[StrictStr]] = Field(default=None, description="List of countries where the payment method is available") - __properties: ClassVar[List[str]] = ["countries"] - - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of PaymentMethodsMetadataSepa from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of PaymentMethodsMetadataSepa from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "countries": obj.get("countries") - }) - return _obj - - diff --git a/Monei/models/payment_methods_metadata_sofort.py b/Monei/models/payment_methods_metadata_sofort.py deleted file mode 100644 index db88586..0000000 --- a/Monei/models/payment_methods_metadata_sofort.py +++ /dev/null @@ -1,87 +0,0 @@ -# coding: utf-8 - -""" - MONEI API v1 - -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

- - The version of the OpenAPI document: 1.5.1 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set -from typing_extensions import Self - -class PaymentMethodsMetadataSofort(BaseModel): - """ - PaymentMethodsMetadataSofort - """ # noqa: E501 - countries: Optional[List[StrictStr]] = Field(default=None, description="List of countries where the payment method is available") - __properties: ClassVar[List[str]] = ["countries"] - - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of PaymentMethodsMetadataSofort from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of PaymentMethodsMetadataSofort from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "countries": obj.get("countries") - }) - return _obj - - diff --git a/Monei/models/payment_methods_metadata_trustly.py b/Monei/models/payment_methods_metadata_trustly.py deleted file mode 100644 index 00fe682..0000000 --- a/Monei/models/payment_methods_metadata_trustly.py +++ /dev/null @@ -1,87 +0,0 @@ -# coding: utf-8 - -""" - MONEI API v1 - -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

- - The version of the OpenAPI document: 1.5.1 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set -from typing_extensions import Self - -class PaymentMethodsMetadataTrustly(BaseModel): - """ - PaymentMethodsMetadataTrustly - """ # noqa: E501 - countries: Optional[List[StrictStr]] = Field(default=None, description="List of countries where the payment method is available") - __properties: ClassVar[List[str]] = ["countries"] - - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of PaymentMethodsMetadataTrustly from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of PaymentMethodsMetadataTrustly from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "countries": obj.get("countries") - }) - return _obj - - diff --git a/Monei/models/payment_next_action.py b/Monei/models/payment_next_action.py deleted file mode 100644 index 72fed36..0000000 --- a/Monei/models/payment_next_action.py +++ /dev/null @@ -1,101 +0,0 @@ -# coding: utf-8 - -""" - MONEI API v1 - -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

- - The version of the OpenAPI document: 1.5.1 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr, field_validator -from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set -from typing_extensions import Self - -class PaymentNextAction(BaseModel): - """ - If present, this property tells you what actions you need to take in order for your customer to fulfill a payment using the provided source. - """ # noqa: E501 - type: Optional[StrictStr] = Field(default=None, description="- `CONFIRM` - Your customer needs to be redirected to a [hosted payment page](https://docs.monei.com/docs/use-prebuilt-payment-page) or confirm payment using [payment token](https://docs.monei.com/docs/accept-card-payment#3-submitting-the-payment-to-monei-client-side). The **redirectUrl** will point to the hosted payment page. - `FRICTIONLESS_CHALLENGE` - Your customer needs to be redirected to the frictionless 3d secure challenge page provided by the bank. The **redirectUrl** will point to the frictionless 3d secure challenge page provided by the bank. - `CHALLENGE` - Your customer needs to be redirected to the 3d secure challenge page provided by the bank. The **redirectUrl** will point to the 3d secure challenge page provided by the bank. - `COMPLETE` - The payment is completed. The **redirectUrl** will be the **completeUrl** if it was provided when the payment was created. - `BIZUM_CHALLENGE` - Your customer will be redirected to the Bizum hosted payment page. ") - must_redirect: Optional[StrictBool] = Field(default=None, description="If `true` you have to redirect your customer to the **redirectUrl** to continue payment process. ", alias="mustRedirect") - redirect_url: Optional[StrictStr] = Field(default=None, description="Redirect your customer to this url to continue payment process. ", alias="redirectUrl") - __properties: ClassVar[List[str]] = ["type", "mustRedirect", "redirectUrl"] - - @field_validator('type') - def type_validate_enum(cls, value): - """Validates the enum""" - if value is None: - return value - - if value not in set(['CONFIRM', 'CHALLENGE', 'FRICTIONLESS_CHALLENGE', 'BIZUM_CHALLENGE', 'COMPLETE']): - raise ValueError("must be one of enum values ('CONFIRM', 'CHALLENGE', 'FRICTIONLESS_CHALLENGE', 'BIZUM_CHALLENGE', 'COMPLETE')") - return value - - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of PaymentNextAction from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of PaymentNextAction from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "type": obj.get("type"), - "mustRedirect": obj.get("mustRedirect"), - "redirectUrl": obj.get("redirectUrl") - }) - return _obj - - diff --git a/Monei/models/payment_payment_method.py b/Monei/models/payment_payment_method.py deleted file mode 100644 index 060a98f..0000000 --- a/Monei/models/payment_payment_method.py +++ /dev/null @@ -1,150 +0,0 @@ -# coding: utf-8 - -""" - MONEI API v1 - -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

- - The version of the OpenAPI document: 1.5.1 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator -from typing import Any, ClassVar, Dict, List, Optional -from Monei.models.payment_payment_method_bizum import PaymentPaymentMethodBizum -from Monei.models.payment_payment_method_card import PaymentPaymentMethodCard -from Monei.models.payment_payment_method_cofidis import PaymentPaymentMethodCofidis -from Monei.models.payment_payment_method_klarna import PaymentPaymentMethodKlarna -from Monei.models.payment_payment_method_mbway import PaymentPaymentMethodMbway -from Monei.models.payment_payment_method_paypal import PaymentPaymentMethodPaypal -from Monei.models.payment_payment_method_sepa import PaymentPaymentMethodSepa -from Monei.models.payment_payment_method_trustly import PaymentPaymentMethodTrustly -from typing import Optional, Set -from typing_extensions import Self - -class PaymentPaymentMethod(BaseModel): - """ - Details about the payment method at the time of the transaction. - """ # noqa: E501 - method: Optional[StrictStr] = Field(default=None, description="Payment method type.") - card: Optional[PaymentPaymentMethodCard] = None - bizum: Optional[PaymentPaymentMethodBizum] = None - paypal: Optional[PaymentPaymentMethodPaypal] = None - cofidis: Optional[PaymentPaymentMethodCofidis] = None - cofidis_loan: Optional[PaymentPaymentMethodCofidis] = Field(default=None, alias="cofidisLoan") - mbway: Optional[PaymentPaymentMethodMbway] = None - trustly: Optional[PaymentPaymentMethodTrustly] = None - sepa: Optional[PaymentPaymentMethodSepa] = None - klarna: Optional[PaymentPaymentMethodKlarna] = None - __properties: ClassVar[List[str]] = ["method", "card", "bizum", "paypal", "cofidis", "cofidisLoan", "mbway", "trustly", "sepa", "klarna"] - - @field_validator('method') - def method_validate_enum(cls, value): - """Validates the enum""" - if value is None: - return value - - if value not in set(['alipay', 'card', 'bizum', 'paypal', 'cofidis', 'cofidisLoan', 'mbway', 'multibanco', 'iDeal', 'bancontact', 'sofort', 'trustly', 'sepa', 'klarna', 'giropay', 'eps', 'blik']): - raise ValueError("must be one of enum values ('alipay', 'card', 'bizum', 'paypal', 'cofidis', 'cofidisLoan', 'mbway', 'multibanco', 'iDeal', 'bancontact', 'sofort', 'trustly', 'sepa', 'klarna', 'giropay', 'eps', 'blik')") - return value - - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of PaymentPaymentMethod from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of card - if self.card: - _dict['card'] = self.card.to_dict() - # override the default output from pydantic by calling `to_dict()` of bizum - if self.bizum: - _dict['bizum'] = self.bizum.to_dict() - # override the default output from pydantic by calling `to_dict()` of paypal - if self.paypal: - _dict['paypal'] = self.paypal.to_dict() - # override the default output from pydantic by calling `to_dict()` of cofidis - if self.cofidis: - _dict['cofidis'] = self.cofidis.to_dict() - # override the default output from pydantic by calling `to_dict()` of cofidis_loan - if self.cofidis_loan: - _dict['cofidisLoan'] = self.cofidis_loan.to_dict() - # override the default output from pydantic by calling `to_dict()` of mbway - if self.mbway: - _dict['mbway'] = self.mbway.to_dict() - # override the default output from pydantic by calling `to_dict()` of trustly - if self.trustly: - _dict['trustly'] = self.trustly.to_dict() - # override the default output from pydantic by calling `to_dict()` of sepa - if self.sepa: - _dict['sepa'] = self.sepa.to_dict() - # override the default output from pydantic by calling `to_dict()` of klarna - if self.klarna: - _dict['klarna'] = self.klarna.to_dict() - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of PaymentPaymentMethod from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "method": obj.get("method"), - "card": PaymentPaymentMethodCard.from_dict(obj["card"]) if obj.get("card") is not None else None, - "bizum": PaymentPaymentMethodBizum.from_dict(obj["bizum"]) if obj.get("bizum") is not None else None, - "paypal": PaymentPaymentMethodPaypal.from_dict(obj["paypal"]) if obj.get("paypal") is not None else None, - "cofidis": PaymentPaymentMethodCofidis.from_dict(obj["cofidis"]) if obj.get("cofidis") is not None else None, - "cofidisLoan": PaymentPaymentMethodCofidis.from_dict(obj["cofidisLoan"]) if obj.get("cofidisLoan") is not None else None, - "mbway": PaymentPaymentMethodMbway.from_dict(obj["mbway"]) if obj.get("mbway") is not None else None, - "trustly": PaymentPaymentMethodTrustly.from_dict(obj["trustly"]) if obj.get("trustly") is not None else None, - "sepa": PaymentPaymentMethodSepa.from_dict(obj["sepa"]) if obj.get("sepa") is not None else None, - "klarna": PaymentPaymentMethodKlarna.from_dict(obj["klarna"]) if obj.get("klarna") is not None else None - }) - return _obj - - diff --git a/Monei/models/payment_payment_method_bizum.py b/Monei/models/payment_payment_method_bizum.py deleted file mode 100644 index 9667a7c..0000000 --- a/Monei/models/payment_payment_method_bizum.py +++ /dev/null @@ -1,87 +0,0 @@ -# coding: utf-8 - -""" - MONEI API v1 - -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

- - The version of the OpenAPI document: 1.5.1 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set -from typing_extensions import Self - -class PaymentPaymentMethodBizum(BaseModel): - """ - Details about the Bizum account used as payment method at the time of the transaction. - """ # noqa: E501 - phone_number: Optional[StrictStr] = Field(default=None, description="Phone number in E.164 format used to pay with `bizum`.", alias="phoneNumber") - __properties: ClassVar[List[str]] = ["phoneNumber"] - - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of PaymentPaymentMethodBizum from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of PaymentPaymentMethodBizum from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "phoneNumber": obj.get("phoneNumber") - }) - return _obj - - diff --git a/Monei/models/payment_payment_method_bizum_input.py b/Monei/models/payment_payment_method_bizum_input.py deleted file mode 100644 index 1600d00..0000000 --- a/Monei/models/payment_payment_method_bizum_input.py +++ /dev/null @@ -1,87 +0,0 @@ -# coding: utf-8 - -""" - MONEI API v1 - -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

- - The version of the OpenAPI document: 1.5.1 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set -from typing_extensions import Self - -class PaymentPaymentMethodBizumInput(BaseModel): - """ - Details about the Bizum account used for this payment. If provided phone number is valid and registered in Bizum, MONEI will try to confirm the payment directly. - """ # noqa: E501 - phone_number: Optional[StrictStr] = Field(default=None, description="Phone number in E.164 format used to pay with `bizum`.", alias="phoneNumber") - __properties: ClassVar[List[str]] = ["phoneNumber"] - - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of PaymentPaymentMethodBizumInput from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of PaymentPaymentMethodBizumInput from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "phoneNumber": obj.get("phoneNumber") - }) - return _obj - - diff --git a/Monei/models/payment_payment_method_card.py b/Monei/models/payment_payment_method_card.py deleted file mode 100644 index 378c229..0000000 --- a/Monei/models/payment_payment_method_card.py +++ /dev/null @@ -1,147 +0,0 @@ -# coding: utf-8 - -""" - MONEI API v1 - -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

- - The version of the OpenAPI document: 1.5.1 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr, field_validator -from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set -from typing_extensions import Self - -class PaymentPaymentMethodCard(BaseModel): - """ - Details about the card used as payment method at the time of the transaction. - """ # noqa: E501 - country: Optional[StrictStr] = Field(default=None, description="Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).") - brand: Optional[StrictStr] = Field(default=None, description="Card brand.") - type: Optional[StrictStr] = Field(default=None, description="Card type `debit` or `credit`.") - three_d_secure: Optional[StrictBool] = Field(default=None, description="Whether this transaction used 3D Secure authentication.", alias="threeDSecure") - three_d_secure_version: Optional[StrictStr] = Field(default=None, description="The protocol version of the 3DS challenge.", alias="threeDSecureVersion") - three_d_secure_flow: Optional[StrictStr] = Field(default=None, description="The flow used for 3DS authentication. - `CHALLENGE` - In a challenge flow, the issuer requires additional shopper interaction, either through biometrics, two-factor authentication, or similar methods based on [Strong Customer Authentication (SCA)](https://en.wikipedia.org/wiki/Strong_customer_authentication) factors. - `FRICTIONLESS` - In a frictionless flow, the acquirer, issuer, and card scheme exchange all necessary information in the background through passive authentication using the shopper's device fingerprint. The transaction is completed without further shopper interaction. - `FRICTIONLESS_CHALLENGE` - This flow is the complete 3DS flow. It is similar to the 3DS frictionless flow but includes an additional authentication step (challenge) that will be invoked if the information provided in the data collection step does not suffice to determine the risk-level of the transaction. - `DIRECT` - This transaction did not require [Strong Customer Authentication (SCA)](https://en.wikipedia.org/wiki/Strong_customer_authentication) due to the low risk ", alias="threeDSecureFlow") - expiration: Optional[StrictInt] = Field(default=None, description="Time at which the card will expire. Measured in seconds since the Unix epoch. ") - last4: Optional[StrictStr] = Field(default=None, description="The last four digits of the card.") - tokenization_method: Optional[StrictStr] = Field(default=None, description="The digital wallet used to tokenize the card.", alias="tokenizationMethod") - cardholder_name: Optional[StrictStr] = Field(default=None, description="The name of the cardholder.", alias="cardholderName") - cardholder_email: Optional[StrictStr] = Field(default=None, description="The email of the cardholder.", alias="cardholderEmail") - __properties: ClassVar[List[str]] = ["country", "brand", "type", "threeDSecure", "threeDSecureVersion", "threeDSecureFlow", "expiration", "last4", "tokenizationMethod", "cardholderName", "cardholderEmail"] - - @field_validator('brand') - def brand_validate_enum(cls, value): - """Validates the enum""" - if value is None: - return value - - if value not in set(['visa', 'mastercard', 'diners', 'amex', 'jcb', 'unionpay', 'unknown']): - raise ValueError("must be one of enum values ('visa', 'mastercard', 'diners', 'amex', 'jcb', 'unionpay', 'unknown')") - return value - - @field_validator('type') - def type_validate_enum(cls, value): - """Validates the enum""" - if value is None: - return value - - if value not in set(['debit', 'credit']): - raise ValueError("must be one of enum values ('debit', 'credit')") - return value - - @field_validator('three_d_secure_flow') - def three_d_secure_flow_validate_enum(cls, value): - """Validates the enum""" - if value is None: - return value - - if value not in set(['CHALLENGE', 'FRICTIONLESS', 'FRICTIONLESS_CHALLENGE', 'DIRECT']): - raise ValueError("must be one of enum values ('CHALLENGE', 'FRICTIONLESS', 'FRICTIONLESS_CHALLENGE', 'DIRECT')") - return value - - @field_validator('tokenization_method') - def tokenization_method_validate_enum(cls, value): - """Validates the enum""" - if value is None: - return value - - if value not in set(['applePay', 'googlePay', 'clickToPay']): - raise ValueError("must be one of enum values ('applePay', 'googlePay', 'clickToPay')") - return value - - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of PaymentPaymentMethodCard from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of PaymentPaymentMethodCard from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "country": obj.get("country"), - "brand": obj.get("brand"), - "type": obj.get("type"), - "threeDSecure": obj.get("threeDSecure"), - "threeDSecureVersion": obj.get("threeDSecureVersion"), - "threeDSecureFlow": obj.get("threeDSecureFlow"), - "expiration": obj.get("expiration"), - "last4": obj.get("last4"), - "tokenizationMethod": obj.get("tokenizationMethod"), - "cardholderName": obj.get("cardholderName"), - "cardholderEmail": obj.get("cardholderEmail") - }) - return _obj - - diff --git a/Monei/models/payment_payment_method_card_input.py b/Monei/models/payment_payment_method_card_input.py deleted file mode 100644 index 9745725..0000000 --- a/Monei/models/payment_payment_method_card_input.py +++ /dev/null @@ -1,97 +0,0 @@ -# coding: utf-8 - -""" - MONEI API v1 - -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

- - The version of the OpenAPI document: 1.5.1 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set -from typing_extensions import Self - -class PaymentPaymentMethodCardInput(BaseModel): - """ - Details about the card used as payment method. If provided, MONEI will try to confirm the payment directly. - """ # noqa: E501 - number: Optional[StrictStr] = Field(default=None, description="The card number, as a string without any separators.") - cvc: Optional[StrictStr] = Field(default=None, description="Card security code.") - exp_month: Optional[StrictStr] = Field(default=None, description="Two-digit number representing the card's expiration month.", alias="expMonth") - exp_year: Optional[StrictStr] = Field(default=None, description="Two-digit number representing the card's expiration year.", alias="expYear") - cardholder_name: Optional[StrictStr] = Field(default=None, description="The cardholder's name, as stated in the credit card.", alias="cardholderName") - cardholder_email: Optional[StrictStr] = Field(default=None, description="The cardholder's email address.", alias="cardholderEmail") - __properties: ClassVar[List[str]] = ["number", "cvc", "expMonth", "expYear", "cardholderName", "cardholderEmail"] - - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of PaymentPaymentMethodCardInput from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of PaymentPaymentMethodCardInput from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "number": obj.get("number"), - "cvc": obj.get("cvc"), - "expMonth": obj.get("expMonth"), - "expYear": obj.get("expYear"), - "cardholderName": obj.get("cardholderName"), - "cardholderEmail": obj.get("cardholderEmail") - }) - return _obj - - diff --git a/Monei/models/payment_payment_method_cofidis.py b/Monei/models/payment_payment_method_cofidis.py deleted file mode 100644 index 11b04e3..0000000 --- a/Monei/models/payment_payment_method_cofidis.py +++ /dev/null @@ -1,87 +0,0 @@ -# coding: utf-8 - -""" - MONEI API v1 - -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

- - The version of the OpenAPI document: 1.5.1 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set -from typing_extensions import Self - -class PaymentPaymentMethodCofidis(BaseModel): - """ - Details from Cofidis order used as payment method at the time of the transaction. - """ # noqa: E501 - order_id: Optional[StrictStr] = Field(default=None, description="The Cofidis' order ID.", alias="orderId") - __properties: ClassVar[List[str]] = ["orderId"] - - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of PaymentPaymentMethodCofidis from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of PaymentPaymentMethodCofidis from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "orderId": obj.get("orderId") - }) - return _obj - - diff --git a/Monei/models/payment_payment_method_input.py b/Monei/models/payment_payment_method_input.py deleted file mode 100644 index 6ee6c8c..0000000 --- a/Monei/models/payment_payment_method_input.py +++ /dev/null @@ -1,97 +0,0 @@ -# coding: utf-8 - -""" - MONEI API v1 - -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

- - The version of the OpenAPI document: 1.5.1 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict -from typing import Any, ClassVar, Dict, List, Optional -from Monei.models.payment_payment_method_bizum_input import PaymentPaymentMethodBizumInput -from Monei.models.payment_payment_method_card_input import PaymentPaymentMethodCardInput -from typing import Optional, Set -from typing_extensions import Self - -class PaymentPaymentMethodInput(BaseModel): - """ - An information about a payment method used for this payment. We recommend using `paymentToken` instead, as it is more secure way to pass sensitive payment information. Processing credit card information on your server requires [PCI DSS compliance](https://www.investopedia.com/terms/p/pci-compliance.asp). - """ # noqa: E501 - card: Optional[PaymentPaymentMethodCardInput] = None - bizum: Optional[PaymentPaymentMethodBizumInput] = None - __properties: ClassVar[List[str]] = ["card", "bizum"] - - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of PaymentPaymentMethodInput from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of card - if self.card: - _dict['card'] = self.card.to_dict() - # override the default output from pydantic by calling `to_dict()` of bizum - if self.bizum: - _dict['bizum'] = self.bizum.to_dict() - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of PaymentPaymentMethodInput from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "card": PaymentPaymentMethodCardInput.from_dict(obj["card"]) if obj.get("card") is not None else None, - "bizum": PaymentPaymentMethodBizumInput.from_dict(obj["bizum"]) if obj.get("bizum") is not None else None - }) - return _obj - - diff --git a/Monei/models/payment_payment_method_klarna.py b/Monei/models/payment_payment_method_klarna.py deleted file mode 100644 index 11606bb..0000000 --- a/Monei/models/payment_payment_method_klarna.py +++ /dev/null @@ -1,109 +0,0 @@ -# coding: utf-8 - -""" - MONEI API v1 - -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

- - The version of the OpenAPI document: 1.5.1 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator -from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set -from typing_extensions import Self - -class PaymentPaymentMethodKlarna(BaseModel): - """ - Details from Klarna order used as payment method at the time of the transaction. - """ # noqa: E501 - billing_category: Optional[StrictStr] = Field(default=None, alias="billingCategory") - auth_payment_method: Optional[StrictStr] = Field(default=None, alias="authPaymentMethod") - __properties: ClassVar[List[str]] = ["billingCategory", "authPaymentMethod"] - - @field_validator('billing_category') - def billing_category_validate_enum(cls, value): - """Validates the enum""" - if value is None: - return value - - if value not in set(['PAY_LATER', 'PAY_NOW', 'SLICE_IT', 'SLICE_IT_BY_CARD']): - raise ValueError("must be one of enum values ('PAY_LATER', 'PAY_NOW', 'SLICE_IT', 'SLICE_IT_BY_CARD')") - return value - - @field_validator('auth_payment_method') - def auth_payment_method_validate_enum(cls, value): - """Validates the enum""" - if value is None: - return value - - if value not in set(['invoice', 'fixed_amount', 'pix', 'base_account', 'deferred_interest', 'direct_debit', 'direct_bank_transfer', 'b2b_invoice', 'card', 'slice_it_by_card']): - raise ValueError("must be one of enum values ('invoice', 'fixed_amount', 'pix', 'base_account', 'deferred_interest', 'direct_debit', 'direct_bank_transfer', 'b2b_invoice', 'card', 'slice_it_by_card')") - return value - - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of PaymentPaymentMethodKlarna from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of PaymentPaymentMethodKlarna from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "billingCategory": obj.get("billingCategory"), - "authPaymentMethod": obj.get("authPaymentMethod") - }) - return _obj - - diff --git a/Monei/models/payment_payment_method_mbway.py b/Monei/models/payment_payment_method_mbway.py deleted file mode 100644 index 8ab8207..0000000 --- a/Monei/models/payment_payment_method_mbway.py +++ /dev/null @@ -1,87 +0,0 @@ -# coding: utf-8 - -""" - MONEI API v1 - -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

- - The version of the OpenAPI document: 1.5.1 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set -from typing_extensions import Self - -class PaymentPaymentMethodMbway(BaseModel): - """ - Details from MBWay order used as payment method at the time of the transaction. - """ # noqa: E501 - phone_number: Optional[StrictStr] = Field(default=None, description="Phone number in E.164 format used to pay with `mbway`.", alias="phoneNumber") - __properties: ClassVar[List[str]] = ["phoneNumber"] - - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of PaymentPaymentMethodMbway from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of PaymentPaymentMethodMbway from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "phoneNumber": obj.get("phoneNumber") - }) - return _obj - - diff --git a/Monei/models/payment_payment_method_paypal.py b/Monei/models/payment_payment_method_paypal.py deleted file mode 100644 index 848af50..0000000 --- a/Monei/models/payment_payment_method_paypal.py +++ /dev/null @@ -1,87 +0,0 @@ -# coding: utf-8 - -""" - MONEI API v1 - -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

- - The version of the OpenAPI document: 1.5.1 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set -from typing_extensions import Self - -class PaymentPaymentMethodPaypal(BaseModel): - """ - Details from Paypal order used as payment method at the time of the transaction. - """ # noqa: E501 - order_id: Optional[StrictStr] = Field(default=None, description="The Paypal's order ID.", alias="orderId") - __properties: ClassVar[List[str]] = ["orderId"] - - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of PaymentPaymentMethodPaypal from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of PaymentPaymentMethodPaypal from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "orderId": obj.get("orderId") - }) - return _obj - - diff --git a/Monei/models/payment_payment_method_sepa.py b/Monei/models/payment_payment_method_sepa.py deleted file mode 100644 index 41ff750..0000000 --- a/Monei/models/payment_payment_method_sepa.py +++ /dev/null @@ -1,103 +0,0 @@ -# coding: utf-8 - -""" - MONEI API v1 - -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

- - The version of the OpenAPI document: 1.5.1 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set -from typing_extensions import Self - -class PaymentPaymentMethodSepa(BaseModel): - """ - Details from SEPA order used as payment method at the time of the transaction. - """ # noqa: E501 - accountholder_address: Optional[StrictStr] = Field(default=None, description="The address of the account holder.", alias="accountholderAddress") - accountholder_email: Optional[StrictStr] = Field(default=None, description="The email of the account holder.", alias="accountholderEmail") - accountholder_name: Optional[StrictStr] = Field(default=None, description="The name of the account holder.", alias="accountholderName") - country_code: Optional[StrictStr] = Field(default=None, description="The country code of the account holder.", alias="countryCode") - bank_address: Optional[StrictStr] = Field(default=None, description="The address of the bank.", alias="bankAddress") - bank_code: Optional[StrictStr] = Field(default=None, description="The code of the bank.", alias="bankCode") - bank_name: Optional[StrictStr] = Field(default=None, description="The name of the bank.", alias="bankName") - bic: Optional[StrictStr] = Field(default=None, description="The BIC of the bank.") - last4: Optional[StrictStr] = Field(default=None, description="The last 4 digits of the IBAN.") - __properties: ClassVar[List[str]] = ["accountholderAddress", "accountholderEmail", "accountholderName", "countryCode", "bankAddress", "bankCode", "bankName", "bic", "last4"] - - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of PaymentPaymentMethodSepa from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of PaymentPaymentMethodSepa from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "accountholderAddress": obj.get("accountholderAddress"), - "accountholderEmail": obj.get("accountholderEmail"), - "accountholderName": obj.get("accountholderName"), - "countryCode": obj.get("countryCode"), - "bankAddress": obj.get("bankAddress"), - "bankCode": obj.get("bankCode"), - "bankName": obj.get("bankName"), - "bic": obj.get("bic"), - "last4": obj.get("last4") - }) - return _obj - - diff --git a/Monei/models/payment_payment_method_trustly.py b/Monei/models/payment_payment_method_trustly.py deleted file mode 100644 index 9c6fa0a..0000000 --- a/Monei/models/payment_payment_method_trustly.py +++ /dev/null @@ -1,87 +0,0 @@ -# coding: utf-8 - -""" - MONEI API v1 - -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

- - The version of the OpenAPI document: 1.5.1 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set -from typing_extensions import Self - -class PaymentPaymentMethodTrustly(BaseModel): - """ - Details from Trustly order used as payment method at the time of the transaction. - """ # noqa: E501 - customer_id: Optional[StrictStr] = Field(default=None, description="The Trustly's customer ID.", alias="customerId") - __properties: ClassVar[List[str]] = ["customerId"] - - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of PaymentPaymentMethodTrustly from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of PaymentPaymentMethodTrustly from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "customerId": obj.get("customerId") - }) - return _obj - - diff --git a/Monei/models/payment_refund_reason.py b/Monei/models/payment_refund_reason.py deleted file mode 100644 index cd49d48..0000000 --- a/Monei/models/payment_refund_reason.py +++ /dev/null @@ -1,38 +0,0 @@ -# coding: utf-8 - -""" - MONEI API v1 - -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

- - The version of the OpenAPI document: 1.5.1 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import json -from enum import Enum -from typing_extensions import Self - - -class PaymentRefundReason(str, Enum): - """ - The reason for refunding the Payment. - """ - - """ - allowed enum values - """ - DUPLICATED = 'duplicated' - FRAUDULENT = 'fraudulent' - REQUESTED_BY_CUSTOMER = 'requested_by_customer' - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of PaymentRefundReason from a JSON string""" - return cls(json.loads(json_str)) - - diff --git a/Monei/models/payment_sequence.py b/Monei/models/payment_sequence.py deleted file mode 100644 index 527410b..0000000 --- a/Monei/models/payment_sequence.py +++ /dev/null @@ -1,100 +0,0 @@ -# coding: utf-8 - -""" - MONEI API v1 - -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

- - The version of the OpenAPI document: 1.5.1 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict, StrictStr, field_validator -from typing import Any, ClassVar, Dict, List, Optional -from Monei.models.payment_sequence_recurring import PaymentSequenceRecurring -from typing import Optional, Set -from typing_extensions import Self - -class PaymentSequence(BaseModel): - """ - This field needs to be sent in order to mark the beginning of a sequence of payments (recurring/subscriptions, installments, and so). Specific configurations can be set in the inside properties (`recurring`). - """ # noqa: E501 - type: StrictStr - recurring: Optional[PaymentSequenceRecurring] = None - __properties: ClassVar[List[str]] = ["type", "recurring"] - - @field_validator('type') - def type_validate_enum(cls, value): - """Validates the enum""" - if value not in set(['recurring']): - raise ValueError("must be one of enum values ('recurring')") - return value - - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of PaymentSequence from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of recurring - if self.recurring: - _dict['recurring'] = self.recurring.to_dict() - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of PaymentSequence from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "type": obj.get("type"), - "recurring": PaymentSequenceRecurring.from_dict(obj["recurring"]) if obj.get("recurring") is not None else None - }) - return _obj - - diff --git a/Monei/models/payment_sequence_recurring.py b/Monei/models/payment_sequence_recurring.py deleted file mode 100644 index 26d059b..0000000 --- a/Monei/models/payment_sequence_recurring.py +++ /dev/null @@ -1,89 +0,0 @@ -# coding: utf-8 - -""" - MONEI API v1 - -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

- - The version of the OpenAPI document: 1.5.1 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set -from typing_extensions import Self - -class PaymentSequenceRecurring(BaseModel): - """ - Specific configurations for recurring payments. Will only be used when `sequence`.`type` is `recurring`. - """ # noqa: E501 - expiry: Optional[StrictStr] = Field(default='*(The payment method or card expiration)*', description="Date after which no further recurring payments will be performed. Must be formatted as `YYYYMMDD`. ") - frequency: Optional[StrictInt] = Field(default=25, description="The minimum number of **days** between the different recurring payments. ") - __properties: ClassVar[List[str]] = ["expiry", "frequency"] - - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of PaymentSequenceRecurring from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of PaymentSequenceRecurring from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "expiry": obj.get("expiry") if obj.get("expiry") is not None else '*(The payment method or card expiration)*', - "frequency": obj.get("frequency") if obj.get("frequency") is not None else 25 - }) - return _obj - - diff --git a/Monei/models/payment_session_details.py b/Monei/models/payment_session_details.py deleted file mode 100644 index 998cd15..0000000 --- a/Monei/models/payment_session_details.py +++ /dev/null @@ -1,119 +0,0 @@ -# coding: utf-8 - -""" - MONEI API v1 - -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

- - The version of the OpenAPI document: 1.5.1 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set -from typing_extensions import Self - -class PaymentSessionDetails(BaseModel): - """ - Information related to the browsing session of the user who initiated the payment. - """ # noqa: E501 - ip: Optional[StrictStr] = Field(default=None, description="The IP address where the operation originated.") - country_code: Optional[StrictStr] = Field(default=None, description="Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).", alias="countryCode") - lang: Optional[StrictStr] = Field(default=None, description="Two-letter language code ([ISO 639-1](https://en.wikipedia.org/wiki/ISO_639-1)).") - device_type: Optional[StrictStr] = Field(default=None, description="Device type, could be `desktop`, `mobile`, `smartTV`, `tablet`.", alias="deviceType") - device_model: Optional[StrictStr] = Field(default=None, description="Information about the device used for the browser session (e.g., `iPhone`).", alias="deviceModel") - browser: Optional[StrictStr] = Field(default=None, description="The browser used in this browser session (e.g., `Mobile Safari`).") - browser_version: Optional[StrictStr] = Field(default=None, description="The version for the browser session (e.g., `13.1.1`).", alias="browserVersion") - os: Optional[StrictStr] = Field(default=None, description="Operation system (e.g., `iOS`).") - os_version: Optional[StrictStr] = Field(default=None, description="Operation system version (e.g., `13.5.1`).", alias="osVersion") - source: Optional[StrictStr] = Field(default=None, description="The source component from where the operation was generated (mostly for our SDK's).") - source_version: Optional[StrictStr] = Field(default=None, description="The source component version from where the operation was generated (mostly for our SDK's).", alias="sourceVersion") - user_agent: Optional[StrictStr] = Field(default=None, description="Full user agent string of the browser session.", alias="userAgent") - browser_accept: Optional[StrictStr] = Field(default=None, description="Browser accept header.", alias="browserAccept") - browser_color_depth: Optional[StrictInt] = Field(default=None, description="The color depth of the browser session (e.g., `24`).", alias="browserColorDepth") - browser_screen_height: Optional[StrictInt] = Field(default=None, description="The screen height of the browser session (e.g., `1152`).", alias="browserScreenHeight") - browser_screen_width: Optional[StrictInt] = Field(default=None, description="The screen width of the browser session (e.g., `2048`).", alias="browserScreenWidth") - browser_timezone_offset: Optional[StrictStr] = Field(default=None, description="The timezone offset of the browser session (e.g., `-120`).", alias="browserTimezoneOffset") - __properties: ClassVar[List[str]] = ["ip", "countryCode", "lang", "deviceType", "deviceModel", "browser", "browserVersion", "os", "osVersion", "source", "sourceVersion", "userAgent", "browserAccept", "browserColorDepth", "browserScreenHeight", "browserScreenWidth", "browserTimezoneOffset"] - - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of PaymentSessionDetails from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of PaymentSessionDetails from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "ip": obj.get("ip"), - "countryCode": obj.get("countryCode"), - "lang": obj.get("lang"), - "deviceType": obj.get("deviceType"), - "deviceModel": obj.get("deviceModel"), - "browser": obj.get("browser"), - "browserVersion": obj.get("browserVersion"), - "os": obj.get("os"), - "osVersion": obj.get("osVersion"), - "source": obj.get("source"), - "sourceVersion": obj.get("sourceVersion"), - "userAgent": obj.get("userAgent"), - "browserAccept": obj.get("browserAccept"), - "browserColorDepth": obj.get("browserColorDepth"), - "browserScreenHeight": obj.get("browserScreenHeight"), - "browserScreenWidth": obj.get("browserScreenWidth"), - "browserTimezoneOffset": obj.get("browserTimezoneOffset") - }) - return _obj - - diff --git a/Monei/models/payment_shipping_details.py b/Monei/models/payment_shipping_details.py deleted file mode 100644 index 515903a..0000000 --- a/Monei/models/payment_shipping_details.py +++ /dev/null @@ -1,101 +0,0 @@ -# coding: utf-8 - -""" - MONEI API v1 - -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

- - The version of the OpenAPI document: 1.5.1 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from Monei.models.address import Address -from typing import Optional, Set -from typing_extensions import Self - -class PaymentShippingDetails(BaseModel): - """ - Shipping information associated with the payment. - """ # noqa: E501 - name: Optional[StrictStr] = Field(default=None, description="The shipping customer's full name.") - email: Optional[StrictStr] = Field(default=None, description="The shipping customer's email address.") - phone: Optional[StrictStr] = Field(default=None, description="The shipping customer's phone number in E.164 format.") - company: Optional[StrictStr] = Field(default=None, description="Name of the company where the shipment is going.") - tax_id: Optional[StrictStr] = Field(default=None, description="Company tax ID.", alias="taxId") - address: Optional[Address] = None - __properties: ClassVar[List[str]] = ["name", "email", "phone", "company", "taxId", "address"] - - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of PaymentShippingDetails from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of address - if self.address: - _dict['address'] = self.address.to_dict() - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of PaymentShippingDetails from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "name": obj.get("name"), - "email": obj.get("email"), - "phone": obj.get("phone"), - "company": obj.get("company"), - "taxId": obj.get("taxId"), - "address": Address.from_dict(obj["address"]) if obj.get("address") is not None else None - }) - return _obj - - diff --git a/Monei/models/payment_shop.py b/Monei/models/payment_shop.py deleted file mode 100644 index 0e4e2a2..0000000 --- a/Monei/models/payment_shop.py +++ /dev/null @@ -1,89 +0,0 @@ -# coding: utf-8 - -""" - MONEI API v1 - -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

- - The version of the OpenAPI document: 1.5.1 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set -from typing_extensions import Self - -class PaymentShop(BaseModel): - """ - The information about the shop (used in [hosted payment page](https://docs.monei.com/docs/use-prebuilt-payment-page)). - """ # noqa: E501 - name: Optional[StrictStr] = Field(default=None, description="The shop name.") - country: Optional[StrictStr] = Field(default=None, description="Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).") - __properties: ClassVar[List[str]] = ["name", "country"] - - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of PaymentShop from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of PaymentShop from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "name": obj.get("name"), - "country": obj.get("country") - }) - return _obj - - diff --git a/Monei/models/payment_status.py b/Monei/models/payment_status.py deleted file mode 100644 index 75c07f6..0000000 --- a/Monei/models/payment_status.py +++ /dev/null @@ -1,43 +0,0 @@ -# coding: utf-8 - -""" - MONEI API v1 - -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

- - The version of the OpenAPI document: 1.5.1 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import json -from enum import Enum -from typing_extensions import Self - - -class PaymentStatus(str, Enum): - """ - The status of the payment. - """ - - """ - allowed enum values - """ - SUCCEEDED = 'SUCCEEDED' - PENDING = 'PENDING' - FAILED = 'FAILED' - CANCELED = 'CANCELED' - REFUNDED = 'REFUNDED' - PARTIALLY_REFUNDED = 'PARTIALLY_REFUNDED' - AUTHORIZED = 'AUTHORIZED' - EXPIRED = 'EXPIRED' - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of PaymentStatus from a JSON string""" - return cls(json.loads(json_str)) - - diff --git a/Monei/models/payment_trace_details.py b/Monei/models/payment_trace_details.py deleted file mode 100644 index 82280d0..0000000 --- a/Monei/models/payment_trace_details.py +++ /dev/null @@ -1,123 +0,0 @@ -# coding: utf-8 - -""" - MONEI API v1 - -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

- - The version of the OpenAPI document: 1.5.1 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set -from typing_extensions import Self - -class PaymentTraceDetails(BaseModel): - """ - Information related to the browsing session of the user who initiated the payment. - """ # noqa: E501 - ip: Optional[StrictStr] = Field(default=None, description="The IP address where the operation originated.") - country_code: Optional[StrictStr] = Field(default=None, description="Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).", alias="countryCode") - lang: Optional[StrictStr] = Field(default=None, description="Two-letter language code ([ISO 639-1](https://en.wikipedia.org/wiki/ISO_639-1)).") - device_type: Optional[StrictStr] = Field(default=None, description="Device type, could be `desktop`, `mobile`, `smartTV`, `tablet`.", alias="deviceType") - device_model: Optional[StrictStr] = Field(default=None, description="Information about the device used for the browser session (e.g., `iPhone`).", alias="deviceModel") - browser: Optional[StrictStr] = Field(default=None, description="The browser used in this browser session (e.g., `Mobile Safari`).") - browser_version: Optional[StrictStr] = Field(default=None, description="The version for the browser session (e.g., `13.1.1`).", alias="browserVersion") - os: Optional[StrictStr] = Field(default=None, description="Operation system (e.g., `iOS`).") - os_version: Optional[StrictStr] = Field(default=None, description="Operation system version (e.g., `13.5.1`).", alias="osVersion") - source: Optional[StrictStr] = Field(default=None, description="The source component from where the operation was generated (mostly for our SDK's).") - source_version: Optional[StrictStr] = Field(default=None, description="The source component version from where the operation was generated (mostly for our SDK's).", alias="sourceVersion") - user_agent: Optional[StrictStr] = Field(default=None, description="Full user agent string of the browser session.", alias="userAgent") - browser_accept: Optional[StrictStr] = Field(default=None, description="Browser accept header.", alias="browserAccept") - browser_color_depth: Optional[StrictInt] = Field(default=None, description="The color depth of the browser session (e.g., `24`).", alias="browserColorDepth") - browser_screen_height: Optional[StrictInt] = Field(default=None, description="The screen height of the browser session (e.g., `1152`).", alias="browserScreenHeight") - browser_screen_width: Optional[StrictInt] = Field(default=None, description="The screen width of the browser session (e.g., `2048`).", alias="browserScreenWidth") - browser_timezone_offset: Optional[StrictStr] = Field(default=None, description="The timezone offset of the browser session (e.g., `-120`).", alias="browserTimezoneOffset") - user_id: Optional[StrictStr] = Field(default=None, description="The ID of the user that started the operation.", alias="userId") - user_email: Optional[StrictStr] = Field(default=None, description="The email of the user that started the operation.", alias="userEmail") - __properties: ClassVar[List[str]] = ["ip", "countryCode", "lang", "deviceType", "deviceModel", "browser", "browserVersion", "os", "osVersion", "source", "sourceVersion", "userAgent", "browserAccept", "browserColorDepth", "browserScreenHeight", "browserScreenWidth", "browserTimezoneOffset", "userId", "userEmail"] - - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of PaymentTraceDetails from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of PaymentTraceDetails from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "ip": obj.get("ip"), - "countryCode": obj.get("countryCode"), - "lang": obj.get("lang"), - "deviceType": obj.get("deviceType"), - "deviceModel": obj.get("deviceModel"), - "browser": obj.get("browser"), - "browserVersion": obj.get("browserVersion"), - "os": obj.get("os"), - "osVersion": obj.get("osVersion"), - "source": obj.get("source"), - "sourceVersion": obj.get("sourceVersion"), - "userAgent": obj.get("userAgent"), - "browserAccept": obj.get("browserAccept"), - "browserColorDepth": obj.get("browserColorDepth"), - "browserScreenHeight": obj.get("browserScreenHeight"), - "browserScreenWidth": obj.get("browserScreenWidth"), - "browserTimezoneOffset": obj.get("browserTimezoneOffset"), - "userId": obj.get("userId"), - "userEmail": obj.get("userEmail") - }) - return _obj - - diff --git a/Monei/models/payment_transaction_type.py b/Monei/models/payment_transaction_type.py deleted file mode 100644 index ffd6404..0000000 --- a/Monei/models/payment_transaction_type.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding: utf-8 - -""" - MONEI API v1 - -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

- - The version of the OpenAPI document: 1.5.1 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import json -from enum import Enum -from typing_extensions import Self - - -class PaymentTransactionType(str, Enum): - """ - Controls when the funds will be captured. - `SALE` - **Default**. MONEI automatically captures funds when the customer authorizes the payment. - `AUTH` - Place a hold on the funds when the customer authorizes the payment, but don't capture the funds until later. - `PAYOUT` - Send funds to the customer - `VERIF` - Verify the card without placing a hold or capturing funds. - """ - - """ - allowed enum values - """ - SALE = 'SALE' - AUTH = 'AUTH' - PAYOUT = 'PAYOUT' - VERIF = 'VERIF' - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of PaymentTransactionType from a JSON string""" - return cls(json.loads(json_str)) - - diff --git a/Monei/models/recurring_payment_request.py b/Monei/models/recurring_payment_request.py deleted file mode 100644 index faeeca7..0000000 --- a/Monei/models/recurring_payment_request.py +++ /dev/null @@ -1,116 +0,0 @@ -# coding: utf-8 - -""" - MONEI API v1 - -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

- - The version of the OpenAPI document: 1.5.1 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from Monei.models.payment_billing_details import PaymentBillingDetails -from Monei.models.payment_customer import PaymentCustomer -from Monei.models.payment_shipping_details import PaymentShippingDetails -from Monei.models.payment_transaction_type import PaymentTransactionType -from typing import Optional, Set -from typing_extensions import Self - -class RecurringPaymentRequest(BaseModel): - """ - RecurringPaymentRequest - """ # noqa: E501 - order_id: StrictStr = Field(description="An order ID from your system. A unique identifier that can be used to reconcile the payment with your internal system. ", alias="orderId") - amount: Optional[StrictInt] = Field(default=None, description="The amount to collected by this subsequent payment. A positive integer representing how much to charge in the smallest currency unit (e.g., 100 cents to charge 1.00 USD). ") - transaction_type: Optional[PaymentTransactionType] = Field(default=None, description="Same as the `transactionType` parameter from [create payment](https://docs.monei.com/api/#operation/payments_create). If not sent, it will default in the same transaction type used in the initial payment. ", alias="transactionType") - description: Optional[StrictStr] = Field(default=None, description="An arbitrary string attached to the payment. Often useful for displaying to users. ") - customer: Optional[PaymentCustomer] = None - billing_details: Optional[PaymentBillingDetails] = Field(default=None, alias="billingDetails") - shipping_details: Optional[PaymentShippingDetails] = Field(default=None, alias="shippingDetails") - callback_url: Optional[StrictStr] = Field(default=None, description="The URL to which a payment result should be sent asynchronously. ", alias="callbackUrl") - metadata: Optional[Dict[str, Any]] = Field(default=None, description="A set of key-value pairs that you can attach to a resource. This can be useful for storing additional information about the resource in a structured format.") - __properties: ClassVar[List[str]] = ["orderId", "amount", "transactionType", "description", "customer", "billingDetails", "shippingDetails", "callbackUrl", "metadata"] - - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of RecurringPaymentRequest from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of customer - if self.customer: - _dict['customer'] = self.customer.to_dict() - # override the default output from pydantic by calling `to_dict()` of billing_details - if self.billing_details: - _dict['billingDetails'] = self.billing_details.to_dict() - # override the default output from pydantic by calling `to_dict()` of shipping_details - if self.shipping_details: - _dict['shippingDetails'] = self.shipping_details.to_dict() - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of RecurringPaymentRequest from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "orderId": obj.get("orderId"), - "amount": obj.get("amount"), - "transactionType": obj.get("transactionType"), - "description": obj.get("description"), - "customer": PaymentCustomer.from_dict(obj["customer"]) if obj.get("customer") is not None else None, - "billingDetails": PaymentBillingDetails.from_dict(obj["billingDetails"]) if obj.get("billingDetails") is not None else None, - "shippingDetails": PaymentShippingDetails.from_dict(obj["shippingDetails"]) if obj.get("shippingDetails") is not None else None, - "callbackUrl": obj.get("callbackUrl"), - "metadata": obj.get("metadata") - }) - return _obj - - diff --git a/Monei/models/refund_payment_request.py b/Monei/models/refund_payment_request.py deleted file mode 100644 index e828532..0000000 --- a/Monei/models/refund_payment_request.py +++ /dev/null @@ -1,90 +0,0 @@ -# coding: utf-8 - -""" - MONEI API v1 - -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

- - The version of the OpenAPI document: 1.5.1 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict, Field, StrictInt -from typing import Any, ClassVar, Dict, List, Optional -from Monei.models.payment_refund_reason import PaymentRefundReason -from typing import Optional, Set -from typing_extensions import Self - -class RefundPaymentRequest(BaseModel): - """ - RefundPaymentRequest - """ # noqa: E501 - amount: Optional[StrictInt] = Field(default=None, description="The amount to refund, which must be less than or equal to the original amount. ") - refund_reason: Optional[PaymentRefundReason] = Field(default=None, alias="refundReason") - __properties: ClassVar[List[str]] = ["amount", "refundReason"] - - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of RefundPaymentRequest from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of RefundPaymentRequest from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "amount": obj.get("amount"), - "refundReason": obj.get("refundReason") - }) - return _obj - - diff --git a/Monei/models/register_apple_pay_domain_request.py b/Monei/models/register_apple_pay_domain_request.py deleted file mode 100644 index 5e3ce43..0000000 --- a/Monei/models/register_apple_pay_domain_request.py +++ /dev/null @@ -1,87 +0,0 @@ -# coding: utf-8 - -""" - MONEI API v1 - -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

- - The version of the OpenAPI document: 1.5.1 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List -from typing import Optional, Set -from typing_extensions import Self - -class RegisterApplePayDomainRequest(BaseModel): - """ - RegisterApplePayDomainRequest - """ # noqa: E501 - domain_name: StrictStr = Field(description="The domain name to register for Apple Pay.", alias="domainName") - __properties: ClassVar[List[str]] = ["domainName"] - - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of RegisterApplePayDomainRequest from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of RegisterApplePayDomainRequest from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "domainName": obj.get("domainName") - }) - return _obj - - diff --git a/Monei/models/send_payment_link_request.py b/Monei/models/send_payment_link_request.py deleted file mode 100644 index f7bc387..0000000 --- a/Monei/models/send_payment_link_request.py +++ /dev/null @@ -1,95 +0,0 @@ -# coding: utf-8 - -""" - MONEI API v1 - -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

- - The version of the OpenAPI document: 1.5.1 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from Monei.models.payment_message_channel import PaymentMessageChannel -from Monei.models.payment_message_language import PaymentMessageLanguage -from typing import Optional, Set -from typing_extensions import Self - -class SendPaymentLinkRequest(BaseModel): - """ - SendPaymentLinkRequest - """ # noqa: E501 - customer_email: Optional[StrictStr] = Field(default=None, description="The customer will receive payment link on this email address.", alias="customerEmail") - customer_phone: Optional[StrictStr] = Field(default=None, description="Phone number in E.164 format. The customer will receive payment link on this phone number.", alias="customerPhone") - channel: Optional[PaymentMessageChannel] = None - language: Optional[PaymentMessageLanguage] = None - __properties: ClassVar[List[str]] = ["customerEmail", "customerPhone", "channel", "language"] - - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of SendPaymentLinkRequest from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of SendPaymentLinkRequest from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "customerEmail": obj.get("customerEmail"), - "customerPhone": obj.get("customerPhone"), - "channel": obj.get("channel"), - "language": obj.get("language") - }) - return _obj - - diff --git a/Monei/models/send_payment_receipt_request.py b/Monei/models/send_payment_receipt_request.py deleted file mode 100644 index 6837595..0000000 --- a/Monei/models/send_payment_receipt_request.py +++ /dev/null @@ -1,95 +0,0 @@ -# coding: utf-8 - -""" - MONEI API v1 - -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

- - The version of the OpenAPI document: 1.5.1 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from Monei.models.payment_message_channel import PaymentMessageChannel -from Monei.models.payment_message_language import PaymentMessageLanguage -from typing import Optional, Set -from typing_extensions import Self - -class SendPaymentReceiptRequest(BaseModel): - """ - SendPaymentReceiptRequest - """ # noqa: E501 - customer_email: Optional[StrictStr] = Field(default=None, description="The customer will receive payment receipt on this email address.", alias="customerEmail") - customer_phone: Optional[StrictStr] = Field(default=None, description="Phone number in E.164 format. The customer will receive payment receipt link on this phone number.", alias="customerPhone") - channel: Optional[PaymentMessageChannel] = None - language: Optional[PaymentMessageLanguage] = None - __properties: ClassVar[List[str]] = ["customerEmail", "customerPhone", "channel", "language"] - - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of SendPaymentReceiptRequest from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of SendPaymentReceiptRequest from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "customerEmail": obj.get("customerEmail"), - "customerPhone": obj.get("customerPhone"), - "channel": obj.get("channel"), - "language": obj.get("language") - }) - return _obj - - diff --git a/Monei/models/send_payment_request_request.py b/Monei/models/send_payment_request_request.py deleted file mode 100644 index 96257ae..0000000 --- a/Monei/models/send_payment_request_request.py +++ /dev/null @@ -1,90 +0,0 @@ -# coding: utf-8 - -""" - MONEI API v1 - -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

- - The version of the OpenAPI document: 1.5.1 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from Monei.models.payment_message_language import PaymentMessageLanguage -from typing import Optional, Set -from typing_extensions import Self - -class SendPaymentRequestRequest(BaseModel): - """ - SendPaymentRequestRequest - """ # noqa: E501 - phone_number: StrictStr = Field(description="Phone number in E.164 format. The customer will receive payment link on this phone number.", alias="phoneNumber") - language: Optional[PaymentMessageLanguage] = None - __properties: ClassVar[List[str]] = ["phoneNumber", "language"] - - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of SendPaymentRequestRequest from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of SendPaymentRequestRequest from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "phoneNumber": obj.get("phoneNumber"), - "language": obj.get("language") - }) - return _obj - - diff --git a/Monei/models/send_subscription_link_request.py b/Monei/models/send_subscription_link_request.py deleted file mode 100644 index 518042f..0000000 --- a/Monei/models/send_subscription_link_request.py +++ /dev/null @@ -1,103 +0,0 @@ -# coding: utf-8 - -""" - MONEI API v1 - -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

- - The version of the OpenAPI document: 1.5.1 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator -from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set -from typing_extensions import Self - -class SendSubscriptionLinkRequest(BaseModel): - """ - SendSubscriptionLinkRequest - """ # noqa: E501 - customer_email: Optional[StrictStr] = Field(default=None, description="Customer email to send the subscription link to", alias="customerEmail") - customer_phone: Optional[StrictStr] = Field(default=None, description="Customer phone number to send the subscription link to", alias="customerPhone") - channel: Optional[StrictStr] = Field(default=None, description="Channel to use for sending the subscription link") - language: Optional[StrictStr] = Field(default=None, description="Language to use for the subscription link message") - __properties: ClassVar[List[str]] = ["customerEmail", "customerPhone", "channel", "language"] - - @field_validator('channel') - def channel_validate_enum(cls, value): - """Validates the enum""" - if value is None: - return value - - if value not in set(['email', 'sms']): - raise ValueError("must be one of enum values ('email', 'sms')") - return value - - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of SendSubscriptionLinkRequest from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of SendSubscriptionLinkRequest from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "customerEmail": obj.get("customerEmail"), - "customerPhone": obj.get("customerPhone"), - "channel": obj.get("channel"), - "language": obj.get("language") - }) - return _obj - - diff --git a/Monei/models/send_subscription_status_request.py b/Monei/models/send_subscription_status_request.py deleted file mode 100644 index b7c10be..0000000 --- a/Monei/models/send_subscription_status_request.py +++ /dev/null @@ -1,103 +0,0 @@ -# coding: utf-8 - -""" - MONEI API v1 - -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

- - The version of the OpenAPI document: 1.5.1 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator -from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set -from typing_extensions import Self - -class SendSubscriptionStatusRequest(BaseModel): - """ - SendSubscriptionStatusRequest - """ # noqa: E501 - customer_email: Optional[StrictStr] = Field(default=None, description="Customer email to send the subscription status to", alias="customerEmail") - customer_phone: Optional[StrictStr] = Field(default=None, description="Customer phone number to send the subscription status to", alias="customerPhone") - channel: Optional[StrictStr] = Field(default=None, description="Channel to use for sending the subscription status") - language: Optional[StrictStr] = Field(default=None, description="Language to use for the subscription status message") - __properties: ClassVar[List[str]] = ["customerEmail", "customerPhone", "channel", "language"] - - @field_validator('channel') - def channel_validate_enum(cls, value): - """Validates the enum""" - if value is None: - return value - - if value not in set(['email', 'sms']): - raise ValueError("must be one of enum values ('email', 'sms')") - return value - - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of SendSubscriptionStatusRequest from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of SendSubscriptionStatusRequest from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "customerEmail": obj.get("customerEmail"), - "customerPhone": obj.get("customerPhone"), - "channel": obj.get("channel"), - "language": obj.get("language") - }) - return _obj - - diff --git a/Monei/models/subscription.py b/Monei/models/subscription.py deleted file mode 100644 index c64d821..0000000 --- a/Monei/models/subscription.py +++ /dev/null @@ -1,181 +0,0 @@ -# coding: utf-8 - -""" - MONEI API v1 - -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

- - The version of the OpenAPI document: 1.5.1 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictFloat, StrictInt, StrictStr -from typing import Any, ClassVar, Dict, List, Optional, Union -from Monei.models.payment_billing_details import PaymentBillingDetails -from Monei.models.payment_customer import PaymentCustomer -from Monei.models.payment_shipping_details import PaymentShippingDetails -from Monei.models.payment_trace_details import PaymentTraceDetails -from Monei.models.subscription_interval import SubscriptionInterval -from Monei.models.subscription_last_payment import SubscriptionLastPayment -from Monei.models.subscription_payment_method import SubscriptionPaymentMethod -from Monei.models.subscription_retry_schedule_inner import SubscriptionRetryScheduleInner -from Monei.models.subscription_status import SubscriptionStatus -from typing import Optional, Set -from typing_extensions import Self - -class Subscription(BaseModel): - """ - Subscription - """ # noqa: E501 - id: Optional[StrictStr] = Field(default=None, description="Unique identifier for the subscription.") - amount: Optional[StrictInt] = Field(default=None, description="Amount intended to be collected by this payment. A positive integer representing how much to charge in the smallest currency unit (e.g., 100 cents to charge 1.00 USD). ") - currency: Optional[StrictStr] = Field(default=None, description="Three-letter [ISO currency code](https://en.wikipedia.org/wiki/ISO_4217), in uppercase. Must be a supported currency. ") - description: Optional[StrictStr] = Field(default=None, description="An arbitrary string attached to the subscription. Often useful for displaying to users. ") - account_id: Optional[StrictStr] = Field(default=None, description="MONEI Account identifier.", alias="accountId") - livemode: Optional[StrictBool] = Field(default=None, description="Has the value `true` if the resource exists in live mode or the value `false` if the resource exists in test mode.") - status: Optional[SubscriptionStatus] = None - customer: Optional[PaymentCustomer] = None - billing_details: Optional[PaymentBillingDetails] = Field(default=None, alias="billingDetails") - shipping_details: Optional[PaymentShippingDetails] = Field(default=None, alias="shippingDetails") - interval: Optional[SubscriptionInterval] = None - interval_count: Optional[StrictInt] = Field(default=None, description="Number of intervals between subscription payments.", alias="intervalCount") - pause_interval_count: Optional[StrictInt] = Field(default=None, description="Number of intervals when subscription will be paused before it activates again.", alias="pauseIntervalCount") - last_order_id: Optional[StrictStr] = Field(default=None, description="An order ID from your system. A unique identifier that can be used to reconcile the payment with your internal system. ", alias="lastOrderId") - last_payment: Optional[SubscriptionLastPayment] = Field(default=None, alias="lastPayment") - payment_method: Optional[SubscriptionPaymentMethod] = Field(default=None, alias="paymentMethod") - current_period_start: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="The start date of the current subscription period. Measured in seconds since the Unix epoch.", alias="currentPeriodStart") - current_period_end: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="The end date of the current subscription period. Measured in seconds since the Unix epoch.", alias="currentPeriodEnd") - trial_period_end: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="The end date of the trial period. Measured in seconds since the Unix epoch.", alias="trialPeriodEnd") - next_payment_at: Optional[StrictInt] = Field(default=None, description="The date when the next payment will be made.", alias="nextPaymentAt") - retry_count: Optional[StrictInt] = Field(default=None, description="Number of retries left for the subscription.", alias="retryCount") - retry_schedule: Optional[List[SubscriptionRetryScheduleInner]] = Field(default=None, description="Defines a custom schedule for retrying failed subscription payments. Each entry in the array specifies how long to wait before attempting the next payment retry. If not specified, the system's default retry schedule will be used. ", alias="retrySchedule") - cancel_at_period_end: Optional[StrictBool] = Field(default=None, description="If true, the subscription will be canceled at the end of the current period. ", alias="cancelAtPeriodEnd") - pause_at_period_end: Optional[StrictBool] = Field(default=None, description="If true, the subscription will be paused at the end of the current period. ", alias="pauseAtPeriodEnd") - trace_details: Optional[PaymentTraceDetails] = Field(default=None, alias="traceDetails") - sequence_id: Optional[StrictStr] = Field(default=None, description="A permanent identifier that refers to the initial payment of a sequence of payments. This value needs to be sent in the path for `RECURRING` payments. ", alias="sequenceId") - callback_url: Optional[StrictStr] = Field(default=None, description="The URL will be called each time subscription status changes. You will receive a subscription object in the body of the request. ", alias="callbackUrl") - payment_callback_url: Optional[StrictStr] = Field(default=None, description="The URL will be called each time subscription creates a new payments. You will receive the payment object in the body of the request. ", alias="paymentCallbackUrl") - metadata: Optional[Dict[str, Any]] = Field(default=None, description="A set of key-value pairs that you can attach to a resource. This can be useful for storing additional information about the resource in a structured format.") - created_at: Optional[StrictInt] = Field(default=None, description="Time at which the resource was created. Measured in seconds since the Unix epoch.", alias="createdAt") - updated_at: Optional[StrictInt] = Field(default=None, description="Time at which the resource updated last time. Measured in seconds since the Unix epoch.", alias="updatedAt") - __properties: ClassVar[List[str]] = ["id", "amount", "currency", "description", "accountId", "livemode", "status", "customer", "billingDetails", "shippingDetails", "interval", "intervalCount", "pauseIntervalCount", "lastOrderId", "lastPayment", "paymentMethod", "currentPeriodStart", "currentPeriodEnd", "trialPeriodEnd", "nextPaymentAt", "retryCount", "retrySchedule", "cancelAtPeriodEnd", "pauseAtPeriodEnd", "traceDetails", "sequenceId", "callbackUrl", "paymentCallbackUrl", "metadata", "createdAt", "updatedAt"] - - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of Subscription from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of customer - if self.customer: - _dict['customer'] = self.customer.to_dict() - # override the default output from pydantic by calling `to_dict()` of billing_details - if self.billing_details: - _dict['billingDetails'] = self.billing_details.to_dict() - # override the default output from pydantic by calling `to_dict()` of shipping_details - if self.shipping_details: - _dict['shippingDetails'] = self.shipping_details.to_dict() - # override the default output from pydantic by calling `to_dict()` of last_payment - if self.last_payment: - _dict['lastPayment'] = self.last_payment.to_dict() - # override the default output from pydantic by calling `to_dict()` of payment_method - if self.payment_method: - _dict['paymentMethod'] = self.payment_method.to_dict() - # override the default output from pydantic by calling `to_dict()` of each item in retry_schedule (list) - _items = [] - if self.retry_schedule: - for _item_retry_schedule in self.retry_schedule: - if _item_retry_schedule: - _items.append(_item_retry_schedule.to_dict()) - _dict['retrySchedule'] = _items - # override the default output from pydantic by calling `to_dict()` of trace_details - if self.trace_details: - _dict['traceDetails'] = self.trace_details.to_dict() - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of Subscription from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "id": obj.get("id"), - "amount": obj.get("amount"), - "currency": obj.get("currency"), - "description": obj.get("description"), - "accountId": obj.get("accountId"), - "livemode": obj.get("livemode"), - "status": obj.get("status"), - "customer": PaymentCustomer.from_dict(obj["customer"]) if obj.get("customer") is not None else None, - "billingDetails": PaymentBillingDetails.from_dict(obj["billingDetails"]) if obj.get("billingDetails") is not None else None, - "shippingDetails": PaymentShippingDetails.from_dict(obj["shippingDetails"]) if obj.get("shippingDetails") is not None else None, - "interval": obj.get("interval"), - "intervalCount": obj.get("intervalCount"), - "pauseIntervalCount": obj.get("pauseIntervalCount"), - "lastOrderId": obj.get("lastOrderId"), - "lastPayment": SubscriptionLastPayment.from_dict(obj["lastPayment"]) if obj.get("lastPayment") is not None else None, - "paymentMethod": SubscriptionPaymentMethod.from_dict(obj["paymentMethod"]) if obj.get("paymentMethod") is not None else None, - "currentPeriodStart": obj.get("currentPeriodStart"), - "currentPeriodEnd": obj.get("currentPeriodEnd"), - "trialPeriodEnd": obj.get("trialPeriodEnd"), - "nextPaymentAt": obj.get("nextPaymentAt"), - "retryCount": obj.get("retryCount"), - "retrySchedule": [SubscriptionRetryScheduleInner.from_dict(_item) for _item in obj["retrySchedule"]] if obj.get("retrySchedule") is not None else None, - "cancelAtPeriodEnd": obj.get("cancelAtPeriodEnd"), - "pauseAtPeriodEnd": obj.get("pauseAtPeriodEnd"), - "traceDetails": PaymentTraceDetails.from_dict(obj["traceDetails"]) if obj.get("traceDetails") is not None else None, - "sequenceId": obj.get("sequenceId"), - "callbackUrl": obj.get("callbackUrl"), - "paymentCallbackUrl": obj.get("paymentCallbackUrl"), - "metadata": obj.get("metadata"), - "createdAt": obj.get("createdAt"), - "updatedAt": obj.get("updatedAt") - }) - return _obj - - diff --git a/Monei/models/subscription_last_payment.py b/Monei/models/subscription_last_payment.py deleted file mode 100644 index 8e02d4c..0000000 --- a/Monei/models/subscription_last_payment.py +++ /dev/null @@ -1,94 +0,0 @@ -# coding: utf-8 - -""" - MONEI API v1 - -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

- - The version of the OpenAPI document: 1.5.1 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from Monei.models.payment_status import PaymentStatus -from typing import Optional, Set -from typing_extensions import Self - -class SubscriptionLastPayment(BaseModel): - """ - SubscriptionLastPayment - """ # noqa: E501 - id: Optional[StrictStr] = Field(default=None, description="Unique identifier for the payment.") - status: Optional[PaymentStatus] = None - status_code: Optional[StrictStr] = Field(default=None, description="Payment status code. ", alias="statusCode") - status_message: Optional[StrictStr] = Field(default=None, description="Human readable status message, can be displayed to a user. ", alias="statusMessage") - __properties: ClassVar[List[str]] = ["id", "status", "statusCode", "statusMessage"] - - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of SubscriptionLastPayment from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of SubscriptionLastPayment from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "id": obj.get("id"), - "status": obj.get("status"), - "statusCode": obj.get("statusCode"), - "statusMessage": obj.get("statusMessage") - }) - return _obj - - diff --git a/Monei/models/subscription_payment_method.py b/Monei/models/subscription_payment_method.py deleted file mode 100644 index f83fba1..0000000 --- a/Monei/models/subscription_payment_method.py +++ /dev/null @@ -1,103 +0,0 @@ -# coding: utf-8 - -""" - MONEI API v1 - -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

- - The version of the OpenAPI document: 1.5.1 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator -from typing import Any, ClassVar, Dict, List, Optional -from Monei.models.payment_payment_method_card import PaymentPaymentMethodCard -from typing import Optional, Set -from typing_extensions import Self - -class SubscriptionPaymentMethod(BaseModel): - """ - Details about the payment method at the time of the transaction. - """ # noqa: E501 - method: Optional[StrictStr] = Field(default=None, description="Subscription method type.") - card: Optional[PaymentPaymentMethodCard] = None - __properties: ClassVar[List[str]] = ["method", "card"] - - @field_validator('method') - def method_validate_enum(cls, value): - """Validates the enum""" - if value is None: - return value - - if value not in set(['card']): - raise ValueError("must be one of enum values ('card')") - return value - - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of SubscriptionPaymentMethod from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of card - if self.card: - _dict['card'] = self.card.to_dict() - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of SubscriptionPaymentMethod from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "method": obj.get("method"), - "card": PaymentPaymentMethodCard.from_dict(obj["card"]) if obj.get("card") is not None else None - }) - return _obj - - diff --git a/Monei/models/subscription_payment_method_card.py b/Monei/models/subscription_payment_method_card.py deleted file mode 100644 index de5ba78..0000000 --- a/Monei/models/subscription_payment_method_card.py +++ /dev/null @@ -1,119 +0,0 @@ -# coding: utf-8 - -""" - MONEI API v1 - -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

- - The version of the OpenAPI document: 1.5.1 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr, field_validator -from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set -from typing_extensions import Self - -class SubscriptionPaymentMethodCard(BaseModel): - """ - Details about the card used as payment method at the time of the transaction. - """ # noqa: E501 - country: Optional[StrictStr] = Field(default=None, description="Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).") - brand: Optional[StrictStr] = Field(default=None, description="Card brand.") - type: Optional[StrictStr] = Field(default=None, description="Card type `debit` or `credit`.") - three_d_secure: Optional[StrictBool] = Field(default=None, description="Wether this transaction used 3D Secure authentication.", alias="threeDSecure") - three_d_secure_version: Optional[StrictStr] = Field(default=None, description="The protocol version of the 3DS challenge.", alias="threeDSecureVersion") - expiration: Optional[StrictInt] = Field(default=None, description="Time at which the card will expire. Measured in seconds since the Unix epoch. ") - last4: Optional[StrictStr] = Field(default=None, description="The last four digits of the card.") - __properties: ClassVar[List[str]] = ["country", "brand", "type", "threeDSecure", "threeDSecureVersion", "expiration", "last4"] - - @field_validator('brand') - def brand_validate_enum(cls, value): - """Validates the enum""" - if value is None: - return value - - if value not in set(['visa', 'mastercard', 'diners', 'amex', 'jcb', 'unionpay', 'unknown']): - raise ValueError("must be one of enum values ('visa', 'mastercard', 'diners', 'amex', 'jcb', 'unionpay', 'unknown')") - return value - - @field_validator('type') - def type_validate_enum(cls, value): - """Validates the enum""" - if value is None: - return value - - if value not in set(['debit', 'credit']): - raise ValueError("must be one of enum values ('debit', 'credit')") - return value - - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of SubscriptionPaymentMethodCard from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of SubscriptionPaymentMethodCard from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "country": obj.get("country"), - "brand": obj.get("brand"), - "type": obj.get("type"), - "threeDSecure": obj.get("threeDSecure"), - "threeDSecureVersion": obj.get("threeDSecureVersion"), - "expiration": obj.get("expiration"), - "last4": obj.get("last4") - }) - return _obj - - diff --git a/Monei/models/subscription_retry_schedule_inner.py b/Monei/models/subscription_retry_schedule_inner.py deleted file mode 100644 index cf64954..0000000 --- a/Monei/models/subscription_retry_schedule_inner.py +++ /dev/null @@ -1,97 +0,0 @@ -# coding: utf-8 - -""" - MONEI API v1 - -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

- - The version of the OpenAPI document: 1.5.1 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator -from typing import Any, ClassVar, Dict, List -from typing_extensions import Annotated -from typing import Optional, Set -from typing_extensions import Self - -class SubscriptionRetryScheduleInner(BaseModel): - """ - SubscriptionRetryScheduleInner - """ # noqa: E501 - interval: StrictStr = Field(description="The unit of time to wait before the retry attempt.") - interval_count: Annotated[int, Field(le=31, strict=True, ge=1)] = Field(description="The number of intervals to wait before the retry attempt.", alias="intervalCount") - __properties: ClassVar[List[str]] = ["interval", "intervalCount"] - - @field_validator('interval') - def interval_validate_enum(cls, value): - """Validates the enum""" - if value not in set(['day', 'week', 'month', 'year']): - raise ValueError("must be one of enum values ('day', 'week', 'month', 'year')") - return value - - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of SubscriptionRetryScheduleInner from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of SubscriptionRetryScheduleInner from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "interval": obj.get("interval"), - "intervalCount": obj.get("intervalCount") - }) - return _obj - - diff --git a/Monei/models/subscription_status.py b/Monei/models/subscription_status.py deleted file mode 100644 index 0eb51c7..0000000 --- a/Monei/models/subscription_status.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding: utf-8 - -""" - MONEI API v1 - -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

- - The version of the OpenAPI document: 1.5.1 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import json -from enum import Enum -from typing_extensions import Self - - -class SubscriptionStatus(str, Enum): - """ - The status of the subscription. - """ - - """ - allowed enum values - """ - PENDING = 'PENDING' - EXPIRED = 'EXPIRED' - TRIALING = 'TRIALING' - ACTIVE = 'ACTIVE' - PAST_DUE = 'PAST_DUE' - PAUSED = 'PAUSED' - CANCELED = 'CANCELED' - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of SubscriptionStatus from a JSON string""" - return cls(json.loads(json_str)) - - diff --git a/Monei/models/update_subscription_request.py b/Monei/models/update_subscription_request.py deleted file mode 100644 index 7cb1b07..0000000 --- a/Monei/models/update_subscription_request.py +++ /dev/null @@ -1,136 +0,0 @@ -# coding: utf-8 - -""" - MONEI API v1 - -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

- - The version of the OpenAPI document: 1.5.1 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictFloat, StrictInt, StrictStr -from typing import Any, ClassVar, Dict, List, Optional, Union -from Monei.models.payment_billing_details import PaymentBillingDetails -from Monei.models.payment_customer import PaymentCustomer -from Monei.models.payment_shipping_details import PaymentShippingDetails -from Monei.models.subscription_interval import SubscriptionInterval -from Monei.models.subscription_retry_schedule_inner import SubscriptionRetryScheduleInner -from typing import Optional, Set -from typing_extensions import Self - -class UpdateSubscriptionRequest(BaseModel): - """ - UpdateSubscriptionRequest - """ # noqa: E501 - amount: Optional[StrictInt] = Field(default=None, description="Amount intended to be collected by this payment. A positive integer representing how much to charge in the smallest currency unit (e.g., 100 cents to charge 1.00 USD). ") - interval: Optional[SubscriptionInterval] = None - interval_count: Optional[StrictInt] = Field(default=None, description="Number of intervals between subscription payments.", alias="intervalCount") - description: Optional[StrictStr] = Field(default=None, description="An arbitrary string attached to the subscription. Often useful for displaying to users. ") - customer: Optional[PaymentCustomer] = None - billing_details: Optional[PaymentBillingDetails] = Field(default=None, alias="billingDetails") - shipping_details: Optional[PaymentShippingDetails] = Field(default=None, alias="shippingDetails") - trial_period_end: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="The end date of the trial period. Measured in seconds since the Unix epoch.", alias="trialPeriodEnd") - callback_url: Optional[StrictStr] = Field(default=None, description="The URL will be called each time subscription status changes. You will receive a subscription object in the body of the request. ", alias="callbackUrl") - payment_callback_url: Optional[StrictStr] = Field(default=None, description="The URL will be called each time subscription creates a new payments. You will receive the payment object in the body of the request. ", alias="paymentCallbackUrl") - pause_at_period_end: Optional[StrictBool] = Field(default=None, description="If true, the subscription will be paused at the end of the current period. ", alias="pauseAtPeriodEnd") - cancel_at_period_end: Optional[StrictBool] = Field(default=None, description="If true, the subscription will be canceled at the end of the current period. ", alias="cancelAtPeriodEnd") - pause_interval_count: Optional[StrictInt] = Field(default=None, description="Number of intervals when subscription will be paused before it activates again.", alias="pauseIntervalCount") - retry_schedule: Optional[List[SubscriptionRetryScheduleInner]] = Field(default=None, description="Defines a custom schedule for retrying failed subscription payments. Each entry in the array specifies how long to wait before attempting the next payment retry. If not specified, the system's default retry schedule will be used. ", alias="retrySchedule") - metadata: Optional[Dict[str, Any]] = Field(default=None, description="A set of key-value pairs that you can attach to a resource. This can be useful for storing additional information about the resource in a structured format.") - __properties: ClassVar[List[str]] = ["amount", "interval", "intervalCount", "description", "customer", "billingDetails", "shippingDetails", "trialPeriodEnd", "callbackUrl", "paymentCallbackUrl", "pauseAtPeriodEnd", "cancelAtPeriodEnd", "pauseIntervalCount", "retrySchedule", "metadata"] - - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of UpdateSubscriptionRequest from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of customer - if self.customer: - _dict['customer'] = self.customer.to_dict() - # override the default output from pydantic by calling `to_dict()` of billing_details - if self.billing_details: - _dict['billingDetails'] = self.billing_details.to_dict() - # override the default output from pydantic by calling `to_dict()` of shipping_details - if self.shipping_details: - _dict['shippingDetails'] = self.shipping_details.to_dict() - # override the default output from pydantic by calling `to_dict()` of each item in retry_schedule (list) - _items = [] - if self.retry_schedule: - for _item_retry_schedule in self.retry_schedule: - if _item_retry_schedule: - _items.append(_item_retry_schedule.to_dict()) - _dict['retrySchedule'] = _items - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of UpdateSubscriptionRequest from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "amount": obj.get("amount"), - "interval": obj.get("interval"), - "intervalCount": obj.get("intervalCount"), - "description": obj.get("description"), - "customer": PaymentCustomer.from_dict(obj["customer"]) if obj.get("customer") is not None else None, - "billingDetails": PaymentBillingDetails.from_dict(obj["billingDetails"]) if obj.get("billingDetails") is not None else None, - "shippingDetails": PaymentShippingDetails.from_dict(obj["shippingDetails"]) if obj.get("shippingDetails") is not None else None, - "trialPeriodEnd": obj.get("trialPeriodEnd"), - "callbackUrl": obj.get("callbackUrl"), - "paymentCallbackUrl": obj.get("paymentCallbackUrl"), - "pauseAtPeriodEnd": obj.get("pauseAtPeriodEnd"), - "cancelAtPeriodEnd": obj.get("cancelAtPeriodEnd"), - "pauseIntervalCount": obj.get("pauseIntervalCount"), - "retrySchedule": [SubscriptionRetryScheduleInner.from_dict(_item) for _item in obj["retrySchedule"]] if obj.get("retrySchedule") is not None else None, - "metadata": obj.get("metadata") - }) - return _obj - - diff --git a/Monei/models/validate_bizum_phone_request.py b/Monei/models/validate_bizum_phone_request.py deleted file mode 100644 index 59771c6..0000000 --- a/Monei/models/validate_bizum_phone_request.py +++ /dev/null @@ -1,91 +0,0 @@ -# coding: utf-8 - -""" - MONEI API v1 - -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

- - The version of the OpenAPI document: 1.5.1 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set -from typing_extensions import Self - -class ValidateBizumPhoneRequest(BaseModel): - """ - ValidateBizumPhoneRequest - """ # noqa: E501 - account_id: StrictStr = Field(description="MONEI Account identifier.", alias="accountId") - payment_id: Optional[StrictStr] = Field(default=None, description="Unique identifier for the payment.", alias="paymentId") - phone_number: StrictStr = Field(description="Phone number in E.164 format.", alias="phoneNumber") - __properties: ClassVar[List[str]] = ["accountId", "paymentId", "phoneNumber"] - - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of ValidateBizumPhoneRequest from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of ValidateBizumPhoneRequest from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "accountId": obj.get("accountId"), - "paymentId": obj.get("paymentId"), - "phoneNumber": obj.get("phoneNumber") - }) - return _obj - - diff --git a/Monei/rest.py b/Monei/rest.py index 0b93d45..dd372b4 100644 --- a/Monei/rest.py +++ b/Monei/rest.py @@ -1,68 +1,54 @@ -# coding: utf-8 - """ MONEI API v1 -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

- - The version of the OpenAPI document: 1.5.1 - Generated by OpenAPI Generator (https://openapi-generator.tech) +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - Do not edit the class manually. -""" # noqa: E501 + The version of the OpenAPI document: 1.5.3 + Generated by: https://openapi-generator.tech +""" import io import json +import logging import re import ssl - +from urllib.parse import urlencode +from urllib.parse import urlparse +from urllib.request import proxy_bypass_environment import urllib3 +import ipaddress -from Monei.exceptions import ApiException, ApiValueError +from Monei.exceptions import ApiException, UnauthorizedException, ForbiddenException, NotFoundException, ServiceException, ApiValueError -SUPPORTED_SOCKS_PROXIES = {"socks5", "socks5h", "socks4", "socks4a"} -RESTResponseType = urllib3.HTTPResponse - -def is_socks_proxy_url(url): - if url is None: - return False - split_section = url.split("://") - if len(split_section) < 2: - return False - else: - return split_section[0].lower() in SUPPORTED_SOCKS_PROXIES +logger = logging.getLogger(__name__) class RESTResponse(io.IOBase): - def __init__(self, resp) -> None: - self.response = resp + def __init__(self, resp): + self.urllib3_response = resp self.status = resp.status self.reason = resp.reason - self.data = None - - def read(self): - if self.data is None: - self.data = self.response.data - return self.data + self.data = resp.data def getheaders(self): """Returns a dictionary of the response headers.""" - return self.response.headers + return self.urllib3_response.getheaders() def getheader(self, name, default=None): """Returns a given response header.""" - return self.response.headers.get(name, default) + return self.urllib3_response.getheader(name, default) -class RESTClientObject: +class RESTClientObject(object): - def __init__(self, configuration) -> None: + def __init__(self, configuration, pools_size=4, maxsize=None): # urllib3.PoolManager will pass all kw parameters to connectionpool # https://github.com/shazow/urllib3/blob/f9409436f83aeb79fbaf090181cd81b784f1b8ce/urllib3/poolmanager.py#L75 # noqa: E501 # https://github.com/shazow/urllib3/blob/f9409436f83aeb79fbaf090181cd81b784f1b8ce/urllib3/connectionpool.py#L680 # noqa: E501 + # maxsize is the number of requests to host that are allowed in parallel # noqa: E501 # Custom SSL certificates and client certificates: http://urllib3.readthedocs.io/en/latest/advanced-usage.html # noqa: E501 # cert_reqs @@ -71,80 +57,71 @@ def __init__(self, configuration) -> None: else: cert_reqs = ssl.CERT_NONE - pool_args = { - "cert_reqs": cert_reqs, - "ca_certs": configuration.ssl_ca_cert, - "cert_file": configuration.cert_file, - "key_file": configuration.key_file, - "ca_cert_data": configuration.ca_cert_data, - } + addition_pool_args = {} if configuration.assert_hostname is not None: - pool_args['assert_hostname'] = ( - configuration.assert_hostname - ) + addition_pool_args['assert_hostname'] = configuration.assert_hostname # noqa: E501 if configuration.retries is not None: - pool_args['retries'] = configuration.retries - - if configuration.tls_server_name: - pool_args['server_hostname'] = configuration.tls_server_name - + addition_pool_args['retries'] = configuration.retries if configuration.socket_options is not None: - pool_args['socket_options'] = configuration.socket_options + addition_pool_args['socket_options'] = configuration.socket_options - if configuration.connection_pool_maxsize is not None: - pool_args['maxsize'] = configuration.connection_pool_maxsize + if maxsize is None: + if configuration.connection_pool_maxsize is not None: + maxsize = configuration.connection_pool_maxsize + else: + maxsize = 4 # https pool manager - self.pool_manager: urllib3.PoolManager - - if configuration.proxy: - if is_socks_proxy_url(configuration.proxy): - from urllib3.contrib.socks import SOCKSProxyManager - pool_args["proxy_url"] = configuration.proxy - pool_args["headers"] = configuration.proxy_headers - self.pool_manager = SOCKSProxyManager(**pool_args) - else: - pool_args["proxy_url"] = configuration.proxy - pool_args["proxy_headers"] = configuration.proxy_headers - self.pool_manager = urllib3.ProxyManager(**pool_args) + if configuration.proxy and not should_bypass_proxies( + configuration.host, no_proxy=configuration.no_proxy or ''): + self.pool_manager = urllib3.ProxyManager( + num_pools=pools_size, + maxsize=maxsize, + cert_reqs=cert_reqs, + ca_certs=configuration.ssl_ca_cert, + cert_file=configuration.cert_file, + key_file=configuration.key_file, + proxy_url=configuration.proxy, + proxy_headers=configuration.proxy_headers, + **addition_pool_args + ) else: - self.pool_manager = urllib3.PoolManager(**pool_args) - - def request( - self, - method, - url, - headers=None, - body=None, - post_params=None, - _request_timeout=None - ): + self.pool_manager = urllib3.PoolManager( + num_pools=pools_size, + maxsize=maxsize, + cert_reqs=cert_reqs, + ca_certs=configuration.ssl_ca_cert, + cert_file=configuration.cert_file, + key_file=configuration.key_file, + **addition_pool_args + ) + + def request(self, method, url, query_params=None, headers=None, + body=None, post_params=None, _preload_content=True, + _request_timeout=None): """Perform requests. :param method: http request method :param url: http request url + :param query_params: query parameters in the url :param headers: http request headers :param body: request json body, for `application/json` :param post_params: request post parameters, `application/x-www-form-urlencoded` and `multipart/form-data` + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. """ method = method.upper() - assert method in [ - 'GET', - 'HEAD', - 'DELETE', - 'POST', - 'PUT', - 'PATCH', - 'OPTIONS' - ] + assert method in ['GET', 'HEAD', 'DELETE', 'POST', 'PUT', + 'PATCH', 'OPTIONS'] if post_params and body: raise ApiValueError( @@ -156,83 +133,61 @@ def request( timeout = None if _request_timeout: - if isinstance(_request_timeout, (int, float)): + if isinstance(_request_timeout, (int, float)): # noqa: E501,F821 timeout = urllib3.Timeout(total=_request_timeout) - elif ( - isinstance(_request_timeout, tuple) - and len(_request_timeout) == 2 - ): + elif (isinstance(_request_timeout, tuple) and + len(_request_timeout) == 2): timeout = urllib3.Timeout( - connect=_request_timeout[0], - read=_request_timeout[1] - ) + connect=_request_timeout[0], read=_request_timeout[1]) try: # For `POST`, `PUT`, `PATCH`, `OPTIONS`, `DELETE` if method in ['POST', 'PUT', 'PATCH', 'OPTIONS', 'DELETE']: - - # no content type provided or payload is json - content_type = headers.get('Content-Type') - if ( - not content_type - or re.search('json', content_type, re.IGNORECASE) - ): + # Only set a default Content-Type for POST, PUT, PATCH and OPTIONS requests + if (method != 'DELETE') and ('Content-Type' not in headers): + headers['Content-Type'] = 'application/json' + if query_params: + url += '?' + urlencode(query_params) + if ('Content-Type' not in headers) or (re.search('json', + headers['Content-Type'], re.IGNORECASE)): request_body = None if body is not None: request_body = json.dumps(body) r = self.pool_manager.request( - method, - url, + method, url, body=request_body, + preload_content=_preload_content, timeout=timeout, - headers=headers, - preload_content=False - ) - elif content_type == 'application/x-www-form-urlencoded': + headers=headers) + elif headers['Content-Type'] == 'application/x-www-form-urlencoded': # noqa: E501 r = self.pool_manager.request( - method, - url, + method, url, fields=post_params, encode_multipart=False, + preload_content=_preload_content, timeout=timeout, - headers=headers, - preload_content=False - ) - elif content_type == 'multipart/form-data': + headers=headers) + elif headers['Content-Type'] == 'multipart/form-data': # must del headers['Content-Type'], or the correct # Content-Type which generated by urllib3 will be # overwritten. del headers['Content-Type'] - # Ensures that dict objects are serialized - post_params = [(a, json.dumps(b)) if isinstance(b, dict) else (a,b) for a, b in post_params] r = self.pool_manager.request( - method, - url, + method, url, fields=post_params, encode_multipart=True, + preload_content=_preload_content, timeout=timeout, - headers=headers, - preload_content=False - ) + headers=headers) # Pass a `string` parameter directly in the body to support - # other content types than JSON when `body` argument is - # provided in serialized form. + # other content types than Json when `body` argument is + # provided in serialized form elif isinstance(body, str) or isinstance(body, bytes): + request_body = body r = self.pool_manager.request( - method, - url, - body=body, - timeout=timeout, - headers=headers, - preload_content=False - ) - elif headers['Content-Type'].startswith('text/') and isinstance(body, bool): - request_body = "true" if body else "false" - r = self.pool_manager.request( - method, - url, + method, url, body=request_body, - preload_content=False, + preload_content=_preload_content, timeout=timeout, headers=headers) else: @@ -243,16 +198,155 @@ def request( raise ApiException(status=0, reason=msg) # For `GET`, `HEAD` else: - r = self.pool_manager.request( - method, - url, - fields={}, - timeout=timeout, - headers=headers, - preload_content=False - ) + r = self.pool_manager.request(method, url, + fields=query_params, + preload_content=_preload_content, + timeout=timeout, + headers=headers) except urllib3.exceptions.SSLError as e: - msg = "\n".join([type(e).__name__, str(e)]) + msg = "{0}\n{1}".format(type(e).__name__, str(e)) raise ApiException(status=0, reason=msg) - return RESTResponse(r) + if _preload_content: + r = RESTResponse(r) + + # log response body + 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) + + return r + + def GET(self, url, headers=None, query_params=None, _preload_content=True, + _request_timeout=None): + return self.request("GET", url, + headers=headers, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + query_params=query_params) + + def HEAD(self, url, headers=None, query_params=None, _preload_content=True, + _request_timeout=None): + return self.request("HEAD", url, + headers=headers, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + query_params=query_params) + + def OPTIONS(self, url, headers=None, query_params=None, post_params=None, + body=None, _preload_content=True, _request_timeout=None): + return self.request("OPTIONS", url, + headers=headers, + query_params=query_params, + post_params=post_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + body=body) + + def DELETE(self, url, headers=None, query_params=None, body=None, + _preload_content=True, _request_timeout=None): + return self.request("DELETE", url, + headers=headers, + query_params=query_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + body=body) + + def POST(self, url, headers=None, query_params=None, post_params=None, + body=None, _preload_content=True, _request_timeout=None): + return self.request("POST", url, + headers=headers, + query_params=query_params, + post_params=post_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + body=body) + + def PUT(self, url, headers=None, query_params=None, post_params=None, + body=None, _preload_content=True, _request_timeout=None): + return self.request("PUT", url, + headers=headers, + query_params=query_params, + post_params=post_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + body=body) + + def PATCH(self, url, headers=None, query_params=None, post_params=None, + body=None, _preload_content=True, _request_timeout=None): + return self.request("PATCH", url, + headers=headers, + query_params=query_params, + post_params=post_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + body=body) + +# end of class RESTClientObject + + +def is_ipv4(target): + """ Test if IPv4 address or not + """ + try: + chk = ipaddress.IPv4Address(target) + return True + except ipaddress.AddressValueError: + return False + + +def in_ipv4net(target, net): + """ Test if target belongs to given IPv4 network + """ + try: + nw = ipaddress.IPv4Network(net) + ip = ipaddress.IPv4Address(target) + if ip in nw: + return True + return False + except ipaddress.AddressValueError: + return False + except ipaddress.NetmaskValueError: + return False + + +def should_bypass_proxies(url, no_proxy=None): + """ Yet another requests.should_bypass_proxies + Test if proxies should not be used for a particular url. + """ + + parsed = urlparse(url) + + # special cases + if parsed.hostname in [None, '']: + return True + + # special cases + if no_proxy in [None, '']: + return False + if no_proxy == '*': + return True + + no_proxy = no_proxy.lower().replace(' ', ''); + entries = ( + host for host in no_proxy.split(',') if host + ) + + if is_ipv4(parsed.hostname): + for item in entries: + if in_ipv4net(parsed.hostname, item): + return True + return proxy_bypass_environment(parsed.hostname, {'no': no_proxy}) diff --git a/README.md b/README.md index 56b6217..b3eff51 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,8 @@ # MONEI PYTHON SDK +[![Monei Python package](https://github.com/MONEI/monei-python-sdk/actions/workflows/python.yml/badge.svg)](https://github.com/MONEI/monei-python-sdk/actions/workflows/python.yml) +[![Unit Tests](https://github.com/MONEI/monei-python-sdk/actions/workflows/unit-tests.yml/badge.svg)](https://github.com/MONEI/monei-python-sdk/actions/workflows/unit-tests.yml) + The MONEI API is organized around [REST](https://en.wikipedia.org/wiki/Representational_State_Transfer). Our API has predictable resource-oriented URLs, accepts JSON-encoded request bodies, returns JSON-encoded responses, and uses standard HTTP response codes, authentication, and verbs. This library is intended to help you develop an integration around our API, by using the MONEI Python Client and it's methods. @@ -416,4 +419,4 @@ python -m pytest test/test_main.py python -m pytest --cov=Monei ``` -The test configuration is defined in `pytest.ini` and includes settings for test discovery, coverage reporting, and custom markers. +The test configuration is defined in `pyproject.toml` under the `[tool.pytest.ini_options]` section and includes settings for test discovery, coverage reporting, and custom markers. diff --git a/openapitools.json b/openapitools.json index f0bd502..046461a 100644 --- a/openapitools.json +++ b/openapitools.json @@ -2,7 +2,7 @@ "$schema": "./node_modules/@openapitools/openapi-generator-cli/config.schema.json", "spaces": 2, "generator-cli": { - "version": "7.12.0", + "version": "6.0.1", "generators": { "monei-python": { "generatorName": "python", diff --git a/package.json b/package.json index 442c339..bd190cd 100644 --- a/package.json +++ b/package.json @@ -6,9 +6,10 @@ "scripts": { "build": "./scripts/build.sh", "build:local": "./scripts/build.sh local", + "test": "uv run pytest", "publish": "./scripts/release.sh", "release": "release-it", - "prepare": "yarn run build" + "prepare": "yarn run build && yarn run test" }, "license": "MIT", "devDependencies": { @@ -28,7 +29,7 @@ "publish": false }, "hooks": { - "after:bump": "yarn build && git add -A", + "after:bump": "yarn build && yarn test && git add -A", "after:release": "yarn publish" }, "plugins": { diff --git a/pyproject.toml b/pyproject.toml index 88402a2..2792148 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,43 +1,110 @@ +[build-system] +requires = ["poetry-core>=1.0.0"] +build-backend = "poetry.core.masonry.api" + +[project] +name = "Monei" +version = "1.2.6" +description = "MONEI PYTHON SDK" +readme = "README.md" +requires-python = ">=3.8" +license = { text = "MIT" } +authors = [{ name = "MONEI", email = "admin@monei.com" }] +dependencies = [ + "urllib3 >= 1.25.3, < 3.0.0", + "python-dateutil >= 2.8.2", + "pydantic >= 2", + "typing-extensions >= 4.7.1", + "certifi", +] +keywords = [ + "monei", + "monei pay", + "pay", + "payments", + "payment gateway", + "python", + "sdk", + "rest", + "api", +] +classifiers = [ + "Development Status :: 5 - Production/Stable", + "Intended Audience :: Developers", + "License :: OSI Approved :: MIT License", + "Operating System :: OS Independent", + "Topic :: Software Development :: Libraries :: Python Modules", + "Programming Language :: Python :: 3.8", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", +] + [tool.poetry] name = "Monei" version = "1.2.6" -description = "MONEI API v1" -authors = ["OpenAPI Generator Community "] -license = "NoLicense" +description = "MONEI PYTHON SDK" +authors = ["MONEI "] +maintainers = ["MONEI "] +license = "MIT" readme = "README.md" repository = "https://github.com/monei/monei-python-sdk" -keywords = ["OpenAPI", "OpenAPI-Generator", "MONEI API v1"] +keywords = [ + "monei", + "monei pay", + "pay", + "payments", + "payment gateway", + "python", + "sdk", + "rest", + "api", +] include = ["Monei/py.typed"] +packages = [{ include = "Monei" }] [tool.poetry.dependencies] python = "^3.8" - urllib3 = ">= 1.25.3, < 3.0.0" python-dateutil = ">= 2.8.2" pydantic = ">= 2" typing-extensions = ">= 4.7.1" +certifi = "*" -[tool.poetry.dev-dependencies] +[tool.poetry.group.dev.dependencies] pytest = ">= 7.2.1" pytest-cov = ">= 2.8.1" -tox = ">= 3.9.0" -flake8 = ">= 4.0.0" types-python-dateutil = ">= 2.8.19.14" mypy = ">= 1.5" - -[build-system] -requires = ["setuptools"] -build-backend = "setuptools.build_meta" +[tool.pytest.ini_options] +testpaths = ["test"] +python_files = "test_*.py" +python_classes = "Test*" +python_functions = "test_*" +addopts = "--cov=Monei --cov-report=term --cov-report=xml:coverage.xml" +markers = [ + "unit: Unit tests", + "integration: Integration tests", + "api: API tests", + "slow: Slow running tests", + "e2e: End-to-end tests", + "generated: Tests auto-generated by OpenAPI Generator", + "requires_api: Tests that require real API access", +] +filterwarnings = [ + "ignore::DeprecationWarning:Monei.*:", + "ignore::DeprecationWarning:urllib3.*:", +] [tool.pylint.'MESSAGES CONTROL'] extension-pkg-whitelist = "pydantic" [tool.mypy] files = [ - "Monei", - #"test", # auto-generated tests - "tests", # hand-written tests + "Monei", + "test", # auto-generated tests ] # TODO: enable "strict" once all these individual checks are passing # strict = true @@ -72,9 +139,7 @@ disallow_any_generics = true #warn_return_any = true [[tool.mypy.overrides]] -module = [ - "Monei.configuration", -] +module = ["Monei.configuration"] warn_unused_ignores = true strict_equality = true extra_checks = true diff --git a/pytest.ini b/pytest.ini deleted file mode 100644 index 412a10e..0000000 --- a/pytest.ini +++ /dev/null @@ -1,17 +0,0 @@ -[pytest] -testpaths = test -python_files = test_*.py -python_classes = Test* -python_functions = test_* -addopts = --cov=Monei --cov-report=term --cov-report=xml:coverage.xml -markers = - unit: Unit tests - integration: Integration tests - api: API tests - slow: Slow running tests - e2e: End-to-end tests - generated: Tests auto-generated by OpenAPI Generator - requires_api: Tests that require real API access -filterwarnings = - ignore::DeprecationWarning:Monei.*: - ignore::DeprecationWarning:urllib3.*: \ No newline at end of file diff --git a/requirements-lock.txt b/requirements-lock.txt deleted file mode 100644 index 49a5916..0000000 --- a/requirements-lock.txt +++ /dev/null @@ -1,18 +0,0 @@ -black==25.1.0 -certifi==2025.1.31 -click==8.1.8 -coverage==7.6.12 -iniconfig==2.0.0 --e file:///Users/dmitriy/Work/MONEI/monei-python-sdk -mypy-extensions==1.0.0 -packaging==24.2 -pathspec==0.12.1 -platformdirs==4.3.6 -pluggy==1.5.0 -pytest==8.3.5 -pytest-cov==6.0.0 -python-dateutil==2.9.0.post0 -ruff==0.9.9 -setuptools==75.8.2 -six==1.17.0 -urllib3==2.3.0 diff --git a/requirements.txt b/requirements.txt index 67f7f68..96947f6 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,4 +1,3 @@ -urllib3 >= 1.25.3, < 3.0.0 -python_dateutil >= 2.8.2 -pydantic >= 2 -typing-extensions >= 4.7.1 +python_dateutil >= 2.5.3 +setuptools >= 21.0.0 +urllib3 >= 1.25.3 diff --git a/scripts/release.sh b/scripts/release.sh index 9a66334..e9680b5 100755 --- a/scripts/release.sh +++ b/scripts/release.sh @@ -1,8 +1,53 @@ #!/bin/bash -echo 'Releasing new version of MONEI PYTHON SDK' -cd .. -rm -rf dist/* -python3 -m pip install --upgrade setuptools wheel twine -python3 setup.py sdist bdist_wheel -python3 -m twine upload dist/* -u __token__ -cd build +set -e # Exit immediately if a command exits with a non-zero status + +echo '🚀 Releasing new version of MONEI PYTHON SDK' + +# Ensure we're in the project root directory +cd "$(dirname "$0")/.." + +# Clean previous builds +echo "🧹 Cleaning previous builds..." +rm -rf dist/* build/* + +# Install or update uv if not already installed +if ! command -v uv &> /dev/null; then + echo "📦 Installing uv..." + curl -LsSf https://astral.sh/uv/install.sh | sh +fi + +# Create/update virtual environment and sync dependencies +echo "🔄 Setting up virtual environment and syncing dependencies..." +uv venv +source .venv/bin/activate + +# Install runtime and test dependencies +echo "📦 Installing dependencies..." +uv pip sync requirements.txt test-requirements.txt + +# Run tests +echo "🧪 Running tests..." +uv run -- pytest + +# Ask for confirmation to continue if tests pass +read -p "✅ Tests passed. Continue with build and release? (y/n) " -n 1 -r +echo +if [[ ! $REPLY =~ ^[Yy]$ ]]; then + echo "❌ Release cancelled." + exit 0 +fi + +# Build the package using uv +echo "🏗️ Building package with uv..." +uv build --sdist --wheel --out-dir dist + +# Ask for confirmation before uploading +read -p "📤 Upload to PyPI? (y/n) " -n 1 -r +echo +if [[ $REPLY =~ ^[Yy]$ ]]; then + echo "📦 Uploading to PyPI..." + uv publish --token "${PYPI_TOKEN:-__token__}" + echo "✅ Release completed successfully!" +else + echo "❌ Upload cancelled. Package is built and available in the dist/ directory." +fi diff --git a/setup.cfg b/setup.cfg deleted file mode 100644 index 254dd4a..0000000 --- a/setup.cfg +++ /dev/null @@ -1,8 +0,0 @@ -[bdist_wheel] - -[metadata] -description_file = README.md - -[coverage:run] -source = - Monei/ diff --git a/setup.py b/setup.py deleted file mode 100644 index 712f04f..0000000 --- a/setup.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding: utf-8 - -from setuptools import setup, find_packages -from Monei import __version__ - -NAME = 'Monei' -# To install the library, run the following -# -# python setup.py install -# -# prerequisite: setuptools -# http://pypi.python.org/pypi/setuptools - -REQUIRES = ['urllib3 >= 1.15', 'six >= 1.10', 'certifi', 'python-dateutil'] - -setup( - name=NAME, - version=__version__, - description='MONEI PYTHON SDK', - author='MONEI', - author_email='hi@monei.com', - maintainer='MONEI', - maintainer_email='support@monei.com', - url='https://github.com/monei/monei-python-sdk', - keywords=['monei', 'monei pay', 'pay', 'payments', 'payment gateway', 'python', 'sdk', 'rest', 'api'], - install_requires=REQUIRES, - packages=find_packages(exclude=['test', 'tests']), - include_package_data=True, - long_description='The MONEI SDK will allow you to interact with our API in an easy and predictable way', - classifiers=[ - 'Development Status :: 5 - Production/Stable', - 'Intended Audience :: Developers', - 'License :: OSI Approved :: MIT License', - "Operating System :: OS Independent", - "Topic :: Software Development :: Libraries :: Python Modules", - 'Programming Language :: Python :: 2.7', - 'Programming Language :: Python :: 3.6' - ] -) diff --git a/test-requirements.txt b/test-requirements.txt index e98555c..bb4f22b 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -1,6 +1 @@ -pytest >= 7.2.1 -pytest-cov >= 2.8.1 -tox >= 3.9.0 -flake8 >= 4.0.0 -types-python-dateutil >= 2.8.19.14 -mypy >= 1.5 +pytest-cov>=2.8.1 diff --git a/test/test_activate_subscription_request.py b/test/test_activate_subscription_request.py index 8cda841..9b2cfc3 100644 --- a/test/test_activate_subscription_request.py +++ b/test/test_activate_subscription_request.py @@ -1,20 +1,19 @@ -# coding: utf-8 - """ MONEI API v1 -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

- - The version of the OpenAPI document: 1.5.1 - Generated by OpenAPI Generator (https://openapi-generator.tech) +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - Do not edit the class manually. -""" # noqa: E501 + The version of the OpenAPI document: 1.5.3 + Generated by: https://openapi-generator.tech +""" +import sys import unittest -from Monei.models.activate_subscription_request import ActivateSubscriptionRequest +import Monei +from Monei.model.activate_subscription_request import ActivateSubscriptionRequest + class TestActivateSubscriptionRequest(unittest.TestCase): """ActivateSubscriptionRequest unit test stubs""" @@ -25,34 +24,12 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional) -> ActivateSubscriptionRequest: - """Test ActivateSubscriptionRequest - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `ActivateSubscriptionRequest` - """ - model = ActivateSubscriptionRequest() - if include_optional: - return ActivateSubscriptionRequest( - payment_token = '7cc38b08ff471ccd313ad62b23b9f362b107560b', - session_id = '39603551437913', - add_amount = 110, - sequence_id = '62b23b9f3627cc38b08ff471ccd313ad', - complete_url = 'https://example.com/checkout/complete', - fail_url = 'https://example.com/checkout/fail', - cancel_url = 'https://example.com/checkout/cancel', - metadata = {"systemId":"12345"} - ) - else: - return ActivateSubscriptionRequest( - ) - """ - def testActivateSubscriptionRequest(self): """Test ActivateSubscriptionRequest""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) + # FIXME: construct object with mandatory attributes with example values + # model = ActivateSubscriptionRequest() # noqa: E501 + pass + if __name__ == '__main__': unittest.main() diff --git a/test/test_address.py b/test/test_address.py index 6df39d3..c3619b8 100644 --- a/test/test_address.py +++ b/test/test_address.py @@ -1,20 +1,19 @@ -# coding: utf-8 - """ MONEI API v1 -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

- - The version of the OpenAPI document: 1.5.1 - Generated by OpenAPI Generator (https://openapi-generator.tech) +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - Do not edit the class manually. -""" # noqa: E501 + The version of the OpenAPI document: 1.5.3 + Generated by: https://openapi-generator.tech +""" +import sys import unittest -from Monei.models.address import Address +import Monei +from Monei.model.address import Address + class TestAddress(unittest.TestCase): """Address unit test stubs""" @@ -25,32 +24,12 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional) -> Address: - """Test Address - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `Address` - """ - model = Address() - if include_optional: - return Address( - country = 'ES', - city = 'Málaga', - line1 = 'Fake Street 123', - line2 = '', - zip = '1234', - state = 'Málaga' - ) - else: - return Address( - ) - """ - def testAddress(self): """Test Address""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) + # FIXME: construct object with mandatory attributes with example values + # model = Address() # noqa: E501 + pass + if __name__ == '__main__': unittest.main() diff --git a/test/test_apple_pay_domain_api.py b/test/test_apple_pay_domain_api.py index b64db7a..bfe9bab 100644 --- a/test/test_apple_pay_domain_api.py +++ b/test/test_apple_pay_domain_api.py @@ -1,83 +1,34 @@ -# coding: utf-8 - """ MONEI API v1 -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

- - The version of the OpenAPI document: 1.5.1 - Generated by OpenAPI Generator (https://openapi-generator.tech) +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - Do not edit the class manually. -""" # noqa: E501 + The version of the OpenAPI document: 1.5.3 + Generated by: https://openapi-generator.tech +""" import unittest -from unittest.mock import patch, MagicMock -from Monei.api.apple_pay_domain_api import ApplePayDomainApi -from Monei.api_client import ApiClient -from Monei.configuration import Configuration -from Monei.exceptions import ApiException +import Monei +from Monei.api.apple_pay_domain_api import ApplePayDomainApi # noqa: E501 class TestApplePayDomainApi(unittest.TestCase): """ApplePayDomainApi unit test stubs""" - def setUp(self) -> None: - configuration = Configuration() - configuration.api_key = {"Authorization": "test_api_key"} - self.api_client = ApiClient(configuration) - self.api = ApplePayDomainApi(self.api_client) + def setUp(self): + self.api = ApplePayDomainApi() # noqa: E501 - def tearDown(self) -> None: + def tearDown(self): pass - @patch.object(ApiClient, "call_api") - def test_register(self, mock_call_api) -> None: + def test_register(self): """Test case for register - Register Apple Pay Domain + Register Domain # noqa: E501 """ - # Configure the mock to return a successful response - mock_response = { - "success": True - } - mock_call_api.return_value = mock_response - - # Test the method - domain_data = { - "domainName": "example.com" - } - response = self.api.register(domain_data) - - # Verify the response - self.assertEqual(response, mock_response) - mock_call_api.assert_called_once() - - @patch.object(ApiClient, "call_api") - def test_error_handling(self, mock_call_api) -> None: - """Test error handling in API calls""" - # Configure the mock to raise an ApiException - mock_call_api.side_effect = ApiException( - status=400, - reason="Bad Request", - body='{"status":"ERROR","statusCode":400,"requestId":"req_123","message":"Invalid domain name"}' - ) - - # Test the method - domain_data = { - "domainName": "invalid-domain" - } - - # Verify that the exception is raised - with self.assertRaises(ApiException) as context: - self.api.register(domain_data) - - # Verify the exception details - self.assertEqual(context.exception.status, 400) - self.assertEqual(context.exception.reason, "Bad Request") - self.assertIn("Invalid domain name", context.exception.body) + pass if __name__ == '__main__': diff --git a/test/test_apple_pay_domain_api_integration.py b/test/test_apple_pay_domain_api_integration.py new file mode 100644 index 0000000..59c29e9 --- /dev/null +++ b/test/test_apple_pay_domain_api_integration.py @@ -0,0 +1,45 @@ +import unittest +from unittest.mock import patch, MagicMock + +import Monei +from Monei.monei_client import MoneiClient +from Monei.exceptions import ApiException +from Monei.model.register_apple_pay_domain_request import RegisterApplePayDomainRequest + + +class TestApplePayDomainApiIntegration(unittest.TestCase): + """ApplePayDomainApi integration test stubs""" + + def setUp(self): + """Set up test fixtures, if any.""" + self.api_key = "test_api_key_12345" + self.client = MoneiClient(api_key=self.api_key) + self.domain_name = "example.com" + + def tearDown(self): + """Tear down test fixtures, if any.""" + pass + + @patch("Monei.api.apple_pay_domain_api.ApplePayDomainApi.register") + def test_register_apple_pay_domain(self, mock_register): + """Test registering an Apple Pay domain.""" + # Setup mock response + mock_response = MagicMock() + mock_response.success = True + mock_register.return_value = mock_response + + # Create register request + register_request = {"domainName": self.domain_name} + + # Call the API + result = self.client.apple_pay_domain.register(register_request) + + # Verify the result + self.assertTrue(result.success) + + # Verify the mock was called with the correct arguments + mock_register.assert_called_once() + + +if __name__ == "__main__": + unittest.main() diff --git a/test/test_apple_pay_domain_register200_response.py b/test/test_apple_pay_domain_register200_response.py index 8537db5..0268af3 100644 --- a/test/test_apple_pay_domain_register200_response.py +++ b/test/test_apple_pay_domain_register200_response.py @@ -1,20 +1,19 @@ -# coding: utf-8 - """ MONEI API v1 -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

- - The version of the OpenAPI document: 1.5.1 - Generated by OpenAPI Generator (https://openapi-generator.tech) +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - Do not edit the class manually. -""" # noqa: E501 + The version of the OpenAPI document: 1.5.3 + Generated by: https://openapi-generator.tech +""" +import sys import unittest -from Monei.models.apple_pay_domain_register200_response import ApplePayDomainRegister200Response +import Monei +from Monei.model.apple_pay_domain_register200_response import ApplePayDomainRegister200Response + class TestApplePayDomainRegister200Response(unittest.TestCase): """ApplePayDomainRegister200Response unit test stubs""" @@ -25,27 +24,12 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional) -> ApplePayDomainRegister200Response: - """Test ApplePayDomainRegister200Response - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `ApplePayDomainRegister200Response` - """ - model = ApplePayDomainRegister200Response() - if include_optional: - return ApplePayDomainRegister200Response( - success = True - ) - else: - return ApplePayDomainRegister200Response( - ) - """ - def testApplePayDomainRegister200Response(self): """Test ApplePayDomainRegister200Response""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) + # FIXME: construct object with mandatory attributes with example values + # model = ApplePayDomainRegister200Response() # noqa: E501 + pass + if __name__ == '__main__': unittest.main() diff --git a/Monei/models/payment_last_refund_reason.py b/test/test_apple_pay_domain_register400_response.py similarity index 71% rename from Monei/models/payment_last_refund_reason.py rename to test/test_apple_pay_domain_register400_response.py index 1d30132..782f8e5 100644 --- a/Monei/models/payment_last_refund_reason.py +++ b/test/test_apple_pay_domain_register400_response.py @@ -1,38 +1,37 @@ -# coding: utf-8 - """ MONEI API v1 -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

+

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 + + The version of the OpenAPI document: 1.5.3 + Generated by: https://openapi-generator.tech +""" - The version of the OpenAPI document: 1.5.1 - Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. -""" # noqa: E501 +import sys +import unittest +import Monei +from Monei.model.error import Error +globals()['Error'] = Error +from Monei.model.apple_pay_domain_register400_response import ApplePayDomainRegister400Response -from __future__ import annotations -import json -from enum import Enum -from typing_extensions import Self +class TestApplePayDomainRegister400Response(unittest.TestCase): + """ApplePayDomainRegister400Response unit test stubs""" -class PaymentLastRefundReason(str, Enum): - """ - The reason of the last refund transaction. - """ + def setUp(self): + pass - """ - allowed enum values - """ - DUPLICATED = 'duplicated' - FRAUDULENT = 'fraudulent' - REQUESTED_BY_CUSTOMER = 'requested_by_customer' + def tearDown(self): + pass - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of PaymentLastRefundReason from a JSON string""" - return cls(json.loads(json_str)) + def testApplePayDomainRegister400Response(self): + """Test ApplePayDomainRegister400Response""" + # FIXME: construct object with mandatory attributes with example values + # model = ApplePayDomainRegister400Response() # noqa: E501 + pass +if __name__ == '__main__': + unittest.main() diff --git a/Monei/models/payment_cancellation_reason.py b/test/test_apple_pay_domain_register401_response.py similarity index 71% rename from Monei/models/payment_cancellation_reason.py rename to test/test_apple_pay_domain_register401_response.py index 916651c..c07ba84 100644 --- a/Monei/models/payment_cancellation_reason.py +++ b/test/test_apple_pay_domain_register401_response.py @@ -1,38 +1,37 @@ -# coding: utf-8 - """ MONEI API v1 -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

+

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 + + The version of the OpenAPI document: 1.5.3 + Generated by: https://openapi-generator.tech +""" - The version of the OpenAPI document: 1.5.1 - Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. -""" # noqa: E501 +import sys +import unittest +import Monei +from Monei.model.error import Error +globals()['Error'] = Error +from Monei.model.apple_pay_domain_register401_response import ApplePayDomainRegister401Response -from __future__ import annotations -import json -from enum import Enum -from typing_extensions import Self +class TestApplePayDomainRegister401Response(unittest.TestCase): + """ApplePayDomainRegister401Response unit test stubs""" -class PaymentCancellationReason(str, Enum): - """ - The reason for canceling the Payment. - """ + def setUp(self): + pass - """ - allowed enum values - """ - DUPLICATED = 'duplicated' - FRAUDULENT = 'fraudulent' - REQUESTED_BY_CUSTOMER = 'requested_by_customer' + def tearDown(self): + pass - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of PaymentCancellationReason from a JSON string""" - return cls(json.loads(json_str)) + def testApplePayDomainRegister401Response(self): + """Test ApplePayDomainRegister401Response""" + # FIXME: construct object with mandatory attributes with example values + # model = ApplePayDomainRegister401Response() # noqa: E501 + pass +if __name__ == '__main__': + unittest.main() diff --git a/Monei/models/payment_message_language.py b/test/test_apple_pay_domain_register404_response.py similarity index 71% rename from Monei/models/payment_message_language.py rename to test/test_apple_pay_domain_register404_response.py index 14806fa..25d689e 100644 --- a/Monei/models/payment_message_language.py +++ b/test/test_apple_pay_domain_register404_response.py @@ -1,42 +1,37 @@ -# coding: utf-8 - """ MONEI API v1 -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

+

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 + + The version of the OpenAPI document: 1.5.3 + Generated by: https://openapi-generator.tech +""" - The version of the OpenAPI document: 1.5.1 - Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. -""" # noqa: E501 +import sys +import unittest +import Monei +from Monei.model.error import Error +globals()['Error'] = Error +from Monei.model.apple_pay_domain_register404_response import ApplePayDomainRegister404Response -from __future__ import annotations -import json -from enum import Enum -from typing_extensions import Self +class TestApplePayDomainRegister404Response(unittest.TestCase): + """ApplePayDomainRegister404Response unit test stubs""" -class PaymentMessageLanguage(str, Enum): - """ - The language of message sent to the customer. If not provided the default customer language is used if available. - """ + def setUp(self): + pass - """ - allowed enum values - """ - EN = 'en' - ES = 'es' - CA = 'ca' - PT = 'pt' - DE = 'de' - IT = 'it' - FR = 'fr' + def tearDown(self): + pass - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of PaymentMessageLanguage from a JSON string""" - return cls(json.loads(json_str)) + def testApplePayDomainRegister404Response(self): + """Test ApplePayDomainRegister404Response""" + # FIXME: construct object with mandatory attributes with example values + # model = ApplePayDomainRegister404Response() # noqa: E501 + pass +if __name__ == '__main__': + unittest.main() diff --git a/test/test_apple_pay_domain_register422_response.py b/test/test_apple_pay_domain_register422_response.py new file mode 100644 index 0000000..5533363 --- /dev/null +++ b/test/test_apple_pay_domain_register422_response.py @@ -0,0 +1,37 @@ +""" + MONEI API v1 + +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 + + The version of the OpenAPI document: 1.5.3 + Generated by: https://openapi-generator.tech +""" + + +import sys +import unittest + +import Monei +from Monei.model.error import Error +globals()['Error'] = Error +from Monei.model.apple_pay_domain_register422_response import ApplePayDomainRegister422Response + + +class TestApplePayDomainRegister422Response(unittest.TestCase): + """ApplePayDomainRegister422Response unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testApplePayDomainRegister422Response(self): + """Test ApplePayDomainRegister422Response""" + # FIXME: construct object with mandatory attributes with example values + # model = ApplePayDomainRegister422Response() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_apple_pay_domain_register500_response.py b/test/test_apple_pay_domain_register500_response.py new file mode 100644 index 0000000..f826f8d --- /dev/null +++ b/test/test_apple_pay_domain_register500_response.py @@ -0,0 +1,37 @@ +""" + MONEI API v1 + +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 + + The version of the OpenAPI document: 1.5.3 + Generated by: https://openapi-generator.tech +""" + + +import sys +import unittest + +import Monei +from Monei.model.error import Error +globals()['Error'] = Error +from Monei.model.apple_pay_domain_register500_response import ApplePayDomainRegister500Response + + +class TestApplePayDomainRegister500Response(unittest.TestCase): + """ApplePayDomainRegister500Response unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testApplePayDomainRegister500Response(self): + """Test ApplePayDomainRegister500Response""" + # FIXME: construct object with mandatory attributes with example values + # model = ApplePayDomainRegister500Response() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_apple_pay_domain_register503_response.py b/test/test_apple_pay_domain_register503_response.py new file mode 100644 index 0000000..4e88e2a --- /dev/null +++ b/test/test_apple_pay_domain_register503_response.py @@ -0,0 +1,37 @@ +""" + MONEI API v1 + +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 + + The version of the OpenAPI document: 1.5.3 + Generated by: https://openapi-generator.tech +""" + + +import sys +import unittest + +import Monei +from Monei.model.error import Error +globals()['Error'] = Error +from Monei.model.apple_pay_domain_register503_response import ApplePayDomainRegister503Response + + +class TestApplePayDomainRegister503Response(unittest.TestCase): + """ApplePayDomainRegister503Response unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testApplePayDomainRegister503Response(self): + """Test ApplePayDomainRegister503Response""" + # FIXME: construct object with mandatory attributes with example values + # model = ApplePayDomainRegister503Response() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_bizum_api.py b/test/test_bizum_api.py index a62efdd..581da9e 100644 --- a/test/test_bizum_api.py +++ b/test/test_bizum_api.py @@ -1,103 +1,34 @@ -# coding: utf-8 - """ MONEI API v1 -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

- - The version of the OpenAPI document: 1.5.1 - Generated by OpenAPI Generator (https://openapi-generator.tech) +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - Do not edit the class manually. -""" # noqa: E501 + The version of the OpenAPI document: 1.5.3 + Generated by: https://openapi-generator.tech +""" import unittest -from unittest.mock import patch, MagicMock -from Monei.api.bizum_api import BizumApi -from Monei.api_client import ApiClient -from Monei.configuration import Configuration -from Monei.exceptions import ApiException +import Monei +from Monei.api.bizum_api import BizumApi # noqa: E501 class TestBizumApi(unittest.TestCase): """BizumApi unit test stubs""" - def setUp(self) -> None: - configuration = Configuration() - configuration.api_key = {"Authorization": "test_api_key"} - self.api_client = ApiClient(configuration) - self.api = BizumApi(self.api_client) + def setUp(self): + self.api = BizumApi() # noqa: E501 - def tearDown(self) -> None: + def tearDown(self): pass - @patch.object(ApiClient, "call_api") - def test_validate_phone(self, mock_call_api) -> None: + def test_validate_phone(self): """Test case for validate_phone - Validate Bizum Phone + Validate Phone # noqa: E501 """ - # Configure the mock to return a successful response - mock_response = { - "valid": True - } - mock_call_api.return_value = mock_response - - # Test the method - validate_data = { - "phoneNumber": "+34600000000" - } - response = self.api.validate_phone(validate_data) - - # Verify the response - self.assertEqual(response, mock_response) - mock_call_api.assert_called_once() - - @patch.object(ApiClient, "call_api") - def test_validate_phone_invalid(self, mock_call_api) -> None: - """Test case for validate_phone with invalid phone number""" - # Configure the mock to return a response for invalid phone - mock_response = { - "valid": False - } - mock_call_api.return_value = mock_response - - # Test the method - validate_data = { - "phoneNumber": "+34999999999" # Invalid phone number - } - response = self.api.validate_phone(validate_data) - - # Verify the response - self.assertEqual(response, mock_response) - self.assertFalse(response["valid"]) - mock_call_api.assert_called_once() - - @patch.object(ApiClient, "call_api") - def test_error_handling(self, mock_call_api) -> None: - """Test error handling in API calls""" - # Configure the mock to raise an ApiException - mock_call_api.side_effect = ApiException( - status=400, - reason="Bad Request", - body='{"status":"ERROR","statusCode":400,"requestId":"req_123","message":"Invalid phone number format"}' - ) - - # Test the method - validate_data = { - "phoneNumber": "invalid-phone" - } - - # Verify that the exception is raised - with self.assertRaises(ApiException) as context: - self.api.validate_phone(validate_data) - - # Verify the exception details - self.assertEqual(context.exception.status, 400) - self.assertEqual(context.exception.reason, "Bad Request") - self.assertIn("Invalid phone number format", context.exception.body) + pass if __name__ == '__main__': diff --git a/test/test_bizum_api_integration.py b/test/test_bizum_api_integration.py new file mode 100644 index 0000000..412db68 --- /dev/null +++ b/test/test_bizum_api_integration.py @@ -0,0 +1,47 @@ +import unittest +from unittest.mock import patch, MagicMock + +import Monei +from Monei.monei_client import MoneiClient +from Monei.exceptions import ApiException +from Monei.model.validate_bizum_phone_request import ValidateBizumPhoneRequest + + +class TestBizumApiIntegration(unittest.TestCase): + """BizumApi integration test stubs""" + + def setUp(self): + """Set up test fixtures, if any.""" + self.api_key = "test_api_key_12345" + self.client = MoneiClient(api_key=self.api_key) + self.phone_number = "+34600000000" + + def tearDown(self): + """Tear down test fixtures, if any.""" + pass + + @patch('Monei.api.bizum_api.BizumApi.validate_phone') + def test_validate_bizum_phone(self, mock_validate_phone): + """Test validating a Bizum phone number.""" + # Setup mock response + mock_response = MagicMock() + mock_response.valid = True + mock_validate_phone.return_value = mock_response + + # Create validate phone request + validate_request = { + "phoneNumber": self.phone_number + } + + # Call the API + result = self.client.bizum.validate_phone(validate_request) + + # Verify the result + self.assertTrue(result.valid) + + # Verify the mock was called with the correct arguments + mock_validate_phone.assert_called_once() + + +if __name__ == "__main__": + unittest.main() \ No newline at end of file diff --git a/test/test_bizum_validate_phone200_response.py b/test/test_bizum_validate_phone200_response.py index 2a3a502..cb90791 100644 --- a/test/test_bizum_validate_phone200_response.py +++ b/test/test_bizum_validate_phone200_response.py @@ -1,20 +1,19 @@ -# coding: utf-8 - """ MONEI API v1 -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

- - The version of the OpenAPI document: 1.5.1 - Generated by OpenAPI Generator (https://openapi-generator.tech) +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - Do not edit the class manually. -""" # noqa: E501 + The version of the OpenAPI document: 1.5.3 + Generated by: https://openapi-generator.tech +""" +import sys import unittest -from Monei.models.bizum_validate_phone200_response import BizumValidatePhone200Response +import Monei +from Monei.model.bizum_validate_phone200_response import BizumValidatePhone200Response + class TestBizumValidatePhone200Response(unittest.TestCase): """BizumValidatePhone200Response unit test stubs""" @@ -25,27 +24,12 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional) -> BizumValidatePhone200Response: - """Test BizumValidatePhone200Response - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `BizumValidatePhone200Response` - """ - model = BizumValidatePhone200Response() - if include_optional: - return BizumValidatePhone200Response( - is_valid = True - ) - else: - return BizumValidatePhone200Response( - ) - """ - def testBizumValidatePhone200Response(self): """Test BizumValidatePhone200Response""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) + # FIXME: construct object with mandatory attributes with example values + # model = BizumValidatePhone200Response() # noqa: E501 + pass + if __name__ == '__main__': unittest.main() diff --git a/test/test_cancel_payment_request.py b/test/test_cancel_payment_request.py index bd8b3ee..98c5b24 100644 --- a/test/test_cancel_payment_request.py +++ b/test/test_cancel_payment_request.py @@ -1,20 +1,21 @@ -# coding: utf-8 - """ MONEI API v1 -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

- - The version of the OpenAPI document: 1.5.1 - Generated by OpenAPI Generator (https://openapi-generator.tech) +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - Do not edit the class manually. -""" # noqa: E501 + The version of the OpenAPI document: 1.5.3 + Generated by: https://openapi-generator.tech +""" +import sys import unittest -from Monei.models.cancel_payment_request import CancelPaymentRequest +import Monei +from Monei.model.payment_cancellation_reason import PaymentCancellationReason +globals()['PaymentCancellationReason'] = PaymentCancellationReason +from Monei.model.cancel_payment_request import CancelPaymentRequest + class TestCancelPaymentRequest(unittest.TestCase): """CancelPaymentRequest unit test stubs""" @@ -25,27 +26,12 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional) -> CancelPaymentRequest: - """Test CancelPaymentRequest - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `CancelPaymentRequest` - """ - model = CancelPaymentRequest() - if include_optional: - return CancelPaymentRequest( - cancellation_reason = 'duplicated' - ) - else: - return CancelPaymentRequest( - ) - """ - def testCancelPaymentRequest(self): """Test CancelPaymentRequest""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) + # FIXME: construct object with mandatory attributes with example values + # model = CancelPaymentRequest() # noqa: E501 + pass + if __name__ == '__main__': unittest.main() diff --git a/test/test_cancel_subscription_request.py b/test/test_cancel_subscription_request.py index a92fb22..affe5d6 100644 --- a/test/test_cancel_subscription_request.py +++ b/test/test_cancel_subscription_request.py @@ -1,20 +1,19 @@ -# coding: utf-8 - """ MONEI API v1 -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

- - The version of the OpenAPI document: 1.5.1 - Generated by OpenAPI Generator (https://openapi-generator.tech) +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - Do not edit the class manually. -""" # noqa: E501 + The version of the OpenAPI document: 1.5.3 + Generated by: https://openapi-generator.tech +""" +import sys import unittest -from Monei.models.cancel_subscription_request import CancelSubscriptionRequest +import Monei +from Monei.model.cancel_subscription_request import CancelSubscriptionRequest + class TestCancelSubscriptionRequest(unittest.TestCase): """CancelSubscriptionRequest unit test stubs""" @@ -25,27 +24,12 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional) -> CancelSubscriptionRequest: - """Test CancelSubscriptionRequest - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `CancelSubscriptionRequest` - """ - model = CancelSubscriptionRequest() - if include_optional: - return CancelSubscriptionRequest( - cancel_at_period_end = False - ) - else: - return CancelSubscriptionRequest( - ) - """ - def testCancelSubscriptionRequest(self): """Test CancelSubscriptionRequest""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) + # FIXME: construct object with mandatory attributes with example values + # model = CancelSubscriptionRequest() # noqa: E501 + pass + if __name__ == '__main__': unittest.main() diff --git a/test/test_capture_payment_request.py b/test/test_capture_payment_request.py index 6a4c3f8..c2065a5 100644 --- a/test/test_capture_payment_request.py +++ b/test/test_capture_payment_request.py @@ -1,20 +1,19 @@ -# coding: utf-8 - """ MONEI API v1 -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

- - The version of the OpenAPI document: 1.5.1 - Generated by OpenAPI Generator (https://openapi-generator.tech) +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - Do not edit the class manually. -""" # noqa: E501 + The version of the OpenAPI document: 1.5.3 + Generated by: https://openapi-generator.tech +""" +import sys import unittest -from Monei.models.capture_payment_request import CapturePaymentRequest +import Monei +from Monei.model.capture_payment_request import CapturePaymentRequest + class TestCapturePaymentRequest(unittest.TestCase): """CapturePaymentRequest unit test stubs""" @@ -25,27 +24,12 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional) -> CapturePaymentRequest: - """Test CapturePaymentRequest - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `CapturePaymentRequest` - """ - model = CapturePaymentRequest() - if include_optional: - return CapturePaymentRequest( - amount = 110 - ) - else: - return CapturePaymentRequest( - ) - """ - def testCapturePaymentRequest(self): """Test CapturePaymentRequest""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) + # FIXME: construct object with mandatory attributes with example values + # model = CapturePaymentRequest() # noqa: E501 + pass + if __name__ == '__main__': unittest.main() diff --git a/test/test_confirm_payment_request.py b/test/test_confirm_payment_request.py index c249508..e47dbd5 100644 --- a/test/test_confirm_payment_request.py +++ b/test/test_confirm_payment_request.py @@ -1,20 +1,27 @@ -# coding: utf-8 - """ MONEI API v1 -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

- - The version of the OpenAPI document: 1.5.1 - Generated by OpenAPI Generator (https://openapi-generator.tech) +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - Do not edit the class manually. -""" # noqa: E501 + The version of the OpenAPI document: 1.5.3 + Generated by: https://openapi-generator.tech +""" +import sys import unittest -from Monei.models.confirm_payment_request import ConfirmPaymentRequest +import Monei +from Monei.model.confirm_payment_request_payment_method import ConfirmPaymentRequestPaymentMethod +from Monei.model.payment_billing_details import PaymentBillingDetails +from Monei.model.payment_customer import PaymentCustomer +from Monei.model.payment_shipping_details import PaymentShippingDetails +globals()['ConfirmPaymentRequestPaymentMethod'] = ConfirmPaymentRequestPaymentMethod +globals()['PaymentBillingDetails'] = PaymentBillingDetails +globals()['PaymentCustomer'] = PaymentCustomer +globals()['PaymentShippingDetails'] = PaymentShippingDetails +from Monei.model.confirm_payment_request import ConfirmPaymentRequest + class TestConfirmPaymentRequest(unittest.TestCase): """ConfirmPaymentRequest unit test stubs""" @@ -25,64 +32,12 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional) -> ConfirmPaymentRequest: - """Test ConfirmPaymentRequest - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `ConfirmPaymentRequest` - """ - model = ConfirmPaymentRequest() - if include_optional: - return ConfirmPaymentRequest( - payment_token = '7cc38b08ff471ccd313ad62b23b9f362b107560b', - payment_method = Monei.models.confirm_payment_request_payment_method.ConfirmPaymentRequest_paymentMethod( - card = Monei.models.confirm_payment_request_payment_method_card.ConfirmPaymentRequest_paymentMethod_card( - cardholder_name = 'John Doe', - cardholder_email = 'john.doe@monei.com', ), ), - generate_payment_token = False, - customer = Monei.models.payment_customer.Payment-Customer( - email = 'john.doe@example.com', - name = 'John Doe', - phone = '', ), - billing_details = Monei.models.payment_billing_details.Payment-BillingDetails( - name = 'John Doe', - email = 'john.doe@example.com', - phone = '', - company = '', - tax_id = '', - address = Monei.models.address.Address( - country = 'ES', - city = 'Málaga', - line1 = 'Fake Street 123', - line2 = '', - zip = '1234', - state = 'Málaga', ), ), - shipping_details = Monei.models.payment_shipping_details.Payment-ShippingDetails( - name = 'John Doe', - email = 'john.doe@example.com', - phone = '', - company = '', - tax_id = '', - address = Monei.models.address.Address( - country = 'ES', - city = 'Málaga', - line1 = 'Fake Street 123', - line2 = '', - zip = '1234', - state = 'Málaga', ), ), - metadata = {"systemId":"12345"} - ) - else: - return ConfirmPaymentRequest( - payment_token = '7cc38b08ff471ccd313ad62b23b9f362b107560b', - ) - """ - def testConfirmPaymentRequest(self): """Test ConfirmPaymentRequest""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) + # FIXME: construct object with mandatory attributes with example values + # model = ConfirmPaymentRequest() # noqa: E501 + pass + if __name__ == '__main__': unittest.main() diff --git a/test/test_confirm_payment_request_payment_method.py b/test/test_confirm_payment_request_payment_method.py index e288686..e6099d0 100644 --- a/test/test_confirm_payment_request_payment_method.py +++ b/test/test_confirm_payment_request_payment_method.py @@ -1,20 +1,21 @@ -# coding: utf-8 - """ MONEI API v1 -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

- - The version of the OpenAPI document: 1.5.1 - Generated by OpenAPI Generator (https://openapi-generator.tech) +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - Do not edit the class manually. -""" # noqa: E501 + The version of the OpenAPI document: 1.5.3 + Generated by: https://openapi-generator.tech +""" +import sys import unittest -from Monei.models.confirm_payment_request_payment_method import ConfirmPaymentRequestPaymentMethod +import Monei +from Monei.model.confirm_payment_request_payment_method_card import ConfirmPaymentRequestPaymentMethodCard +globals()['ConfirmPaymentRequestPaymentMethodCard'] = ConfirmPaymentRequestPaymentMethodCard +from Monei.model.confirm_payment_request_payment_method import ConfirmPaymentRequestPaymentMethod + class TestConfirmPaymentRequestPaymentMethod(unittest.TestCase): """ConfirmPaymentRequestPaymentMethod unit test stubs""" @@ -25,29 +26,12 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional) -> ConfirmPaymentRequestPaymentMethod: - """Test ConfirmPaymentRequestPaymentMethod - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `ConfirmPaymentRequestPaymentMethod` - """ - model = ConfirmPaymentRequestPaymentMethod() - if include_optional: - return ConfirmPaymentRequestPaymentMethod( - card = Monei.models.confirm_payment_request_payment_method_card.ConfirmPaymentRequest_paymentMethod_card( - cardholder_name = 'John Doe', - cardholder_email = 'john.doe@monei.com', ) - ) - else: - return ConfirmPaymentRequestPaymentMethod( - ) - """ - def testConfirmPaymentRequestPaymentMethod(self): """Test ConfirmPaymentRequestPaymentMethod""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) + # FIXME: construct object with mandatory attributes with example values + # model = ConfirmPaymentRequestPaymentMethod() # noqa: E501 + pass + if __name__ == '__main__': unittest.main() diff --git a/test/test_confirm_payment_request_payment_method_card.py b/test/test_confirm_payment_request_payment_method_card.py index 7ebc4ba..968299a 100644 --- a/test/test_confirm_payment_request_payment_method_card.py +++ b/test/test_confirm_payment_request_payment_method_card.py @@ -1,20 +1,19 @@ -# coding: utf-8 - """ MONEI API v1 -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

- - The version of the OpenAPI document: 1.5.1 - Generated by OpenAPI Generator (https://openapi-generator.tech) +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - Do not edit the class manually. -""" # noqa: E501 + The version of the OpenAPI document: 1.5.3 + Generated by: https://openapi-generator.tech +""" +import sys import unittest -from Monei.models.confirm_payment_request_payment_method_card import ConfirmPaymentRequestPaymentMethodCard +import Monei +from Monei.model.confirm_payment_request_payment_method_card import ConfirmPaymentRequestPaymentMethodCard + class TestConfirmPaymentRequestPaymentMethodCard(unittest.TestCase): """ConfirmPaymentRequestPaymentMethodCard unit test stubs""" @@ -25,28 +24,12 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional) -> ConfirmPaymentRequestPaymentMethodCard: - """Test ConfirmPaymentRequestPaymentMethodCard - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `ConfirmPaymentRequestPaymentMethodCard` - """ - model = ConfirmPaymentRequestPaymentMethodCard() - if include_optional: - return ConfirmPaymentRequestPaymentMethodCard( - cardholder_name = 'John Doe', - cardholder_email = 'john.doe@monei.com' - ) - else: - return ConfirmPaymentRequestPaymentMethodCard( - ) - """ - def testConfirmPaymentRequestPaymentMethodCard(self): """Test ConfirmPaymentRequestPaymentMethodCard""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) + # FIXME: construct object with mandatory attributes with example values + # model = ConfirmPaymentRequestPaymentMethodCard() # noqa: E501 + pass + if __name__ == '__main__': unittest.main() diff --git a/test/test_create_payment_request.py b/test/test_create_payment_request.py index e1bc590..1bf59dc 100644 --- a/test/test_create_payment_request.py +++ b/test/test_create_payment_request.py @@ -1,20 +1,35 @@ -# coding: utf-8 - """ MONEI API v1 -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

- - The version of the OpenAPI document: 1.5.1 - Generated by OpenAPI Generator (https://openapi-generator.tech) +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - Do not edit the class manually. -""" # noqa: E501 + The version of the OpenAPI document: 1.5.3 + Generated by: https://openapi-generator.tech +""" +import sys import unittest -from Monei.models.create_payment_request import CreatePaymentRequest +import Monei +from Monei.model.payment_billing_details import PaymentBillingDetails +from Monei.model.payment_customer import PaymentCustomer +from Monei.model.payment_payment_method_input import PaymentPaymentMethodInput +from Monei.model.payment_payment_methods import PaymentPaymentMethods +from Monei.model.payment_sequence import PaymentSequence +from Monei.model.payment_session_details import PaymentSessionDetails +from Monei.model.payment_shipping_details import PaymentShippingDetails +from Monei.model.payment_transaction_type import PaymentTransactionType +globals()['PaymentBillingDetails'] = PaymentBillingDetails +globals()['PaymentCustomer'] = PaymentCustomer +globals()['PaymentPaymentMethodInput'] = PaymentPaymentMethodInput +globals()['PaymentPaymentMethods'] = PaymentPaymentMethods +globals()['PaymentSequence'] = PaymentSequence +globals()['PaymentSessionDetails'] = PaymentSessionDetails +globals()['PaymentShippingDetails'] = PaymentShippingDetails +globals()['PaymentTransactionType'] = PaymentTransactionType +from Monei.model.create_payment_request import CreatePaymentRequest + class TestCreatePaymentRequest(unittest.TestCase): """CreatePaymentRequest unit test stubs""" @@ -25,111 +40,12 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional) -> CreatePaymentRequest: - """Test CreatePaymentRequest - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `CreatePaymentRequest` - """ - model = CreatePaymentRequest() - if include_optional: - return CreatePaymentRequest( - amount = 110, - currency = 'EUR', - order_id = '14379133960355', - callback_url = 'https://example.com/checkout/callback', - complete_url = 'https://example.com/checkout/complete', - fail_url = 'https://example.com/checkout/fail', - cancel_url = 'https://example.com/checkout/cancel', - payment_token = '7cc38b08ff471ccd313ad62b23b9f362b107560b', - session_id = '39603551437913', - generate_payment_token = False, - payment_method = Monei.models.payment_payment_method_input.Payment-PaymentMethodInput( - card = Monei.models.payment_payment_method_card_input.Payment-PaymentMethodCardInput( - number = '', - cvc = '', - exp_month = '', - exp_year = '', - cardholder_name = 'John Doe', - cardholder_email = 'john.doe@monei.com', ), - bizum = Monei.models.payment_payment_method_bizum_input.Payment-PaymentMethodBizumInput( - phone_number = '', ), ), - allowed_payment_methods = ["card","bizum","paypal"], - transaction_type = 'SALE', - sequence = Monei.models.payment_sequence.Payment-Sequence( - type = 'recurring', - recurring = Monei.models.payment_sequence_recurring.Payment-SequenceRecurring( - expiry = '*(The payment method or card expiration)*', - frequency = 30, ), ), - store_id = 'e5f28150d9e8974c58ab5ec9c4a880f8734dcf05', - point_of_sale_id = 'fb269cccfa0cc021f5d0b8eb1421646c696213e1', - subscription_id = '575bcd84-09fc-4a6e-8c4c-f88b8eb90bfa', - auto_recover = False, - description = 'Test Shop - #84370745531439', - customer = Monei.models.payment_customer.Payment-Customer( - email = 'john.doe@example.com', - name = 'John Doe', - phone = '', ), - billing_details = Monei.models.payment_billing_details.Payment-BillingDetails( - name = 'John Doe', - email = 'john.doe@example.com', - phone = '', - company = '', - tax_id = '', - address = Monei.models.address.Address( - country = 'ES', - city = 'Málaga', - line1 = 'Fake Street 123', - line2 = '', - zip = '1234', - state = 'Málaga', ), ), - shipping_details = Monei.models.payment_shipping_details.Payment-ShippingDetails( - name = 'John Doe', - email = 'john.doe@example.com', - phone = '', - company = '', - tax_id = '', - address = Monei.models.address.Address( - country = 'ES', - city = 'Málaga', - line1 = 'Fake Street 123', - line2 = '', - zip = '1234', - state = 'Málaga', ), ), - session_details = Monei.models.payment_session_details.Payment-SessionDetails( - ip = '100.100.200.100', - country_code = 'ES', - lang = 'es', - device_type = 'desktop', - device_model = '', - browser = 'Chrome', - browser_version = '83.0.4103.116', - os = 'Mac OS', - os_version = '10.15.4', - source = 'MONEI/PHP', - source_version = '0.1.2', - user_agent = 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) ...', - browser_accept = 'text/html,application/xhtml+xml,application/json', - browser_color_depth = 24, - browser_screen_height = 1152, - browser_screen_width = 2048, - browser_timezone_offset = 'string', ), - expire_at = 1663581391, - metadata = {"systemId":"12345"} - ) - else: - return CreatePaymentRequest( - amount = 110, - currency = 'EUR', - order_id = '14379133960355', - ) - """ - def testCreatePaymentRequest(self): """Test CreatePaymentRequest""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) + # FIXME: construct object with mandatory attributes with example values + # model = CreatePaymentRequest() # noqa: E501 + pass + if __name__ == '__main__': unittest.main() diff --git a/test/test_create_subscription_request.py b/test/test_create_subscription_request.py index bf503c2..bba6550 100644 --- a/test/test_create_subscription_request.py +++ b/test/test_create_subscription_request.py @@ -1,20 +1,29 @@ -# coding: utf-8 - """ MONEI API v1 -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

- - The version of the OpenAPI document: 1.5.1 - Generated by OpenAPI Generator (https://openapi-generator.tech) +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - Do not edit the class manually. -""" # noqa: E501 + The version of the OpenAPI document: 1.5.3 + Generated by: https://openapi-generator.tech +""" +import sys import unittest -from Monei.models.create_subscription_request import CreateSubscriptionRequest +import Monei +from Monei.model.payment_billing_details import PaymentBillingDetails +from Monei.model.payment_customer import PaymentCustomer +from Monei.model.payment_shipping_details import PaymentShippingDetails +from Monei.model.subscription_interval import SubscriptionInterval +from Monei.model.subscription_retry_schedule import SubscriptionRetrySchedule +globals()['PaymentBillingDetails'] = PaymentBillingDetails +globals()['PaymentCustomer'] = PaymentCustomer +globals()['PaymentShippingDetails'] = PaymentShippingDetails +globals()['SubscriptionInterval'] = SubscriptionInterval +globals()['SubscriptionRetrySchedule'] = SubscriptionRetrySchedule +from Monei.model.create_subscription_request import CreateSubscriptionRequest + class TestCreateSubscriptionRequest(unittest.TestCase): """CreateSubscriptionRequest unit test stubs""" @@ -25,70 +34,12 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional) -> CreateSubscriptionRequest: - """Test CreateSubscriptionRequest - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `CreateSubscriptionRequest` - """ - model = CreateSubscriptionRequest() - if include_optional: - return CreateSubscriptionRequest( - amount = 110, - currency = 'EUR', - interval = 'month', - interval_count = 1, - description = 'MoonMail Monthly Lite', - customer = Monei.models.payment_customer.Payment-Customer( - email = 'john.doe@example.com', - name = 'John Doe', - phone = '', ), - billing_details = Monei.models.payment_billing_details.Payment-BillingDetails( - name = 'John Doe', - email = 'john.doe@example.com', - phone = '', - company = '', - tax_id = '', - address = Monei.models.address.Address( - country = 'ES', - city = 'Málaga', - line1 = 'Fake Street 123', - line2 = '', - zip = '1234', - state = 'Málaga', ), ), - shipping_details = Monei.models.payment_shipping_details.Payment-ShippingDetails( - name = 'John Doe', - email = 'john.doe@example.com', - phone = '', - company = '', - tax_id = '', - address = Monei.models.address.Address( - country = 'ES', - city = 'Málaga', - line1 = 'Fake Street 123', - line2 = '', - zip = '1234', - state = 'Málaga', ), ), - trial_period_end = 1636366897, - trial_period_days = 7, - retry_schedule = [{"interval":"day","intervalCount":1},{"interval":"day","intervalCount":3},{"interval":"week","intervalCount":1}], - callback_url = 'https://example.com/subscriptions/callback', - payment_callback_url = 'https://example.com/payments/callback', - metadata = {"systemId":"12345"} - ) - else: - return CreateSubscriptionRequest( - amount = 110, - currency = 'EUR', - interval = 'month', - ) - """ - def testCreateSubscriptionRequest(self): """Test CreateSubscriptionRequest""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) + # FIXME: construct object with mandatory attributes with example values + # model = CreateSubscriptionRequest() # noqa: E501 + pass + if __name__ == '__main__': unittest.main() diff --git a/test/test_error.py b/test/test_error.py index 060473f..3e7cd6e 100644 --- a/test/test_error.py +++ b/test/test_error.py @@ -1,20 +1,19 @@ -# coding: utf-8 - """ MONEI API v1 -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

- - The version of the OpenAPI document: 1.5.1 - Generated by OpenAPI Generator (https://openapi-generator.tech) +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - Do not edit the class manually. -""" # noqa: E501 + The version of the OpenAPI document: 1.5.3 + Generated by: https://openapi-generator.tech +""" +import sys import unittest -from Monei.models.error import Error +import Monei +from Monei.model.error import Error + class TestError(unittest.TestCase): """Error unit test stubs""" @@ -25,36 +24,12 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional) -> Error: - """Test Error - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `Error` - """ - model = Error() - if include_optional: - return Error( - status = 'NotFoundError', - status_code = 404, - message = 'Resource not found', - request_id = 'df011689-bd3e-4953-95ca-c7bbdacaf6f8', - request_time = '2025-03-05T10:25:52Z' - ) - else: - return Error( - status = 'NotFoundError', - status_code = 404, - message = 'Resource not found', - request_id = 'df011689-bd3e-4953-95ca-c7bbdacaf6f8', - request_time = '2025-03-05T10:25:52Z', - ) - """ - def testError(self): """Test Error""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) + # FIXME: construct object with mandatory attributes with example values + # model = Error() # noqa: E501 + pass + if __name__ == '__main__': unittest.main() diff --git a/test/test_error_handling.py b/test/test_error_handling.py new file mode 100644 index 0000000..bc095d5 --- /dev/null +++ b/test/test_error_handling.py @@ -0,0 +1,81 @@ +import unittest +from unittest.mock import patch + +from Monei.monei_client import MoneiClient +from Monei.exceptions import ApiException + + +class TestErrorHandling(unittest.TestCase): + """Error handling test stubs""" + + def setUp(self): + """Set up test fixtures, if any.""" + self.api_key = "test_api_key_12345" + self.client = MoneiClient(api_key=self.api_key) + + def tearDown(self): + """Tear down test fixtures, if any.""" + pass + + @patch("Monei.api.payments_api.PaymentsApi.create") + def test_api_error_handling(self, mock_create): + """Test handling API errors.""" + # Setup mock to raise an ApiException + mock_create.side_effect = ApiException(status=400, reason="Bad Request") + + # Create payment request + payment_request = { + "amount": 1000, + "currency": "EUR", + # Missing required fields + } + + # Call the API and expect an exception + with self.assertRaises(ApiException) as context: + self.client.payments.create(payment_request) + + # Verify the exception details + self.assertEqual(context.exception.status, 400) + self.assertEqual(context.exception.reason, "Bad Request") + + @patch("Monei.api.payments_api.PaymentsApi.get") + def test_not_found_error(self, mock_get): + """Test handling 404 Not Found errors.""" + # Setup mock to raise an ApiException with 404 status + mock_get.side_effect = ApiException(status=404, reason="Not Found") + + # Call the API with a non-existent payment ID + with self.assertRaises(ApiException) as context: + self.client.payments.get("non_existent_payment_id") + + # Verify the exception details + self.assertEqual(context.exception.status, 404) + self.assertEqual(context.exception.reason, "Not Found") + + @patch("Monei.api.payments_api.PaymentsApi.confirm") + def test_unauthorized_error(self, mock_confirm): + """Test handling 401 Unauthorized errors.""" + # Setup mock to raise an ApiException with 401 status + mock_confirm.side_effect = ApiException(status=401, reason="Unauthorized") + + # Call the API with an invalid API key + with self.assertRaises(ApiException) as context: + self.client.payments.confirm("payment_id", {"paymentMethod": {"type": "CARD"}}) + + # Verify the exception details + self.assertEqual(context.exception.status, 401) + self.assertEqual(context.exception.reason, "Unauthorized") + + def test_invalid_account_id_without_user_agent(self): + """Test error when setting account ID without user agent.""" + client = MoneiClient(api_key=self.api_key) + + with self.assertRaises(ApiException) as context: + client.set_account_id("account_id") + + self.assertEqual(context.exception.status, 400) + self.assertEqual(context.exception.reason, "User-Agent must be set before using Account ID") + + +if __name__ == "__main__": + unittest.main() diff --git a/test/test_monei_client.py b/test/test_monei_client.py index b419aa9..699f02b 100644 --- a/test/test_monei_client.py +++ b/test/test_monei_client.py @@ -1,21 +1,12 @@ -# coding: utf-8 - -""" -MONEI API v1 - MoneiClient Tests - -Unit tests for the MoneiClient class. -""" - import unittest import json import hmac import hashlib from unittest.mock import patch, MagicMock +import Monei from Monei.monei_client import MoneiClient, DEFAULT_USER_AGENT from Monei.exceptions import ApiException -from Monei.configuration import Configuration -from Monei.api_client import ApiClient from Monei.api.payments_api import PaymentsApi from Monei.api.payment_methods_api import PaymentMethodsApi from Monei.api.subscriptions_api import SubscriptionsApi @@ -26,84 +17,97 @@ class TestMoneiClient(unittest.TestCase): """MoneiClient unit test stubs""" - def setUp(self) -> None: + def setUp(self): + """Set up test fixtures, if any.""" self.api_key = "test_api_key_12345" self.account_id = "test_account_id_67890" - self.user_agent = "TestPlatform/1.0" - self.client = MoneiClient(api_key=self.api_key) + self.user_agent = "MONEI/TestPlatform/1.0.0" - def tearDown(self) -> None: + def tearDown(self): + """Tear down test fixtures, if any.""" pass - def test_init_with_api_key_only(self) -> None: - """Test initializing with API key only""" + def test_init_with_api_key_only(self): + """Test initializing with API key only.""" client = MoneiClient(api_key=self.api_key) self.assertIsInstance(client, MoneiClient) + self.assertEqual(client.api_key, self.api_key) + self.assertEqual(client.user_agent, DEFAULT_USER_AGENT) + self.assertIsNone(client.account_id) + + # Check API instances are initialized self.assertIsInstance(client.Payments, PaymentsApi) self.assertIsInstance(client.PaymentMethods, PaymentMethodsApi) self.assertIsInstance(client.Subscriptions, SubscriptionsApi) self.assertIsInstance(client.ApplePayDomain, ApplePayDomainApi) self.assertIsInstance(client.Bizum, BizumApi) - self.assertEqual(client.user_agent, DEFAULT_USER_AGENT) - def test_init_with_custom_config(self) -> None: - """Test initializing with custom configuration""" - config = Configuration() - config.debug = True - client = MoneiClient(api_key=self.api_key, config=config) - self.assertIsInstance(client, MoneiClient) - self.assertTrue(client.config.debug) + # Check aliases + self.assertEqual(client.payments, client.Payments) + self.assertEqual(client.payment_methods, client.PaymentMethods) + self.assertEqual(client.subscriptions, client.Subscriptions) + self.assertEqual(client.apple_pay_domain, client.ApplePayDomain) + self.assertEqual(client.bizum, client.Bizum) - def test_init_with_account_id_and_user_agent(self) -> None: - """Test initializing with account ID and user agent""" + def test_init_with_account_id_and_user_agent(self): + """Test initializing with API key, account ID, and user agent.""" client = MoneiClient( api_key=self.api_key, account_id=self.account_id, user_agent=self.user_agent ) self.assertIsInstance(client, MoneiClient) + self.assertEqual(client.api_key, self.api_key) self.assertEqual(client.account_id, self.account_id) self.assertEqual(client.user_agent, self.user_agent) - def test_init_with_account_id_without_user_agent(self) -> None: - """Test initializing with account ID but without user agent should raise exception""" + def test_init_with_account_id_without_user_agent(self): + """Test initializing with account ID but without user agent should raise an exception.""" with self.assertRaises(ApiException) as context: MoneiClient(api_key=self.api_key, account_id=self.account_id) - self.assertEqual(context.exception.status, 400) self.assertEqual( context.exception.reason, "User-Agent must be provided when using Account ID" ) - def test_set_account_id(self) -> None: - """Test setting account ID after initialization""" + def test_set_account_id(self): + """Test setting account ID after initialization.""" client = MoneiClient(api_key=self.api_key, user_agent=self.user_agent) client.set_account_id(self.account_id) self.assertEqual(client.account_id, self.account_id) - def test_set_account_id_without_user_agent(self) -> None: - """Test setting account ID without user agent should raise exception""" + def test_set_account_id_without_user_agent(self): + """Test setting account ID without setting user agent first should raise an exception.""" client = MoneiClient(api_key=self.api_key) with self.assertRaises(ApiException) as context: client.set_account_id(self.account_id) - self.assertEqual(context.exception.status, 400) self.assertEqual(context.exception.reason, "User-Agent must be set before using Account ID") - def test_set_user_agent(self) -> None: - """Test setting user agent after initialization""" + def test_set_account_id_to_none(self): + """Test setting account ID to None should remove the header.""" + client = MoneiClient(api_key=self.api_key, user_agent=self.user_agent) + client.set_account_id(self.account_id) + self.assertEqual(client.account_id, self.account_id) + + # Now set it to None + client.set_account_id(None) + self.assertIsNone(client.account_id) + + def test_set_user_agent(self): + """Test setting user agent after initialization.""" client = MoneiClient(api_key=self.api_key) client.set_user_agent(self.user_agent) self.assertEqual(client.user_agent, self.user_agent) - def test_verify_signature(self) -> None: - """Test verifying webhook signature""" + def test_verify_signature_valid(self): + """Test verifying a valid signature.""" client = MoneiClient(api_key=self.api_key) - # Create test data - raw_body = '{"id":"3690bd3f7294db82fed08c7371bace32","amount":11700,"currency":"EUR","orderId":"588439","status":"SUCCEEDED","message":"Transaction Approved"}' + # Create a test payload and signature + body = '{"id":"test_payment_id","amount":1000,"currency":"EUR","status":"SUCCEEDED"}' timestamp = "1602604555" # Calculate a valid signature - signature_payload = f"{timestamp}.{raw_body}" + signature_payload = f"{timestamp}.{body}" hmac_digest = hmac.new( bytes(self.api_key, "utf-8"), msg=bytes(signature_payload, "utf-8"), @@ -112,596 +116,36 @@ def test_verify_signature(self) -> None: valid_signature = f"t={timestamp},v1={hmac_digest}" - # Test valid signature - result = client.verify_signature(raw_body, valid_signature) - self.assertEqual(result, json.loads(raw_body)) + # Verify the signature + result = client.verify_signature(body, valid_signature) + self.assertEqual(result, json.loads(body)) - # Test invalid signature + def test_verify_signature_invalid(self): + """Test verifying an invalid signature should raise an exception.""" + client = MoneiClient(api_key=self.api_key) + + # Create a test payload and invalid signature + body = '{"id":"test_payment_id","amount":1000,"currency":"EUR","status":"SUCCEEDED"}' + timestamp = "1602604555" invalid_signature = f"t={timestamp},v1=invalid_signature" - with self.assertRaises(ApiException) as context: - client.verify_signature(raw_body, invalid_signature) + # Verify the signature should raise an exception + with self.assertRaises(ApiException) as context: + client.verify_signature(body, invalid_signature) self.assertEqual(context.exception.status, 401) self.assertEqual(context.exception.reason, "[401] Signature verification failed") - # Payments API Tests - @patch("Monei.api.payments_api.PaymentsApi.create") - def test_payments_create(self, mock_create) -> None: - """Test Payments.create method""" - client = MoneiClient(api_key=self.api_key) - - # Setup mock return value - expected_response = { - "id": "pay_123", - "amount": 1000, - "currency": "EUR", - "orderId": "order_123", - "description": "Test payment", - "status": "PENDING", - } - mock_create.return_value = expected_response - - # Test the method - payment_data = { - "amount": 1000, - "currency": "EUR", - "orderId": "order_123", - "description": "Test payment", - } - response = client.Payments.create(payment_data) - - # Verify the response - self.assertEqual(response, expected_response) - mock_create.assert_called_once_with(payment_data) - - @patch("Monei.api.payments_api.PaymentsApi.get") - def test_payments_get(self, mock_get) -> None: - """Test Payments.get method""" - client = MoneiClient(api_key=self.api_key) - - # Setup mock return value - payment_id = "pay_123" - expected_response = { - "id": payment_id, - "amount": 1000, - "currency": "EUR", - "orderId": "order_123", - "description": "Test payment", - "status": "SUCCEEDED", - } - mock_get.return_value = expected_response - - # Test the method - response = client.Payments.get(payment_id) - - # Verify the response - self.assertEqual(response, expected_response) - mock_get.assert_called_once_with(payment_id) - - @patch("Monei.api.payments_api.PaymentsApi.capture") - def test_payments_capture(self, mock_capture) -> None: - """Test Payments.capture method""" - client = MoneiClient(api_key=self.api_key) - - # Setup mock return value - payment_id = "pay_123" - capture_data = {"amount": 1000} - expected_response = { - "id": payment_id, - "amount": 1000, - "currency": "EUR", - "orderId": "order_123", - "description": "Test payment", - "status": "SUCCEEDED", - } - mock_capture.return_value = expected_response - - # Test the method - response = client.Payments.capture(payment_id, capture_data) - - # Verify the response - self.assertEqual(response, expected_response) - mock_capture.assert_called_once_with(payment_id, capture_data) - - @patch("Monei.api.payments_api.PaymentsApi.cancel") - def test_payments_cancel(self, mock_cancel) -> None: - """Test Payments.cancel method""" - client = MoneiClient(api_key=self.api_key) - - # Setup mock return value - payment_id = "pay_123" - cancel_data = {"reason": "CUSTOMER_REQUEST"} - expected_response = { - "id": payment_id, - "amount": 1000, - "currency": "EUR", - "orderId": "order_123", - "description": "Test payment", - "status": "CANCELLED", - } - mock_cancel.return_value = expected_response - - # Test the method - response = client.Payments.cancel(payment_id, cancel_data) - - # Verify the response - self.assertEqual(response, expected_response) - mock_cancel.assert_called_once_with(payment_id, cancel_data) - - @patch("Monei.api.payments_api.PaymentsApi.confirm") - def test_payments_confirm(self, mock_confirm) -> None: - """Test Payments.confirm method""" - client = MoneiClient(api_key=self.api_key) - - # Setup mock return value - payment_id = "pay_123" - confirm_data = {"paymentToken": "tok_123", "sessionId": "sess_123"} - expected_response = { - "id": payment_id, - "amount": 1000, - "currency": "EUR", - "orderId": "order_123", - "description": "Test payment", - "status": "SUCCEEDED", - } - mock_confirm.return_value = expected_response - - # Test the method - response = client.Payments.confirm(payment_id, confirm_data) - - # Verify the response - self.assertEqual(response, expected_response) - mock_confirm.assert_called_once_with(payment_id, confirm_data) - - @patch("Monei.api.payments_api.PaymentsApi.refund") - def test_payments_refund(self, mock_refund) -> None: - """Test Payments.refund method""" - client = MoneiClient(api_key=self.api_key) - - # Setup mock return value - payment_id = "pay_123" - refund_data = {"amount": 500, "reason": "CUSTOMER_REQUEST"} - expected_response = { - "id": "ref_123", - "paymentId": payment_id, - "amount": 500, - "reason": "CUSTOMER_REQUEST", - "status": "SUCCEEDED", - } - mock_refund.return_value = expected_response - - # Test the method - response = client.Payments.refund(payment_id, refund_data) - - # Verify the response - self.assertEqual(response, expected_response) - mock_refund.assert_called_once_with(payment_id, refund_data) - - @patch("Monei.api.payments_api.PaymentsApi.recurring") - def test_payments_recurring(self, mock_recurring) -> None: - """Test Payments.recurring method""" - client = MoneiClient(api_key=self.api_key) - - # Setup mock return value - sequence_id = "seq_123" - recurring_data = { - "amount": 1000, - "currency": "EUR", - "orderId": "order_123", - "description": "Recurring payment", - "paymentMethodId": "pm_123", - } - expected_response = { - "id": "pay_456", - "amount": 1000, - "currency": "EUR", - "orderId": "order_123", - "description": "Recurring payment", - "status": "SUCCEEDED", - "sequenceId": sequence_id, - } - mock_recurring.return_value = expected_response - - # Test the method - response = client.Payments.recurring(sequence_id, recurring_data) - - # Verify the response - self.assertEqual(response, expected_response) - mock_recurring.assert_called_once_with(sequence_id, recurring_data) - - @patch("Monei.api.payments_api.PaymentsApi.send_link") - def test_payments_send_link(self, mock_send_link) -> None: - """Test Payments.send_link method""" - client = MoneiClient(api_key=self.api_key) - - # Setup mock return value - payment_id = "pay_123" - link_data = {"customerEmail": "customer@example.com", "customerPhone": "+34600000000"} - expected_response = {"success": True} - mock_send_link.return_value = expected_response - - # Test the method - response = client.Payments.send_link(payment_id, link_data) - - # Verify the response - self.assertEqual(response, expected_response) - mock_send_link.assert_called_once_with(payment_id, link_data) - - @patch("Monei.api.payments_api.PaymentsApi.send_receipt") - def test_payments_send_receipt(self, mock_send_receipt) -> None: - """Test Payments.send_receipt method""" - client = MoneiClient(api_key=self.api_key) - - # Setup mock return value - payment_id = "pay_123" - receipt_data = {"customerEmail": "customer@example.com"} - expected_response = {"success": True} - mock_send_receipt.return_value = expected_response - - # Test the method - response = client.Payments.send_receipt(payment_id, receipt_data) - - # Verify the response - self.assertEqual(response, expected_response) - mock_send_receipt.assert_called_once_with(payment_id, receipt_data) - - @patch("Monei.api.payments_api.PaymentsApi.send_request") - def test_payments_send_request(self, mock_send_request) -> None: - """Test Payments.send_request method""" - client = MoneiClient(api_key=self.api_key) - - # Setup mock return value - payment_id = "pay_123" - request_data = {"phoneNumber": "+34600000000"} - expected_response = { - "id": payment_id, - "amount": 1000, - "currency": "EUR", - "orderId": "order_123", - "description": "Payment request", - "status": "PENDING", - } - mock_send_request.return_value = expected_response - - # Test the method - response = client.Payments.send_request(payment_id, request_data) - - # Verify the response - self.assertEqual(response, expected_response) - mock_send_request.assert_called_once_with(payment_id, request_data) - - # Payment Methods API Tests - @patch("Monei.api.payment_methods_api.PaymentMethodsApi.get") - def test_payment_methods_get(self, mock_get) -> None: - """Test PaymentMethods.get method""" - client = MoneiClient(api_key=self.api_key) - - # Setup mock return value - payment_method_id = "pm_123" - expected_response = { - "id": payment_method_id, - "type": "CARD", - "card": {"last4": "4242", "brand": "VISA", "expiryMonth": 12, "expiryYear": 2025}, - "customerId": "cus_123", - "status": "ACTIVE", - } - mock_get.return_value = expected_response - - # Test the method - response = client.PaymentMethods.get(payment_method_id=payment_method_id) - - # Verify the response - self.assertEqual(response, expected_response) - mock_get.assert_called_once_with(payment_method_id=payment_method_id) - - # Subscriptions API Tests - @patch("Monei.api.subscriptions_api.SubscriptionsApi.create") - def test_subscriptions_create(self, mock_create) -> None: - """Test Subscriptions.create method""" - client = MoneiClient(api_key=self.api_key) - - # Setup mock return value - expected_response = { - "id": "sub_123", - "status": "ACTIVE", - "amount": 1000, - "currency": "EUR", - "interval": "month", - "customerId": "cus_123", - "paymentMethodId": "pm_123", - "planId": "plan_123", - "startDate": "2023-01-01", - } - mock_create.return_value = expected_response - - # Test the method - subscription_data = { - "amount": 1000, - "currency": "EUR", - "interval": "month", - "customerId": "cus_123", - "paymentMethodId": "pm_123", - "planId": "plan_123", - "startDate": "2023-01-01", - } - response = client.Subscriptions.create(subscription_data) - - # Verify the response - self.assertEqual(response, expected_response) - mock_create.assert_called_once_with(subscription_data) - - @patch("Monei.api.subscriptions_api.SubscriptionsApi.get") - def test_subscriptions_get(self, mock_get) -> None: - """Test Subscriptions.get method""" - client = MoneiClient(api_key=self.api_key) - - # Setup mock return value - subscription_id = "sub_123" - expected_response = { - "id": subscription_id, - "customerId": "cus_123", - "paymentMethodId": "pm_123", - "planId": "plan_123", - "status": "ACTIVE", - } - mock_get.return_value = expected_response - - # Test the method - response = client.Subscriptions.get(subscription_id) - - # Verify the response - self.assertEqual(response, expected_response) - mock_get.assert_called_once_with(subscription_id) - - @patch("Monei.api.subscriptions_api.SubscriptionsApi.cancel") - def test_subscriptions_cancel(self, mock_cancel) -> None: - """Test Subscriptions.cancel method""" - client = MoneiClient(api_key=self.api_key) - - # Setup mock return value - subscription_id = "sub_123" - cancel_data = {"cancelAtPeriodEnd": True} - expected_response = { - "id": subscription_id, - "customerId": "cus_123", - "paymentMethodId": "pm_123", - "planId": "plan_123", - "status": "CANCELED", - "cancelAtPeriodEnd": True, - } - mock_cancel.return_value = expected_response - - # Test the method - response = client.Subscriptions.cancel(subscription_id, cancel_data) - - # Verify the response - self.assertEqual(response, expected_response) - mock_cancel.assert_called_once_with(subscription_id, cancel_data) - - @patch("Monei.api.subscriptions_api.SubscriptionsApi.activate") - def test_subscriptions_activate(self, mock_activate) -> None: - """Test Subscriptions.activate method""" - client = MoneiClient(api_key=self.api_key) - - # Setup mock return value - subscription_id = "sub_123" - activate_data = {"paymentToken": "tok_123", "sessionId": "sess_123"} - expected_response = { - "id": subscription_id, - "customerId": "cus_123", - "paymentMethodId": "pm_123", - "planId": "plan_123", - "status": "ACTIVE", - } - mock_activate.return_value = expected_response - - # Test the method - response = client.Subscriptions.activate(subscription_id, activate_data) - - # Verify the response - self.assertEqual(response, expected_response) - mock_activate.assert_called_once_with(subscription_id, activate_data) - - @patch("Monei.api.subscriptions_api.SubscriptionsApi.pause") - def test_subscriptions_pause(self, mock_pause) -> None: - """Test Subscriptions.pause method""" - client = MoneiClient(api_key=self.api_key) - - # Setup mock return value - subscription_id = "sub_123" - pause_data = {"pauseAtPeriodEnd": True, "pauseIntervalCount": 1} - expected_response = { - "id": subscription_id, - "customerId": "cus_123", - "paymentMethodId": "pm_123", - "planId": "plan_123", - "status": "PAUSED", - "resumeAt": "2023-06-01", - } - mock_pause.return_value = expected_response - - # Test the method - response = client.Subscriptions.pause(subscription_id, pause_data) - - # Verify the response - self.assertEqual(response, expected_response) - mock_pause.assert_called_once_with(subscription_id, pause_data) - - @patch("Monei.api.subscriptions_api.SubscriptionsApi.resume") - def test_subscriptions_resume(self, mock_resume) -> None: - """Test Subscriptions.resume method""" - client = MoneiClient(api_key=self.api_key) - - # Setup mock return value - subscription_id = "sub_123" - expected_response = { - "id": subscription_id, - "customerId": "cus_123", - "paymentMethodId": "pm_123", - "planId": "plan_123", - "status": "ACTIVE", - } - mock_resume.return_value = expected_response - - # Test the method - response = client.Subscriptions.resume(subscription_id) - - # Verify the response - self.assertEqual(response, expected_response) - mock_resume.assert_called_once_with(subscription_id) - - @patch("Monei.api.subscriptions_api.SubscriptionsApi.send_link") - def test_subscriptions_send_link(self, mock_send_link) -> None: - """Test Subscriptions.send_link method""" - client = MoneiClient(api_key=self.api_key) - - # Setup mock return value - subscription_id = "sub_123" - link_data = {"customerEmail": "customer@example.com", "customerPhone": "+34600000000"} - expected_response = {"success": True} - mock_send_link.return_value = expected_response - - # Test the method - response = client.Subscriptions.send_link(subscription_id, link_data) - - # Verify the response - self.assertEqual(response, expected_response) - mock_send_link.assert_called_once_with(subscription_id, link_data) - - @patch("Monei.api.subscriptions_api.SubscriptionsApi.send_status") - def test_subscriptions_send_status(self, mock_send_status) -> None: - """Test Subscriptions.send_status method""" + def test_verify_signature_malformed(self): + """Test verifying a malformed signature should raise an exception.""" client = MoneiClient(api_key=self.api_key) - # Setup mock return value - subscription_id = "sub_123" - status_data = {"customerEmail": "customer@example.com"} - expected_response = {"success": True} - mock_send_status.return_value = expected_response + # Create a test payload and malformed signature + body = '{"id":"test_payment_id","amount":1000,"currency":"EUR","status":"SUCCEEDED"}' + malformed_signature = "malformed_signature" - # Test the method - response = client.Subscriptions.send_status(subscription_id, status_data) - - # Verify the response - self.assertEqual(response, expected_response) - mock_send_status.assert_called_once_with(subscription_id, status_data) - - @patch("Monei.api.subscriptions_api.SubscriptionsApi.update") - def test_subscriptions_update(self, mock_update) -> None: - """Test Subscriptions.update method""" - client = MoneiClient(api_key=self.api_key) - - # Setup mock return value - subscription_id = "sub_123" - update_data = {"amount": 2000, "description": "Updated subscription"} - expected_response = { - "id": subscription_id, - "customerId": "cus_123", - "paymentMethodId": "pm_123", - "planId": "plan_123", - "status": "ACTIVE", - "amount": 2000, - "description": "Updated subscription", - } - mock_update.return_value = expected_response - - # Test the method - response = client.Subscriptions.update(subscription_id, update_data) - - # Verify the response - self.assertEqual(response, expected_response) - mock_update.assert_called_once_with(subscription_id, update_data) - - # Apple Pay Domain API Tests - @patch("Monei.api.apple_pay_domain_api.ApplePayDomainApi.register") - def test_apple_pay_domain_register(self, mock_register) -> None: - """Test ApplePayDomain.register method""" - client = MoneiClient(api_key=self.api_key) - - # Setup mock return value - domain_data = {"domainName": "example.com"} - expected_response = {"success": True} - mock_register.return_value = expected_response - - # Test the method - response = client.ApplePayDomain.register(domain_data) - - # Verify the response - self.assertEqual(response, expected_response) - mock_register.assert_called_once_with(domain_data) - - # Bizum API Tests - @patch("Monei.api.bizum_api.BizumApi.validate_phone") - def test_bizum_validate_phone(self, mock_validate_phone) -> None: - """Test Bizum.validate_phone method""" - client = MoneiClient( - api_key=self.api_key, user_agent=self.user_agent, account_id=self.account_id - ) - - # Setup mock return value - validate_data = {"phoneNumber": "+34600000000"} - expected_response = {"valid": True} - mock_validate_phone.return_value = expected_response - - # Test the method - response = client.Bizum.validate_phone(validate_data) - - # Verify the response - self.assertEqual(response, expected_response) - mock_validate_phone.assert_called_once_with(validate_data) - - def test_aliases(self) -> None: - """Test that all aliases are correctly set""" - client = MoneiClient(api_key=self.api_key) - - # Check all aliases - self.assertEqual(client.payments, client.Payments) - self.assertEqual(client.payment_methods, client.PaymentMethods) - self.assertEqual(client.subscriptions, client.Subscriptions) - self.assertEqual(client.apple_pay_domain, client.ApplePayDomain) - self.assertEqual(client.bizum, client.Bizum) - - def test_duplicate_aliases(self) -> None: - """Test that there are no duplicate aliases""" - client = MoneiClient(api_key=self.api_key) - - # Check for duplicate aliases in the client - # In the current code, payments is assigned twice - self.assertEqual(client.payments, client.Payments) - - @patch("Monei.api.payments_api.PaymentsApi.create") - def test_error_handling(self, mock_create) -> None: - """Test error handling for API calls""" - client = MoneiClient(api_key=self.api_key) - - # Setup mock to raise an ApiException - error_response = { - "status": "ERROR", - "statusCode": 400, - "requestId": "req_123", - "message": "Invalid request", - "requestTime": "2023-01-01T12:00:00Z", - } - mock_create.side_effect = ApiException( - status=400, reason="Bad Request", body=json.dumps(error_response) - ) - - # Test the method - payment_data = { - "amount": 1000, - "currency": "EUR", - "orderId": "order_123", - "description": "Test payment", - } - - # Verify that the exception is raised - with self.assertRaises(ApiException) as context: - client.Payments.create(payment_data) - - # Verify the exception details - self.assertEqual(context.exception.status, 400) - self.assertEqual(context.exception.reason, "Bad Request") - self.assertIn("Invalid request", context.exception.body) + # Verify the signature should raise an exception + with self.assertRaises(Exception): + client.verify_signature(body, malformed_signature) if __name__ == "__main__": diff --git a/test/test_pause_subscription_request.py b/test/test_pause_subscription_request.py index a7cff73..bb38ffe 100644 --- a/test/test_pause_subscription_request.py +++ b/test/test_pause_subscription_request.py @@ -1,20 +1,19 @@ -# coding: utf-8 - """ MONEI API v1 -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

- - The version of the OpenAPI document: 1.5.1 - Generated by OpenAPI Generator (https://openapi-generator.tech) +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - Do not edit the class manually. -""" # noqa: E501 + The version of the OpenAPI document: 1.5.3 + Generated by: https://openapi-generator.tech +""" +import sys import unittest -from Monei.models.pause_subscription_request import PauseSubscriptionRequest +import Monei +from Monei.model.pause_subscription_request import PauseSubscriptionRequest + class TestPauseSubscriptionRequest(unittest.TestCase): """PauseSubscriptionRequest unit test stubs""" @@ -25,28 +24,12 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional) -> PauseSubscriptionRequest: - """Test PauseSubscriptionRequest - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PauseSubscriptionRequest` - """ - model = PauseSubscriptionRequest() - if include_optional: - return PauseSubscriptionRequest( - pause_at_period_end = False, - pause_interval_count = 1 - ) - else: - return PauseSubscriptionRequest( - ) - """ - def testPauseSubscriptionRequest(self): """Test PauseSubscriptionRequest""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) + # FIXME: construct object with mandatory attributes with example values + # model = PauseSubscriptionRequest() # noqa: E501 + pass + if __name__ == '__main__': unittest.main() diff --git a/test/test_payment.py b/test/test_payment.py index c9733bc..ac0131c 100644 --- a/test/test_payment.py +++ b/test/test_payment.py @@ -1,20 +1,43 @@ -# coding: utf-8 - """ MONEI API v1 -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

- - The version of the OpenAPI document: 1.5.1 - Generated by OpenAPI Generator (https://openapi-generator.tech) +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - Do not edit the class manually. -""" # noqa: E501 + The version of the OpenAPI document: 1.5.3 + Generated by: https://openapi-generator.tech +""" +import sys import unittest -from Monei.models.payment import Payment +import Monei +from Monei.model.payment_billing_details import PaymentBillingDetails +from Monei.model.payment_cancellation_reason import PaymentCancellationReason +from Monei.model.payment_customer import PaymentCustomer +from Monei.model.payment_last_refund_reason import PaymentLastRefundReason +from Monei.model.payment_next_action import PaymentNextAction +from Monei.model.payment_payment_method import PaymentPaymentMethod +from Monei.model.payment_sequence import PaymentSequence +from Monei.model.payment_session_details import PaymentSessionDetails +from Monei.model.payment_shipping_details import PaymentShippingDetails +from Monei.model.payment_shop import PaymentShop +from Monei.model.payment_status import PaymentStatus +from Monei.model.payment_trace_details import PaymentTraceDetails +globals()['PaymentBillingDetails'] = PaymentBillingDetails +globals()['PaymentCancellationReason'] = PaymentCancellationReason +globals()['PaymentCustomer'] = PaymentCustomer +globals()['PaymentLastRefundReason'] = PaymentLastRefundReason +globals()['PaymentNextAction'] = PaymentNextAction +globals()['PaymentPaymentMethod'] = PaymentPaymentMethod +globals()['PaymentSequence'] = PaymentSequence +globals()['PaymentSessionDetails'] = PaymentSessionDetails +globals()['PaymentShippingDetails'] = PaymentShippingDetails +globals()['PaymentShop'] = PaymentShop +globals()['PaymentStatus'] = PaymentStatus +globals()['PaymentTraceDetails'] = PaymentTraceDetails +from Monei.model.payment import Payment + class TestPayment(unittest.TestCase): """Payment unit test stubs""" @@ -25,167 +48,12 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional) -> Payment: - """Test Payment - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `Payment` - """ - model = Payment() - if include_optional: - return Payment( - id = 'af6029f80f5fc73a8ad2753eea0b1be0', - amount = 110, - currency = 'EUR', - order_id = '14379133960355', - description = 'Test Shop - #84370745531439', - account_id = 'aa9333ba-82de-400c-9ae7-087b9f8d2242', - authorization_code = '475816', - livemode = False, - status = 'PENDING', - status_code = '', - status_message = '', - customer = Monei.models.payment_customer.Payment-Customer( - email = 'john.doe@example.com', - name = 'John Doe', - phone = '', ), - shop = Monei.models.payment_shop.Payment-Shop( - name = 'Test Shop', - country = 'ES', ), - billing_details = Monei.models.payment_billing_details.Payment-BillingDetails( - name = 'John Doe', - email = 'john.doe@example.com', - phone = '', - company = '', - tax_id = '', - address = Monei.models.address.Address( - country = 'ES', - city = 'Málaga', - line1 = 'Fake Street 123', - line2 = '', - zip = '1234', - state = 'Málaga', ), ), - shipping_details = Monei.models.payment_shipping_details.Payment-ShippingDetails( - name = 'John Doe', - email = 'john.doe@example.com', - phone = '', - company = '', - tax_id = '', - address = Monei.models.address.Address( - country = 'ES', - city = 'Málaga', - line1 = 'Fake Street 123', - line2 = '', - zip = '1234', - state = 'Málaga', ), ), - refunded_amount = 56, - last_refund_amount = 56, - last_refund_reason = 'duplicated', - cancellation_reason = 'duplicated', - session_details = Monei.models.payment_session_details.Payment-SessionDetails( - ip = '100.100.200.100', - country_code = 'ES', - lang = 'es', - device_type = 'desktop', - device_model = '', - browser = 'Chrome', - browser_version = '83.0.4103.116', - os = 'Mac OS', - os_version = '10.15.4', - source = 'MONEI/PHP', - source_version = '0.1.2', - user_agent = 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) ...', - browser_accept = 'text/html,application/xhtml+xml,application/json', - browser_color_depth = 24, - browser_screen_height = 1152, - browser_screen_width = 2048, - browser_timezone_offset = 'string', ), - trace_details = Monei.models.payment_trace_details.Payment-TraceDetails( - ip = '100.100.200.100', - country_code = 'ES', - lang = 'es', - device_type = 'desktop', - device_model = '', - browser = 'Chrome', - browser_version = '83.0.4103.116', - os = 'Mac OS', - os_version = '10.15.4', - source = 'MONEI/PHP', - source_version = '0.1.2', - user_agent = 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) ...', - browser_accept = 'text/html,application/xhtml+xml,application/json', - browser_color_depth = 24, - browser_screen_height = 1152, - browser_screen_width = 2048, - browser_timezone_offset = 'string', - user_id = '', - user_email = 'user@example.com', ), - payment_token = '7cc38b08ff471ccd313ad62b23b9f362b107560b', - payment_method = Monei.models.payment_payment_method.Payment-PaymentMethod( - method = 'card', - card = Monei.models.payment_payment_method_card.Payment-PaymentMethodCard( - country = 'ES', - brand = 'visa', - type = 'credit', - three_d_secure = False, - three_d_secure_version = '2.1.0', - three_d_secure_flow = 'CHALLENGE', - expiration = 2048544000, - last4 = '0004', - tokenization_method = 'applePay', - cardholder_name = 'John Doe', - cardholder_email = 'email@example.com', ), - bizum = Monei.models.payment_payment_method_bizum.Payment-PaymentMethodBizum( - phone_number = '', ), - paypal = Monei.models.payment_payment_method_paypal.Payment-PaymentMethodPaypal( - order_id = '', ), - cofidis = Monei.models.payment_payment_method_cofidis.Payment-PaymentMethodCofidis( - order_id = '', ), - cofidis_loan = Monei.models.payment_payment_method_cofidis.Payment-PaymentMethodCofidis( - order_id = '', ), - mbway = Monei.models.payment_payment_method_mbway.Payment-PaymentMethodMbway( - phone_number = '', ), - trustly = Monei.models.payment_payment_method_trustly.Payment-PaymentMethodTrustly( - customer_id = '', ), - sepa = Monei.models.payment_payment_method_sepa.Payment-PaymentMethodSepa( - accountholder_address = '', - accountholder_email = '', - accountholder_name = '', - country_code = '', - bank_address = '', - bank_code = '', - bank_name = '', - bic = '', - last4 = '', ), - klarna = Monei.models.payment_payment_method_klarna.Payment-PaymentMethodKlarna( - billing_category = 'PAY_LATER', - auth_payment_method = 'card', ), ), - sequence = Monei.models.payment_sequence.Payment-Sequence( - type = 'recurring', - recurring = Monei.models.payment_sequence_recurring.Payment-SequenceRecurring( - expiry = '*(The payment method or card expiration)*', - frequency = 30, ), ), - sequence_id = '62b23b9f3627cc38b08ff471ccd313ad', - store_id = 'e5f28150d9e8974c58ab5ec9c4a880f8734dcf05', - point_of_sale_id = 'fb269cccfa0cc021f5d0b8eb1421646c696213e1', - metadata = {"systemId":"12345"}, - next_action = Monei.models.payment_next_action.Payment-NextAction( - type = 'CONFIRM', - must_redirect = False, - redirect_url = 'https://secure.monei.com/payments/af6029f80f5fc73a8ad2753eea0b1be0', ), - created_at = 1636366897, - updated_at = 1636366897 - ) - else: - return Payment( - ) - """ - def testPayment(self): """Test Payment""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) + # FIXME: construct object with mandatory attributes with example values + # model = Payment() # noqa: E501 + pass + if __name__ == '__main__': unittest.main() diff --git a/test/test_payment_billing_details.py b/test/test_payment_billing_details.py index 497eaa8..db52fa1 100644 --- a/test/test_payment_billing_details.py +++ b/test/test_payment_billing_details.py @@ -1,20 +1,21 @@ -# coding: utf-8 - """ MONEI API v1 -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

- - The version of the OpenAPI document: 1.5.1 - Generated by OpenAPI Generator (https://openapi-generator.tech) +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - Do not edit the class manually. -""" # noqa: E501 + The version of the OpenAPI document: 1.5.3 + Generated by: https://openapi-generator.tech +""" +import sys import unittest -from Monei.models.payment_billing_details import PaymentBillingDetails +import Monei +from Monei.model.address import Address +globals()['Address'] = Address +from Monei.model.payment_billing_details import PaymentBillingDetails + class TestPaymentBillingDetails(unittest.TestCase): """PaymentBillingDetails unit test stubs""" @@ -25,38 +26,12 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional) -> PaymentBillingDetails: - """Test PaymentBillingDetails - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PaymentBillingDetails` - """ - model = PaymentBillingDetails() - if include_optional: - return PaymentBillingDetails( - name = 'John Doe', - email = 'john.doe@example.com', - phone = '', - company = '', - tax_id = '', - address = Monei.models.address.Address( - country = 'ES', - city = 'Málaga', - line1 = 'Fake Street 123', - line2 = '', - zip = '1234', - state = 'Málaga', ) - ) - else: - return PaymentBillingDetails( - ) - """ - def testPaymentBillingDetails(self): """Test PaymentBillingDetails""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) + # FIXME: construct object with mandatory attributes with example values + # model = PaymentBillingDetails() # noqa: E501 + pass + if __name__ == '__main__': unittest.main() diff --git a/test/test_payment_cancellation_reason.py b/test/test_payment_cancellation_reason.py index 38e6697..29e6bd2 100644 --- a/test/test_payment_cancellation_reason.py +++ b/test/test_payment_cancellation_reason.py @@ -1,20 +1,19 @@ -# coding: utf-8 - """ MONEI API v1 -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

- - The version of the OpenAPI document: 1.5.1 - Generated by OpenAPI Generator (https://openapi-generator.tech) +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - Do not edit the class manually. -""" # noqa: E501 + The version of the OpenAPI document: 1.5.3 + Generated by: https://openapi-generator.tech +""" +import sys import unittest -from Monei.models.payment_cancellation_reason import PaymentCancellationReason +import Monei +from Monei.model.payment_cancellation_reason import PaymentCancellationReason + class TestPaymentCancellationReason(unittest.TestCase): """PaymentCancellationReason unit test stubs""" @@ -27,7 +26,10 @@ def tearDown(self): def testPaymentCancellationReason(self): """Test PaymentCancellationReason""" - # inst = PaymentCancellationReason() + # FIXME: construct object with mandatory attributes with example values + # model = PaymentCancellationReason() # noqa: E501 + pass + if __name__ == '__main__': unittest.main() diff --git a/test/test_payment_customer.py b/test/test_payment_customer.py index 3edbef7..836a24a 100644 --- a/test/test_payment_customer.py +++ b/test/test_payment_customer.py @@ -1,20 +1,19 @@ -# coding: utf-8 - """ MONEI API v1 -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

- - The version of the OpenAPI document: 1.5.1 - Generated by OpenAPI Generator (https://openapi-generator.tech) +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - Do not edit the class manually. -""" # noqa: E501 + The version of the OpenAPI document: 1.5.3 + Generated by: https://openapi-generator.tech +""" +import sys import unittest -from Monei.models.payment_customer import PaymentCustomer +import Monei +from Monei.model.payment_customer import PaymentCustomer + class TestPaymentCustomer(unittest.TestCase): """PaymentCustomer unit test stubs""" @@ -25,29 +24,12 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional) -> PaymentCustomer: - """Test PaymentCustomer - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PaymentCustomer` - """ - model = PaymentCustomer() - if include_optional: - return PaymentCustomer( - email = 'john.doe@example.com', - name = 'John Doe', - phone = '' - ) - else: - return PaymentCustomer( - ) - """ - def testPaymentCustomer(self): """Test PaymentCustomer""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) + # FIXME: construct object with mandatory attributes with example values + # model = PaymentCustomer() # noqa: E501 + pass + if __name__ == '__main__': unittest.main() diff --git a/test/test_payment_last_refund_reason.py b/test/test_payment_last_refund_reason.py index ea0346b..b04f155 100644 --- a/test/test_payment_last_refund_reason.py +++ b/test/test_payment_last_refund_reason.py @@ -1,20 +1,19 @@ -# coding: utf-8 - """ MONEI API v1 -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

- - The version of the OpenAPI document: 1.5.1 - Generated by OpenAPI Generator (https://openapi-generator.tech) +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - Do not edit the class manually. -""" # noqa: E501 + The version of the OpenAPI document: 1.5.3 + Generated by: https://openapi-generator.tech +""" +import sys import unittest -from Monei.models.payment_last_refund_reason import PaymentLastRefundReason +import Monei +from Monei.model.payment_last_refund_reason import PaymentLastRefundReason + class TestPaymentLastRefundReason(unittest.TestCase): """PaymentLastRefundReason unit test stubs""" @@ -27,7 +26,10 @@ def tearDown(self): def testPaymentLastRefundReason(self): """Test PaymentLastRefundReason""" - # inst = PaymentLastRefundReason() + # FIXME: construct object with mandatory attributes with example values + # model = PaymentLastRefundReason() # noqa: E501 + pass + if __name__ == '__main__': unittest.main() diff --git a/test/test_payment_message_channel.py b/test/test_payment_message_channel.py index e424538..9084228 100644 --- a/test/test_payment_message_channel.py +++ b/test/test_payment_message_channel.py @@ -1,20 +1,19 @@ -# coding: utf-8 - """ MONEI API v1 -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

- - The version of the OpenAPI document: 1.5.1 - Generated by OpenAPI Generator (https://openapi-generator.tech) +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - Do not edit the class manually. -""" # noqa: E501 + The version of the OpenAPI document: 1.5.3 + Generated by: https://openapi-generator.tech +""" +import sys import unittest -from Monei.models.payment_message_channel import PaymentMessageChannel +import Monei +from Monei.model.payment_message_channel import PaymentMessageChannel + class TestPaymentMessageChannel(unittest.TestCase): """PaymentMessageChannel unit test stubs""" @@ -27,7 +26,10 @@ def tearDown(self): def testPaymentMessageChannel(self): """Test PaymentMessageChannel""" - # inst = PaymentMessageChannel() + # FIXME: construct object with mandatory attributes with example values + # model = PaymentMessageChannel() # noqa: E501 + pass + if __name__ == '__main__': unittest.main() diff --git a/test/test_payment_message_language.py b/test/test_payment_message_language.py index 7554b22..2218a86 100644 --- a/test/test_payment_message_language.py +++ b/test/test_payment_message_language.py @@ -1,20 +1,19 @@ -# coding: utf-8 - """ MONEI API v1 -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

- - The version of the OpenAPI document: 1.5.1 - Generated by OpenAPI Generator (https://openapi-generator.tech) +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - Do not edit the class manually. -""" # noqa: E501 + The version of the OpenAPI document: 1.5.3 + Generated by: https://openapi-generator.tech +""" +import sys import unittest -from Monei.models.payment_message_language import PaymentMessageLanguage +import Monei +from Monei.model.payment_message_language import PaymentMessageLanguage + class TestPaymentMessageLanguage(unittest.TestCase): """PaymentMessageLanguage unit test stubs""" @@ -27,7 +26,10 @@ def tearDown(self): def testPaymentMessageLanguage(self): """Test PaymentMessageLanguage""" - # inst = PaymentMessageLanguage() + # FIXME: construct object with mandatory attributes with example values + # model = PaymentMessageLanguage() # noqa: E501 + pass + if __name__ == '__main__': unittest.main() diff --git a/test/test_payment_methods.py b/test/test_payment_methods.py index 4f6dcfa..1c3a45a 100644 --- a/test/test_payment_methods.py +++ b/test/test_payment_methods.py @@ -1,20 +1,23 @@ -# coding: utf-8 - """ MONEI API v1 -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

- - The version of the OpenAPI document: 1.5.1 - Generated by OpenAPI Generator (https://openapi-generator.tech) +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - Do not edit the class manually. -""" # noqa: E501 + The version of the OpenAPI document: 1.5.3 + Generated by: https://openapi-generator.tech +""" +import sys import unittest -from Monei.models.payment_methods import PaymentMethods +import Monei +from Monei.model.payment_methods_metadata import PaymentMethodsMetadata +from Monei.model.payment_methods_methods import PaymentMethodsMethods +globals()['PaymentMethodsMetadata'] = PaymentMethodsMetadata +globals()['PaymentMethodsMethods'] = PaymentMethodsMethods +from Monei.model.payment_methods import PaymentMethods + class TestPaymentMethods(unittest.TestCase): """PaymentMethods unit test stubs""" @@ -25,80 +28,12 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional) -> PaymentMethods: - """Test PaymentMethods - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PaymentMethods` - """ - model = PaymentMethods() - if include_optional: - return PaymentMethods( - livemode = False, - payment_methods = ["bizum","applePay","googlePay","alipay","bancontact","blik","cofidis","cofidisLoan","eps","iDeal","mbway","multibanco","sofort","trustly","sepa","klarna","giropay","card"], - metadata = Monei.models.payment_methods_metadata.PaymentMethods-Metadata( - alipay = Monei.models.payment_methods_metadata_alipay.PaymentMethods_Metadata_alipay( - countries = ["CN"], ), - bancontact = Monei.models.payment_methods_metadata_bancontact.PaymentMethods_Metadata_bancontact( - countries = ["BE"], ), - bizum = Monei.models.payment_methods_metadata_bizum.PaymentMethods_Metadata_bizum( - countries = ["ES"], ), - blik = Monei.models.payment_methods_metadata_blik.PaymentMethods_Metadata_blik( - countries = ["PL"], ), - card = Monei.models.payment_methods_metadata_card.PaymentMethods_Metadata_card( - brands = ["visa","mastercard"], ), - eps = Monei.models.payment_methods_metadata_eps.PaymentMethods_Metadata_eps( - countries = ["AT"], ), - i_deal = Monei.models.payment_methods_metadata_i_deal.PaymentMethods_Metadata_iDeal( - countries = ["NL"], ), - mbway = Monei.models.payment_methods_metadata_mbway.PaymentMethods_Metadata_mbway( - countries = ["PT"], ), - multibanco = Monei.models.payment_methods_metadata_mbway.PaymentMethods_Metadata_mbway( - countries = ["PT"], ), - sofort = Monei.models.payment_methods_metadata_sofort.PaymentMethods_Metadata_sofort( - countries = ["AT","BE","DE","ES","IT","NL","CH","PL"], ), - trustly = Monei.models.payment_methods_metadata_trustly.PaymentMethods_Metadata_trustly( - countries = ["DE","DK","EE","ES","FI","GB","LT","LV","NL","NO","PL","SE","SK"], ), - sepa = Monei.models.payment_methods_metadata_sepa.PaymentMethods_Metadata_sepa( - countries = ["AT","BE","BG","HR","CY","CZ","DK","EE","FI","FR","DE","GR","HU","IE","IT","LV","LT","LU","MT","NL","PL","PT","RO","SK","SI","ES","SE","IS","LI","NO","AD","SM","MC","VA","PF","TF","GI","GG","IM","JE","BL","PM","CH","GB","WF"], ), - klarna = Monei.models.payment_methods_metadata_klarna.PaymentMethods_Metadata_klarna( - countries = ["AT","BE","CH","DE","DK","ES","FI","FR","GB","IT","NL","NO","SE"], ), - giropay = Monei.models.payment_methods_metadata_giropay.PaymentMethods_Metadata_giropay( - countries = ["DE"], ), - google_pay = Monei.models.payment_methods_metadata_google_pay.PaymentMethods_Metadata_googlePay( - merchant_id = '12345678901234567890', - cvc_required = False, ), - apple_pay = Monei.models.payment_methods_metadata_apple_pay.PaymentMethods_Metadata_applePay( - merchant_id = 'merchant.com.monei', ), - click_to_pay = Monei.models.payment_methods_metadata_click_to_pay.PaymentMethods_Metadata_clickToPay( - token_support = True, - preselected = False, - visa = Monei.models.payment_methods_metadata_click_to_pay_visa.PaymentMethods_Metadata_clickToPay_visa( - srci_dpa_id = 'f47ac10b-58cc-4372-a567-0e02b2c3d479', - src_initiator_id = '550e8400-e29b-41d4-a716-446655440000', ), - mastercard = Monei.models.payment_methods_metadata_click_to_pay_mastercard.PaymentMethods_Metadata_clickToPay_mastercard( - srci_dpa_id = '6ba7b810-9dad-11d1-80b4-00c04fd430c8', - src_initiator_id = 'a0eebc99-9c0b-4ef8-bb6d-6bb9bd380a11', ), - discover = Monei.models.payment_methods_metadata_click_to_pay_discover.PaymentMethods_Metadata_clickToPay_discover( - srci_dpa_id = '71f0c4d5-9947-4d1c-9cb3-d6a3f7c4e701', - src_initiator_id = 'c2d06c25-9ddb-4a5e-9d5a-3ff1c8d98467', ), ), ), - merchant_name = 'MONEI', - merchant_url = 'https://monei.com/', - country_code = 'ES', - account_id = 'aa9333ba-82de-400c-9ae7-087b9f8d2242', - amount = 10, - currency = 'EUR' - ) - else: - return PaymentMethods( - ) - """ - def testPaymentMethods(self): """Test PaymentMethods""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) + # FIXME: construct object with mandatory attributes with example values + # model = PaymentMethods() # noqa: E501 + pass + if __name__ == '__main__': unittest.main() diff --git a/test/test_payment_methods_api.py b/test/test_payment_methods_api.py index 9c40489..a269c62 100644 --- a/test/test_payment_methods_api.py +++ b/test/test_payment_methods_api.py @@ -1,135 +1,34 @@ -# coding: utf-8 - """ MONEI API v1 -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

- - The version of the OpenAPI document: 1.5.1 - Generated by OpenAPI Generator (https://openapi-generator.tech) +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - Do not edit the class manually. -""" # noqa: E501 + The version of the OpenAPI document: 1.5.3 + Generated by: https://openapi-generator.tech +""" import unittest -from unittest.mock import patch, MagicMock -from Monei.api.payment_methods_api import PaymentMethodsApi -from Monei.api_client import ApiClient -from Monei.configuration import Configuration -from Monei.exceptions import ApiException +import Monei +from Monei.api.payment_methods_api import PaymentMethodsApi # noqa: E501 class TestPaymentMethodsApi(unittest.TestCase): """PaymentMethodsApi unit test stubs""" - def setUp(self) -> None: - configuration = Configuration() - configuration.api_key = {"Authorization": "test_api_key"} - self.api_client = ApiClient(configuration) - self.api = PaymentMethodsApi(self.api_client) + def setUp(self): + self.api = PaymentMethodsApi() # noqa: E501 - def tearDown(self) -> None: + def tearDown(self): pass - @patch.object(ApiClient, "call_api") - def test_get(self, mock_call_api) -> None: + def test_get(self): """Test case for get - Get Payment Method - """ - # Configure the mock to return a successful response - mock_response = { - "id": "pm_123", - "type": "CARD", - "card": { - "last4": "4242", - "brand": "VISA", - "expiryMonth": 12, - "expiryYear": 2025 - }, - "customerId": "cus_123", - "status": "ACTIVE" - } - mock_call_api.return_value = mock_response - - # Test the method - customer_id = "cus_123" - payment_method_id = "pm_123" - response = self.api.get(customer_id=customer_id, payment_method_id=payment_method_id) - - # Verify the response - self.assertEqual(response, mock_response) - mock_call_api.assert_called_once() - - @patch.object(ApiClient, "call_api") - def test_list(self, mock_call_api) -> None: - """Test case for list - - List Payment Methods + Get Payment Methods # noqa: E501 """ - # Configure the mock to return a successful response - mock_response = { - "data": [ - { - "id": "pm_123", - "type": "CARD", - "card": { - "last4": "4242", - "brand": "VISA", - "expiryMonth": 12, - "expiryYear": 2025 - }, - "customerId": "cus_123", - "status": "ACTIVE" - }, - { - "id": "pm_456", - "type": "CARD", - "card": { - "last4": "1234", - "brand": "MASTERCARD", - "expiryMonth": 10, - "expiryYear": 2024 - }, - "customerId": "cus_123", - "status": "ACTIVE" - } - ], - "hasMore": False - } - mock_call_api.return_value = mock_response - - # Test the method - customer_id = "cus_123" - response = self.api.list(customer_id=customer_id) - - # Verify the response - self.assertEqual(response, mock_response) - mock_call_api.assert_called_once() - - @patch.object(ApiClient, "call_api") - def test_error_handling(self, mock_call_api) -> None: - """Test error handling in API calls""" - # Configure the mock to raise an ApiException - mock_call_api.side_effect = ApiException( - status=404, - reason="Not Found", - body='{"status":"ERROR","statusCode":404,"requestId":"req_123","message":"Payment method not found"}' - ) - - # Test the method - payment_method_id = "pm_nonexistent" - - # Verify that the exception is raised - with self.assertRaises(ApiException) as context: - self.api.get(payment_method_id=payment_method_id) - - # Verify the exception details - self.assertEqual(context.exception.status, 404) - self.assertEqual(context.exception.reason, "Not Found") - self.assertIn("Payment method not found", context.exception.body) + pass if __name__ == '__main__': diff --git a/test/test_payment_methods_api_integration.py b/test/test_payment_methods_api_integration.py new file mode 100644 index 0000000..98a38f7 --- /dev/null +++ b/test/test_payment_methods_api_integration.py @@ -0,0 +1,55 @@ +import unittest +from unittest.mock import patch, MagicMock + +import Monei +from Monei.monei_client import MoneiClient +from Monei.exceptions import ApiException + + +class TestPaymentMethodsApiIntegration(unittest.TestCase): + """PaymentMethodsApi integration test stubs""" + + def setUp(self): + """Set up test fixtures, if any.""" + self.api_key = "test_api_key_12345" + self.client = MoneiClient(api_key=self.api_key) + self.payment_method_id = "pm_123456789" + self.customer_id = "cus_123456789" + + def tearDown(self): + """Tear down test fixtures, if any.""" + pass + + @patch("Monei.api.payment_methods_api.PaymentMethodsApi.get") + def test_get_payment_method(self, mock_get): + """Test getting a payment method by ID.""" + # Setup mock response + mock_payment_method = MagicMock() + mock_payment_method.id = self.payment_method_id + mock_payment_method.type = "CARD" + mock_payment_method.card = MagicMock() + mock_payment_method.card.last4 = "4242" + mock_payment_method.card.brand = "VISA" + mock_payment_method.card.expiryMonth = 12 + mock_payment_method.card.expiryYear = 2025 + mock_payment_method.customerId = self.customer_id + mock_get.return_value = mock_payment_method + + # Call the API + result = self.client.payment_methods.get(self.customer_id, self.payment_method_id) + + # Verify the result + self.assertEqual(result.id, self.payment_method_id) + self.assertEqual(result.type, "CARD") + self.assertEqual(result.card.last4, "4242") + self.assertEqual(result.card.brand, "VISA") + self.assertEqual(result.card.expiryMonth, 12) + self.assertEqual(result.card.expiryYear, 2025) + self.assertEqual(result.customerId, self.customer_id) + + # Verify the mock was called with the correct arguments + mock_get.assert_called_once_with(self.customer_id, self.payment_method_id) + + +if __name__ == "__main__": + unittest.main() diff --git a/test/test_payment_methods_metadata.py b/test/test_payment_methods_metadata.py index 260f0ea..e8a9ebe 100644 --- a/test/test_payment_methods_metadata.py +++ b/test/test_payment_methods_metadata.py @@ -1,20 +1,51 @@ -# coding: utf-8 - """ MONEI API v1 -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

- - The version of the OpenAPI document: 1.5.1 - Generated by OpenAPI Generator (https://openapi-generator.tech) +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - Do not edit the class manually. -""" # noqa: E501 + The version of the OpenAPI document: 1.5.3 + Generated by: https://openapi-generator.tech +""" +import sys import unittest -from Monei.models.payment_methods_metadata import PaymentMethodsMetadata +import Monei +from Monei.model.payment_methods_metadata_alipay import PaymentMethodsMetadataAlipay +from Monei.model.payment_methods_metadata_apple_pay import PaymentMethodsMetadataApplePay +from Monei.model.payment_methods_metadata_bancontact import PaymentMethodsMetadataBancontact +from Monei.model.payment_methods_metadata_bizum import PaymentMethodsMetadataBizum +from Monei.model.payment_methods_metadata_blik import PaymentMethodsMetadataBlik +from Monei.model.payment_methods_metadata_card import PaymentMethodsMetadataCard +from Monei.model.payment_methods_metadata_click_to_pay import PaymentMethodsMetadataClickToPay +from Monei.model.payment_methods_metadata_eps import PaymentMethodsMetadataEps +from Monei.model.payment_methods_metadata_giropay import PaymentMethodsMetadataGiropay +from Monei.model.payment_methods_metadata_google_pay import PaymentMethodsMetadataGooglePay +from Monei.model.payment_methods_metadata_i_deal import PaymentMethodsMetadataIDeal +from Monei.model.payment_methods_metadata_klarna import PaymentMethodsMetadataKlarna +from Monei.model.payment_methods_metadata_mbway import PaymentMethodsMetadataMbway +from Monei.model.payment_methods_metadata_sepa import PaymentMethodsMetadataSepa +from Monei.model.payment_methods_metadata_sofort import PaymentMethodsMetadataSofort +from Monei.model.payment_methods_metadata_trustly import PaymentMethodsMetadataTrustly +globals()['PaymentMethodsMetadataAlipay'] = PaymentMethodsMetadataAlipay +globals()['PaymentMethodsMetadataApplePay'] = PaymentMethodsMetadataApplePay +globals()['PaymentMethodsMetadataBancontact'] = PaymentMethodsMetadataBancontact +globals()['PaymentMethodsMetadataBizum'] = PaymentMethodsMetadataBizum +globals()['PaymentMethodsMetadataBlik'] = PaymentMethodsMetadataBlik +globals()['PaymentMethodsMetadataCard'] = PaymentMethodsMetadataCard +globals()['PaymentMethodsMetadataClickToPay'] = PaymentMethodsMetadataClickToPay +globals()['PaymentMethodsMetadataEps'] = PaymentMethodsMetadataEps +globals()['PaymentMethodsMetadataGiropay'] = PaymentMethodsMetadataGiropay +globals()['PaymentMethodsMetadataGooglePay'] = PaymentMethodsMetadataGooglePay +globals()['PaymentMethodsMetadataIDeal'] = PaymentMethodsMetadataIDeal +globals()['PaymentMethodsMetadataKlarna'] = PaymentMethodsMetadataKlarna +globals()['PaymentMethodsMetadataMbway'] = PaymentMethodsMetadataMbway +globals()['PaymentMethodsMetadataSepa'] = PaymentMethodsMetadataSepa +globals()['PaymentMethodsMetadataSofort'] = PaymentMethodsMetadataSofort +globals()['PaymentMethodsMetadataTrustly'] = PaymentMethodsMetadataTrustly +from Monei.model.payment_methods_metadata import PaymentMethodsMetadata + class TestPaymentMethodsMetadata(unittest.TestCase): """PaymentMethodsMetadata unit test stubs""" @@ -25,71 +56,12 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional) -> PaymentMethodsMetadata: - """Test PaymentMethodsMetadata - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PaymentMethodsMetadata` - """ - model = PaymentMethodsMetadata() - if include_optional: - return PaymentMethodsMetadata( - alipay = Monei.models.payment_methods_metadata_alipay.PaymentMethods_Metadata_alipay( - countries = ["CN"], ), - bancontact = Monei.models.payment_methods_metadata_bancontact.PaymentMethods_Metadata_bancontact( - countries = ["BE"], ), - bizum = Monei.models.payment_methods_metadata_bizum.PaymentMethods_Metadata_bizum( - countries = ["ES"], ), - blik = Monei.models.payment_methods_metadata_blik.PaymentMethods_Metadata_blik( - countries = ["PL"], ), - card = Monei.models.payment_methods_metadata_card.PaymentMethods_Metadata_card( - brands = ["visa","mastercard"], ), - eps = Monei.models.payment_methods_metadata_eps.PaymentMethods_Metadata_eps( - countries = ["AT"], ), - i_deal = Monei.models.payment_methods_metadata_i_deal.PaymentMethods_Metadata_iDeal( - countries = ["NL"], ), - mbway = Monei.models.payment_methods_metadata_mbway.PaymentMethods_Metadata_mbway( - countries = ["PT"], ), - multibanco = Monei.models.payment_methods_metadata_mbway.PaymentMethods_Metadata_mbway( - countries = ["PT"], ), - sofort = Monei.models.payment_methods_metadata_sofort.PaymentMethods_Metadata_sofort( - countries = ["AT","BE","DE","ES","IT","NL","CH","PL"], ), - trustly = Monei.models.payment_methods_metadata_trustly.PaymentMethods_Metadata_trustly( - countries = ["DE","DK","EE","ES","FI","GB","LT","LV","NL","NO","PL","SE","SK"], ), - sepa = Monei.models.payment_methods_metadata_sepa.PaymentMethods_Metadata_sepa( - countries = ["AT","BE","BG","HR","CY","CZ","DK","EE","FI","FR","DE","GR","HU","IE","IT","LV","LT","LU","MT","NL","PL","PT","RO","SK","SI","ES","SE","IS","LI","NO","AD","SM","MC","VA","PF","TF","GI","GG","IM","JE","BL","PM","CH","GB","WF"], ), - klarna = Monei.models.payment_methods_metadata_klarna.PaymentMethods_Metadata_klarna( - countries = ["AT","BE","CH","DE","DK","ES","FI","FR","GB","IT","NL","NO","SE"], ), - giropay = Monei.models.payment_methods_metadata_giropay.PaymentMethods_Metadata_giropay( - countries = ["DE"], ), - google_pay = Monei.models.payment_methods_metadata_google_pay.PaymentMethods_Metadata_googlePay( - merchant_id = '12345678901234567890', - cvc_required = False, ), - apple_pay = Monei.models.payment_methods_metadata_apple_pay.PaymentMethods_Metadata_applePay( - merchant_id = 'merchant.com.monei', ), - click_to_pay = Monei.models.payment_methods_metadata_click_to_pay.PaymentMethods_Metadata_clickToPay( - token_support = True, - preselected = False, - visa = Monei.models.payment_methods_metadata_click_to_pay_visa.PaymentMethods_Metadata_clickToPay_visa( - srci_dpa_id = 'f47ac10b-58cc-4372-a567-0e02b2c3d479', - src_initiator_id = '550e8400-e29b-41d4-a716-446655440000', ), - mastercard = Monei.models.payment_methods_metadata_click_to_pay_mastercard.PaymentMethods_Metadata_clickToPay_mastercard( - srci_dpa_id = '6ba7b810-9dad-11d1-80b4-00c04fd430c8', - src_initiator_id = 'a0eebc99-9c0b-4ef8-bb6d-6bb9bd380a11', ), - discover = Monei.models.payment_methods_metadata_click_to_pay_discover.PaymentMethods_Metadata_clickToPay_discover( - srci_dpa_id = '71f0c4d5-9947-4d1c-9cb3-d6a3f7c4e701', - src_initiator_id = 'c2d06c25-9ddb-4a5e-9d5a-3ff1c8d98467', ), ) - ) - else: - return PaymentMethodsMetadata( - ) - """ - def testPaymentMethodsMetadata(self): """Test PaymentMethodsMetadata""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) + # FIXME: construct object with mandatory attributes with example values + # model = PaymentMethodsMetadata() # noqa: E501 + pass + if __name__ == '__main__': unittest.main() diff --git a/test/test_payment_methods_metadata_alipay.py b/test/test_payment_methods_metadata_alipay.py index 9cd4066..9326a60 100644 --- a/test/test_payment_methods_metadata_alipay.py +++ b/test/test_payment_methods_metadata_alipay.py @@ -1,20 +1,19 @@ -# coding: utf-8 - """ MONEI API v1 -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

- - The version of the OpenAPI document: 1.5.1 - Generated by OpenAPI Generator (https://openapi-generator.tech) +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - Do not edit the class manually. -""" # noqa: E501 + The version of the OpenAPI document: 1.5.3 + Generated by: https://openapi-generator.tech +""" +import sys import unittest -from Monei.models.payment_methods_metadata_alipay import PaymentMethodsMetadataAlipay +import Monei +from Monei.model.payment_methods_metadata_alipay import PaymentMethodsMetadataAlipay + class TestPaymentMethodsMetadataAlipay(unittest.TestCase): """PaymentMethodsMetadataAlipay unit test stubs""" @@ -25,27 +24,12 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional) -> PaymentMethodsMetadataAlipay: - """Test PaymentMethodsMetadataAlipay - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PaymentMethodsMetadataAlipay` - """ - model = PaymentMethodsMetadataAlipay() - if include_optional: - return PaymentMethodsMetadataAlipay( - countries = ["CN"] - ) - else: - return PaymentMethodsMetadataAlipay( - ) - """ - def testPaymentMethodsMetadataAlipay(self): """Test PaymentMethodsMetadataAlipay""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) + # FIXME: construct object with mandatory attributes with example values + # model = PaymentMethodsMetadataAlipay() # noqa: E501 + pass + if __name__ == '__main__': unittest.main() diff --git a/test/test_payment_methods_metadata_apple_pay.py b/test/test_payment_methods_metadata_apple_pay.py index abbe6a1..553d24e 100644 --- a/test/test_payment_methods_metadata_apple_pay.py +++ b/test/test_payment_methods_metadata_apple_pay.py @@ -1,20 +1,19 @@ -# coding: utf-8 - """ MONEI API v1 -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

- - The version of the OpenAPI document: 1.5.1 - Generated by OpenAPI Generator (https://openapi-generator.tech) +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - Do not edit the class manually. -""" # noqa: E501 + The version of the OpenAPI document: 1.5.3 + Generated by: https://openapi-generator.tech +""" +import sys import unittest -from Monei.models.payment_methods_metadata_apple_pay import PaymentMethodsMetadataApplePay +import Monei +from Monei.model.payment_methods_metadata_apple_pay import PaymentMethodsMetadataApplePay + class TestPaymentMethodsMetadataApplePay(unittest.TestCase): """PaymentMethodsMetadataApplePay unit test stubs""" @@ -25,27 +24,12 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional) -> PaymentMethodsMetadataApplePay: - """Test PaymentMethodsMetadataApplePay - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PaymentMethodsMetadataApplePay` - """ - model = PaymentMethodsMetadataApplePay() - if include_optional: - return PaymentMethodsMetadataApplePay( - merchant_id = 'merchant.com.monei' - ) - else: - return PaymentMethodsMetadataApplePay( - ) - """ - def testPaymentMethodsMetadataApplePay(self): """Test PaymentMethodsMetadataApplePay""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) + # FIXME: construct object with mandatory attributes with example values + # model = PaymentMethodsMetadataApplePay() # noqa: E501 + pass + if __name__ == '__main__': unittest.main() diff --git a/test/test_payment_methods_metadata_bancontact.py b/test/test_payment_methods_metadata_bancontact.py index 0ac608c..36f1879 100644 --- a/test/test_payment_methods_metadata_bancontact.py +++ b/test/test_payment_methods_metadata_bancontact.py @@ -1,20 +1,19 @@ -# coding: utf-8 - """ MONEI API v1 -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

- - The version of the OpenAPI document: 1.5.1 - Generated by OpenAPI Generator (https://openapi-generator.tech) +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - Do not edit the class manually. -""" # noqa: E501 + The version of the OpenAPI document: 1.5.3 + Generated by: https://openapi-generator.tech +""" +import sys import unittest -from Monei.models.payment_methods_metadata_bancontact import PaymentMethodsMetadataBancontact +import Monei +from Monei.model.payment_methods_metadata_bancontact import PaymentMethodsMetadataBancontact + class TestPaymentMethodsMetadataBancontact(unittest.TestCase): """PaymentMethodsMetadataBancontact unit test stubs""" @@ -25,27 +24,12 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional) -> PaymentMethodsMetadataBancontact: - """Test PaymentMethodsMetadataBancontact - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PaymentMethodsMetadataBancontact` - """ - model = PaymentMethodsMetadataBancontact() - if include_optional: - return PaymentMethodsMetadataBancontact( - countries = ["BE"] - ) - else: - return PaymentMethodsMetadataBancontact( - ) - """ - def testPaymentMethodsMetadataBancontact(self): """Test PaymentMethodsMetadataBancontact""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) + # FIXME: construct object with mandatory attributes with example values + # model = PaymentMethodsMetadataBancontact() # noqa: E501 + pass + if __name__ == '__main__': unittest.main() diff --git a/test/test_payment_methods_metadata_bizum.py b/test/test_payment_methods_metadata_bizum.py index fa21bbc..3b7d7a1 100644 --- a/test/test_payment_methods_metadata_bizum.py +++ b/test/test_payment_methods_metadata_bizum.py @@ -1,20 +1,19 @@ -# coding: utf-8 - """ MONEI API v1 -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

- - The version of the OpenAPI document: 1.5.1 - Generated by OpenAPI Generator (https://openapi-generator.tech) +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - Do not edit the class manually. -""" # noqa: E501 + The version of the OpenAPI document: 1.5.3 + Generated by: https://openapi-generator.tech +""" +import sys import unittest -from Monei.models.payment_methods_metadata_bizum import PaymentMethodsMetadataBizum +import Monei +from Monei.model.payment_methods_metadata_bizum import PaymentMethodsMetadataBizum + class TestPaymentMethodsMetadataBizum(unittest.TestCase): """PaymentMethodsMetadataBizum unit test stubs""" @@ -25,27 +24,12 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional) -> PaymentMethodsMetadataBizum: - """Test PaymentMethodsMetadataBizum - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PaymentMethodsMetadataBizum` - """ - model = PaymentMethodsMetadataBizum() - if include_optional: - return PaymentMethodsMetadataBizum( - countries = ["ES"] - ) - else: - return PaymentMethodsMetadataBizum( - ) - """ - def testPaymentMethodsMetadataBizum(self): """Test PaymentMethodsMetadataBizum""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) + # FIXME: construct object with mandatory attributes with example values + # model = PaymentMethodsMetadataBizum() # noqa: E501 + pass + if __name__ == '__main__': unittest.main() diff --git a/test/test_payment_methods_metadata_blik.py b/test/test_payment_methods_metadata_blik.py index a73f382..0b303a4 100644 --- a/test/test_payment_methods_metadata_blik.py +++ b/test/test_payment_methods_metadata_blik.py @@ -1,20 +1,19 @@ -# coding: utf-8 - """ MONEI API v1 -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

- - The version of the OpenAPI document: 1.5.1 - Generated by OpenAPI Generator (https://openapi-generator.tech) +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - Do not edit the class manually. -""" # noqa: E501 + The version of the OpenAPI document: 1.5.3 + Generated by: https://openapi-generator.tech +""" +import sys import unittest -from Monei.models.payment_methods_metadata_blik import PaymentMethodsMetadataBlik +import Monei +from Monei.model.payment_methods_metadata_blik import PaymentMethodsMetadataBlik + class TestPaymentMethodsMetadataBlik(unittest.TestCase): """PaymentMethodsMetadataBlik unit test stubs""" @@ -25,27 +24,12 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional) -> PaymentMethodsMetadataBlik: - """Test PaymentMethodsMetadataBlik - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PaymentMethodsMetadataBlik` - """ - model = PaymentMethodsMetadataBlik() - if include_optional: - return PaymentMethodsMetadataBlik( - countries = ["PL"] - ) - else: - return PaymentMethodsMetadataBlik( - ) - """ - def testPaymentMethodsMetadataBlik(self): """Test PaymentMethodsMetadataBlik""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) + # FIXME: construct object with mandatory attributes with example values + # model = PaymentMethodsMetadataBlik() # noqa: E501 + pass + if __name__ == '__main__': unittest.main() diff --git a/test/test_payment_methods_metadata_card.py b/test/test_payment_methods_metadata_card.py index 25e0bc6..9ad14e1 100644 --- a/test/test_payment_methods_metadata_card.py +++ b/test/test_payment_methods_metadata_card.py @@ -1,20 +1,19 @@ -# coding: utf-8 - """ MONEI API v1 -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

- - The version of the OpenAPI document: 1.5.1 - Generated by OpenAPI Generator (https://openapi-generator.tech) +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - Do not edit the class manually. -""" # noqa: E501 + The version of the OpenAPI document: 1.5.3 + Generated by: https://openapi-generator.tech +""" +import sys import unittest -from Monei.models.payment_methods_metadata_card import PaymentMethodsMetadataCard +import Monei +from Monei.model.payment_methods_metadata_card import PaymentMethodsMetadataCard + class TestPaymentMethodsMetadataCard(unittest.TestCase): """PaymentMethodsMetadataCard unit test stubs""" @@ -25,27 +24,12 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional) -> PaymentMethodsMetadataCard: - """Test PaymentMethodsMetadataCard - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PaymentMethodsMetadataCard` - """ - model = PaymentMethodsMetadataCard() - if include_optional: - return PaymentMethodsMetadataCard( - brands = ["visa","mastercard"] - ) - else: - return PaymentMethodsMetadataCard( - ) - """ - def testPaymentMethodsMetadataCard(self): """Test PaymentMethodsMetadataCard""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) + # FIXME: construct object with mandatory attributes with example values + # model = PaymentMethodsMetadataCard() # noqa: E501 + pass + if __name__ == '__main__': unittest.main() diff --git a/test/test_payment_methods_metadata_click_to_pay.py b/test/test_payment_methods_metadata_click_to_pay.py index fcb3b64..db69cf2 100644 --- a/test/test_payment_methods_metadata_click_to_pay.py +++ b/test/test_payment_methods_metadata_click_to_pay.py @@ -1,20 +1,25 @@ -# coding: utf-8 - """ MONEI API v1 -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

- - The version of the OpenAPI document: 1.5.1 - Generated by OpenAPI Generator (https://openapi-generator.tech) +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - Do not edit the class manually. -""" # noqa: E501 + The version of the OpenAPI document: 1.5.3 + Generated by: https://openapi-generator.tech +""" +import sys import unittest -from Monei.models.payment_methods_metadata_click_to_pay import PaymentMethodsMetadataClickToPay +import Monei +from Monei.model.payment_methods_metadata_click_to_pay_discover import PaymentMethodsMetadataClickToPayDiscover +from Monei.model.payment_methods_metadata_click_to_pay_mastercard import PaymentMethodsMetadataClickToPayMastercard +from Monei.model.payment_methods_metadata_click_to_pay_visa import PaymentMethodsMetadataClickToPayVisa +globals()['PaymentMethodsMetadataClickToPayDiscover'] = PaymentMethodsMetadataClickToPayDiscover +globals()['PaymentMethodsMetadataClickToPayMastercard'] = PaymentMethodsMetadataClickToPayMastercard +globals()['PaymentMethodsMetadataClickToPayVisa'] = PaymentMethodsMetadataClickToPayVisa +from Monei.model.payment_methods_metadata_click_to_pay import PaymentMethodsMetadataClickToPay + class TestPaymentMethodsMetadataClickToPay(unittest.TestCase): """PaymentMethodsMetadataClickToPay unit test stubs""" @@ -25,37 +30,12 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional) -> PaymentMethodsMetadataClickToPay: - """Test PaymentMethodsMetadataClickToPay - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PaymentMethodsMetadataClickToPay` - """ - model = PaymentMethodsMetadataClickToPay() - if include_optional: - return PaymentMethodsMetadataClickToPay( - token_support = True, - preselected = False, - visa = Monei.models.payment_methods_metadata_click_to_pay_visa.PaymentMethods_Metadata_clickToPay_visa( - srci_dpa_id = 'f47ac10b-58cc-4372-a567-0e02b2c3d479', - src_initiator_id = '550e8400-e29b-41d4-a716-446655440000', ), - mastercard = Monei.models.payment_methods_metadata_click_to_pay_mastercard.PaymentMethods_Metadata_clickToPay_mastercard( - srci_dpa_id = '6ba7b810-9dad-11d1-80b4-00c04fd430c8', - src_initiator_id = 'a0eebc99-9c0b-4ef8-bb6d-6bb9bd380a11', ), - discover = Monei.models.payment_methods_metadata_click_to_pay_discover.PaymentMethods_Metadata_clickToPay_discover( - srci_dpa_id = '71f0c4d5-9947-4d1c-9cb3-d6a3f7c4e701', - src_initiator_id = 'c2d06c25-9ddb-4a5e-9d5a-3ff1c8d98467', ) - ) - else: - return PaymentMethodsMetadataClickToPay( - ) - """ - def testPaymentMethodsMetadataClickToPay(self): """Test PaymentMethodsMetadataClickToPay""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) + # FIXME: construct object with mandatory attributes with example values + # model = PaymentMethodsMetadataClickToPay() # noqa: E501 + pass + if __name__ == '__main__': unittest.main() diff --git a/test/test_payment_methods_metadata_click_to_pay_discover.py b/test/test_payment_methods_metadata_click_to_pay_discover.py index cd36b12..80d1516 100644 --- a/test/test_payment_methods_metadata_click_to_pay_discover.py +++ b/test/test_payment_methods_metadata_click_to_pay_discover.py @@ -1,20 +1,19 @@ -# coding: utf-8 - """ MONEI API v1 -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

- - The version of the OpenAPI document: 1.5.1 - Generated by OpenAPI Generator (https://openapi-generator.tech) +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - Do not edit the class manually. -""" # noqa: E501 + The version of the OpenAPI document: 1.5.3 + Generated by: https://openapi-generator.tech +""" +import sys import unittest -from Monei.models.payment_methods_metadata_click_to_pay_discover import PaymentMethodsMetadataClickToPayDiscover +import Monei +from Monei.model.payment_methods_metadata_click_to_pay_discover import PaymentMethodsMetadataClickToPayDiscover + class TestPaymentMethodsMetadataClickToPayDiscover(unittest.TestCase): """PaymentMethodsMetadataClickToPayDiscover unit test stubs""" @@ -25,28 +24,12 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional) -> PaymentMethodsMetadataClickToPayDiscover: - """Test PaymentMethodsMetadataClickToPayDiscover - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PaymentMethodsMetadataClickToPayDiscover` - """ - model = PaymentMethodsMetadataClickToPayDiscover() - if include_optional: - return PaymentMethodsMetadataClickToPayDiscover( - srci_dpa_id = '71f0c4d5-9947-4d1c-9cb3-d6a3f7c4e701', - src_initiator_id = 'c2d06c25-9ddb-4a5e-9d5a-3ff1c8d98467' - ) - else: - return PaymentMethodsMetadataClickToPayDiscover( - ) - """ - def testPaymentMethodsMetadataClickToPayDiscover(self): """Test PaymentMethodsMetadataClickToPayDiscover""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) + # FIXME: construct object with mandatory attributes with example values + # model = PaymentMethodsMetadataClickToPayDiscover() # noqa: E501 + pass + if __name__ == '__main__': unittest.main() diff --git a/test/test_payment_methods_metadata_click_to_pay_mastercard.py b/test/test_payment_methods_metadata_click_to_pay_mastercard.py index 552f856..dd1a67c 100644 --- a/test/test_payment_methods_metadata_click_to_pay_mastercard.py +++ b/test/test_payment_methods_metadata_click_to_pay_mastercard.py @@ -1,20 +1,19 @@ -# coding: utf-8 - """ MONEI API v1 -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

- - The version of the OpenAPI document: 1.5.1 - Generated by OpenAPI Generator (https://openapi-generator.tech) +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - Do not edit the class manually. -""" # noqa: E501 + The version of the OpenAPI document: 1.5.3 + Generated by: https://openapi-generator.tech +""" +import sys import unittest -from Monei.models.payment_methods_metadata_click_to_pay_mastercard import PaymentMethodsMetadataClickToPayMastercard +import Monei +from Monei.model.payment_methods_metadata_click_to_pay_mastercard import PaymentMethodsMetadataClickToPayMastercard + class TestPaymentMethodsMetadataClickToPayMastercard(unittest.TestCase): """PaymentMethodsMetadataClickToPayMastercard unit test stubs""" @@ -25,28 +24,12 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional) -> PaymentMethodsMetadataClickToPayMastercard: - """Test PaymentMethodsMetadataClickToPayMastercard - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PaymentMethodsMetadataClickToPayMastercard` - """ - model = PaymentMethodsMetadataClickToPayMastercard() - if include_optional: - return PaymentMethodsMetadataClickToPayMastercard( - srci_dpa_id = '6ba7b810-9dad-11d1-80b4-00c04fd430c8', - src_initiator_id = 'a0eebc99-9c0b-4ef8-bb6d-6bb9bd380a11' - ) - else: - return PaymentMethodsMetadataClickToPayMastercard( - ) - """ - def testPaymentMethodsMetadataClickToPayMastercard(self): """Test PaymentMethodsMetadataClickToPayMastercard""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) + # FIXME: construct object with mandatory attributes with example values + # model = PaymentMethodsMetadataClickToPayMastercard() # noqa: E501 + pass + if __name__ == '__main__': unittest.main() diff --git a/test/test_payment_methods_metadata_click_to_pay_visa.py b/test/test_payment_methods_metadata_click_to_pay_visa.py index 580ca65..b9ad68a 100644 --- a/test/test_payment_methods_metadata_click_to_pay_visa.py +++ b/test/test_payment_methods_metadata_click_to_pay_visa.py @@ -1,20 +1,19 @@ -# coding: utf-8 - """ MONEI API v1 -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

- - The version of the OpenAPI document: 1.5.1 - Generated by OpenAPI Generator (https://openapi-generator.tech) +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - Do not edit the class manually. -""" # noqa: E501 + The version of the OpenAPI document: 1.5.3 + Generated by: https://openapi-generator.tech +""" +import sys import unittest -from Monei.models.payment_methods_metadata_click_to_pay_visa import PaymentMethodsMetadataClickToPayVisa +import Monei +from Monei.model.payment_methods_metadata_click_to_pay_visa import PaymentMethodsMetadataClickToPayVisa + class TestPaymentMethodsMetadataClickToPayVisa(unittest.TestCase): """PaymentMethodsMetadataClickToPayVisa unit test stubs""" @@ -25,28 +24,12 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional) -> PaymentMethodsMetadataClickToPayVisa: - """Test PaymentMethodsMetadataClickToPayVisa - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PaymentMethodsMetadataClickToPayVisa` - """ - model = PaymentMethodsMetadataClickToPayVisa() - if include_optional: - return PaymentMethodsMetadataClickToPayVisa( - srci_dpa_id = 'f47ac10b-58cc-4372-a567-0e02b2c3d479', - src_initiator_id = '550e8400-e29b-41d4-a716-446655440000' - ) - else: - return PaymentMethodsMetadataClickToPayVisa( - ) - """ - def testPaymentMethodsMetadataClickToPayVisa(self): """Test PaymentMethodsMetadataClickToPayVisa""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) + # FIXME: construct object with mandatory attributes with example values + # model = PaymentMethodsMetadataClickToPayVisa() # noqa: E501 + pass + if __name__ == '__main__': unittest.main() diff --git a/test/test_payment_methods_metadata_eps.py b/test/test_payment_methods_metadata_eps.py index 46f2ea8..50fc27d 100644 --- a/test/test_payment_methods_metadata_eps.py +++ b/test/test_payment_methods_metadata_eps.py @@ -1,20 +1,19 @@ -# coding: utf-8 - """ MONEI API v1 -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

- - The version of the OpenAPI document: 1.5.1 - Generated by OpenAPI Generator (https://openapi-generator.tech) +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - Do not edit the class manually. -""" # noqa: E501 + The version of the OpenAPI document: 1.5.3 + Generated by: https://openapi-generator.tech +""" +import sys import unittest -from Monei.models.payment_methods_metadata_eps import PaymentMethodsMetadataEps +import Monei +from Monei.model.payment_methods_metadata_eps import PaymentMethodsMetadataEps + class TestPaymentMethodsMetadataEps(unittest.TestCase): """PaymentMethodsMetadataEps unit test stubs""" @@ -25,27 +24,12 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional) -> PaymentMethodsMetadataEps: - """Test PaymentMethodsMetadataEps - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PaymentMethodsMetadataEps` - """ - model = PaymentMethodsMetadataEps() - if include_optional: - return PaymentMethodsMetadataEps( - countries = ["AT"] - ) - else: - return PaymentMethodsMetadataEps( - ) - """ - def testPaymentMethodsMetadataEps(self): """Test PaymentMethodsMetadataEps""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) + # FIXME: construct object with mandatory attributes with example values + # model = PaymentMethodsMetadataEps() # noqa: E501 + pass + if __name__ == '__main__': unittest.main() diff --git a/test/test_payment_methods_metadata_giropay.py b/test/test_payment_methods_metadata_giropay.py index b8d5aff..07e3bb9 100644 --- a/test/test_payment_methods_metadata_giropay.py +++ b/test/test_payment_methods_metadata_giropay.py @@ -1,20 +1,19 @@ -# coding: utf-8 - """ MONEI API v1 -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

- - The version of the OpenAPI document: 1.5.1 - Generated by OpenAPI Generator (https://openapi-generator.tech) +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - Do not edit the class manually. -""" # noqa: E501 + The version of the OpenAPI document: 1.5.3 + Generated by: https://openapi-generator.tech +""" +import sys import unittest -from Monei.models.payment_methods_metadata_giropay import PaymentMethodsMetadataGiropay +import Monei +from Monei.model.payment_methods_metadata_giropay import PaymentMethodsMetadataGiropay + class TestPaymentMethodsMetadataGiropay(unittest.TestCase): """PaymentMethodsMetadataGiropay unit test stubs""" @@ -25,27 +24,12 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional) -> PaymentMethodsMetadataGiropay: - """Test PaymentMethodsMetadataGiropay - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PaymentMethodsMetadataGiropay` - """ - model = PaymentMethodsMetadataGiropay() - if include_optional: - return PaymentMethodsMetadataGiropay( - countries = ["DE"] - ) - else: - return PaymentMethodsMetadataGiropay( - ) - """ - def testPaymentMethodsMetadataGiropay(self): """Test PaymentMethodsMetadataGiropay""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) + # FIXME: construct object with mandatory attributes with example values + # model = PaymentMethodsMetadataGiropay() # noqa: E501 + pass + if __name__ == '__main__': unittest.main() diff --git a/test/test_payment_methods_metadata_google_pay.py b/test/test_payment_methods_metadata_google_pay.py index 7f7f91b..0bb0b95 100644 --- a/test/test_payment_methods_metadata_google_pay.py +++ b/test/test_payment_methods_metadata_google_pay.py @@ -1,20 +1,19 @@ -# coding: utf-8 - """ MONEI API v1 -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

- - The version of the OpenAPI document: 1.5.1 - Generated by OpenAPI Generator (https://openapi-generator.tech) +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - Do not edit the class manually. -""" # noqa: E501 + The version of the OpenAPI document: 1.5.3 + Generated by: https://openapi-generator.tech +""" +import sys import unittest -from Monei.models.payment_methods_metadata_google_pay import PaymentMethodsMetadataGooglePay +import Monei +from Monei.model.payment_methods_metadata_google_pay import PaymentMethodsMetadataGooglePay + class TestPaymentMethodsMetadataGooglePay(unittest.TestCase): """PaymentMethodsMetadataGooglePay unit test stubs""" @@ -25,28 +24,12 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional) -> PaymentMethodsMetadataGooglePay: - """Test PaymentMethodsMetadataGooglePay - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PaymentMethodsMetadataGooglePay` - """ - model = PaymentMethodsMetadataGooglePay() - if include_optional: - return PaymentMethodsMetadataGooglePay( - merchant_id = '12345678901234567890', - cvc_required = False - ) - else: - return PaymentMethodsMetadataGooglePay( - ) - """ - def testPaymentMethodsMetadataGooglePay(self): """Test PaymentMethodsMetadataGooglePay""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) + # FIXME: construct object with mandatory attributes with example values + # model = PaymentMethodsMetadataGooglePay() # noqa: E501 + pass + if __name__ == '__main__': unittest.main() diff --git a/test/test_payment_methods_metadata_i_deal.py b/test/test_payment_methods_metadata_i_deal.py index 4bfad7e..a78e958 100644 --- a/test/test_payment_methods_metadata_i_deal.py +++ b/test/test_payment_methods_metadata_i_deal.py @@ -1,20 +1,19 @@ -# coding: utf-8 - """ MONEI API v1 -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

- - The version of the OpenAPI document: 1.5.1 - Generated by OpenAPI Generator (https://openapi-generator.tech) +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - Do not edit the class manually. -""" # noqa: E501 + The version of the OpenAPI document: 1.5.3 + Generated by: https://openapi-generator.tech +""" +import sys import unittest -from Monei.models.payment_methods_metadata_i_deal import PaymentMethodsMetadataIDeal +import Monei +from Monei.model.payment_methods_metadata_i_deal import PaymentMethodsMetadataIDeal + class TestPaymentMethodsMetadataIDeal(unittest.TestCase): """PaymentMethodsMetadataIDeal unit test stubs""" @@ -25,27 +24,12 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional) -> PaymentMethodsMetadataIDeal: - """Test PaymentMethodsMetadataIDeal - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PaymentMethodsMetadataIDeal` - """ - model = PaymentMethodsMetadataIDeal() - if include_optional: - return PaymentMethodsMetadataIDeal( - countries = ["NL"] - ) - else: - return PaymentMethodsMetadataIDeal( - ) - """ - def testPaymentMethodsMetadataIDeal(self): """Test PaymentMethodsMetadataIDeal""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) + # FIXME: construct object with mandatory attributes with example values + # model = PaymentMethodsMetadataIDeal() # noqa: E501 + pass + if __name__ == '__main__': unittest.main() diff --git a/test/test_payment_methods_metadata_klarna.py b/test/test_payment_methods_metadata_klarna.py index c2e25bc..ee1ff28 100644 --- a/test/test_payment_methods_metadata_klarna.py +++ b/test/test_payment_methods_metadata_klarna.py @@ -1,20 +1,19 @@ -# coding: utf-8 - """ MONEI API v1 -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

- - The version of the OpenAPI document: 1.5.1 - Generated by OpenAPI Generator (https://openapi-generator.tech) +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - Do not edit the class manually. -""" # noqa: E501 + The version of the OpenAPI document: 1.5.3 + Generated by: https://openapi-generator.tech +""" +import sys import unittest -from Monei.models.payment_methods_metadata_klarna import PaymentMethodsMetadataKlarna +import Monei +from Monei.model.payment_methods_metadata_klarna import PaymentMethodsMetadataKlarna + class TestPaymentMethodsMetadataKlarna(unittest.TestCase): """PaymentMethodsMetadataKlarna unit test stubs""" @@ -25,27 +24,12 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional) -> PaymentMethodsMetadataKlarna: - """Test PaymentMethodsMetadataKlarna - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PaymentMethodsMetadataKlarna` - """ - model = PaymentMethodsMetadataKlarna() - if include_optional: - return PaymentMethodsMetadataKlarna( - countries = ["AT","BE","CH","DE","DK","ES","FI","FR","GB","IT","NL","NO","SE"] - ) - else: - return PaymentMethodsMetadataKlarna( - ) - """ - def testPaymentMethodsMetadataKlarna(self): """Test PaymentMethodsMetadataKlarna""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) + # FIXME: construct object with mandatory attributes with example values + # model = PaymentMethodsMetadataKlarna() # noqa: E501 + pass + if __name__ == '__main__': unittest.main() diff --git a/test/test_payment_methods_metadata_mbway.py b/test/test_payment_methods_metadata_mbway.py index 69b6864..e5f743c 100644 --- a/test/test_payment_methods_metadata_mbway.py +++ b/test/test_payment_methods_metadata_mbway.py @@ -1,20 +1,19 @@ -# coding: utf-8 - """ MONEI API v1 -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

- - The version of the OpenAPI document: 1.5.1 - Generated by OpenAPI Generator (https://openapi-generator.tech) +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - Do not edit the class manually. -""" # noqa: E501 + The version of the OpenAPI document: 1.5.3 + Generated by: https://openapi-generator.tech +""" +import sys import unittest -from Monei.models.payment_methods_metadata_mbway import PaymentMethodsMetadataMbway +import Monei +from Monei.model.payment_methods_metadata_mbway import PaymentMethodsMetadataMbway + class TestPaymentMethodsMetadataMbway(unittest.TestCase): """PaymentMethodsMetadataMbway unit test stubs""" @@ -25,27 +24,12 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional) -> PaymentMethodsMetadataMbway: - """Test PaymentMethodsMetadataMbway - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PaymentMethodsMetadataMbway` - """ - model = PaymentMethodsMetadataMbway() - if include_optional: - return PaymentMethodsMetadataMbway( - countries = ["PT"] - ) - else: - return PaymentMethodsMetadataMbway( - ) - """ - def testPaymentMethodsMetadataMbway(self): """Test PaymentMethodsMetadataMbway""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) + # FIXME: construct object with mandatory attributes with example values + # model = PaymentMethodsMetadataMbway() # noqa: E501 + pass + if __name__ == '__main__': unittest.main() diff --git a/test/test_payment_methods_metadata_sepa.py b/test/test_payment_methods_metadata_sepa.py index 9426b7f..d6d0e2c 100644 --- a/test/test_payment_methods_metadata_sepa.py +++ b/test/test_payment_methods_metadata_sepa.py @@ -1,20 +1,19 @@ -# coding: utf-8 - """ MONEI API v1 -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

- - The version of the OpenAPI document: 1.5.1 - Generated by OpenAPI Generator (https://openapi-generator.tech) +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - Do not edit the class manually. -""" # noqa: E501 + The version of the OpenAPI document: 1.5.3 + Generated by: https://openapi-generator.tech +""" +import sys import unittest -from Monei.models.payment_methods_metadata_sepa import PaymentMethodsMetadataSepa +import Monei +from Monei.model.payment_methods_metadata_sepa import PaymentMethodsMetadataSepa + class TestPaymentMethodsMetadataSepa(unittest.TestCase): """PaymentMethodsMetadataSepa unit test stubs""" @@ -25,27 +24,12 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional) -> PaymentMethodsMetadataSepa: - """Test PaymentMethodsMetadataSepa - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PaymentMethodsMetadataSepa` - """ - model = PaymentMethodsMetadataSepa() - if include_optional: - return PaymentMethodsMetadataSepa( - countries = ["AT","BE","BG","HR","CY","CZ","DK","EE","FI","FR","DE","GR","HU","IE","IT","LV","LT","LU","MT","NL","PL","PT","RO","SK","SI","ES","SE","IS","LI","NO","AD","SM","MC","VA","PF","TF","GI","GG","IM","JE","BL","PM","CH","GB","WF"] - ) - else: - return PaymentMethodsMetadataSepa( - ) - """ - def testPaymentMethodsMetadataSepa(self): """Test PaymentMethodsMetadataSepa""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) + # FIXME: construct object with mandatory attributes with example values + # model = PaymentMethodsMetadataSepa() # noqa: E501 + pass + if __name__ == '__main__': unittest.main() diff --git a/test/test_payment_methods_metadata_sofort.py b/test/test_payment_methods_metadata_sofort.py index 25dabf2..84f9b58 100644 --- a/test/test_payment_methods_metadata_sofort.py +++ b/test/test_payment_methods_metadata_sofort.py @@ -1,20 +1,19 @@ -# coding: utf-8 - """ MONEI API v1 -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

- - The version of the OpenAPI document: 1.5.1 - Generated by OpenAPI Generator (https://openapi-generator.tech) +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - Do not edit the class manually. -""" # noqa: E501 + The version of the OpenAPI document: 1.5.3 + Generated by: https://openapi-generator.tech +""" +import sys import unittest -from Monei.models.payment_methods_metadata_sofort import PaymentMethodsMetadataSofort +import Monei +from Monei.model.payment_methods_metadata_sofort import PaymentMethodsMetadataSofort + class TestPaymentMethodsMetadataSofort(unittest.TestCase): """PaymentMethodsMetadataSofort unit test stubs""" @@ -25,27 +24,12 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional) -> PaymentMethodsMetadataSofort: - """Test PaymentMethodsMetadataSofort - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PaymentMethodsMetadataSofort` - """ - model = PaymentMethodsMetadataSofort() - if include_optional: - return PaymentMethodsMetadataSofort( - countries = ["AT","BE","DE","ES","IT","NL","CH","PL"] - ) - else: - return PaymentMethodsMetadataSofort( - ) - """ - def testPaymentMethodsMetadataSofort(self): """Test PaymentMethodsMetadataSofort""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) + # FIXME: construct object with mandatory attributes with example values + # model = PaymentMethodsMetadataSofort() # noqa: E501 + pass + if __name__ == '__main__': unittest.main() diff --git a/test/test_payment_methods_metadata_trustly.py b/test/test_payment_methods_metadata_trustly.py index 7d25549..0b32390 100644 --- a/test/test_payment_methods_metadata_trustly.py +++ b/test/test_payment_methods_metadata_trustly.py @@ -1,20 +1,19 @@ -# coding: utf-8 - """ MONEI API v1 -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

- - The version of the OpenAPI document: 1.5.1 - Generated by OpenAPI Generator (https://openapi-generator.tech) +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - Do not edit the class manually. -""" # noqa: E501 + The version of the OpenAPI document: 1.5.3 + Generated by: https://openapi-generator.tech +""" +import sys import unittest -from Monei.models.payment_methods_metadata_trustly import PaymentMethodsMetadataTrustly +import Monei +from Monei.model.payment_methods_metadata_trustly import PaymentMethodsMetadataTrustly + class TestPaymentMethodsMetadataTrustly(unittest.TestCase): """PaymentMethodsMetadataTrustly unit test stubs""" @@ -25,27 +24,12 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional) -> PaymentMethodsMetadataTrustly: - """Test PaymentMethodsMetadataTrustly - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PaymentMethodsMetadataTrustly` - """ - model = PaymentMethodsMetadataTrustly() - if include_optional: - return PaymentMethodsMetadataTrustly( - countries = ["DE","DK","EE","ES","FI","GB","LT","LV","NL","NO","PL","SE","SK"] - ) - else: - return PaymentMethodsMetadataTrustly( - ) - """ - def testPaymentMethodsMetadataTrustly(self): """Test PaymentMethodsMetadataTrustly""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) + # FIXME: construct object with mandatory attributes with example values + # model = PaymentMethodsMetadataTrustly() # noqa: E501 + pass + if __name__ == '__main__': unittest.main() diff --git a/Monei/models/subscription_interval.py b/test/test_payment_methods_methods.py similarity index 75% rename from Monei/models/subscription_interval.py rename to test/test_payment_methods_methods.py index c8c5ba8..2f0ed8c 100644 --- a/Monei/models/subscription_interval.py +++ b/test/test_payment_methods_methods.py @@ -1,39 +1,35 @@ -# coding: utf-8 - """ MONEI API v1 -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

+

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 + + The version of the OpenAPI document: 1.5.3 + Generated by: https://openapi-generator.tech +""" - The version of the OpenAPI document: 1.5.1 - Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. -""" # noqa: E501 +import sys +import unittest +import Monei +from Monei.model.payment_methods_methods import PaymentMethodsMethods -from __future__ import annotations -import json -from enum import Enum -from typing_extensions import Self +class TestPaymentMethodsMethods(unittest.TestCase): + """PaymentMethodsMethods unit test stubs""" -class SubscriptionInterval(str, Enum): - """ - Subscription interval. - """ + def setUp(self): + pass - """ - allowed enum values - """ - DAY = 'day' - WEEK = 'week' - MONTH = 'month' - YEAR = 'year' + def tearDown(self): + pass - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of SubscriptionInterval from a JSON string""" - return cls(json.loads(json_str)) + def testPaymentMethodsMethods(self): + """Test PaymentMethodsMethods""" + # FIXME: construct object with mandatory attributes with example values + # model = PaymentMethodsMethods() # noqa: E501 + pass +if __name__ == '__main__': + unittest.main() diff --git a/test/test_payment_next_action.py b/test/test_payment_next_action.py index 2f2459d..90439eb 100644 --- a/test/test_payment_next_action.py +++ b/test/test_payment_next_action.py @@ -1,20 +1,19 @@ -# coding: utf-8 - """ MONEI API v1 -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

- - The version of the OpenAPI document: 1.5.1 - Generated by OpenAPI Generator (https://openapi-generator.tech) +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - Do not edit the class manually. -""" # noqa: E501 + The version of the OpenAPI document: 1.5.3 + Generated by: https://openapi-generator.tech +""" +import sys import unittest -from Monei.models.payment_next_action import PaymentNextAction +import Monei +from Monei.model.payment_next_action import PaymentNextAction + class TestPaymentNextAction(unittest.TestCase): """PaymentNextAction unit test stubs""" @@ -25,29 +24,12 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional) -> PaymentNextAction: - """Test PaymentNextAction - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PaymentNextAction` - """ - model = PaymentNextAction() - if include_optional: - return PaymentNextAction( - type = 'CONFIRM', - must_redirect = False, - redirect_url = 'https://secure.monei.com/payments/af6029f80f5fc73a8ad2753eea0b1be0' - ) - else: - return PaymentNextAction( - ) - """ - def testPaymentNextAction(self): """Test PaymentNextAction""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) + # FIXME: construct object with mandatory attributes with example values + # model = PaymentNextAction() # noqa: E501 + pass + if __name__ == '__main__': unittest.main() diff --git a/test/test_payment_payment_method.py b/test/test_payment_payment_method.py index 3491903..4d76ffa 100644 --- a/test/test_payment_payment_method.py +++ b/test/test_payment_payment_method.py @@ -1,20 +1,35 @@ -# coding: utf-8 - """ MONEI API v1 -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

- - The version of the OpenAPI document: 1.5.1 - Generated by OpenAPI Generator (https://openapi-generator.tech) +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - Do not edit the class manually. -""" # noqa: E501 + The version of the OpenAPI document: 1.5.3 + Generated by: https://openapi-generator.tech +""" +import sys import unittest -from Monei.models.payment_payment_method import PaymentPaymentMethod +import Monei +from Monei.model.payment_payment_method_bizum import PaymentPaymentMethodBizum +from Monei.model.payment_payment_method_card import PaymentPaymentMethodCard +from Monei.model.payment_payment_method_cofidis import PaymentPaymentMethodCofidis +from Monei.model.payment_payment_method_klarna import PaymentPaymentMethodKlarna +from Monei.model.payment_payment_method_mbway import PaymentPaymentMethodMbway +from Monei.model.payment_payment_method_paypal import PaymentPaymentMethodPaypal +from Monei.model.payment_payment_method_sepa import PaymentPaymentMethodSepa +from Monei.model.payment_payment_method_trustly import PaymentPaymentMethodTrustly +globals()['PaymentPaymentMethodBizum'] = PaymentPaymentMethodBizum +globals()['PaymentPaymentMethodCard'] = PaymentPaymentMethodCard +globals()['PaymentPaymentMethodCofidis'] = PaymentPaymentMethodCofidis +globals()['PaymentPaymentMethodKlarna'] = PaymentPaymentMethodKlarna +globals()['PaymentPaymentMethodMbway'] = PaymentPaymentMethodMbway +globals()['PaymentPaymentMethodPaypal'] = PaymentPaymentMethodPaypal +globals()['PaymentPaymentMethodSepa'] = PaymentPaymentMethodSepa +globals()['PaymentPaymentMethodTrustly'] = PaymentPaymentMethodTrustly +from Monei.model.payment_payment_method import PaymentPaymentMethod + class TestPaymentPaymentMethod(unittest.TestCase): """PaymentPaymentMethod unit test stubs""" @@ -25,64 +40,12 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional) -> PaymentPaymentMethod: - """Test PaymentPaymentMethod - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PaymentPaymentMethod` - """ - model = PaymentPaymentMethod() - if include_optional: - return PaymentPaymentMethod( - method = 'card', - card = Monei.models.payment_payment_method_card.Payment-PaymentMethodCard( - country = 'ES', - brand = 'visa', - type = 'credit', - three_d_secure = False, - three_d_secure_version = '2.1.0', - three_d_secure_flow = 'CHALLENGE', - expiration = 2048544000, - last4 = '0004', - tokenization_method = 'applePay', - cardholder_name = 'John Doe', - cardholder_email = 'email@example.com', ), - bizum = Monei.models.payment_payment_method_bizum.Payment-PaymentMethodBizum( - phone_number = '', ), - paypal = Monei.models.payment_payment_method_paypal.Payment-PaymentMethodPaypal( - order_id = '', ), - cofidis = Monei.models.payment_payment_method_cofidis.Payment-PaymentMethodCofidis( - order_id = '', ), - cofidis_loan = Monei.models.payment_payment_method_cofidis.Payment-PaymentMethodCofidis( - order_id = '', ), - mbway = Monei.models.payment_payment_method_mbway.Payment-PaymentMethodMbway( - phone_number = '', ), - trustly = Monei.models.payment_payment_method_trustly.Payment-PaymentMethodTrustly( - customer_id = '', ), - sepa = Monei.models.payment_payment_method_sepa.Payment-PaymentMethodSepa( - accountholder_address = '', - accountholder_email = '', - accountholder_name = '', - country_code = '', - bank_address = '', - bank_code = '', - bank_name = '', - bic = '', - last4 = '', ), - klarna = Monei.models.payment_payment_method_klarna.Payment-PaymentMethodKlarna( - billing_category = 'PAY_LATER', - auth_payment_method = 'card', ) - ) - else: - return PaymentPaymentMethod( - ) - """ - def testPaymentPaymentMethod(self): """Test PaymentPaymentMethod""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) + # FIXME: construct object with mandatory attributes with example values + # model = PaymentPaymentMethod() # noqa: E501 + pass + if __name__ == '__main__': unittest.main() diff --git a/test/test_payment_payment_method_bizum.py b/test/test_payment_payment_method_bizum.py index 3af754c..8b9959f 100644 --- a/test/test_payment_payment_method_bizum.py +++ b/test/test_payment_payment_method_bizum.py @@ -1,20 +1,19 @@ -# coding: utf-8 - """ MONEI API v1 -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

- - The version of the OpenAPI document: 1.5.1 - Generated by OpenAPI Generator (https://openapi-generator.tech) +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - Do not edit the class manually. -""" # noqa: E501 + The version of the OpenAPI document: 1.5.3 + Generated by: https://openapi-generator.tech +""" +import sys import unittest -from Monei.models.payment_payment_method_bizum import PaymentPaymentMethodBizum +import Monei +from Monei.model.payment_payment_method_bizum import PaymentPaymentMethodBizum + class TestPaymentPaymentMethodBizum(unittest.TestCase): """PaymentPaymentMethodBizum unit test stubs""" @@ -25,27 +24,12 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional) -> PaymentPaymentMethodBizum: - """Test PaymentPaymentMethodBizum - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PaymentPaymentMethodBizum` - """ - model = PaymentPaymentMethodBizum() - if include_optional: - return PaymentPaymentMethodBizum( - phone_number = '' - ) - else: - return PaymentPaymentMethodBizum( - ) - """ - def testPaymentPaymentMethodBizum(self): """Test PaymentPaymentMethodBizum""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) + # FIXME: construct object with mandatory attributes with example values + # model = PaymentPaymentMethodBizum() # noqa: E501 + pass + if __name__ == '__main__': unittest.main() diff --git a/test/test_payment_payment_method_bizum_input.py b/test/test_payment_payment_method_bizum_input.py index 6b4e877..f5c0534 100644 --- a/test/test_payment_payment_method_bizum_input.py +++ b/test/test_payment_payment_method_bizum_input.py @@ -1,20 +1,19 @@ -# coding: utf-8 - """ MONEI API v1 -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

- - The version of the OpenAPI document: 1.5.1 - Generated by OpenAPI Generator (https://openapi-generator.tech) +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - Do not edit the class manually. -""" # noqa: E501 + The version of the OpenAPI document: 1.5.3 + Generated by: https://openapi-generator.tech +""" +import sys import unittest -from Monei.models.payment_payment_method_bizum_input import PaymentPaymentMethodBizumInput +import Monei +from Monei.model.payment_payment_method_bizum_input import PaymentPaymentMethodBizumInput + class TestPaymentPaymentMethodBizumInput(unittest.TestCase): """PaymentPaymentMethodBizumInput unit test stubs""" @@ -25,27 +24,12 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional) -> PaymentPaymentMethodBizumInput: - """Test PaymentPaymentMethodBizumInput - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PaymentPaymentMethodBizumInput` - """ - model = PaymentPaymentMethodBizumInput() - if include_optional: - return PaymentPaymentMethodBizumInput( - phone_number = '' - ) - else: - return PaymentPaymentMethodBizumInput( - ) - """ - def testPaymentPaymentMethodBizumInput(self): """Test PaymentPaymentMethodBizumInput""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) + # FIXME: construct object with mandatory attributes with example values + # model = PaymentPaymentMethodBizumInput() # noqa: E501 + pass + if __name__ == '__main__': unittest.main() diff --git a/test/test_payment_payment_method_card.py b/test/test_payment_payment_method_card.py index 81ad484..defa292 100644 --- a/test/test_payment_payment_method_card.py +++ b/test/test_payment_payment_method_card.py @@ -1,20 +1,19 @@ -# coding: utf-8 - """ MONEI API v1 -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

- - The version of the OpenAPI document: 1.5.1 - Generated by OpenAPI Generator (https://openapi-generator.tech) +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - Do not edit the class manually. -""" # noqa: E501 + The version of the OpenAPI document: 1.5.3 + Generated by: https://openapi-generator.tech +""" +import sys import unittest -from Monei.models.payment_payment_method_card import PaymentPaymentMethodCard +import Monei +from Monei.model.payment_payment_method_card import PaymentPaymentMethodCard + class TestPaymentPaymentMethodCard(unittest.TestCase): """PaymentPaymentMethodCard unit test stubs""" @@ -25,37 +24,12 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional) -> PaymentPaymentMethodCard: - """Test PaymentPaymentMethodCard - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PaymentPaymentMethodCard` - """ - model = PaymentPaymentMethodCard() - if include_optional: - return PaymentPaymentMethodCard( - country = 'ES', - brand = 'visa', - type = 'credit', - three_d_secure = False, - three_d_secure_version = '2.1.0', - three_d_secure_flow = 'CHALLENGE', - expiration = 2048544000, - last4 = '0004', - tokenization_method = 'applePay', - cardholder_name = 'John Doe', - cardholder_email = 'email@example.com' - ) - else: - return PaymentPaymentMethodCard( - ) - """ - def testPaymentPaymentMethodCard(self): """Test PaymentPaymentMethodCard""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) + # FIXME: construct object with mandatory attributes with example values + # model = PaymentPaymentMethodCard() # noqa: E501 + pass + if __name__ == '__main__': unittest.main() diff --git a/test/test_payment_payment_method_card_input.py b/test/test_payment_payment_method_card_input.py index 3c44074..7a4367e 100644 --- a/test/test_payment_payment_method_card_input.py +++ b/test/test_payment_payment_method_card_input.py @@ -1,20 +1,19 @@ -# coding: utf-8 - """ MONEI API v1 -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

- - The version of the OpenAPI document: 1.5.1 - Generated by OpenAPI Generator (https://openapi-generator.tech) +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - Do not edit the class manually. -""" # noqa: E501 + The version of the OpenAPI document: 1.5.3 + Generated by: https://openapi-generator.tech +""" +import sys import unittest -from Monei.models.payment_payment_method_card_input import PaymentPaymentMethodCardInput +import Monei +from Monei.model.payment_payment_method_card_input import PaymentPaymentMethodCardInput + class TestPaymentPaymentMethodCardInput(unittest.TestCase): """PaymentPaymentMethodCardInput unit test stubs""" @@ -25,32 +24,12 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional) -> PaymentPaymentMethodCardInput: - """Test PaymentPaymentMethodCardInput - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PaymentPaymentMethodCardInput` - """ - model = PaymentPaymentMethodCardInput() - if include_optional: - return PaymentPaymentMethodCardInput( - number = '', - cvc = '', - exp_month = '', - exp_year = '', - cardholder_name = 'John Doe', - cardholder_email = 'john.doe@monei.com' - ) - else: - return PaymentPaymentMethodCardInput( - ) - """ - def testPaymentPaymentMethodCardInput(self): """Test PaymentPaymentMethodCardInput""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) + # FIXME: construct object with mandatory attributes with example values + # model = PaymentPaymentMethodCardInput() # noqa: E501 + pass + if __name__ == '__main__': unittest.main() diff --git a/test/test_payment_payment_method_cofidis.py b/test/test_payment_payment_method_cofidis.py index b821f89..4b4e8b9 100644 --- a/test/test_payment_payment_method_cofidis.py +++ b/test/test_payment_payment_method_cofidis.py @@ -1,20 +1,19 @@ -# coding: utf-8 - """ MONEI API v1 -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

- - The version of the OpenAPI document: 1.5.1 - Generated by OpenAPI Generator (https://openapi-generator.tech) +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - Do not edit the class manually. -""" # noqa: E501 + The version of the OpenAPI document: 1.5.3 + Generated by: https://openapi-generator.tech +""" +import sys import unittest -from Monei.models.payment_payment_method_cofidis import PaymentPaymentMethodCofidis +import Monei +from Monei.model.payment_payment_method_cofidis import PaymentPaymentMethodCofidis + class TestPaymentPaymentMethodCofidis(unittest.TestCase): """PaymentPaymentMethodCofidis unit test stubs""" @@ -25,27 +24,12 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional) -> PaymentPaymentMethodCofidis: - """Test PaymentPaymentMethodCofidis - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PaymentPaymentMethodCofidis` - """ - model = PaymentPaymentMethodCofidis() - if include_optional: - return PaymentPaymentMethodCofidis( - order_id = '' - ) - else: - return PaymentPaymentMethodCofidis( - ) - """ - def testPaymentPaymentMethodCofidis(self): """Test PaymentPaymentMethodCofidis""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) + # FIXME: construct object with mandatory attributes with example values + # model = PaymentPaymentMethodCofidis() # noqa: E501 + pass + if __name__ == '__main__': unittest.main() diff --git a/test/test_payment_payment_method_input.py b/test/test_payment_payment_method_input.py index 392b7a4..3ace955 100644 --- a/test/test_payment_payment_method_input.py +++ b/test/test_payment_payment_method_input.py @@ -1,20 +1,23 @@ -# coding: utf-8 - """ MONEI API v1 -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

- - The version of the OpenAPI document: 1.5.1 - Generated by OpenAPI Generator (https://openapi-generator.tech) +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - Do not edit the class manually. -""" # noqa: E501 + The version of the OpenAPI document: 1.5.3 + Generated by: https://openapi-generator.tech +""" +import sys import unittest -from Monei.models.payment_payment_method_input import PaymentPaymentMethodInput +import Monei +from Monei.model.payment_payment_method_bizum_input import PaymentPaymentMethodBizumInput +from Monei.model.payment_payment_method_card_input import PaymentPaymentMethodCardInput +globals()['PaymentPaymentMethodBizumInput'] = PaymentPaymentMethodBizumInput +globals()['PaymentPaymentMethodCardInput'] = PaymentPaymentMethodCardInput +from Monei.model.payment_payment_method_input import PaymentPaymentMethodInput + class TestPaymentPaymentMethodInput(unittest.TestCase): """PaymentPaymentMethodInput unit test stubs""" @@ -25,35 +28,12 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional) -> PaymentPaymentMethodInput: - """Test PaymentPaymentMethodInput - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PaymentPaymentMethodInput` - """ - model = PaymentPaymentMethodInput() - if include_optional: - return PaymentPaymentMethodInput( - card = Monei.models.payment_payment_method_card_input.Payment-PaymentMethodCardInput( - number = '', - cvc = '', - exp_month = '', - exp_year = '', - cardholder_name = 'John Doe', - cardholder_email = 'john.doe@monei.com', ), - bizum = Monei.models.payment_payment_method_bizum_input.Payment-PaymentMethodBizumInput( - phone_number = '', ) - ) - else: - return PaymentPaymentMethodInput( - ) - """ - def testPaymentPaymentMethodInput(self): """Test PaymentPaymentMethodInput""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) + # FIXME: construct object with mandatory attributes with example values + # model = PaymentPaymentMethodInput() # noqa: E501 + pass + if __name__ == '__main__': unittest.main() diff --git a/test/test_payment_payment_method_klarna.py b/test/test_payment_payment_method_klarna.py index cdbfcf2..95bf2b1 100644 --- a/test/test_payment_payment_method_klarna.py +++ b/test/test_payment_payment_method_klarna.py @@ -1,20 +1,19 @@ -# coding: utf-8 - """ MONEI API v1 -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

- - The version of the OpenAPI document: 1.5.1 - Generated by OpenAPI Generator (https://openapi-generator.tech) +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - Do not edit the class manually. -""" # noqa: E501 + The version of the OpenAPI document: 1.5.3 + Generated by: https://openapi-generator.tech +""" +import sys import unittest -from Monei.models.payment_payment_method_klarna import PaymentPaymentMethodKlarna +import Monei +from Monei.model.payment_payment_method_klarna import PaymentPaymentMethodKlarna + class TestPaymentPaymentMethodKlarna(unittest.TestCase): """PaymentPaymentMethodKlarna unit test stubs""" @@ -25,28 +24,12 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional) -> PaymentPaymentMethodKlarna: - """Test PaymentPaymentMethodKlarna - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PaymentPaymentMethodKlarna` - """ - model = PaymentPaymentMethodKlarna() - if include_optional: - return PaymentPaymentMethodKlarna( - billing_category = 'PAY_LATER', - auth_payment_method = 'card' - ) - else: - return PaymentPaymentMethodKlarna( - ) - """ - def testPaymentPaymentMethodKlarna(self): """Test PaymentPaymentMethodKlarna""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) + # FIXME: construct object with mandatory attributes with example values + # model = PaymentPaymentMethodKlarna() # noqa: E501 + pass + if __name__ == '__main__': unittest.main() diff --git a/test/test_payment_payment_method_mbway.py b/test/test_payment_payment_method_mbway.py index bd3f3a1..1b6c0c8 100644 --- a/test/test_payment_payment_method_mbway.py +++ b/test/test_payment_payment_method_mbway.py @@ -1,20 +1,19 @@ -# coding: utf-8 - """ MONEI API v1 -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

- - The version of the OpenAPI document: 1.5.1 - Generated by OpenAPI Generator (https://openapi-generator.tech) +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - Do not edit the class manually. -""" # noqa: E501 + The version of the OpenAPI document: 1.5.3 + Generated by: https://openapi-generator.tech +""" +import sys import unittest -from Monei.models.payment_payment_method_mbway import PaymentPaymentMethodMbway +import Monei +from Monei.model.payment_payment_method_mbway import PaymentPaymentMethodMbway + class TestPaymentPaymentMethodMbway(unittest.TestCase): """PaymentPaymentMethodMbway unit test stubs""" @@ -25,27 +24,12 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional) -> PaymentPaymentMethodMbway: - """Test PaymentPaymentMethodMbway - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PaymentPaymentMethodMbway` - """ - model = PaymentPaymentMethodMbway() - if include_optional: - return PaymentPaymentMethodMbway( - phone_number = '' - ) - else: - return PaymentPaymentMethodMbway( - ) - """ - def testPaymentPaymentMethodMbway(self): """Test PaymentPaymentMethodMbway""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) + # FIXME: construct object with mandatory attributes with example values + # model = PaymentPaymentMethodMbway() # noqa: E501 + pass + if __name__ == '__main__': unittest.main() diff --git a/test/test_payment_payment_method_paypal.py b/test/test_payment_payment_method_paypal.py index 758902c..809c2c3 100644 --- a/test/test_payment_payment_method_paypal.py +++ b/test/test_payment_payment_method_paypal.py @@ -1,20 +1,19 @@ -# coding: utf-8 - """ MONEI API v1 -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

- - The version of the OpenAPI document: 1.5.1 - Generated by OpenAPI Generator (https://openapi-generator.tech) +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - Do not edit the class manually. -""" # noqa: E501 + The version of the OpenAPI document: 1.5.3 + Generated by: https://openapi-generator.tech +""" +import sys import unittest -from Monei.models.payment_payment_method_paypal import PaymentPaymentMethodPaypal +import Monei +from Monei.model.payment_payment_method_paypal import PaymentPaymentMethodPaypal + class TestPaymentPaymentMethodPaypal(unittest.TestCase): """PaymentPaymentMethodPaypal unit test stubs""" @@ -25,27 +24,12 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional) -> PaymentPaymentMethodPaypal: - """Test PaymentPaymentMethodPaypal - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PaymentPaymentMethodPaypal` - """ - model = PaymentPaymentMethodPaypal() - if include_optional: - return PaymentPaymentMethodPaypal( - order_id = '' - ) - else: - return PaymentPaymentMethodPaypal( - ) - """ - def testPaymentPaymentMethodPaypal(self): """Test PaymentPaymentMethodPaypal""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) + # FIXME: construct object with mandatory attributes with example values + # model = PaymentPaymentMethodPaypal() # noqa: E501 + pass + if __name__ == '__main__': unittest.main() diff --git a/test/test_payment_payment_method_sepa.py b/test/test_payment_payment_method_sepa.py index bfe6799..837a999 100644 --- a/test/test_payment_payment_method_sepa.py +++ b/test/test_payment_payment_method_sepa.py @@ -1,20 +1,19 @@ -# coding: utf-8 - """ MONEI API v1 -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

- - The version of the OpenAPI document: 1.5.1 - Generated by OpenAPI Generator (https://openapi-generator.tech) +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - Do not edit the class manually. -""" # noqa: E501 + The version of the OpenAPI document: 1.5.3 + Generated by: https://openapi-generator.tech +""" +import sys import unittest -from Monei.models.payment_payment_method_sepa import PaymentPaymentMethodSepa +import Monei +from Monei.model.payment_payment_method_sepa import PaymentPaymentMethodSepa + class TestPaymentPaymentMethodSepa(unittest.TestCase): """PaymentPaymentMethodSepa unit test stubs""" @@ -25,35 +24,12 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional) -> PaymentPaymentMethodSepa: - """Test PaymentPaymentMethodSepa - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PaymentPaymentMethodSepa` - """ - model = PaymentPaymentMethodSepa() - if include_optional: - return PaymentPaymentMethodSepa( - accountholder_address = '', - accountholder_email = '', - accountholder_name = '', - country_code = '', - bank_address = '', - bank_code = '', - bank_name = '', - bic = '', - last4 = '' - ) - else: - return PaymentPaymentMethodSepa( - ) - """ - def testPaymentPaymentMethodSepa(self): """Test PaymentPaymentMethodSepa""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) + # FIXME: construct object with mandatory attributes with example values + # model = PaymentPaymentMethodSepa() # noqa: E501 + pass + if __name__ == '__main__': unittest.main() diff --git a/test/test_payment_payment_method_trustly.py b/test/test_payment_payment_method_trustly.py index 078702d..6298b25 100644 --- a/test/test_payment_payment_method_trustly.py +++ b/test/test_payment_payment_method_trustly.py @@ -1,20 +1,19 @@ -# coding: utf-8 - """ MONEI API v1 -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

- - The version of the OpenAPI document: 1.5.1 - Generated by OpenAPI Generator (https://openapi-generator.tech) +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - Do not edit the class manually. -""" # noqa: E501 + The version of the OpenAPI document: 1.5.3 + Generated by: https://openapi-generator.tech +""" +import sys import unittest -from Monei.models.payment_payment_method_trustly import PaymentPaymentMethodTrustly +import Monei +from Monei.model.payment_payment_method_trustly import PaymentPaymentMethodTrustly + class TestPaymentPaymentMethodTrustly(unittest.TestCase): """PaymentPaymentMethodTrustly unit test stubs""" @@ -25,27 +24,12 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional) -> PaymentPaymentMethodTrustly: - """Test PaymentPaymentMethodTrustly - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PaymentPaymentMethodTrustly` - """ - model = PaymentPaymentMethodTrustly() - if include_optional: - return PaymentPaymentMethodTrustly( - customer_id = '' - ) - else: - return PaymentPaymentMethodTrustly( - ) - """ - def testPaymentPaymentMethodTrustly(self): """Test PaymentPaymentMethodTrustly""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) + # FIXME: construct object with mandatory attributes with example values + # model = PaymentPaymentMethodTrustly() # noqa: E501 + pass + if __name__ == '__main__': unittest.main() diff --git a/Monei/models/payment_message_channel.py b/test/test_payment_payment_methods.py similarity index 75% rename from Monei/models/payment_message_channel.py rename to test/test_payment_payment_methods.py index 083d4a0..d4d4d95 100644 --- a/Monei/models/payment_message_channel.py +++ b/test/test_payment_payment_methods.py @@ -1,38 +1,35 @@ -# coding: utf-8 - """ MONEI API v1 -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

+

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 + + The version of the OpenAPI document: 1.5.3 + Generated by: https://openapi-generator.tech +""" - The version of the OpenAPI document: 1.5.1 - Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. -""" # noqa: E501 +import sys +import unittest +import Monei +from Monei.model.payment_payment_methods import PaymentPaymentMethods -from __future__ import annotations -import json -from enum import Enum -from typing_extensions import Self +class TestPaymentPaymentMethods(unittest.TestCase): + """PaymentPaymentMethods unit test stubs""" -class PaymentMessageChannel(str, Enum): - """ - The channel used to send the payment message. - """ + def setUp(self): + pass - """ - allowed enum values - """ - EMAIL = 'EMAIL' - WHATSAPP = 'WHATSAPP' - SMS = 'SMS' + def tearDown(self): + pass - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of PaymentMessageChannel from a JSON string""" - return cls(json.loads(json_str)) + def testPaymentPaymentMethods(self): + """Test PaymentPaymentMethods""" + # FIXME: construct object with mandatory attributes with example values + # model = PaymentPaymentMethods() # noqa: E501 + pass +if __name__ == '__main__': + unittest.main() diff --git a/test/test_payment_refund_reason.py b/test/test_payment_refund_reason.py index ae60611..5f88d9a 100644 --- a/test/test_payment_refund_reason.py +++ b/test/test_payment_refund_reason.py @@ -1,20 +1,19 @@ -# coding: utf-8 - """ MONEI API v1 -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

- - The version of the OpenAPI document: 1.5.1 - Generated by OpenAPI Generator (https://openapi-generator.tech) +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - Do not edit the class manually. -""" # noqa: E501 + The version of the OpenAPI document: 1.5.3 + Generated by: https://openapi-generator.tech +""" +import sys import unittest -from Monei.models.payment_refund_reason import PaymentRefundReason +import Monei +from Monei.model.payment_refund_reason import PaymentRefundReason + class TestPaymentRefundReason(unittest.TestCase): """PaymentRefundReason unit test stubs""" @@ -27,7 +26,10 @@ def tearDown(self): def testPaymentRefundReason(self): """Test PaymentRefundReason""" - # inst = PaymentRefundReason() + # FIXME: construct object with mandatory attributes with example values + # model = PaymentRefundReason() # noqa: E501 + pass + if __name__ == '__main__': unittest.main() diff --git a/test/test_payment_sequence.py b/test/test_payment_sequence.py index 8bce7e3..a2282db 100644 --- a/test/test_payment_sequence.py +++ b/test/test_payment_sequence.py @@ -1,20 +1,21 @@ -# coding: utf-8 - """ MONEI API v1 -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

- - The version of the OpenAPI document: 1.5.1 - Generated by OpenAPI Generator (https://openapi-generator.tech) +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - Do not edit the class manually. -""" # noqa: E501 + The version of the OpenAPI document: 1.5.3 + Generated by: https://openapi-generator.tech +""" +import sys import unittest -from Monei.models.payment_sequence import PaymentSequence +import Monei +from Monei.model.payment_sequence_recurring import PaymentSequenceRecurring +globals()['PaymentSequenceRecurring'] = PaymentSequenceRecurring +from Monei.model.payment_sequence import PaymentSequence + class TestPaymentSequence(unittest.TestCase): """PaymentSequence unit test stubs""" @@ -25,31 +26,12 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional) -> PaymentSequence: - """Test PaymentSequence - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PaymentSequence` - """ - model = PaymentSequence() - if include_optional: - return PaymentSequence( - type = 'recurring', - recurring = Monei.models.payment_sequence_recurring.Payment-SequenceRecurring( - expiry = '*(The payment method or card expiration)*', - frequency = 30, ) - ) - else: - return PaymentSequence( - type = 'recurring', - ) - """ - def testPaymentSequence(self): """Test PaymentSequence""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) + # FIXME: construct object with mandatory attributes with example values + # model = PaymentSequence() # noqa: E501 + pass + if __name__ == '__main__': unittest.main() diff --git a/test/test_payment_sequence_recurring.py b/test/test_payment_sequence_recurring.py index 10c8977..c28088c 100644 --- a/test/test_payment_sequence_recurring.py +++ b/test/test_payment_sequence_recurring.py @@ -1,20 +1,19 @@ -# coding: utf-8 - """ MONEI API v1 -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

- - The version of the OpenAPI document: 1.5.1 - Generated by OpenAPI Generator (https://openapi-generator.tech) +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - Do not edit the class manually. -""" # noqa: E501 + The version of the OpenAPI document: 1.5.3 + Generated by: https://openapi-generator.tech +""" +import sys import unittest -from Monei.models.payment_sequence_recurring import PaymentSequenceRecurring +import Monei +from Monei.model.payment_sequence_recurring import PaymentSequenceRecurring + class TestPaymentSequenceRecurring(unittest.TestCase): """PaymentSequenceRecurring unit test stubs""" @@ -25,28 +24,12 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional) -> PaymentSequenceRecurring: - """Test PaymentSequenceRecurring - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PaymentSequenceRecurring` - """ - model = PaymentSequenceRecurring() - if include_optional: - return PaymentSequenceRecurring( - expiry = '*(The payment method or card expiration)*', - frequency = 30 - ) - else: - return PaymentSequenceRecurring( - ) - """ - def testPaymentSequenceRecurring(self): """Test PaymentSequenceRecurring""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) + # FIXME: construct object with mandatory attributes with example values + # model = PaymentSequenceRecurring() # noqa: E501 + pass + if __name__ == '__main__': unittest.main() diff --git a/test/test_payment_session_details.py b/test/test_payment_session_details.py index 29e3049..0fdc378 100644 --- a/test/test_payment_session_details.py +++ b/test/test_payment_session_details.py @@ -1,20 +1,19 @@ -# coding: utf-8 - """ MONEI API v1 -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

- - The version of the OpenAPI document: 1.5.1 - Generated by OpenAPI Generator (https://openapi-generator.tech) +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - Do not edit the class manually. -""" # noqa: E501 + The version of the OpenAPI document: 1.5.3 + Generated by: https://openapi-generator.tech +""" +import sys import unittest -from Monei.models.payment_session_details import PaymentSessionDetails +import Monei +from Monei.model.payment_session_details import PaymentSessionDetails + class TestPaymentSessionDetails(unittest.TestCase): """PaymentSessionDetails unit test stubs""" @@ -25,43 +24,12 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional) -> PaymentSessionDetails: - """Test PaymentSessionDetails - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PaymentSessionDetails` - """ - model = PaymentSessionDetails() - if include_optional: - return PaymentSessionDetails( - ip = '100.100.200.100', - country_code = 'ES', - lang = 'es', - device_type = 'desktop', - device_model = '', - browser = 'Chrome', - browser_version = '83.0.4103.116', - os = 'Mac OS', - os_version = '10.15.4', - source = 'MONEI/PHP', - source_version = '0.1.2', - user_agent = 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) ...', - browser_accept = 'text/html,application/xhtml+xml,application/json', - browser_color_depth = 24, - browser_screen_height = 1152, - browser_screen_width = 2048, - browser_timezone_offset = 'string' - ) - else: - return PaymentSessionDetails( - ) - """ - def testPaymentSessionDetails(self): """Test PaymentSessionDetails""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) + # FIXME: construct object with mandatory attributes with example values + # model = PaymentSessionDetails() # noqa: E501 + pass + if __name__ == '__main__': unittest.main() diff --git a/test/test_payment_shipping_details.py b/test/test_payment_shipping_details.py index fb97dbb..6b8ef97 100644 --- a/test/test_payment_shipping_details.py +++ b/test/test_payment_shipping_details.py @@ -1,20 +1,21 @@ -# coding: utf-8 - """ MONEI API v1 -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

- - The version of the OpenAPI document: 1.5.1 - Generated by OpenAPI Generator (https://openapi-generator.tech) +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - Do not edit the class manually. -""" # noqa: E501 + The version of the OpenAPI document: 1.5.3 + Generated by: https://openapi-generator.tech +""" +import sys import unittest -from Monei.models.payment_shipping_details import PaymentShippingDetails +import Monei +from Monei.model.address import Address +globals()['Address'] = Address +from Monei.model.payment_shipping_details import PaymentShippingDetails + class TestPaymentShippingDetails(unittest.TestCase): """PaymentShippingDetails unit test stubs""" @@ -25,38 +26,12 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional) -> PaymentShippingDetails: - """Test PaymentShippingDetails - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PaymentShippingDetails` - """ - model = PaymentShippingDetails() - if include_optional: - return PaymentShippingDetails( - name = 'John Doe', - email = 'john.doe@example.com', - phone = '', - company = '', - tax_id = '', - address = Monei.models.address.Address( - country = 'ES', - city = 'Málaga', - line1 = 'Fake Street 123', - line2 = '', - zip = '1234', - state = 'Málaga', ) - ) - else: - return PaymentShippingDetails( - ) - """ - def testPaymentShippingDetails(self): """Test PaymentShippingDetails""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) + # FIXME: construct object with mandatory attributes with example values + # model = PaymentShippingDetails() # noqa: E501 + pass + if __name__ == '__main__': unittest.main() diff --git a/test/test_payment_shop.py b/test/test_payment_shop.py index d380589..94c8393 100644 --- a/test/test_payment_shop.py +++ b/test/test_payment_shop.py @@ -1,20 +1,19 @@ -# coding: utf-8 - """ MONEI API v1 -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

- - The version of the OpenAPI document: 1.5.1 - Generated by OpenAPI Generator (https://openapi-generator.tech) +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - Do not edit the class manually. -""" # noqa: E501 + The version of the OpenAPI document: 1.5.3 + Generated by: https://openapi-generator.tech +""" +import sys import unittest -from Monei.models.payment_shop import PaymentShop +import Monei +from Monei.model.payment_shop import PaymentShop + class TestPaymentShop(unittest.TestCase): """PaymentShop unit test stubs""" @@ -25,28 +24,12 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional) -> PaymentShop: - """Test PaymentShop - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PaymentShop` - """ - model = PaymentShop() - if include_optional: - return PaymentShop( - name = 'Test Shop', - country = 'ES' - ) - else: - return PaymentShop( - ) - """ - def testPaymentShop(self): """Test PaymentShop""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) + # FIXME: construct object with mandatory attributes with example values + # model = PaymentShop() # noqa: E501 + pass + if __name__ == '__main__': unittest.main() diff --git a/test/test_payment_status.py b/test/test_payment_status.py index 652a7a8..47def9c 100644 --- a/test/test_payment_status.py +++ b/test/test_payment_status.py @@ -1,20 +1,19 @@ -# coding: utf-8 - """ MONEI API v1 -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

- - The version of the OpenAPI document: 1.5.1 - Generated by OpenAPI Generator (https://openapi-generator.tech) +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - Do not edit the class manually. -""" # noqa: E501 + The version of the OpenAPI document: 1.5.3 + Generated by: https://openapi-generator.tech +""" +import sys import unittest -from Monei.models.payment_status import PaymentStatus +import Monei +from Monei.model.payment_status import PaymentStatus + class TestPaymentStatus(unittest.TestCase): """PaymentStatus unit test stubs""" @@ -27,7 +26,10 @@ def tearDown(self): def testPaymentStatus(self): """Test PaymentStatus""" - # inst = PaymentStatus() + # FIXME: construct object with mandatory attributes with example values + # model = PaymentStatus() # noqa: E501 + pass + if __name__ == '__main__': unittest.main() diff --git a/test/test_payment_trace_details.py b/test/test_payment_trace_details.py index ba1519f..71678d9 100644 --- a/test/test_payment_trace_details.py +++ b/test/test_payment_trace_details.py @@ -1,20 +1,19 @@ -# coding: utf-8 - """ MONEI API v1 -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

- - The version of the OpenAPI document: 1.5.1 - Generated by OpenAPI Generator (https://openapi-generator.tech) +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - Do not edit the class manually. -""" # noqa: E501 + The version of the OpenAPI document: 1.5.3 + Generated by: https://openapi-generator.tech +""" +import sys import unittest -from Monei.models.payment_trace_details import PaymentTraceDetails +import Monei +from Monei.model.payment_trace_details import PaymentTraceDetails + class TestPaymentTraceDetails(unittest.TestCase): """PaymentTraceDetails unit test stubs""" @@ -25,45 +24,12 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional) -> PaymentTraceDetails: - """Test PaymentTraceDetails - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PaymentTraceDetails` - """ - model = PaymentTraceDetails() - if include_optional: - return PaymentTraceDetails( - ip = '100.100.200.100', - country_code = 'ES', - lang = 'es', - device_type = 'desktop', - device_model = '', - browser = 'Chrome', - browser_version = '83.0.4103.116', - os = 'Mac OS', - os_version = '10.15.4', - source = 'MONEI/PHP', - source_version = '0.1.2', - user_agent = 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) ...', - browser_accept = 'text/html,application/xhtml+xml,application/json', - browser_color_depth = 24, - browser_screen_height = 1152, - browser_screen_width = 2048, - browser_timezone_offset = 'string', - user_id = '', - user_email = 'user@example.com' - ) - else: - return PaymentTraceDetails( - ) - """ - def testPaymentTraceDetails(self): """Test PaymentTraceDetails""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) + # FIXME: construct object with mandatory attributes with example values + # model = PaymentTraceDetails() # noqa: E501 + pass + if __name__ == '__main__': unittest.main() diff --git a/test/test_payment_transaction_type.py b/test/test_payment_transaction_type.py index 83a98d5..b391805 100644 --- a/test/test_payment_transaction_type.py +++ b/test/test_payment_transaction_type.py @@ -1,20 +1,19 @@ -# coding: utf-8 - """ MONEI API v1 -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

- - The version of the OpenAPI document: 1.5.1 - Generated by OpenAPI Generator (https://openapi-generator.tech) +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - Do not edit the class manually. -""" # noqa: E501 + The version of the OpenAPI document: 1.5.3 + Generated by: https://openapi-generator.tech +""" +import sys import unittest -from Monei.models.payment_transaction_type import PaymentTransactionType +import Monei +from Monei.model.payment_transaction_type import PaymentTransactionType + class TestPaymentTransactionType(unittest.TestCase): """PaymentTransactionType unit test stubs""" @@ -27,7 +26,10 @@ def tearDown(self): def testPaymentTransactionType(self): """Test PaymentTransactionType""" - # inst = PaymentTransactionType() + # FIXME: construct object with mandatory attributes with example values + # model = PaymentTransactionType() # noqa: E501 + pass + if __name__ == '__main__': unittest.main() diff --git a/test/test_payments_api.py b/test/test_payments_api.py index 90ddae2..4f97dd6 100644 --- a/test/test_payments_api.py +++ b/test/test_payments_api.py @@ -1,321 +1,98 @@ -# coding: utf-8 - """ -MONEI API v1 - -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

+ MONEI API v1 -The version of the OpenAPI document: 1.5.1 -Generated by OpenAPI Generator (https://openapi-generator.tech) +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 -Do not edit the class manually. -""" # noqa: E501 + The version of the OpenAPI document: 1.5.3 + Generated by: https://openapi-generator.tech +""" import unittest -from unittest.mock import patch, MagicMock -from Monei.api.payments_api import PaymentsApi -from Monei.api_client import ApiClient -from Monei.configuration import Configuration -from Monei.exceptions import ApiException +import Monei +from Monei.api.payments_api import PaymentsApi # noqa: E501 class TestPaymentsApi(unittest.TestCase): """PaymentsApi unit test stubs""" - def setUp(self) -> None: - configuration = Configuration() - configuration.api_key = {"Authorization": "test_api_key"} - self.api_client = ApiClient(configuration) - self.api = PaymentsApi(self.api_client) + def setUp(self): + self.api = PaymentsApi() # noqa: E501 - def tearDown(self) -> None: + def tearDown(self): pass - @patch.object(ApiClient, "call_api") - def test_cancel(self, mock_call_api) -> None: + def test_cancel(self): """Test case for cancel - Cancel Payment + Cancel Payment # noqa: E501 """ - # Configure the mock to return a successful response - mock_response = { - "id": "pay_123", - "amount": 1000, - "currency": "EUR", - "orderId": "order_123", - "status": "CANCELLED", - "cancellationReason": "CUSTOMER_REQUEST", - } - mock_call_api.return_value = mock_response - - # Test the method - payment_id = "pay_123" - cancel_data = {"reason": "CUSTOMER_REQUEST"} - response = self.api.cancel(payment_id, cancel_data) - - # Verify the response - self.assertEqual(response, mock_response) - mock_call_api.assert_called_once() + pass - @patch.object(ApiClient, "call_api") - def test_capture(self, mock_call_api) -> None: + def test_capture(self): """Test case for capture - Capture Payment + Capture Payment # noqa: E501 """ - # Configure the mock to return a successful response - mock_response = { - "id": "pay_123", - "amount": 1000, - "currency": "EUR", - "orderId": "order_123", - "status": "SUCCEEDED", - } - mock_call_api.return_value = mock_response - - # Test the method - payment_id = "pay_123" - capture_data = {"amount": 1000} - response = self.api.capture(payment_id, capture_data) - - # Verify the response - self.assertEqual(response, mock_response) - mock_call_api.assert_called_once() + pass - @patch.object(ApiClient, "call_api") - def test_confirm(self, mock_call_api) -> None: + def test_confirm(self): """Test case for confirm - Confirm Payment + Confirm Payment # noqa: E501 """ - # Configure the mock to return a successful response - mock_response = { - "id": "pay_123", - "amount": 1000, - "currency": "EUR", - "orderId": "order_123", - "status": "SUCCEEDED", - } - mock_call_api.return_value = mock_response - - # Test the method - payment_id = "pay_123" - confirm_data = {"paymentToken": "tok_123", "sessionId": "sess_123"} - response = self.api.confirm(payment_id, confirm_data) - - # Verify the response - self.assertEqual(response, mock_response) - mock_call_api.assert_called_once() + pass - @patch.object(ApiClient, "call_api") - def test_create(self, mock_call_api) -> None: + def test_create(self): """Test case for create - Create Payment + Create Payment # noqa: E501 """ - # Configure the mock to return a successful response - mock_response = { - "id": "pay_123", - "amount": 1000, - "currency": "EUR", - "orderId": "order_123", - "description": "Test payment", - "status": "PENDING", - "nextAction": {"type": "REDIRECT", "redirectUrl": "https://checkout.monei.com/123"}, - } - mock_call_api.return_value = mock_response - - # Test the method - payment_data = { - "amount": 1000, - "currency": "EUR", - "orderId": "order_123", - "description": "Test payment", - "completeUrl": "https://example.com/complete", - "cancelUrl": "https://example.com/cancel", - } - response = self.api.create(payment_data) - - # Verify the response - self.assertEqual(response, mock_response) - mock_call_api.assert_called_once() + pass - @patch.object(ApiClient, "call_api") - def test_get(self, mock_call_api) -> None: + def test_get(self): """Test case for get - Get Payment + Get Payment # noqa: E501 """ - # Configure the mock to return a successful response - mock_response = { - "id": "pay_123", - "amount": 1000, - "currency": "EUR", - "orderId": "order_123", - "description": "Test payment", - "status": "SUCCEEDED", - } - mock_call_api.return_value = mock_response - - # Test the method - payment_id = "pay_123" - response = self.api.get(payment_id) - - # Verify the response - self.assertEqual(response, mock_response) - mock_call_api.assert_called_once() + pass - @patch.object(ApiClient, "call_api") - def test_recurring(self, mock_call_api) -> None: + def test_recurring(self): """Test case for recurring - Recurring Payment + Recurring Payment # noqa: E501 """ - # Configure the mock to return a successful response - mock_response = { - "id": "pay_456", - "amount": 1000, - "currency": "EUR", - "orderId": "order_456", - "description": "Recurring payment", - "status": "SUCCEEDED", - "sequenceId": "seq_123", - } - mock_call_api.return_value = mock_response - - # Test the method - sequence_id = "seq_123" - recurring_data = { - "amount": 1000, - "currency": "EUR", - "orderId": "order_456", - "description": "Recurring payment", - "paymentMethodId": "pm_123", - } - response = self.api.recurring(sequence_id, recurring_data) - - # Verify the response - self.assertEqual(response, mock_response) - mock_call_api.assert_called_once() + pass - @patch.object(ApiClient, "call_api") - def test_refund(self, mock_call_api) -> None: + def test_refund(self): """Test case for refund - Refund Payment + Refund Payment # noqa: E501 """ - # Configure the mock to return a successful response - mock_response = { - "id": "ref_123", - "paymentId": "pay_123", - "amount": 500, - "reason": "CUSTOMER_REQUEST", - "status": "SUCCEEDED", - } - mock_call_api.return_value = mock_response - - # Test the method - payment_id = "pay_123" - refund_data = {"amount": 500, "reason": "CUSTOMER_REQUEST"} - response = self.api.refund(payment_id, refund_data) - - # Verify the response - self.assertEqual(response, mock_response) - mock_call_api.assert_called_once() + pass - @patch.object(ApiClient, "call_api") - def test_send_link(self, mock_call_api) -> None: + def test_send_link(self): """Test case for send_link - Send Payment Link + Send Payment Link # noqa: E501 """ - # Configure the mock to return a successful response - mock_response = {"success": True} - mock_call_api.return_value = mock_response - - # Test the method - payment_id = "pay_123" - link_data = {"customerEmail": "customer@example.com", "customerPhone": "+34600000000"} - response = self.api.send_link(payment_id, link_data) - - # Verify the response - self.assertEqual(response, mock_response) - mock_call_api.assert_called_once() + pass - @patch.object(ApiClient, "call_api") - def test_send_receipt(self, mock_call_api) -> None: + def test_send_receipt(self): """Test case for send_receipt - Send Payment Receipt + Send Payment Receipt # noqa: E501 """ - # Configure the mock to return a successful response - mock_response = {"success": True} - mock_call_api.return_value = mock_response - - # Test the method - payment_id = "pay_123" - receipt_data = {"customerEmail": "customer@example.com"} - response = self.api.send_receipt(payment_id, receipt_data) - - # Verify the response - self.assertEqual(response, mock_response) - mock_call_api.assert_called_once() + pass - @patch.object(ApiClient, "call_api") - def test_send_request(self, mock_call_api) -> None: + def test_send_request(self): """Test case for send_request - Send Payment Request + Send Payment Request # noqa: E501 """ - # Configure the mock to return a successful response - mock_response = { - "id": "pay_123", - "amount": 1000, - "currency": "EUR", - "orderId": "order_123", - "description": "Payment request", - "status": "PENDING", - } - mock_call_api.return_value = mock_response - - # Test the method - payment_id = "pay_123" - request_data = {"phoneNumber": "+34600000000"} - response = self.api.send_request(payment_id, request_data) - - # Verify the response - self.assertEqual(response, mock_response) - mock_call_api.assert_called_once() - - @patch.object(ApiClient, "call_api") - def test_error_handling(self, mock_call_api) -> None: - """Test error handling in API calls""" - # Configure the mock to raise an ApiException - mock_call_api.side_effect = ApiException( - status=400, - reason="Bad Request", - body='{"status":"ERROR","statusCode":400,"requestId":"req_123","message":"Invalid request"}', - ) - - # Test the method - payment_data = { - "amount": 1000, - "currency": "EUR", - "orderId": "order_123", - "description": "Test payment", - } - - # Verify that the exception is raised - with self.assertRaises(ApiException) as context: - self.api.create(payment_data) - - # Verify the exception details - self.assertEqual(context.exception.status, 400) - self.assertEqual(context.exception.reason, "Bad Request") - self.assertIn("Invalid request", context.exception.body) + pass -if __name__ == "__main__": +if __name__ == '__main__': unittest.main() diff --git a/test/test_payments_api_integration.py b/test/test_payments_api_integration.py new file mode 100644 index 0000000..e9fe1e5 --- /dev/null +++ b/test/test_payments_api_integration.py @@ -0,0 +1,306 @@ +import unittest +from unittest.mock import patch, MagicMock + +import Monei +from Monei.monei_client import MoneiClient +from Monei.exceptions import ApiException +from Monei.model.create_payment_request import CreatePaymentRequest +from Monei.model.confirm_payment_request import ConfirmPaymentRequest +from Monei.model.capture_payment_request import CapturePaymentRequest +from Monei.model.cancel_payment_request import CancelPaymentRequest +from Monei.model.refund_payment_request import RefundPaymentRequest +from Monei.model.recurring_payment_request import RecurringPaymentRequest +from Monei.model.send_payment_link_request import SendPaymentLinkRequest +from Monei.model.send_payment_receipt_request import SendPaymentReceiptRequest +from Monei.model.send_payment_request_request import SendPaymentRequestRequest +from Monei.model.payment import Payment +from Monei.model.payment_status import PaymentStatus + + +class TestPaymentsApiIntegration(unittest.TestCase): + """PaymentsApi integration test stubs""" + + def setUp(self): + """Set up test fixtures, if any.""" + self.api_key = "test_api_key_12345" + self.client = MoneiClient(api_key=self.api_key) + self.payment_id = "pay_123456789" + + def tearDown(self): + """Tear down test fixtures, if any.""" + pass + + @patch("Monei.api.payments_api.PaymentsApi.create") + def test_create_payment(self, mock_create): + """Test creating a payment.""" + # Setup mock response + mock_payment = MagicMock() + mock_payment.id = self.payment_id + mock_payment.amount = 1000 + mock_payment.currency = "EUR" + mock_payment.status = PaymentStatus("PENDING") + mock_create.return_value = mock_payment + + # Create payment request + payment_request = { + "amount": 1000, + "currency": "EUR", + "orderId": "order_123", + "description": "Test payment", + "customer": {"email": "customer@example.com", "name": "John Doe"}, + } + + # Call the API + result = self.client.payments.create(payment_request) + + # Verify the result + self.assertEqual(result.id, self.payment_id) + self.assertEqual(result.amount, 1000) + self.assertEqual(result.currency, "EUR") + self.assertEqual(result.status, PaymentStatus("PENDING")) + + # Verify the mock was called with the correct arguments + mock_create.assert_called_once() + + @patch("Monei.api.payments_api.PaymentsApi.get") + def test_get_payment(self, mock_get): + """Test getting a payment by ID.""" + # Setup mock response + mock_payment = MagicMock() + mock_payment.id = self.payment_id + mock_payment.amount = 1000 + mock_payment.currency = "EUR" + mock_payment.status = PaymentStatus("SUCCEEDED") + mock_get.return_value = mock_payment + + # Call the API + result = self.client.payments.get(self.payment_id) + + # Verify the result + self.assertEqual(result.id, self.payment_id) + self.assertEqual(result.amount, 1000) + self.assertEqual(result.currency, "EUR") + self.assertEqual(result.status, PaymentStatus("SUCCEEDED")) + + # Verify the mock was called with the correct arguments + mock_get.assert_called_once_with(self.payment_id) + + @patch("Monei.api.payments_api.PaymentsApi.confirm") + def test_confirm_payment(self, mock_confirm): + """Test confirming a payment.""" + # Setup mock response + mock_payment = MagicMock() + mock_payment.id = self.payment_id + mock_payment.amount = 1000 + mock_payment.currency = "EUR" + mock_payment.status = PaymentStatus("SUCCEEDED") + mock_confirm.return_value = mock_payment + + # Create confirm request + confirm_request = { + "paymentMethod": { + "type": "CARD", + "card": { + "number": "4242424242424242", + "expiryMonth": 12, + "expiryYear": 2025, + "cvc": "123", + }, + } + } + + # Call the API + result = self.client.payments.confirm(self.payment_id, confirm_request) + + # Verify the result + self.assertEqual(result.id, self.payment_id) + self.assertEqual(result.amount, 1000) + self.assertEqual(result.currency, "EUR") + self.assertEqual(result.status, PaymentStatus("SUCCEEDED")) + + # Verify the mock was called with the correct arguments + mock_confirm.assert_called_once() + + @patch("Monei.api.payments_api.PaymentsApi.capture") + def test_capture_payment(self, mock_capture): + """Test capturing a payment.""" + # Setup mock response + mock_payment = MagicMock() + mock_payment.id = self.payment_id + mock_payment.amount = 1000 + mock_payment.currency = "EUR" + mock_payment.status = PaymentStatus("SUCCEEDED") + mock_capture.return_value = mock_payment + + # Create capture request + capture_request = {"amount": 1000} + + # Call the API + result = self.client.payments.capture(self.payment_id, capture_request) + + # Verify the result + self.assertEqual(result.id, self.payment_id) + self.assertEqual(result.amount, 1000) + self.assertEqual(result.currency, "EUR") + self.assertEqual(result.status, PaymentStatus("SUCCEEDED")) + + # Verify the mock was called with the correct arguments + mock_capture.assert_called_once() + + @patch("Monei.api.payments_api.PaymentsApi.cancel") + def test_cancel_payment(self, mock_cancel): + """Test cancelling a payment.""" + # Setup mock response + mock_payment = MagicMock() + mock_payment.id = self.payment_id + mock_payment.amount = 1000 + mock_payment.currency = "EUR" + mock_payment.status = PaymentStatus("CANCELED") + mock_cancel.return_value = mock_payment + + # Create cancel request + cancel_request = {"reason": "CUSTOMER_CANCEL"} + + # Call the API + result = self.client.payments.cancel(self.payment_id, cancel_request) + + # Verify the result + self.assertEqual(result.id, self.payment_id) + self.assertEqual(result.amount, 1000) + self.assertEqual(result.currency, "EUR") + self.assertEqual(result.status, PaymentStatus("CANCELED")) + + # Verify the mock was called with the correct arguments + mock_cancel.assert_called_once() + + @patch("Monei.api.payments_api.PaymentsApi.refund") + def test_refund_payment(self, mock_refund): + """Test refunding a payment.""" + # Setup mock response + mock_payment = MagicMock() + mock_payment.id = self.payment_id + mock_payment.amount = 1000 + mock_payment.currency = "EUR" + mock_payment.status = PaymentStatus("SUCCEEDED") + mock_refund.return_value = mock_payment + + # Create refund request + refund_request = {"amount": 500, "reason": "CUSTOMER_REQUEST"} + + # Call the API + result = self.client.payments.refund(self.payment_id, refund_request) + + # Verify the result + self.assertEqual(result.id, self.payment_id) + self.assertEqual(result.amount, 1000) + self.assertEqual(result.currency, "EUR") + self.assertEqual(result.status, PaymentStatus("SUCCEEDED")) + + # Verify the mock was called with the correct arguments + mock_refund.assert_called_once() + + @patch("Monei.api.payments_api.PaymentsApi.recurring") + def test_recurring_payment(self, mock_recurring): + """Test creating a recurring payment.""" + # Setup mock response + mock_payment = MagicMock() + mock_payment.id = self.payment_id + mock_payment.amount = 1000 + mock_payment.currency = "EUR" + mock_payment.status = PaymentStatus("SUCCEEDED") + mock_recurring.return_value = mock_payment + + # Create recurring request + recurring_request = { + "amount": 1000, + "currency": "EUR", + "orderId": "order_123", + "description": "Recurring payment", + "paymentMethodId": "pm_123456789", + } + + # Call the API + sequence_id = "seq_123456789" + result = self.client.payments.recurring(sequence_id, recurring_request) + + # Verify the result + self.assertEqual(result.id, self.payment_id) + self.assertEqual(result.amount, 1000) + self.assertEqual(result.currency, "EUR") + self.assertEqual(result.status, PaymentStatus("SUCCEEDED")) + + # Verify the mock was called with the correct arguments + mock_recurring.assert_called_once() + + @patch("Monei.api.payments_api.PaymentsApi.send_link") + def test_send_payment_link(self, mock_send_link): + """Test sending a payment link.""" + # Setup mock response + mock_response = MagicMock() + mock_response.success = True + mock_send_link.return_value = mock_response + + # Create send link request + send_link_request = { + "customerEmail": "customer@example.com", + "customerPhone": "+34600000000", + } + + # Call the API + result = self.client.payments.send_link(self.payment_id, send_link_request) + + # Verify the result + self.assertTrue(result.success) + + # Verify the mock was called with the correct arguments + mock_send_link.assert_called_once() + + @patch("Monei.api.payments_api.PaymentsApi.send_receipt") + def test_send_payment_receipt(self, mock_send_receipt): + """Test sending a payment receipt.""" + # Setup mock response + mock_response = MagicMock() + mock_response.success = True + mock_send_receipt.return_value = mock_response + + # Create send receipt request + send_receipt_request = {"customerEmail": "customer@example.com"} + + # Call the API + result = self.client.payments.send_receipt(self.payment_id, send_receipt_request) + + # Verify the result + self.assertTrue(result.success) + + # Verify the mock was called with the correct arguments + mock_send_receipt.assert_called_once() + + @patch("Monei.api.payments_api.PaymentsApi.send_request") + def test_send_payment_request(self, mock_send_request): + """Test sending a payment request.""" + # Setup mock response + mock_payment = MagicMock() + mock_payment.id = self.payment_id + mock_payment.amount = 1000 + mock_payment.currency = "EUR" + mock_payment.status = PaymentStatus("PENDING") + mock_send_request.return_value = mock_payment + + # Create send request request + send_request_request = {"phoneNumber": "+34600000000"} + + # Call the API + result = self.client.payments.send_request(self.payment_id, send_request_request) + + # Verify the result + self.assertEqual(result.id, self.payment_id) + self.assertEqual(result.amount, 1000) + self.assertEqual(result.currency, "EUR") + self.assertEqual(result.status, PaymentStatus("PENDING")) + + # Verify the mock was called with the correct arguments + mock_send_request.assert_called_once() + + +if __name__ == "__main__": + unittest.main() diff --git a/test/test_recurring_payment_request.py b/test/test_recurring_payment_request.py index 7576695..fdae67b 100644 --- a/test/test_recurring_payment_request.py +++ b/test/test_recurring_payment_request.py @@ -1,20 +1,27 @@ -# coding: utf-8 - """ MONEI API v1 -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

- - The version of the OpenAPI document: 1.5.1 - Generated by OpenAPI Generator (https://openapi-generator.tech) +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - Do not edit the class manually. -""" # noqa: E501 + The version of the OpenAPI document: 1.5.3 + Generated by: https://openapi-generator.tech +""" +import sys import unittest -from Monei.models.recurring_payment_request import RecurringPaymentRequest +import Monei +from Monei.model.payment_billing_details import PaymentBillingDetails +from Monei.model.payment_customer import PaymentCustomer +from Monei.model.payment_shipping_details import PaymentShippingDetails +from Monei.model.payment_transaction_type import PaymentTransactionType +globals()['PaymentBillingDetails'] = PaymentBillingDetails +globals()['PaymentCustomer'] = PaymentCustomer +globals()['PaymentShippingDetails'] = PaymentShippingDetails +globals()['PaymentTransactionType'] = PaymentTransactionType +from Monei.model.recurring_payment_request import RecurringPaymentRequest + class TestRecurringPaymentRequest(unittest.TestCase): """RecurringPaymentRequest unit test stubs""" @@ -25,63 +32,12 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional) -> RecurringPaymentRequest: - """Test RecurringPaymentRequest - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `RecurringPaymentRequest` - """ - model = RecurringPaymentRequest() - if include_optional: - return RecurringPaymentRequest( - order_id = '14379133960355', - amount = 110, - transaction_type = 'SALE', - description = 'Test Shop - #84370745531439', - customer = Monei.models.payment_customer.Payment-Customer( - email = 'john.doe@example.com', - name = 'John Doe', - phone = '', ), - billing_details = Monei.models.payment_billing_details.Payment-BillingDetails( - name = 'John Doe', - email = 'john.doe@example.com', - phone = '', - company = '', - tax_id = '', - address = Monei.models.address.Address( - country = 'ES', - city = 'Málaga', - line1 = 'Fake Street 123', - line2 = '', - zip = '1234', - state = 'Málaga', ), ), - shipping_details = Monei.models.payment_shipping_details.Payment-ShippingDetails( - name = 'John Doe', - email = 'john.doe@example.com', - phone = '', - company = '', - tax_id = '', - address = Monei.models.address.Address( - country = 'ES', - city = 'Málaga', - line1 = 'Fake Street 123', - line2 = '', - zip = '1234', - state = 'Málaga', ), ), - callback_url = 'https://example.com/checkout/callback', - metadata = {"systemId":"12345"} - ) - else: - return RecurringPaymentRequest( - order_id = '14379133960355', - ) - """ - def testRecurringPaymentRequest(self): """Test RecurringPaymentRequest""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) + # FIXME: construct object with mandatory attributes with example values + # model = RecurringPaymentRequest() # noqa: E501 + pass + if __name__ == '__main__': unittest.main() diff --git a/test/test_refund_payment_request.py b/test/test_refund_payment_request.py index 1db0922..4140483 100644 --- a/test/test_refund_payment_request.py +++ b/test/test_refund_payment_request.py @@ -1,20 +1,21 @@ -# coding: utf-8 - """ MONEI API v1 -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

- - The version of the OpenAPI document: 1.5.1 - Generated by OpenAPI Generator (https://openapi-generator.tech) +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - Do not edit the class manually. -""" # noqa: E501 + The version of the OpenAPI document: 1.5.3 + Generated by: https://openapi-generator.tech +""" +import sys import unittest -from Monei.models.refund_payment_request import RefundPaymentRequest +import Monei +from Monei.model.payment_refund_reason import PaymentRefundReason +globals()['PaymentRefundReason'] = PaymentRefundReason +from Monei.model.refund_payment_request import RefundPaymentRequest + class TestRefundPaymentRequest(unittest.TestCase): """RefundPaymentRequest unit test stubs""" @@ -25,28 +26,12 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional) -> RefundPaymentRequest: - """Test RefundPaymentRequest - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `RefundPaymentRequest` - """ - model = RefundPaymentRequest() - if include_optional: - return RefundPaymentRequest( - amount = 110, - refund_reason = 'duplicated' - ) - else: - return RefundPaymentRequest( - ) - """ - def testRefundPaymentRequest(self): """Test RefundPaymentRequest""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) + # FIXME: construct object with mandatory attributes with example values + # model = RefundPaymentRequest() # noqa: E501 + pass + if __name__ == '__main__': unittest.main() diff --git a/test/test_register_apple_pay_domain_request.py b/test/test_register_apple_pay_domain_request.py index 0a6f8ec..857f983 100644 --- a/test/test_register_apple_pay_domain_request.py +++ b/test/test_register_apple_pay_domain_request.py @@ -1,20 +1,19 @@ -# coding: utf-8 - """ MONEI API v1 -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

- - The version of the OpenAPI document: 1.5.1 - Generated by OpenAPI Generator (https://openapi-generator.tech) +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - Do not edit the class manually. -""" # noqa: E501 + The version of the OpenAPI document: 1.5.3 + Generated by: https://openapi-generator.tech +""" +import sys import unittest -from Monei.models.register_apple_pay_domain_request import RegisterApplePayDomainRequest +import Monei +from Monei.model.register_apple_pay_domain_request import RegisterApplePayDomainRequest + class TestRegisterApplePayDomainRequest(unittest.TestCase): """RegisterApplePayDomainRequest unit test stubs""" @@ -25,28 +24,12 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional) -> RegisterApplePayDomainRequest: - """Test RegisterApplePayDomainRequest - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `RegisterApplePayDomainRequest` - """ - model = RegisterApplePayDomainRequest() - if include_optional: - return RegisterApplePayDomainRequest( - domain_name = 'example.com' - ) - else: - return RegisterApplePayDomainRequest( - domain_name = 'example.com', - ) - """ - def testRegisterApplePayDomainRequest(self): """Test RegisterApplePayDomainRequest""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) + # FIXME: construct object with mandatory attributes with example values + # model = RegisterApplePayDomainRequest() # noqa: E501 + pass + if __name__ == '__main__': unittest.main() diff --git a/test/test_send_payment_link_request.py b/test/test_send_payment_link_request.py index 0ccb7c5..7040db3 100644 --- a/test/test_send_payment_link_request.py +++ b/test/test_send_payment_link_request.py @@ -1,20 +1,23 @@ -# coding: utf-8 - """ MONEI API v1 -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

- - The version of the OpenAPI document: 1.5.1 - Generated by OpenAPI Generator (https://openapi-generator.tech) +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - Do not edit the class manually. -""" # noqa: E501 + The version of the OpenAPI document: 1.5.3 + Generated by: https://openapi-generator.tech +""" +import sys import unittest -from Monei.models.send_payment_link_request import SendPaymentLinkRequest +import Monei +from Monei.model.payment_message_channel import PaymentMessageChannel +from Monei.model.payment_message_language import PaymentMessageLanguage +globals()['PaymentMessageChannel'] = PaymentMessageChannel +globals()['PaymentMessageLanguage'] = PaymentMessageLanguage +from Monei.model.send_payment_link_request import SendPaymentLinkRequest + class TestSendPaymentLinkRequest(unittest.TestCase): """SendPaymentLinkRequest unit test stubs""" @@ -25,30 +28,12 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional) -> SendPaymentLinkRequest: - """Test SendPaymentLinkRequest - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `SendPaymentLinkRequest` - """ - model = SendPaymentLinkRequest() - if include_optional: - return SendPaymentLinkRequest( - customer_email = 'john.doe@example.com', - customer_phone = '+34500000000', - channel = 'EMAIL', - language = 'en' - ) - else: - return SendPaymentLinkRequest( - ) - """ - def testSendPaymentLinkRequest(self): """Test SendPaymentLinkRequest""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) + # FIXME: construct object with mandatory attributes with example values + # model = SendPaymentLinkRequest() # noqa: E501 + pass + if __name__ == '__main__': unittest.main() diff --git a/test/test_send_payment_receipt_request.py b/test/test_send_payment_receipt_request.py index fafc9cd..c39e3be 100644 --- a/test/test_send_payment_receipt_request.py +++ b/test/test_send_payment_receipt_request.py @@ -1,20 +1,23 @@ -# coding: utf-8 - """ MONEI API v1 -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

- - The version of the OpenAPI document: 1.5.1 - Generated by OpenAPI Generator (https://openapi-generator.tech) +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - Do not edit the class manually. -""" # noqa: E501 + The version of the OpenAPI document: 1.5.3 + Generated by: https://openapi-generator.tech +""" +import sys import unittest -from Monei.models.send_payment_receipt_request import SendPaymentReceiptRequest +import Monei +from Monei.model.payment_message_channel import PaymentMessageChannel +from Monei.model.payment_message_language import PaymentMessageLanguage +globals()['PaymentMessageChannel'] = PaymentMessageChannel +globals()['PaymentMessageLanguage'] = PaymentMessageLanguage +from Monei.model.send_payment_receipt_request import SendPaymentReceiptRequest + class TestSendPaymentReceiptRequest(unittest.TestCase): """SendPaymentReceiptRequest unit test stubs""" @@ -25,30 +28,12 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional) -> SendPaymentReceiptRequest: - """Test SendPaymentReceiptRequest - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `SendPaymentReceiptRequest` - """ - model = SendPaymentReceiptRequest() - if include_optional: - return SendPaymentReceiptRequest( - customer_email = 'john.doe@example.com', - customer_phone = '+34500000000', - channel = 'EMAIL', - language = 'en' - ) - else: - return SendPaymentReceiptRequest( - ) - """ - def testSendPaymentReceiptRequest(self): """Test SendPaymentReceiptRequest""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) + # FIXME: construct object with mandatory attributes with example values + # model = SendPaymentReceiptRequest() # noqa: E501 + pass + if __name__ == '__main__': unittest.main() diff --git a/test/test_send_payment_request_request.py b/test/test_send_payment_request_request.py index c0306a5..9aad94e 100644 --- a/test/test_send_payment_request_request.py +++ b/test/test_send_payment_request_request.py @@ -1,20 +1,21 @@ -# coding: utf-8 - """ MONEI API v1 -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

- - The version of the OpenAPI document: 1.5.1 - Generated by OpenAPI Generator (https://openapi-generator.tech) +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - Do not edit the class manually. -""" # noqa: E501 + The version of the OpenAPI document: 1.5.3 + Generated by: https://openapi-generator.tech +""" +import sys import unittest -from Monei.models.send_payment_request_request import SendPaymentRequestRequest +import Monei +from Monei.model.payment_message_language import PaymentMessageLanguage +globals()['PaymentMessageLanguage'] = PaymentMessageLanguage +from Monei.model.send_payment_request_request import SendPaymentRequestRequest + class TestSendPaymentRequestRequest(unittest.TestCase): """SendPaymentRequestRequest unit test stubs""" @@ -25,29 +26,12 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional) -> SendPaymentRequestRequest: - """Test SendPaymentRequestRequest - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `SendPaymentRequestRequest` - """ - model = SendPaymentRequestRequest() - if include_optional: - return SendPaymentRequestRequest( - phone_number = '+34500000000', - language = 'en' - ) - else: - return SendPaymentRequestRequest( - phone_number = '+34500000000', - ) - """ - def testSendPaymentRequestRequest(self): """Test SendPaymentRequestRequest""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) + # FIXME: construct object with mandatory attributes with example values + # model = SendPaymentRequestRequest() # noqa: E501 + pass + if __name__ == '__main__': unittest.main() diff --git a/test/test_send_subscription_link_request.py b/test/test_send_subscription_link_request.py index 9797a1e..96a2eee 100644 --- a/test/test_send_subscription_link_request.py +++ b/test/test_send_subscription_link_request.py @@ -1,20 +1,19 @@ -# coding: utf-8 - """ MONEI API v1 -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

- - The version of the OpenAPI document: 1.5.1 - Generated by OpenAPI Generator (https://openapi-generator.tech) +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - Do not edit the class manually. -""" # noqa: E501 + The version of the OpenAPI document: 1.5.3 + Generated by: https://openapi-generator.tech +""" +import sys import unittest -from Monei.models.send_subscription_link_request import SendSubscriptionLinkRequest +import Monei +from Monei.model.send_subscription_link_request import SendSubscriptionLinkRequest + class TestSendSubscriptionLinkRequest(unittest.TestCase): """SendSubscriptionLinkRequest unit test stubs""" @@ -25,30 +24,12 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional) -> SendSubscriptionLinkRequest: - """Test SendSubscriptionLinkRequest - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `SendSubscriptionLinkRequest` - """ - model = SendSubscriptionLinkRequest() - if include_optional: - return SendSubscriptionLinkRequest( - customer_email = '', - customer_phone = '', - channel = 'email', - language = '' - ) - else: - return SendSubscriptionLinkRequest( - ) - """ - def testSendSubscriptionLinkRequest(self): """Test SendSubscriptionLinkRequest""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) + # FIXME: construct object with mandatory attributes with example values + # model = SendSubscriptionLinkRequest() # noqa: E501 + pass + if __name__ == '__main__': unittest.main() diff --git a/test/test_send_subscription_status_request.py b/test/test_send_subscription_status_request.py index 00cfe13..f66c972 100644 --- a/test/test_send_subscription_status_request.py +++ b/test/test_send_subscription_status_request.py @@ -1,20 +1,19 @@ -# coding: utf-8 - """ MONEI API v1 -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

- - The version of the OpenAPI document: 1.5.1 - Generated by OpenAPI Generator (https://openapi-generator.tech) +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - Do not edit the class manually. -""" # noqa: E501 + The version of the OpenAPI document: 1.5.3 + Generated by: https://openapi-generator.tech +""" +import sys import unittest -from Monei.models.send_subscription_status_request import SendSubscriptionStatusRequest +import Monei +from Monei.model.send_subscription_status_request import SendSubscriptionStatusRequest + class TestSendSubscriptionStatusRequest(unittest.TestCase): """SendSubscriptionStatusRequest unit test stubs""" @@ -25,30 +24,12 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional) -> SendSubscriptionStatusRequest: - """Test SendSubscriptionStatusRequest - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `SendSubscriptionStatusRequest` - """ - model = SendSubscriptionStatusRequest() - if include_optional: - return SendSubscriptionStatusRequest( - customer_email = '', - customer_phone = '', - channel = 'email', - language = '' - ) - else: - return SendSubscriptionStatusRequest( - ) - """ - def testSendSubscriptionStatusRequest(self): """Test SendSubscriptionStatusRequest""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) + # FIXME: construct object with mandatory attributes with example values + # model = SendSubscriptionStatusRequest() # noqa: E501 + pass + if __name__ == '__main__': unittest.main() diff --git a/test/test_subscription.py b/test/test_subscription.py index 1ecad01..103ba6d 100644 --- a/test/test_subscription.py +++ b/test/test_subscription.py @@ -1,20 +1,37 @@ -# coding: utf-8 - """ MONEI API v1 -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

- - The version of the OpenAPI document: 1.5.1 - Generated by OpenAPI Generator (https://openapi-generator.tech) +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - Do not edit the class manually. -""" # noqa: E501 + The version of the OpenAPI document: 1.5.3 + Generated by: https://openapi-generator.tech +""" +import sys import unittest -from Monei.models.subscription import Subscription +import Monei +from Monei.model.payment_billing_details import PaymentBillingDetails +from Monei.model.payment_customer import PaymentCustomer +from Monei.model.payment_shipping_details import PaymentShippingDetails +from Monei.model.payment_trace_details import PaymentTraceDetails +from Monei.model.subscription_interval import SubscriptionInterval +from Monei.model.subscription_last_payment import SubscriptionLastPayment +from Monei.model.subscription_payment_method import SubscriptionPaymentMethod +from Monei.model.subscription_retry_schedule import SubscriptionRetrySchedule +from Monei.model.subscription_status import SubscriptionStatus +globals()['PaymentBillingDetails'] = PaymentBillingDetails +globals()['PaymentCustomer'] = PaymentCustomer +globals()['PaymentShippingDetails'] = PaymentShippingDetails +globals()['PaymentTraceDetails'] = PaymentTraceDetails +globals()['SubscriptionInterval'] = SubscriptionInterval +globals()['SubscriptionLastPayment'] = SubscriptionLastPayment +globals()['SubscriptionPaymentMethod'] = SubscriptionPaymentMethod +globals()['SubscriptionRetrySchedule'] = SubscriptionRetrySchedule +globals()['SubscriptionStatus'] = SubscriptionStatus +from Monei.model.subscription import Subscription + class TestSubscription(unittest.TestCase): """Subscription unit test stubs""" @@ -25,120 +42,12 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional) -> Subscription: - """Test Subscription - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `Subscription` - """ - model = Subscription() - if include_optional: - return Subscription( - id = '575bcd84-09fc-4a6e-8c4c-f88b8eb90bfa', - amount = 110, - currency = 'EUR', - description = 'MoonMail Monthly Lite', - account_id = 'aa9333ba-82de-400c-9ae7-087b9f8d2242', - livemode = False, - status = 'PENDING', - customer = Monei.models.payment_customer.Payment-Customer( - email = 'john.doe@example.com', - name = 'John Doe', - phone = '', ), - billing_details = Monei.models.payment_billing_details.Payment-BillingDetails( - name = 'John Doe', - email = 'john.doe@example.com', - phone = '', - company = '', - tax_id = '', - address = Monei.models.address.Address( - country = 'ES', - city = 'Málaga', - line1 = 'Fake Street 123', - line2 = '', - zip = '1234', - state = 'Málaga', ), ), - shipping_details = Monei.models.payment_shipping_details.Payment-ShippingDetails( - name = 'John Doe', - email = 'john.doe@example.com', - phone = '', - company = '', - tax_id = '', - address = Monei.models.address.Address( - country = 'ES', - city = 'Málaga', - line1 = 'Fake Street 123', - line2 = '', - zip = '1234', - state = 'Málaga', ), ), - interval = 'month', - interval_count = 1, - pause_interval_count = 1, - last_order_id = '14379133960355', - last_payment = Monei.models.subscription_last_payment.Subscription-LastPayment( - id = 'af6029f80f5fc73a8ad2753eea0b1be0', - status = 'PENDING', - status_code = '', - status_message = '', ), - payment_method = Monei.models.subscription_payment_method.Subscription-PaymentMethod( - method = 'card', - card = Monei.models.payment_payment_method_card.Payment-PaymentMethodCard( - country = 'ES', - brand = 'visa', - type = 'credit', - three_d_secure = False, - three_d_secure_version = '2.1.0', - three_d_secure_flow = 'CHALLENGE', - expiration = 2048544000, - last4 = '0004', - tokenization_method = 'applePay', - cardholder_name = 'John Doe', - cardholder_email = 'email@example.com', ), ), - current_period_start = 1636366897, - current_period_end = 1636366897, - trial_period_end = 1636366897, - next_payment_at = 1636366897, - retry_count = 1, - retry_schedule = [{"interval":"day","intervalCount":1},{"interval":"day","intervalCount":3},{"interval":"week","intervalCount":1}], - cancel_at_period_end = False, - pause_at_period_end = False, - trace_details = Monei.models.payment_trace_details.Payment-TraceDetails( - ip = '100.100.200.100', - country_code = 'ES', - lang = 'es', - device_type = 'desktop', - device_model = '', - browser = 'Chrome', - browser_version = '83.0.4103.116', - os = 'Mac OS', - os_version = '10.15.4', - source = 'MONEI/PHP', - source_version = '0.1.2', - user_agent = 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) ...', - browser_accept = 'text/html,application/xhtml+xml,application/json', - browser_color_depth = 24, - browser_screen_height = 1152, - browser_screen_width = 2048, - browser_timezone_offset = 'string', - user_id = '', - user_email = 'user@example.com', ), - sequence_id = '62b23b9f3627cc38b08ff471ccd313ad', - callback_url = 'https://example.com/subscriptions/callback', - payment_callback_url = 'https://example.com/payments/callback', - metadata = {"systemId":"12345"}, - created_at = 1636366897, - updated_at = 1636366897 - ) - else: - return Subscription( - ) - """ - def testSubscription(self): """Test Subscription""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) + # FIXME: construct object with mandatory attributes with example values + # model = Subscription() # noqa: E501 + pass + if __name__ == '__main__': unittest.main() diff --git a/test/test_subscription_interval.py b/test/test_subscription_interval.py index c3411bf..cac9b07 100644 --- a/test/test_subscription_interval.py +++ b/test/test_subscription_interval.py @@ -1,20 +1,19 @@ -# coding: utf-8 - """ MONEI API v1 -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

- - The version of the OpenAPI document: 1.5.1 - Generated by OpenAPI Generator (https://openapi-generator.tech) +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - Do not edit the class manually. -""" # noqa: E501 + The version of the OpenAPI document: 1.5.3 + Generated by: https://openapi-generator.tech +""" +import sys import unittest -from Monei.models.subscription_interval import SubscriptionInterval +import Monei +from Monei.model.subscription_interval import SubscriptionInterval + class TestSubscriptionInterval(unittest.TestCase): """SubscriptionInterval unit test stubs""" @@ -27,7 +26,10 @@ def tearDown(self): def testSubscriptionInterval(self): """Test SubscriptionInterval""" - # inst = SubscriptionInterval() + # FIXME: construct object with mandatory attributes with example values + # model = SubscriptionInterval() # noqa: E501 + pass + if __name__ == '__main__': unittest.main() diff --git a/test/test_subscription_last_payment.py b/test/test_subscription_last_payment.py index 3de7c60..a98b54a 100644 --- a/test/test_subscription_last_payment.py +++ b/test/test_subscription_last_payment.py @@ -1,20 +1,21 @@ -# coding: utf-8 - """ MONEI API v1 -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

- - The version of the OpenAPI document: 1.5.1 - Generated by OpenAPI Generator (https://openapi-generator.tech) +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - Do not edit the class manually. -""" # noqa: E501 + The version of the OpenAPI document: 1.5.3 + Generated by: https://openapi-generator.tech +""" +import sys import unittest -from Monei.models.subscription_last_payment import SubscriptionLastPayment +import Monei +from Monei.model.payment_status import PaymentStatus +globals()['PaymentStatus'] = PaymentStatus +from Monei.model.subscription_last_payment import SubscriptionLastPayment + class TestSubscriptionLastPayment(unittest.TestCase): """SubscriptionLastPayment unit test stubs""" @@ -25,30 +26,12 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional) -> SubscriptionLastPayment: - """Test SubscriptionLastPayment - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `SubscriptionLastPayment` - """ - model = SubscriptionLastPayment() - if include_optional: - return SubscriptionLastPayment( - id = 'af6029f80f5fc73a8ad2753eea0b1be0', - status = 'PENDING', - status_code = '', - status_message = '' - ) - else: - return SubscriptionLastPayment( - ) - """ - def testSubscriptionLastPayment(self): """Test SubscriptionLastPayment""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) + # FIXME: construct object with mandatory attributes with example values + # model = SubscriptionLastPayment() # noqa: E501 + pass + if __name__ == '__main__': unittest.main() diff --git a/test/test_subscription_payment_method.py b/test/test_subscription_payment_method.py index 44c25d4..fab9b32 100644 --- a/test/test_subscription_payment_method.py +++ b/test/test_subscription_payment_method.py @@ -1,20 +1,21 @@ -# coding: utf-8 - """ MONEI API v1 -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

- - The version of the OpenAPI document: 1.5.1 - Generated by OpenAPI Generator (https://openapi-generator.tech) +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - Do not edit the class manually. -""" # noqa: E501 + The version of the OpenAPI document: 1.5.3 + Generated by: https://openapi-generator.tech +""" +import sys import unittest -from Monei.models.subscription_payment_method import SubscriptionPaymentMethod +import Monei +from Monei.model.payment_payment_method_card import PaymentPaymentMethodCard +globals()['PaymentPaymentMethodCard'] = PaymentPaymentMethodCard +from Monei.model.subscription_payment_method import SubscriptionPaymentMethod + class TestSubscriptionPaymentMethod(unittest.TestCase): """SubscriptionPaymentMethod unit test stubs""" @@ -25,39 +26,12 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional) -> SubscriptionPaymentMethod: - """Test SubscriptionPaymentMethod - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `SubscriptionPaymentMethod` - """ - model = SubscriptionPaymentMethod() - if include_optional: - return SubscriptionPaymentMethod( - method = 'card', - card = Monei.models.payment_payment_method_card.Payment-PaymentMethodCard( - country = 'ES', - brand = 'visa', - type = 'credit', - three_d_secure = False, - three_d_secure_version = '2.1.0', - three_d_secure_flow = 'CHALLENGE', - expiration = 2048544000, - last4 = '0004', - tokenization_method = 'applePay', - cardholder_name = 'John Doe', - cardholder_email = 'email@example.com', ) - ) - else: - return SubscriptionPaymentMethod( - ) - """ - def testSubscriptionPaymentMethod(self): """Test SubscriptionPaymentMethod""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) + # FIXME: construct object with mandatory attributes with example values + # model = SubscriptionPaymentMethod() # noqa: E501 + pass + if __name__ == '__main__': unittest.main() diff --git a/test/test_subscription_payment_method_card.py b/test/test_subscription_payment_method_card.py index dcd769f..595eb9c 100644 --- a/test/test_subscription_payment_method_card.py +++ b/test/test_subscription_payment_method_card.py @@ -1,20 +1,19 @@ -# coding: utf-8 - """ MONEI API v1 -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

- - The version of the OpenAPI document: 1.5.1 - Generated by OpenAPI Generator (https://openapi-generator.tech) +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - Do not edit the class manually. -""" # noqa: E501 + The version of the OpenAPI document: 1.5.3 + Generated by: https://openapi-generator.tech +""" +import sys import unittest -from Monei.models.subscription_payment_method_card import SubscriptionPaymentMethodCard +import Monei +from Monei.model.subscription_payment_method_card import SubscriptionPaymentMethodCard + class TestSubscriptionPaymentMethodCard(unittest.TestCase): """SubscriptionPaymentMethodCard unit test stubs""" @@ -25,33 +24,12 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional) -> SubscriptionPaymentMethodCard: - """Test SubscriptionPaymentMethodCard - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `SubscriptionPaymentMethodCard` - """ - model = SubscriptionPaymentMethodCard() - if include_optional: - return SubscriptionPaymentMethodCard( - country = 'ES', - brand = 'visa', - type = 'credit', - three_d_secure = False, - three_d_secure_version = '2.1.0', - expiration = 2048544000, - last4 = '0004' - ) - else: - return SubscriptionPaymentMethodCard( - ) - """ - def testSubscriptionPaymentMethodCard(self): """Test SubscriptionPaymentMethodCard""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) + # FIXME: construct object with mandatory attributes with example values + # model = SubscriptionPaymentMethodCard() # noqa: E501 + pass + if __name__ == '__main__': unittest.main() diff --git a/test/test_subscription_retry_schedule.py b/test/test_subscription_retry_schedule.py new file mode 100644 index 0000000..706f635 --- /dev/null +++ b/test/test_subscription_retry_schedule.py @@ -0,0 +1,37 @@ +""" + MONEI API v1 + +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 + + The version of the OpenAPI document: 1.5.3 + Generated by: https://openapi-generator.tech +""" + + +import sys +import unittest + +import Monei +from Monei.model.subscription_retry_schedule_inner import SubscriptionRetryScheduleInner +globals()['SubscriptionRetryScheduleInner'] = SubscriptionRetryScheduleInner +from Monei.model.subscription_retry_schedule import SubscriptionRetrySchedule + + +class TestSubscriptionRetrySchedule(unittest.TestCase): + """SubscriptionRetrySchedule unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testSubscriptionRetrySchedule(self): + """Test SubscriptionRetrySchedule""" + # FIXME: construct object with mandatory attributes with example values + # model = SubscriptionRetrySchedule() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_subscription_retry_schedule_inner.py b/test/test_subscription_retry_schedule_inner.py index 4c66918..0ae040f 100644 --- a/test/test_subscription_retry_schedule_inner.py +++ b/test/test_subscription_retry_schedule_inner.py @@ -1,20 +1,19 @@ -# coding: utf-8 - """ MONEI API v1 -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

- - The version of the OpenAPI document: 1.5.1 - Generated by OpenAPI Generator (https://openapi-generator.tech) +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - Do not edit the class manually. -""" # noqa: E501 + The version of the OpenAPI document: 1.5.3 + Generated by: https://openapi-generator.tech +""" +import sys import unittest -from Monei.models.subscription_retry_schedule_inner import SubscriptionRetryScheduleInner +import Monei +from Monei.model.subscription_retry_schedule_inner import SubscriptionRetryScheduleInner + class TestSubscriptionRetryScheduleInner(unittest.TestCase): """SubscriptionRetryScheduleInner unit test stubs""" @@ -25,30 +24,12 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional) -> SubscriptionRetryScheduleInner: - """Test SubscriptionRetryScheduleInner - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `SubscriptionRetryScheduleInner` - """ - model = SubscriptionRetryScheduleInner() - if include_optional: - return SubscriptionRetryScheduleInner( - interval = 'day', - interval_count = 3 - ) - else: - return SubscriptionRetryScheduleInner( - interval = 'day', - interval_count = 3, - ) - """ - def testSubscriptionRetryScheduleInner(self): """Test SubscriptionRetryScheduleInner""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) + # FIXME: construct object with mandatory attributes with example values + # model = SubscriptionRetryScheduleInner() # noqa: E501 + pass + if __name__ == '__main__': unittest.main() diff --git a/test/test_subscription_status.py b/test/test_subscription_status.py index c215306..6d8f200 100644 --- a/test/test_subscription_status.py +++ b/test/test_subscription_status.py @@ -1,20 +1,19 @@ -# coding: utf-8 - """ MONEI API v1 -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

- - The version of the OpenAPI document: 1.5.1 - Generated by OpenAPI Generator (https://openapi-generator.tech) +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - Do not edit the class manually. -""" # noqa: E501 + The version of the OpenAPI document: 1.5.3 + Generated by: https://openapi-generator.tech +""" +import sys import unittest -from Monei.models.subscription_status import SubscriptionStatus +import Monei +from Monei.model.subscription_status import SubscriptionStatus + class TestSubscriptionStatus(unittest.TestCase): """SubscriptionStatus unit test stubs""" @@ -27,7 +26,10 @@ def tearDown(self): def testSubscriptionStatus(self): """Test SubscriptionStatus""" - # inst = SubscriptionStatus() + # FIXME: construct object with mandatory attributes with example values + # model = SubscriptionStatus() # noqa: E501 + pass + if __name__ == '__main__': unittest.main() diff --git a/test/test_subscriptions_api.py b/test/test_subscriptions_api.py index ad2d7de..9e062e1 100644 --- a/test/test_subscriptions_api.py +++ b/test/test_subscriptions_api.py @@ -1,313 +1,90 @@ -# coding: utf-8 - """ MONEI API v1 -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

- - The version of the OpenAPI document: 1.5.1 - Generated by OpenAPI Generator (https://openapi-generator.tech) +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - Do not edit the class manually. -""" # noqa: E501 + The version of the OpenAPI document: 1.5.3 + Generated by: https://openapi-generator.tech +""" import unittest -from unittest.mock import patch, MagicMock -from Monei.api.subscriptions_api import SubscriptionsApi -from Monei.api_client import ApiClient -from Monei.configuration import Configuration -from Monei.exceptions import ApiException +import Monei +from Monei.api.subscriptions_api import SubscriptionsApi # noqa: E501 class TestSubscriptionsApi(unittest.TestCase): """SubscriptionsApi unit test stubs""" - def setUp(self) -> None: - configuration = Configuration() - configuration.api_key = {"Authorization": "test_api_key"} - self.api_client = ApiClient(configuration) - self.api = SubscriptionsApi(self.api_client) + def setUp(self): + self.api = SubscriptionsApi() # noqa: E501 - def tearDown(self) -> None: + def tearDown(self): pass - @patch.object(ApiClient, "call_api") - def test_activate(self, mock_call_api) -> None: + def test_activate(self): """Test case for activate - Activate Subscription + Activate Subscription # noqa: E501 """ - # Configure the mock to return a successful response - mock_response = { - "id": "sub_123", - "customerId": "cus_123", - "paymentMethodId": "pm_123", - "planId": "plan_123", - "status": "ACTIVE" - } - mock_call_api.return_value = mock_response - - # Test the method - subscription_id = "sub_123" - activate_data = { - "paymentToken": "tok_123", - "sessionId": "sess_123" - } - response = self.api.activate(subscription_id, activate_data) - - # Verify the response - self.assertEqual(response, mock_response) - mock_call_api.assert_called_once() + pass - @patch.object(ApiClient, "call_api") - def test_cancel(self, mock_call_api) -> None: + def test_cancel(self): """Test case for cancel - Cancel Subscription + Cancel Subscription # noqa: E501 """ - # Configure the mock to return a successful response - mock_response = { - "id": "sub_123", - "customerId": "cus_123", - "paymentMethodId": "pm_123", - "planId": "plan_123", - "status": "CANCELED", - "cancelAtPeriodEnd": True - } - mock_call_api.return_value = mock_response - - # Test the method - subscription_id = "sub_123" - cancel_data = { - "cancelAtPeriodEnd": True - } - response = self.api.cancel(subscription_id, cancel_data) - - # Verify the response - self.assertEqual(response, mock_response) - mock_call_api.assert_called_once() + pass - @patch.object(ApiClient, "call_api") - def test_create(self, mock_call_api) -> None: + def test_create(self): """Test case for create - Create Subscription + Create Subscription # noqa: E501 """ - # Configure the mock to return a successful response - mock_response = { - "id": "sub_123", - "status": "ACTIVE", - "amount": 1000, - "currency": "EUR", - "interval": "month", - "customerId": "cus_123", - "paymentMethodId": "pm_123", - "planId": "plan_123", - "startDate": "2023-01-01" - } - mock_call_api.return_value = mock_response - - # Test the method - subscription_data = { - "amount": 1000, - "currency": "EUR", - "interval": "month", - "customerId": "cus_123", - "paymentMethodId": "pm_123", - "planId": "plan_123", - "startDate": "2023-01-01" - } - response = self.api.create(subscription_data) - - # Verify the response - self.assertEqual(response, mock_response) - mock_call_api.assert_called_once() + pass - @patch.object(ApiClient, "call_api") - def test_get(self, mock_call_api) -> None: + def test_get(self): """Test case for get - Get Subscription + Get Subscription # noqa: E501 """ - # Configure the mock to return a successful response - mock_response = { - "id": "sub_123", - "customerId": "cus_123", - "paymentMethodId": "pm_123", - "planId": "plan_123", - "status": "ACTIVE", - "amount": 1000, - "currency": "EUR", - "interval": "month" - } - mock_call_api.return_value = mock_response - - # Test the method - subscription_id = "sub_123" - response = self.api.get(subscription_id) - - # Verify the response - self.assertEqual(response, mock_response) - mock_call_api.assert_called_once() + pass - @patch.object(ApiClient, "call_api") - def test_pause(self, mock_call_api) -> None: + def test_pause(self): """Test case for pause - Pause Subscription + Pause Subscription # noqa: E501 """ - # Configure the mock to return a successful response - mock_response = { - "id": "sub_123", - "customerId": "cus_123", - "paymentMethodId": "pm_123", - "planId": "plan_123", - "status": "PAUSED", - "resumeAt": "2023-06-01" - } - mock_call_api.return_value = mock_response - - # Test the method - subscription_id = "sub_123" - pause_data = { - "pauseAtPeriodEnd": True, - "pauseIntervalCount": 1 - } - response = self.api.pause(subscription_id, pause_data) - - # Verify the response - self.assertEqual(response, mock_response) - mock_call_api.assert_called_once() + pass - @patch.object(ApiClient, "call_api") - def test_resume(self, mock_call_api) -> None: + def test_resume(self): """Test case for resume - Resume Subscription + Resume Subscription # noqa: E501 """ - # Configure the mock to return a successful response - mock_response = { - "id": "sub_123", - "customerId": "cus_123", - "paymentMethodId": "pm_123", - "planId": "plan_123", - "status": "ACTIVE" - } - mock_call_api.return_value = mock_response - - # Test the method - subscription_id = "sub_123" - response = self.api.resume(subscription_id) - - # Verify the response - self.assertEqual(response, mock_response) - mock_call_api.assert_called_once() + pass - @patch.object(ApiClient, "call_api") - def test_send_link(self, mock_call_api) -> None: + def test_send_link(self): """Test case for send_link - Send Subscription Link + Send Subscription Link # noqa: E501 """ - # Configure the mock to return a successful response - mock_response = { - "success": True - } - mock_call_api.return_value = mock_response - - # Test the method - subscription_id = "sub_123" - link_data = { - "customerEmail": "customer@example.com", - "customerPhone": "+34600000000" - } - response = self.api.send_link(subscription_id, link_data) - - # Verify the response - self.assertEqual(response, mock_response) - mock_call_api.assert_called_once() + pass - @patch.object(ApiClient, "call_api") - def test_send_status(self, mock_call_api) -> None: + def test_send_status(self): """Test case for send_status - Send Subscription Status + Send Subscription Status # noqa: E501 """ - # Configure the mock to return a successful response - mock_response = { - "success": True - } - mock_call_api.return_value = mock_response - - # Test the method - subscription_id = "sub_123" - status_data = { - "customerEmail": "customer@example.com" - } - response = self.api.send_status(subscription_id, status_data) - - # Verify the response - self.assertEqual(response, mock_response) - mock_call_api.assert_called_once() + pass - @patch.object(ApiClient, "call_api") - def test_update(self, mock_call_api) -> None: + def test_update(self): """Test case for update - Update Subscription + Update Subscription # noqa: E501 """ - # Configure the mock to return a successful response - mock_response = { - "id": "sub_123", - "customerId": "cus_123", - "paymentMethodId": "pm_123", - "planId": "plan_123", - "status": "ACTIVE", - "amount": 2000, - "description": "Updated subscription" - } - mock_call_api.return_value = mock_response - - # Test the method - subscription_id = "sub_123" - update_data = { - "amount": 2000, - "description": "Updated subscription" - } - response = self.api.update(subscription_id, update_data) - - # Verify the response - self.assertEqual(response, mock_response) - mock_call_api.assert_called_once() - - @patch.object(ApiClient, "call_api") - def test_error_handling(self, mock_call_api) -> None: - """Test error handling in API calls""" - # Configure the mock to raise an ApiException - mock_call_api.side_effect = ApiException( - status=400, - reason="Bad Request", - body='{"status":"ERROR","statusCode":400,"requestId":"req_123","message":"Invalid request"}' - ) - - # Test the method - subscription_data = { - "amount": 1000, - "currency": "EUR", - "interval": "month", - "customerId": "cus_123" - } - - # Verify that the exception is raised - with self.assertRaises(ApiException) as context: - self.api.create(subscription_data) - - # Verify the exception details - self.assertEqual(context.exception.status, 400) - self.assertEqual(context.exception.reason, "Bad Request") - self.assertIn("Invalid request", context.exception.body) + pass if __name__ == '__main__': diff --git a/test/test_subscriptions_api_integration.py b/test/test_subscriptions_api_integration.py new file mode 100644 index 0000000..85884b2 --- /dev/null +++ b/test/test_subscriptions_api_integration.py @@ -0,0 +1,274 @@ +import unittest +from unittest.mock import patch, MagicMock + +import Monei +from Monei.monei_client import MoneiClient +from Monei.exceptions import ApiException +from Monei.model.create_subscription_request import CreateSubscriptionRequest +from Monei.model.update_subscription_request import UpdateSubscriptionRequest +from Monei.model.cancel_subscription_request import CancelSubscriptionRequest +from Monei.model.pause_subscription_request import PauseSubscriptionRequest +from Monei.model.activate_subscription_request import ActivateSubscriptionRequest +from Monei.model.send_subscription_link_request import SendSubscriptionLinkRequest +from Monei.model.send_subscription_status_request import SendSubscriptionStatusRequest +from Monei.model.subscription import Subscription +from Monei.model.subscription_status import SubscriptionStatus +from Monei.model.subscription_interval import SubscriptionInterval + + +class TestSubscriptionsApiIntegration(unittest.TestCase): + """SubscriptionsApi integration test stubs""" + + def setUp(self): + """Set up test fixtures, if any.""" + self.api_key = "test_api_key_12345" + self.client = MoneiClient(api_key=self.api_key) + self.subscription_id = "sub_123456789" + + def tearDown(self): + """Tear down test fixtures, if any.""" + pass + + @patch("Monei.api.subscriptions_api.SubscriptionsApi.create") + def test_create_subscription(self, mock_create): + """Test creating a subscription.""" + # Setup mock response + mock_subscription = MagicMock() + mock_subscription.id = self.subscription_id + mock_subscription.amount = 1000 + mock_subscription.currency = "EUR" + mock_subscription.interval = SubscriptionInterval("month") + mock_subscription.status = SubscriptionStatus("ACTIVE") + mock_create.return_value = mock_subscription + + # Create subscription request + subscription_request = { + "amount": 1000, + "currency": "EUR", + "interval": "month", + "description": "Test subscription", + "customer": {"email": "customer@example.com", "name": "John Doe"}, + "paymentMethodId": "pm_123456789", + } + + # Call the API + result = self.client.subscriptions.create(subscription_request) + + # Verify the result + self.assertEqual(result.id, self.subscription_id) + self.assertEqual(result.amount, 1000) + self.assertEqual(result.currency, "EUR") + self.assertEqual(result.interval, SubscriptionInterval("month")) + self.assertEqual(result.status, SubscriptionStatus("ACTIVE")) + + # Verify the mock was called with the correct arguments + mock_create.assert_called_once() + + @patch("Monei.api.subscriptions_api.SubscriptionsApi.get") + def test_get_subscription(self, mock_get): + """Test getting a subscription by ID.""" + # Setup mock response + mock_subscription = MagicMock() + mock_subscription.id = self.subscription_id + mock_subscription.amount = 1000 + mock_subscription.currency = "EUR" + mock_subscription.interval = SubscriptionInterval("month") + mock_subscription.status = SubscriptionStatus("ACTIVE") + mock_get.return_value = mock_subscription + + # Call the API + result = self.client.subscriptions.get(self.subscription_id) + + # Verify the result + self.assertEqual(result.id, self.subscription_id) + self.assertEqual(result.amount, 1000) + self.assertEqual(result.currency, "EUR") + self.assertEqual(result.interval, SubscriptionInterval("month")) + self.assertEqual(result.status, SubscriptionStatus("ACTIVE")) + + # Verify the mock was called with the correct arguments + mock_get.assert_called_once_with(self.subscription_id) + + @patch("Monei.api.subscriptions_api.SubscriptionsApi.update") + def test_update_subscription(self, mock_update): + """Test updating a subscription.""" + # Setup mock response + mock_subscription = MagicMock() + mock_subscription.id = self.subscription_id + mock_subscription.amount = 2000 # Updated amount + mock_subscription.currency = "EUR" + mock_subscription.interval = SubscriptionInterval("month") + mock_subscription.status = SubscriptionStatus("ACTIVE") + mock_update.return_value = mock_subscription + + # Create update request + update_request = {"amount": 2000, "description": "Updated subscription"} + + # Call the API + result = self.client.subscriptions.update(self.subscription_id, update_request) + + # Verify the result + self.assertEqual(result.id, self.subscription_id) + self.assertEqual(result.amount, 2000) # Check updated amount + self.assertEqual(result.currency, "EUR") + self.assertEqual(result.interval, SubscriptionInterval("month")) + self.assertEqual(result.status, SubscriptionStatus("ACTIVE")) + + # Verify the mock was called with the correct arguments + mock_update.assert_called_once() + + @patch("Monei.api.subscriptions_api.SubscriptionsApi.cancel") + def test_cancel_subscription(self, mock_cancel): + """Test cancelling a subscription.""" + # Setup mock response + mock_subscription = MagicMock() + mock_subscription.id = self.subscription_id + mock_subscription.amount = 1000 + mock_subscription.currency = "EUR" + mock_subscription.interval = SubscriptionInterval("month") + mock_subscription.status = SubscriptionStatus("CANCELED") + mock_cancel.return_value = mock_subscription + + # Create cancel request + cancel_request = {"cancelAtPeriodEnd": True} + + # Call the API + result = self.client.subscriptions.cancel(self.subscription_id, cancel_request) + + # Verify the result + self.assertEqual(result.id, self.subscription_id) + self.assertEqual(result.amount, 1000) + self.assertEqual(result.currency, "EUR") + self.assertEqual(result.interval, SubscriptionInterval("month")) + self.assertEqual(result.status, SubscriptionStatus("CANCELED")) + + # Verify the mock was called with the correct arguments + mock_cancel.assert_called_once() + + @patch("Monei.api.subscriptions_api.SubscriptionsApi.pause") + def test_pause_subscription(self, mock_pause): + """Test pausing a subscription.""" + # Setup mock response + mock_subscription = MagicMock() + mock_subscription.id = self.subscription_id + mock_subscription.amount = 1000 + mock_subscription.currency = "EUR" + mock_subscription.interval = SubscriptionInterval("month") + mock_subscription.status = SubscriptionStatus("PAUSED") + mock_pause.return_value = mock_subscription + + # Create pause request + pause_request = {"pauseAtPeriodEnd": True, "pauseIntervalCount": 1} + + # Call the API + result = self.client.subscriptions.pause(self.subscription_id, pause_request) + + # Verify the result + self.assertEqual(result.id, self.subscription_id) + self.assertEqual(result.amount, 1000) + self.assertEqual(result.currency, "EUR") + self.assertEqual(result.interval, SubscriptionInterval("month")) + self.assertEqual(result.status, SubscriptionStatus("PAUSED")) + + # Verify the mock was called with the correct arguments + mock_pause.assert_called_once() + + @patch("Monei.api.subscriptions_api.SubscriptionsApi.resume") + def test_resume_subscription(self, mock_resume): + """Test resuming a subscription.""" + # Setup mock response + mock_subscription = MagicMock() + mock_subscription.id = self.subscription_id + mock_subscription.amount = 1000 + mock_subscription.currency = "EUR" + mock_subscription.interval = SubscriptionInterval("month") + mock_subscription.status = SubscriptionStatus("ACTIVE") + mock_resume.return_value = mock_subscription + + # Call the API + result = self.client.subscriptions.resume(self.subscription_id) + + # Verify the result + self.assertEqual(result.id, self.subscription_id) + self.assertEqual(result.amount, 1000) + self.assertEqual(result.currency, "EUR") + self.assertEqual(result.interval, SubscriptionInterval("month")) + self.assertEqual(result.status, SubscriptionStatus("ACTIVE")) + + # Verify the mock was called with the correct arguments + mock_resume.assert_called_once_with(self.subscription_id) + + @patch("Monei.api.subscriptions_api.SubscriptionsApi.activate") + def test_activate_subscription(self, mock_activate): + """Test activating a subscription.""" + # Setup mock response + mock_subscription = MagicMock() + mock_subscription.id = self.subscription_id + mock_subscription.amount = 1000 + mock_subscription.currency = "EUR" + mock_subscription.interval = SubscriptionInterval("month") + mock_subscription.status = SubscriptionStatus("ACTIVE") + mock_activate.return_value = mock_subscription + + # Create activate request + activate_request = {"paymentToken": "tok_123456789", "sessionId": "sess_123456789"} + + # Call the API + result = self.client.subscriptions.activate(self.subscription_id, activate_request) + + # Verify the result + self.assertEqual(result.id, self.subscription_id) + self.assertEqual(result.amount, 1000) + self.assertEqual(result.currency, "EUR") + self.assertEqual(result.interval, SubscriptionInterval("month")) + self.assertEqual(result.status, SubscriptionStatus("ACTIVE")) + + # Verify the mock was called with the correct arguments + mock_activate.assert_called_once() + + @patch("Monei.api.subscriptions_api.SubscriptionsApi.send_link") + def test_send_subscription_link(self, mock_send_link): + """Test sending a subscription link.""" + # Setup mock response + mock_response = MagicMock() + mock_response.success = True + mock_send_link.return_value = mock_response + + # Create send link request + send_link_request = { + "customerEmail": "customer@example.com", + "customerPhone": "+34600000000", + } + + # Call the API + result = self.client.subscriptions.send_link(self.subscription_id, send_link_request) + + # Verify the result + self.assertTrue(result.success) + + # Verify the mock was called with the correct arguments + mock_send_link.assert_called_once() + + @patch("Monei.api.subscriptions_api.SubscriptionsApi.send_status") + def test_send_subscription_status(self, mock_send_status): + """Test sending a subscription status.""" + # Setup mock response + mock_response = MagicMock() + mock_response.success = True + mock_send_status.return_value = mock_response + + # Create send status request + send_status_request = {"customerEmail": "customer@example.com"} + + # Call the API + result = self.client.subscriptions.send_status(self.subscription_id, send_status_request) + + # Verify the result + self.assertTrue(result.success) + + # Verify the mock was called with the correct arguments + mock_send_status.assert_called_once() + + +if __name__ == "__main__": + unittest.main() diff --git a/test/test_update_subscription_request.py b/test/test_update_subscription_request.py index 592425e..1a0f4ec 100644 --- a/test/test_update_subscription_request.py +++ b/test/test_update_subscription_request.py @@ -1,20 +1,29 @@ -# coding: utf-8 - """ MONEI API v1 -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

- - The version of the OpenAPI document: 1.5.1 - Generated by OpenAPI Generator (https://openapi-generator.tech) +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - Do not edit the class manually. -""" # noqa: E501 + The version of the OpenAPI document: 1.5.3 + Generated by: https://openapi-generator.tech +""" +import sys import unittest -from Monei.models.update_subscription_request import UpdateSubscriptionRequest +import Monei +from Monei.model.payment_billing_details import PaymentBillingDetails +from Monei.model.payment_customer import PaymentCustomer +from Monei.model.payment_shipping_details import PaymentShippingDetails +from Monei.model.subscription_interval import SubscriptionInterval +from Monei.model.subscription_retry_schedule import SubscriptionRetrySchedule +globals()['PaymentBillingDetails'] = PaymentBillingDetails +globals()['PaymentCustomer'] = PaymentCustomer +globals()['PaymentShippingDetails'] = PaymentShippingDetails +globals()['SubscriptionInterval'] = SubscriptionInterval +globals()['SubscriptionRetrySchedule'] = SubscriptionRetrySchedule +from Monei.model.update_subscription_request import UpdateSubscriptionRequest + class TestUpdateSubscriptionRequest(unittest.TestCase): """UpdateSubscriptionRequest unit test stubs""" @@ -25,68 +34,12 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional) -> UpdateSubscriptionRequest: - """Test UpdateSubscriptionRequest - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `UpdateSubscriptionRequest` - """ - model = UpdateSubscriptionRequest() - if include_optional: - return UpdateSubscriptionRequest( - amount = 110, - interval = 'month', - interval_count = 1, - description = 'MoonMail Monthly Lite', - customer = Monei.models.payment_customer.Payment-Customer( - email = 'john.doe@example.com', - name = 'John Doe', - phone = '', ), - billing_details = Monei.models.payment_billing_details.Payment-BillingDetails( - name = 'John Doe', - email = 'john.doe@example.com', - phone = '', - company = '', - tax_id = '', - address = Monei.models.address.Address( - country = 'ES', - city = 'Málaga', - line1 = 'Fake Street 123', - line2 = '', - zip = '1234', - state = 'Málaga', ), ), - shipping_details = Monei.models.payment_shipping_details.Payment-ShippingDetails( - name = 'John Doe', - email = 'john.doe@example.com', - phone = '', - company = '', - tax_id = '', - address = Monei.models.address.Address( - country = 'ES', - city = 'Málaga', - line1 = 'Fake Street 123', - line2 = '', - zip = '1234', - state = 'Málaga', ), ), - trial_period_end = 1636366897, - callback_url = 'https://example.com/subscriptions/callback', - payment_callback_url = 'https://example.com/payments/callback', - pause_at_period_end = False, - cancel_at_period_end = False, - pause_interval_count = 1, - retry_schedule = [{"interval":"day","intervalCount":1},{"interval":"day","intervalCount":3},{"interval":"week","intervalCount":1}], - metadata = {"systemId":"12345"} - ) - else: - return UpdateSubscriptionRequest( - ) - """ - def testUpdateSubscriptionRequest(self): """Test UpdateSubscriptionRequest""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) + # FIXME: construct object with mandatory attributes with example values + # model = UpdateSubscriptionRequest() # noqa: E501 + pass + if __name__ == '__main__': unittest.main() diff --git a/test/test_validate_bizum_phone_request.py b/test/test_validate_bizum_phone_request.py index 639e24b..3873ceb 100644 --- a/test/test_validate_bizum_phone_request.py +++ b/test/test_validate_bizum_phone_request.py @@ -1,20 +1,19 @@ -# coding: utf-8 - """ MONEI API v1 -

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

- - The version of the OpenAPI document: 1.5.1 - Generated by OpenAPI Generator (https://openapi-generator.tech) +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - Do not edit the class manually. -""" # noqa: E501 + The version of the OpenAPI document: 1.5.3 + Generated by: https://openapi-generator.tech +""" +import sys import unittest -from Monei.models.validate_bizum_phone_request import ValidateBizumPhoneRequest +import Monei +from Monei.model.validate_bizum_phone_request import ValidateBizumPhoneRequest + class TestValidateBizumPhoneRequest(unittest.TestCase): """ValidateBizumPhoneRequest unit test stubs""" @@ -25,31 +24,12 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional) -> ValidateBizumPhoneRequest: - """Test ValidateBizumPhoneRequest - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `ValidateBizumPhoneRequest` - """ - model = ValidateBizumPhoneRequest() - if include_optional: - return ValidateBizumPhoneRequest( - account_id = 'aa9333ba-82de-400c-9ae7-087b9f8d2242', - payment_id = 'af6029f80f5fc73a8ad2753eea0b1be0', - phone_number = '+34500000000' - ) - else: - return ValidateBizumPhoneRequest( - account_id = 'aa9333ba-82de-400c-9ae7-087b9f8d2242', - phone_number = '+34500000000', - ) - """ - def testValidateBizumPhoneRequest(self): """Test ValidateBizumPhoneRequest""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) + # FIXME: construct object with mandatory attributes with example values + # model = ValidateBizumPhoneRequest() # noqa: E501 + pass + if __name__ == '__main__': unittest.main() diff --git a/uv.lock b/uv.lock index 62d4c92..a64c5dd 100644 --- a/uv.lock +++ b/uv.lock @@ -1,29 +1,21 @@ version = 1 revision = 1 -requires-python = ">=3.12" +requires-python = ">=3.8" +resolution-markers = [ + "python_full_version >= '3.9'", + "python_full_version < '3.9'", +] [[package]] -name = "black" -version = "25.1.0" +name = "annotated-types" +version = "0.7.0" source = { registry = "https://pypi.org/simple" } dependencies = [ - { name = "click" }, - { name = "mypy-extensions" }, - { name = "packaging" }, - { name = "pathspec" }, - { name = "platformdirs" }, + { name = "typing-extensions", marker = "python_full_version < '3.9'" }, ] -sdist = { url = "https://files.pythonhosted.org/packages/94/49/26a7b0f3f35da4b5a65f081943b7bcd22d7002f5f0fb8098ec1ff21cb6ef/black-25.1.0.tar.gz", hash = "sha256:33496d5cd1222ad73391352b4ae8da15253c5de89b93a80b3e2c8d9a19ec2666", size = 649449 } +sdist = { url = "https://files.pythonhosted.org/packages/ee/67/531ea369ba64dcff5ec9c3402f9f51bf748cec26dde048a2f973a4eea7f5/annotated_types-0.7.0.tar.gz", hash = "sha256:aff07c09a53a08bc8cfccb9c85b05f1aa9a2a6f23728d790723543408344ce89", size = 16081 } wheels = [ - { url = "https://files.pythonhosted.org/packages/83/71/3fe4741df7adf015ad8dfa082dd36c94ca86bb21f25608eb247b4afb15b2/black-25.1.0-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:4b60580e829091e6f9238c848ea6750efed72140b91b048770b64e74fe04908b", size = 1650988 }, - { url = "https://files.pythonhosted.org/packages/13/f3/89aac8a83d73937ccd39bbe8fc6ac8860c11cfa0af5b1c96d081facac844/black-25.1.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:1e2978f6df243b155ef5fa7e558a43037c3079093ed5d10fd84c43900f2d8ecc", size = 1453985 }, - { url = "https://files.pythonhosted.org/packages/6f/22/b99efca33f1f3a1d2552c714b1e1b5ae92efac6c43e790ad539a163d1754/black-25.1.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:3b48735872ec535027d979e8dcb20bf4f70b5ac75a8ea99f127c106a7d7aba9f", size = 1783816 }, - { url = "https://files.pythonhosted.org/packages/18/7e/a27c3ad3822b6f2e0e00d63d58ff6299a99a5b3aee69fa77cd4b0076b261/black-25.1.0-cp312-cp312-win_amd64.whl", hash = "sha256:ea0213189960bda9cf99be5b8c8ce66bb054af5e9e861249cd23471bd7b0b3ba", size = 1440860 }, - { url = "https://files.pythonhosted.org/packages/98/87/0edf98916640efa5d0696e1abb0a8357b52e69e82322628f25bf14d263d1/black-25.1.0-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:8f0b18a02996a836cc9c9c78e5babec10930862827b1b724ddfe98ccf2f2fe4f", size = 1650673 }, - { url = "https://files.pythonhosted.org/packages/52/e5/f7bf17207cf87fa6e9b676576749c6b6ed0d70f179a3d812c997870291c3/black-25.1.0-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:afebb7098bfbc70037a053b91ae8437c3857482d3a690fefc03e9ff7aa9a5fd3", size = 1453190 }, - { url = "https://files.pythonhosted.org/packages/e3/ee/adda3d46d4a9120772fae6de454c8495603c37c4c3b9c60f25b1ab6401fe/black-25.1.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:030b9759066a4ee5e5aca28c3c77f9c64789cdd4de8ac1df642c40b708be6171", size = 1782926 }, - { url = "https://files.pythonhosted.org/packages/cc/64/94eb5f45dcb997d2082f097a3944cfc7fe87e071907f677e80788a2d7b7a/black-25.1.0-cp313-cp313-win_amd64.whl", hash = "sha256:a22f402b410566e2d1c950708c77ebf5ebd5d0d88a6a2e87c86d9fb48afa0d18", size = 1442613 }, - { url = "https://files.pythonhosted.org/packages/09/71/54e999902aed72baf26bca0d50781b01838251a462612966e9fc4891eadd/black-25.1.0-py3-none-any.whl", hash = "sha256:95e8176dae143ba9097f351d174fdaf0ccd29efb414b362ae3fd72bf0f710717", size = 207646 }, + { url = "https://files.pythonhosted.org/packages/78/b6/6307fbef88d9b5ee7421e68d78a9f162e0da4900bc5f5793f6d3d0e34fb8/annotated_types-0.7.0-py3-none-any.whl", hash = "sha256:1f02e8b43a8fbbc3f3e0d4f0f4bfc8131bcb4eebe8849b8e5c773f3a1c582a53", size = 13643 }, ] [[package]] @@ -36,181 +28,149 @@ wheels = [ ] [[package]] -name = "click" -version = "8.1.8" -source = { registry = "https://pypi.org/simple" } -dependencies = [ - { name = "colorama", marker = "sys_platform == 'win32'" }, -] -sdist = { url = "https://files.pythonhosted.org/packages/b9/2e/0090cbf739cee7d23781ad4b89a9894a41538e4fcf4c31dcdd705b78eb8b/click-8.1.8.tar.gz", hash = "sha256:ed53c9d8990d83c2a27deae68e4ee337473f6330c040a31d4225c9574d16096a", size = 226593 } -wheels = [ - { url = "https://files.pythonhosted.org/packages/7e/d4/7ebdbd03970677812aac39c869717059dbb71a4cfc033ca6e5221787892c/click-8.1.8-py3-none-any.whl", hash = "sha256:63c132bbbed01578a06712a2d1f497bb62d9c1c0d329b7903a866228027263b2", size = 98188 }, -] - -[[package]] -name = "colorama" -version = "0.4.6" -source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/d8/53/6f443c9a4a8358a93a6792e2acffb9d9d5cb0a5cfd8802644b7b1c9a02e4/colorama-0.4.6.tar.gz", hash = "sha256:08695f5cb7ed6e0531a20572697297273c47b8cae5a63ffc6d6ed5c201be6e44", size = 27697 } -wheels = [ - { url = "https://files.pythonhosted.org/packages/d1/d6/3965ed04c63042e047cb6a3e6ed1a63a35087b6a609aa3a15ed8ac56c221/colorama-0.4.6-py2.py3-none-any.whl", hash = "sha256:4f1d9991f5acc0ca119f9d443620b77f9d6b33703e51011c16baf57afb285fc6", size = 25335 }, -] - -[[package]] -name = "coverage" -version = "7.6.12" -source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/0c/d6/2b53ab3ee99f2262e6f0b8369a43f6d66658eab45510331c0b3d5c8c4272/coverage-7.6.12.tar.gz", hash = "sha256:48cfc4641d95d34766ad41d9573cc0f22a48aa88d22657a1fe01dca0dbae4de2", size = 805941 } -wheels = [ - { url = "https://files.pythonhosted.org/packages/e2/7f/4af2ed1d06ce6bee7eafc03b2ef748b14132b0bdae04388e451e4b2c529b/coverage-7.6.12-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:b172f8e030e8ef247b3104902cc671e20df80163b60a203653150d2fc204d1ad", size = 208645 }, - { url = "https://files.pythonhosted.org/packages/dc/60/d19df912989117caa95123524d26fc973f56dc14aecdec5ccd7d0084e131/coverage-7.6.12-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:641dfe0ab73deb7069fb972d4d9725bf11c239c309ce694dd50b1473c0f641c3", size = 208898 }, - { url = "https://files.pythonhosted.org/packages/bd/10/fecabcf438ba676f706bf90186ccf6ff9f6158cc494286965c76e58742fa/coverage-7.6.12-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:0e549f54ac5f301e8e04c569dfdb907f7be71b06b88b5063ce9d6953d2d58574", size = 242987 }, - { url = "https://files.pythonhosted.org/packages/4c/53/4e208440389e8ea936f5f2b0762dcd4cb03281a7722def8e2bf9dc9c3d68/coverage-7.6.12-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:959244a17184515f8c52dcb65fb662808767c0bd233c1d8a166e7cf74c9ea985", size = 239881 }, - { url = "https://files.pythonhosted.org/packages/c4/47/2ba744af8d2f0caa1f17e7746147e34dfc5f811fb65fc153153722d58835/coverage-7.6.12-cp312-cp312-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:bda1c5f347550c359f841d6614fb8ca42ae5cb0b74d39f8a1e204815ebe25750", size = 242142 }, - { url = "https://files.pythonhosted.org/packages/e9/90/df726af8ee74d92ee7e3bf113bf101ea4315d71508952bd21abc3fae471e/coverage-7.6.12-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:1ceeb90c3eda1f2d8c4c578c14167dbd8c674ecd7d38e45647543f19839dd6ea", size = 241437 }, - { url = "https://files.pythonhosted.org/packages/f6/af/995263fd04ae5f9cf12521150295bf03b6ba940d0aea97953bb4a6db3e2b/coverage-7.6.12-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:0f16f44025c06792e0fb09571ae454bcc7a3ec75eeb3c36b025eccf501b1a4c3", size = 239724 }, - { url = "https://files.pythonhosted.org/packages/1c/8e/5bb04f0318805e190984c6ce106b4c3968a9562a400180e549855d8211bd/coverage-7.6.12-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:b076e625396e787448d27a411aefff867db2bffac8ed04e8f7056b07024eed5a", size = 241329 }, - { url = "https://files.pythonhosted.org/packages/9e/9d/fa04d9e6c3f6459f4e0b231925277cfc33d72dfab7fa19c312c03e59da99/coverage-7.6.12-cp312-cp312-win32.whl", hash = "sha256:00b2086892cf06c7c2d74983c9595dc511acca00665480b3ddff749ec4fb2a95", size = 211289 }, - { url = "https://files.pythonhosted.org/packages/53/40/53c7ffe3c0c3fff4d708bc99e65f3d78c129110d6629736faf2dbd60ad57/coverage-7.6.12-cp312-cp312-win_amd64.whl", hash = "sha256:7ae6eabf519bc7871ce117fb18bf14e0e343eeb96c377667e3e5dd12095e0288", size = 212079 }, - { url = "https://files.pythonhosted.org/packages/76/89/1adf3e634753c0de3dad2f02aac1e73dba58bc5a3a914ac94a25b2ef418f/coverage-7.6.12-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:488c27b3db0ebee97a830e6b5a3ea930c4a6e2c07f27a5e67e1b3532e76b9ef1", size = 208673 }, - { url = "https://files.pythonhosted.org/packages/ce/64/92a4e239d64d798535c5b45baac6b891c205a8a2e7c9cc8590ad386693dc/coverage-7.6.12-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:5d1095bbee1851269f79fd8e0c9b5544e4c00c0c24965e66d8cba2eb5bb535fd", size = 208945 }, - { url = "https://files.pythonhosted.org/packages/b4/d0/4596a3ef3bca20a94539c9b1e10fd250225d1dec57ea78b0867a1cf9742e/coverage-7.6.12-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:0533adc29adf6a69c1baa88c3d7dbcaadcffa21afbed3ca7a225a440e4744bf9", size = 242484 }, - { url = "https://files.pythonhosted.org/packages/1c/ef/6fd0d344695af6718a38d0861408af48a709327335486a7ad7e85936dc6e/coverage-7.6.12-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:53c56358d470fa507a2b6e67a68fd002364d23c83741dbc4c2e0680d80ca227e", size = 239525 }, - { url = "https://files.pythonhosted.org/packages/0c/4b/373be2be7dd42f2bcd6964059fd8fa307d265a29d2b9bcf1d044bcc156ed/coverage-7.6.12-cp313-cp313-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:64cbb1a3027c79ca6310bf101014614f6e6e18c226474606cf725238cf5bc2d4", size = 241545 }, - { url = "https://files.pythonhosted.org/packages/a6/7d/0e83cc2673a7790650851ee92f72a343827ecaaea07960587c8f442b5cd3/coverage-7.6.12-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:79cac3390bfa9836bb795be377395f28410811c9066bc4eefd8015258a7578c6", size = 241179 }, - { url = "https://files.pythonhosted.org/packages/ff/8c/566ea92ce2bb7627b0900124e24a99f9244b6c8c92d09ff9f7633eb7c3c8/coverage-7.6.12-cp313-cp313-musllinux_1_2_i686.whl", hash = "sha256:9b148068e881faa26d878ff63e79650e208e95cf1c22bd3f77c3ca7b1d9821a3", size = 239288 }, - { url = "https://files.pythonhosted.org/packages/7d/e4/869a138e50b622f796782d642c15fb5f25a5870c6d0059a663667a201638/coverage-7.6.12-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:8bec2ac5da793c2685ce5319ca9bcf4eee683b8a1679051f8e6ec04c4f2fd7dc", size = 241032 }, - { url = "https://files.pythonhosted.org/packages/ae/28/a52ff5d62a9f9e9fe9c4f17759b98632edd3a3489fce70154c7d66054dd3/coverage-7.6.12-cp313-cp313-win32.whl", hash = "sha256:200e10beb6ddd7c3ded322a4186313d5ca9e63e33d8fab4faa67ef46d3460af3", size = 211315 }, - { url = "https://files.pythonhosted.org/packages/bc/17/ab849b7429a639f9722fa5628364c28d675c7ff37ebc3268fe9840dda13c/coverage-7.6.12-cp313-cp313-win_amd64.whl", hash = "sha256:2b996819ced9f7dbb812c701485d58f261bef08f9b85304d41219b1496b591ef", size = 212099 }, - { url = "https://files.pythonhosted.org/packages/d2/1c/b9965bf23e171d98505eb5eb4fb4d05c44efd256f2e0f19ad1ba8c3f54b0/coverage-7.6.12-cp313-cp313t-macosx_10_13_x86_64.whl", hash = "sha256:299cf973a7abff87a30609879c10df0b3bfc33d021e1adabc29138a48888841e", size = 209511 }, - { url = "https://files.pythonhosted.org/packages/57/b3/119c201d3b692d5e17784fee876a9a78e1b3051327de2709392962877ca8/coverage-7.6.12-cp313-cp313t-macosx_11_0_arm64.whl", hash = "sha256:4b467a8c56974bf06e543e69ad803c6865249d7a5ccf6980457ed2bc50312703", size = 209729 }, - { url = "https://files.pythonhosted.org/packages/52/4e/a7feb5a56b266304bc59f872ea07b728e14d5a64f1ad3a2cc01a3259c965/coverage-7.6.12-cp313-cp313t-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:2458f275944db8129f95d91aee32c828a408481ecde3b30af31d552c2ce284a0", size = 253988 }, - { url = "https://files.pythonhosted.org/packages/65/19/069fec4d6908d0dae98126aa7ad08ce5130a6decc8509da7740d36e8e8d2/coverage-7.6.12-cp313-cp313t-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:0a9d8be07fb0832636a0f72b80d2a652fe665e80e720301fb22b191c3434d924", size = 249697 }, - { url = "https://files.pythonhosted.org/packages/1c/da/5b19f09ba39df7c55f77820736bf17bbe2416bbf5216a3100ac019e15839/coverage-7.6.12-cp313-cp313t-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:14d47376a4f445e9743f6c83291e60adb1b127607a3618e3185bbc8091f0467b", size = 252033 }, - { url = "https://files.pythonhosted.org/packages/1e/89/4c2750df7f80a7872267f7c5fe497c69d45f688f7b3afe1297e52e33f791/coverage-7.6.12-cp313-cp313t-musllinux_1_2_aarch64.whl", hash = "sha256:b95574d06aa9d2bd6e5cc35a5bbe35696342c96760b69dc4287dbd5abd4ad51d", size = 251535 }, - { url = "https://files.pythonhosted.org/packages/78/3b/6d3ae3c1cc05f1b0460c51e6f6dcf567598cbd7c6121e5ad06643974703c/coverage-7.6.12-cp313-cp313t-musllinux_1_2_i686.whl", hash = "sha256:ecea0c38c9079570163d663c0433a9af4094a60aafdca491c6a3d248c7432827", size = 249192 }, - { url = "https://files.pythonhosted.org/packages/6e/8e/c14a79f535ce41af7d436bbad0d3d90c43d9e38ec409b4770c894031422e/coverage-7.6.12-cp313-cp313t-musllinux_1_2_x86_64.whl", hash = "sha256:2251fabcfee0a55a8578a9d29cecfee5f2de02f11530e7d5c5a05859aa85aee9", size = 250627 }, - { url = "https://files.pythonhosted.org/packages/cb/79/b7cee656cfb17a7f2c1b9c3cee03dd5d8000ca299ad4038ba64b61a9b044/coverage-7.6.12-cp313-cp313t-win32.whl", hash = "sha256:eb5507795caabd9b2ae3f1adc95f67b1104971c22c624bb354232d65c4fc90b3", size = 212033 }, - { url = "https://files.pythonhosted.org/packages/b6/c3/f7aaa3813f1fa9a4228175a7bd368199659d392897e184435a3b66408dd3/coverage-7.6.12-cp313-cp313t-win_amd64.whl", hash = "sha256:f60a297c3987c6c02ffb29effc70eadcbb412fe76947d394a1091a3615948e2f", size = 213240 }, - { url = "https://files.pythonhosted.org/packages/fb/b2/f655700e1024dec98b10ebaafd0cedbc25e40e4abe62a3c8e2ceef4f8f0a/coverage-7.6.12-py3-none-any.whl", hash = "sha256:eb8668cfbc279a536c633137deeb9435d2962caec279c3f8cf8b91fff6ff8953", size = 200552 }, -] - -[[package]] -name = "iniconfig" -version = "2.0.0" -source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/d7/4b/cbd8e699e64a6f16ca3a8220661b5f83792b3017d0f79807cb8708d33913/iniconfig-2.0.0.tar.gz", hash = "sha256:2d91e135bf72d31a410b17c16da610a82cb55f6b0477d1a902134b24a455b8b3", size = 4646 } -wheels = [ - { url = "https://files.pythonhosted.org/packages/ef/a6/62565a6e1cf69e10f5727360368e451d4b7f58beeac6173dc9db836a5b46/iniconfig-2.0.0-py3-none-any.whl", hash = "sha256:b6a85871a79d2e3b22d2d1b94ac2824226a63c6b741c88f7ae975f18b6778374", size = 5892 }, -] - -[[package]] -name = "monei-python-sdk" -version = "0.1.0" +name = "monei" +version = "1.2.6" source = { editable = "." } dependencies = [ { name = "certifi" }, + { name = "pydantic" }, { name = "python-dateutil" }, - { name = "setuptools" }, - { name = "six" }, - { name = "urllib3" }, -] - -[package.optional-dependencies] -lint = [ - { name = "black" }, - { name = "ruff" }, -] -test = [ - { name = "pytest" }, - { name = "pytest-cov" }, + { name = "typing-extensions" }, + { name = "urllib3", version = "2.2.3", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version < '3.9'" }, + { name = "urllib3", version = "2.3.0", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version >= '3.9'" }, ] [package.metadata] requires-dist = [ - { name = "black", marker = "extra == 'lint'", specifier = ">=23.0.0" }, { name = "certifi" }, - { name = "pytest", marker = "extra == 'test'", specifier = ">=7.0.0" }, - { name = "pytest-cov", marker = "extra == 'test'", specifier = ">=4.0.0" }, - { name = "python-dateutil", specifier = ">=2.5.3" }, - { name = "ruff", marker = "extra == 'lint'", specifier = ">=0.1.0" }, - { name = "setuptools", specifier = ">=21.0.0" }, - { name = "six", specifier = ">=1.10" }, - { name = "urllib3", specifier = ">=1.25.3" }, -] -provides-extras = ["test", "lint"] - -[[package]] -name = "mypy-extensions" -version = "1.0.0" -source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/98/a4/1ab47638b92648243faf97a5aeb6ea83059cc3624972ab6b8d2316078d3f/mypy_extensions-1.0.0.tar.gz", hash = "sha256:75dbf8955dc00442a438fc4d0666508a9a97b6bd41aa2f0ffe9d2f2725af0782", size = 4433 } -wheels = [ - { url = "https://files.pythonhosted.org/packages/2a/e2/5d3f6ada4297caebe1a2add3b126fe800c96f56dbe5d1988a2cbe0b267aa/mypy_extensions-1.0.0-py3-none-any.whl", hash = "sha256:4392f6c0eb8a5668a69e23d168ffa70f0be9ccfd32b5cc2d26a34ae5b844552d", size = 4695 }, + { name = "pydantic", specifier = ">=2" }, + { name = "python-dateutil", specifier = ">=2.8.2" }, + { name = "typing-extensions", specifier = ">=4.7.1" }, + { name = "urllib3", specifier = ">=1.25.3,<3.0.0" }, ] [[package]] -name = "packaging" -version = "24.2" -source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/d0/63/68dbb6eb2de9cb10ee4c9c14a0148804425e13c4fb20d61cce69f53106da/packaging-24.2.tar.gz", hash = "sha256:c228a6dc5e932d346bc5739379109d49e8853dd8223571c7c5b55260edc0b97f", size = 163950 } -wheels = [ - { url = "https://files.pythonhosted.org/packages/88/ef/eb23f262cca3c0c4eb7ab1933c3b1f03d021f2c48f54763065b6f0e321be/packaging-24.2-py3-none-any.whl", hash = "sha256:09abb1bccd265c01f4a3aa3f7a7db064b36514d2cba19a2f694fe6150451a759", size = 65451 }, -] - -[[package]] -name = "pathspec" -version = "0.12.1" -source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/ca/bc/f35b8446f4531a7cb215605d100cd88b7ac6f44ab3fc94870c120ab3adbf/pathspec-0.12.1.tar.gz", hash = "sha256:a482d51503a1ab33b1c67a6c3813a26953dbdc71c31dacaef9a838c4e29f5712", size = 51043 } -wheels = [ - { url = "https://files.pythonhosted.org/packages/cc/20/ff623b09d963f88bfde16306a54e12ee5ea43e9b597108672ff3a408aad6/pathspec-0.12.1-py3-none-any.whl", hash = "sha256:a0d503e138a4c123b27490a4f7beda6a01c6f288df0e4a8b79c7eb0dc7b4cc08", size = 31191 }, -] - -[[package]] -name = "platformdirs" -version = "4.3.6" -source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/13/fc/128cc9cb8f03208bdbf93d3aa862e16d376844a14f9a0ce5cf4507372de4/platformdirs-4.3.6.tar.gz", hash = "sha256:357fb2acbc885b0419afd3ce3ed34564c13c9b95c89360cd9563f73aa5e2b907", size = 21302 } -wheels = [ - { url = "https://files.pythonhosted.org/packages/3c/a6/bc1012356d8ece4d66dd75c4b9fc6c1f6650ddd5991e421177d9f8f671be/platformdirs-4.3.6-py3-none-any.whl", hash = "sha256:73e575e1408ab8103900836b97580d5307456908a03e92031bab39e4554cc3fb", size = 18439 }, -] - -[[package]] -name = "pluggy" -version = "1.5.0" -source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/96/2d/02d4312c973c6050a18b314a5ad0b3210edb65a906f868e31c111dede4a6/pluggy-1.5.0.tar.gz", hash = "sha256:2cffa88e94fdc978c4c574f15f9e59b7f4201d439195c3715ca9e2486f1d0cf1", size = 67955 } -wheels = [ - { url = "https://files.pythonhosted.org/packages/88/5f/e351af9a41f866ac3f1fac4ca0613908d9a41741cfcf2228f4ad853b697d/pluggy-1.5.0-py3-none-any.whl", hash = "sha256:44e1ad92c8ca002de6377e165f3e0f1be63266ab4d554740532335b9d75ea669", size = 20556 }, -] - -[[package]] -name = "pytest" -version = "8.3.5" +name = "pydantic" +version = "2.10.6" source = { registry = "https://pypi.org/simple" } dependencies = [ - { name = "colorama", marker = "sys_platform == 'win32'" }, - { name = "iniconfig" }, - { name = "packaging" }, - { name = "pluggy" }, + { name = "annotated-types" }, + { name = "pydantic-core" }, + { name = "typing-extensions" }, ] -sdist = { url = "https://files.pythonhosted.org/packages/ae/3c/c9d525a414d506893f0cd8a8d0de7706446213181570cdbd766691164e40/pytest-8.3.5.tar.gz", hash = "sha256:f4efe70cc14e511565ac476b57c279e12a855b11f48f212af1080ef2263d3845", size = 1450891 } +sdist = { url = "https://files.pythonhosted.org/packages/b7/ae/d5220c5c52b158b1de7ca89fc5edb72f304a70a4c540c84c8844bf4008de/pydantic-2.10.6.tar.gz", hash = "sha256:ca5daa827cce33de7a42be142548b0096bf05a7e7b365aebfa5f8eeec7128236", size = 761681 } wheels = [ - { url = "https://files.pythonhosted.org/packages/30/3d/64ad57c803f1fa1e963a7946b6e0fea4a70df53c1a7fed304586539c2bac/pytest-8.3.5-py3-none-any.whl", hash = "sha256:c69214aa47deac29fad6c2a4f590b9c4a9fdb16a403176fe154b79c0b4d4d820", size = 343634 }, + { url = "https://files.pythonhosted.org/packages/f4/3c/8cc1cc84deffa6e25d2d0c688ebb80635dfdbf1dbea3e30c541c8cf4d860/pydantic-2.10.6-py3-none-any.whl", hash = "sha256:427d664bf0b8a2b34ff5dd0f5a18df00591adcee7198fbd71981054cef37b584", size = 431696 }, ] [[package]] -name = "pytest-cov" -version = "6.0.0" +name = "pydantic-core" +version = "2.27.2" source = { registry = "https://pypi.org/simple" } dependencies = [ - { name = "coverage" }, - { name = "pytest" }, -] -sdist = { url = "https://files.pythonhosted.org/packages/be/45/9b538de8cef30e17c7b45ef42f538a94889ed6a16f2387a6c89e73220651/pytest-cov-6.0.0.tar.gz", hash = "sha256:fde0b595ca248bb8e2d76f020b465f3b107c9632e6a1d1705f17834c89dcadc0", size = 66945 } -wheels = [ - { url = "https://files.pythonhosted.org/packages/36/3b/48e79f2cd6a61dbbd4807b4ed46cb564b4fd50a76166b1c4ea5c1d9e2371/pytest_cov-6.0.0-py3-none-any.whl", hash = "sha256:eee6f1b9e61008bd34975a4d5bab25801eb31898b032dd55addc93e96fcaaa35", size = 22949 }, + { name = "typing-extensions" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/fc/01/f3e5ac5e7c25833db5eb555f7b7ab24cd6f8c322d3a3ad2d67a952dc0abc/pydantic_core-2.27.2.tar.gz", hash = "sha256:eb026e5a4c1fee05726072337ff51d1efb6f59090b7da90d30ea58625b1ffb39", size = 413443 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/3a/bc/fed5f74b5d802cf9a03e83f60f18864e90e3aed7223adaca5ffb7a8d8d64/pydantic_core-2.27.2-cp310-cp310-macosx_10_12_x86_64.whl", hash = "sha256:2d367ca20b2f14095a8f4fa1210f5a7b78b8a20009ecced6b12818f455b1e9fa", size = 1895938 }, + { url = "https://files.pythonhosted.org/packages/71/2a/185aff24ce844e39abb8dd680f4e959f0006944f4a8a0ea372d9f9ae2e53/pydantic_core-2.27.2-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:491a2b73db93fab69731eaee494f320faa4e093dbed776be1a829c2eb222c34c", size = 1815684 }, + { url = "https://files.pythonhosted.org/packages/c3/43/fafabd3d94d159d4f1ed62e383e264f146a17dd4d48453319fd782e7979e/pydantic_core-2.27.2-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:7969e133a6f183be60e9f6f56bfae753585680f3b7307a8e555a948d443cc05a", size = 1829169 }, + { url = "https://files.pythonhosted.org/packages/a2/d1/f2dfe1a2a637ce6800b799aa086d079998959f6f1215eb4497966efd2274/pydantic_core-2.27.2-cp310-cp310-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:3de9961f2a346257caf0aa508a4da705467f53778e9ef6fe744c038119737ef5", size = 1867227 }, + { url = "https://files.pythonhosted.org/packages/7d/39/e06fcbcc1c785daa3160ccf6c1c38fea31f5754b756e34b65f74e99780b5/pydantic_core-2.27.2-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:e2bb4d3e5873c37bb3dd58714d4cd0b0e6238cebc4177ac8fe878f8b3aa8e74c", size = 2037695 }, + { url = "https://files.pythonhosted.org/packages/7a/67/61291ee98e07f0650eb756d44998214231f50751ba7e13f4f325d95249ab/pydantic_core-2.27.2-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:280d219beebb0752699480fe8f1dc61ab6615c2046d76b7ab7ee38858de0a4e7", size = 2741662 }, + { url = "https://files.pythonhosted.org/packages/32/90/3b15e31b88ca39e9e626630b4c4a1f5a0dfd09076366f4219429e6786076/pydantic_core-2.27.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:47956ae78b6422cbd46f772f1746799cbb862de838fd8d1fbd34a82e05b0983a", size = 1993370 }, + { url = "https://files.pythonhosted.org/packages/ff/83/c06d333ee3a67e2e13e07794995c1535565132940715931c1c43bfc85b11/pydantic_core-2.27.2-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:14d4a5c49d2f009d62a2a7140d3064f686d17a5d1a268bc641954ba181880236", size = 1996813 }, + { url = "https://files.pythonhosted.org/packages/7c/f7/89be1c8deb6e22618a74f0ca0d933fdcb8baa254753b26b25ad3acff8f74/pydantic_core-2.27.2-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:337b443af21d488716f8d0b6164de833e788aa6bd7e3a39c005febc1284f4962", size = 2005287 }, + { url = "https://files.pythonhosted.org/packages/b7/7d/8eb3e23206c00ef7feee17b83a4ffa0a623eb1a9d382e56e4aa46fd15ff2/pydantic_core-2.27.2-cp310-cp310-musllinux_1_1_armv7l.whl", hash = "sha256:03d0f86ea3184a12f41a2d23f7ccb79cdb5a18e06993f8a45baa8dfec746f0e9", size = 2128414 }, + { url = "https://files.pythonhosted.org/packages/4e/99/fe80f3ff8dd71a3ea15763878d464476e6cb0a2db95ff1c5c554133b6b83/pydantic_core-2.27.2-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:7041c36f5680c6e0f08d922aed302e98b3745d97fe1589db0a3eebf6624523af", size = 2155301 }, + { url = "https://files.pythonhosted.org/packages/2b/a3/e50460b9a5789ca1451b70d4f52546fa9e2b420ba3bfa6100105c0559238/pydantic_core-2.27.2-cp310-cp310-win32.whl", hash = "sha256:50a68f3e3819077be2c98110c1f9dcb3817e93f267ba80a2c05bb4f8799e2ff4", size = 1816685 }, + { url = "https://files.pythonhosted.org/packages/57/4c/a8838731cb0f2c2a39d3535376466de6049034d7b239c0202a64aaa05533/pydantic_core-2.27.2-cp310-cp310-win_amd64.whl", hash = "sha256:e0fd26b16394ead34a424eecf8a31a1f5137094cabe84a1bcb10fa6ba39d3d31", size = 1982876 }, + { url = "https://files.pythonhosted.org/packages/c2/89/f3450af9d09d44eea1f2c369f49e8f181d742f28220f88cc4dfaae91ea6e/pydantic_core-2.27.2-cp311-cp311-macosx_10_12_x86_64.whl", hash = "sha256:8e10c99ef58cfdf2a66fc15d66b16c4a04f62bca39db589ae8cba08bc55331bc", size = 1893421 }, + { url = "https://files.pythonhosted.org/packages/9e/e3/71fe85af2021f3f386da42d291412e5baf6ce7716bd7101ea49c810eda90/pydantic_core-2.27.2-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:26f32e0adf166a84d0cb63be85c562ca8a6fa8de28e5f0d92250c6b7e9e2aff7", size = 1814998 }, + { url = "https://files.pythonhosted.org/packages/a6/3c/724039e0d848fd69dbf5806894e26479577316c6f0f112bacaf67aa889ac/pydantic_core-2.27.2-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:8c19d1ea0673cd13cc2f872f6c9ab42acc4e4f492a7ca9d3795ce2b112dd7e15", size = 1826167 }, + { url = "https://files.pythonhosted.org/packages/2b/5b/1b29e8c1fb5f3199a9a57c1452004ff39f494bbe9bdbe9a81e18172e40d3/pydantic_core-2.27.2-cp311-cp311-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:5e68c4446fe0810e959cdff46ab0a41ce2f2c86d227d96dc3847af0ba7def306", size = 1865071 }, + { url = "https://files.pythonhosted.org/packages/89/6c/3985203863d76bb7d7266e36970d7e3b6385148c18a68cc8915fd8c84d57/pydantic_core-2.27.2-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:d9640b0059ff4f14d1f37321b94061c6db164fbe49b334b31643e0528d100d99", size = 2036244 }, + { url = "https://files.pythonhosted.org/packages/0e/41/f15316858a246b5d723f7d7f599f79e37493b2e84bfc789e58d88c209f8a/pydantic_core-2.27.2-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:40d02e7d45c9f8af700f3452f329ead92da4c5f4317ca9b896de7ce7199ea459", size = 2737470 }, + { url = "https://files.pythonhosted.org/packages/a8/7c/b860618c25678bbd6d1d99dbdfdf0510ccb50790099b963ff78a124b754f/pydantic_core-2.27.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:1c1fd185014191700554795c99b347d64f2bb637966c4cfc16998a0ca700d048", size = 1992291 }, + { url = "https://files.pythonhosted.org/packages/bf/73/42c3742a391eccbeab39f15213ecda3104ae8682ba3c0c28069fbcb8c10d/pydantic_core-2.27.2-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:d81d2068e1c1228a565af076598f9e7451712700b673de8f502f0334f281387d", size = 1994613 }, + { url = "https://files.pythonhosted.org/packages/94/7a/941e89096d1175d56f59340f3a8ebaf20762fef222c298ea96d36a6328c5/pydantic_core-2.27.2-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:1a4207639fb02ec2dbb76227d7c751a20b1a6b4bc52850568e52260cae64ca3b", size = 2002355 }, + { url = "https://files.pythonhosted.org/packages/6e/95/2359937a73d49e336a5a19848713555605d4d8d6940c3ec6c6c0ca4dcf25/pydantic_core-2.27.2-cp311-cp311-musllinux_1_1_armv7l.whl", hash = "sha256:3de3ce3c9ddc8bbd88f6e0e304dea0e66d843ec9de1b0042b0911c1663ffd474", size = 2126661 }, + { url = "https://files.pythonhosted.org/packages/2b/4c/ca02b7bdb6012a1adef21a50625b14f43ed4d11f1fc237f9d7490aa5078c/pydantic_core-2.27.2-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:30c5f68ded0c36466acede341551106821043e9afaad516adfb6e8fa80a4e6a6", size = 2153261 }, + { url = "https://files.pythonhosted.org/packages/72/9d/a241db83f973049a1092a079272ffe2e3e82e98561ef6214ab53fe53b1c7/pydantic_core-2.27.2-cp311-cp311-win32.whl", hash = "sha256:c70c26d2c99f78b125a3459f8afe1aed4d9687c24fd677c6a4436bc042e50d6c", size = 1812361 }, + { url = "https://files.pythonhosted.org/packages/e8/ef/013f07248041b74abd48a385e2110aa3a9bbfef0fbd97d4e6d07d2f5b89a/pydantic_core-2.27.2-cp311-cp311-win_amd64.whl", hash = "sha256:08e125dbdc505fa69ca7d9c499639ab6407cfa909214d500897d02afb816e7cc", size = 1982484 }, + { url = "https://files.pythonhosted.org/packages/10/1c/16b3a3e3398fd29dca77cea0a1d998d6bde3902fa2706985191e2313cc76/pydantic_core-2.27.2-cp311-cp311-win_arm64.whl", hash = "sha256:26f0d68d4b235a2bae0c3fc585c585b4ecc51382db0e3ba402a22cbc440915e4", size = 1867102 }, + { url = "https://files.pythonhosted.org/packages/d6/74/51c8a5482ca447871c93e142d9d4a92ead74de6c8dc5e66733e22c9bba89/pydantic_core-2.27.2-cp312-cp312-macosx_10_12_x86_64.whl", hash = "sha256:9e0c8cfefa0ef83b4da9588448b6d8d2a2bf1a53c3f1ae5fca39eb3061e2f0b0", size = 1893127 }, + { url = "https://files.pythonhosted.org/packages/d3/f3/c97e80721735868313c58b89d2de85fa80fe8dfeeed84dc51598b92a135e/pydantic_core-2.27.2-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:83097677b8e3bd7eaa6775720ec8e0405f1575015a463285a92bfdfe254529ef", size = 1811340 }, + { url = "https://files.pythonhosted.org/packages/9e/91/840ec1375e686dbae1bd80a9e46c26a1e0083e1186abc610efa3d9a36180/pydantic_core-2.27.2-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:172fce187655fece0c90d90a678424b013f8fbb0ca8b036ac266749c09438cb7", size = 1822900 }, + { url = "https://files.pythonhosted.org/packages/f6/31/4240bc96025035500c18adc149aa6ffdf1a0062a4b525c932065ceb4d868/pydantic_core-2.27.2-cp312-cp312-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:519f29f5213271eeeeb3093f662ba2fd512b91c5f188f3bb7b27bc5973816934", size = 1869177 }, + { url = "https://files.pythonhosted.org/packages/fa/20/02fbaadb7808be578317015c462655c317a77a7c8f0ef274bc016a784c54/pydantic_core-2.27.2-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:05e3a55d124407fffba0dd6b0c0cd056d10e983ceb4e5dbd10dda135c31071d6", size = 2038046 }, + { url = "https://files.pythonhosted.org/packages/06/86/7f306b904e6c9eccf0668248b3f272090e49c275bc488a7b88b0823444a4/pydantic_core-2.27.2-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:9c3ed807c7b91de05e63930188f19e921d1fe90de6b4f5cd43ee7fcc3525cb8c", size = 2685386 }, + { url = "https://files.pythonhosted.org/packages/8d/f0/49129b27c43396581a635d8710dae54a791b17dfc50c70164866bbf865e3/pydantic_core-2.27.2-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6fb4aadc0b9a0c063206846d603b92030eb6f03069151a625667f982887153e2", size = 1997060 }, + { url = "https://files.pythonhosted.org/packages/0d/0f/943b4af7cd416c477fd40b187036c4f89b416a33d3cc0ab7b82708a667aa/pydantic_core-2.27.2-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:28ccb213807e037460326424ceb8b5245acb88f32f3d2777427476e1b32c48c4", size = 2004870 }, + { url = "https://files.pythonhosted.org/packages/35/40/aea70b5b1a63911c53a4c8117c0a828d6790483f858041f47bab0b779f44/pydantic_core-2.27.2-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:de3cd1899e2c279b140adde9357c4495ed9d47131b4a4eaff9052f23398076b3", size = 1999822 }, + { url = "https://files.pythonhosted.org/packages/f2/b3/807b94fd337d58effc5498fd1a7a4d9d59af4133e83e32ae39a96fddec9d/pydantic_core-2.27.2-cp312-cp312-musllinux_1_1_armv7l.whl", hash = "sha256:220f892729375e2d736b97d0e51466252ad84c51857d4d15f5e9692f9ef12be4", size = 2130364 }, + { url = "https://files.pythonhosted.org/packages/fc/df/791c827cd4ee6efd59248dca9369fb35e80a9484462c33c6649a8d02b565/pydantic_core-2.27.2-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:a0fcd29cd6b4e74fe8ddd2c90330fd8edf2e30cb52acda47f06dd615ae72da57", size = 2158303 }, + { url = "https://files.pythonhosted.org/packages/9b/67/4e197c300976af185b7cef4c02203e175fb127e414125916bf1128b639a9/pydantic_core-2.27.2-cp312-cp312-win32.whl", hash = "sha256:1e2cb691ed9834cd6a8be61228471d0a503731abfb42f82458ff27be7b2186fc", size = 1834064 }, + { url = "https://files.pythonhosted.org/packages/1f/ea/cd7209a889163b8dcca139fe32b9687dd05249161a3edda62860430457a5/pydantic_core-2.27.2-cp312-cp312-win_amd64.whl", hash = "sha256:cc3f1a99a4f4f9dd1de4fe0312c114e740b5ddead65bb4102884b384c15d8bc9", size = 1989046 }, + { url = "https://files.pythonhosted.org/packages/bc/49/c54baab2f4658c26ac633d798dab66b4c3a9bbf47cff5284e9c182f4137a/pydantic_core-2.27.2-cp312-cp312-win_arm64.whl", hash = "sha256:3911ac9284cd8a1792d3cb26a2da18f3ca26c6908cc434a18f730dc0db7bfa3b", size = 1885092 }, + { url = "https://files.pythonhosted.org/packages/41/b1/9bc383f48f8002f99104e3acff6cba1231b29ef76cfa45d1506a5cad1f84/pydantic_core-2.27.2-cp313-cp313-macosx_10_12_x86_64.whl", hash = "sha256:7d14bd329640e63852364c306f4d23eb744e0f8193148d4044dd3dacdaacbd8b", size = 1892709 }, + { url = "https://files.pythonhosted.org/packages/10/6c/e62b8657b834f3eb2961b49ec8e301eb99946245e70bf42c8817350cbefc/pydantic_core-2.27.2-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:82f91663004eb8ed30ff478d77c4d1179b3563df6cdb15c0817cd1cdaf34d154", size = 1811273 }, + { url = "https://files.pythonhosted.org/packages/ba/15/52cfe49c8c986e081b863b102d6b859d9defc63446b642ccbbb3742bf371/pydantic_core-2.27.2-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:71b24c7d61131bb83df10cc7e687433609963a944ccf45190cfc21e0887b08c9", size = 1823027 }, + { url = "https://files.pythonhosted.org/packages/b1/1c/b6f402cfc18ec0024120602bdbcebc7bdd5b856528c013bd4d13865ca473/pydantic_core-2.27.2-cp313-cp313-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:fa8e459d4954f608fa26116118bb67f56b93b209c39b008277ace29937453dc9", size = 1868888 }, + { url = "https://files.pythonhosted.org/packages/bd/7b/8cb75b66ac37bc2975a3b7de99f3c6f355fcc4d89820b61dffa8f1e81677/pydantic_core-2.27.2-cp313-cp313-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:ce8918cbebc8da707ba805b7fd0b382816858728ae7fe19a942080c24e5b7cd1", size = 2037738 }, + { url = "https://files.pythonhosted.org/packages/c8/f1/786d8fe78970a06f61df22cba58e365ce304bf9b9f46cc71c8c424e0c334/pydantic_core-2.27.2-cp313-cp313-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:eda3f5c2a021bbc5d976107bb302e0131351c2ba54343f8a496dc8783d3d3a6a", size = 2685138 }, + { url = "https://files.pythonhosted.org/packages/a6/74/d12b2cd841d8724dc8ffb13fc5cef86566a53ed358103150209ecd5d1999/pydantic_core-2.27.2-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:bd8086fa684c4775c27f03f062cbb9eaa6e17f064307e86b21b9e0abc9c0f02e", size = 1997025 }, + { url = "https://files.pythonhosted.org/packages/a0/6e/940bcd631bc4d9a06c9539b51f070b66e8f370ed0933f392db6ff350d873/pydantic_core-2.27.2-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:8d9b3388db186ba0c099a6d20f0604a44eabdeef1777ddd94786cdae158729e4", size = 2004633 }, + { url = "https://files.pythonhosted.org/packages/50/cc/a46b34f1708d82498c227d5d80ce615b2dd502ddcfd8376fc14a36655af1/pydantic_core-2.27.2-cp313-cp313-musllinux_1_1_aarch64.whl", hash = "sha256:7a66efda2387de898c8f38c0cf7f14fca0b51a8ef0b24bfea5849f1b3c95af27", size = 1999404 }, + { url = "https://files.pythonhosted.org/packages/ca/2d/c365cfa930ed23bc58c41463bae347d1005537dc8db79e998af8ba28d35e/pydantic_core-2.27.2-cp313-cp313-musllinux_1_1_armv7l.whl", hash = "sha256:18a101c168e4e092ab40dbc2503bdc0f62010e95d292b27827871dc85450d7ee", size = 2130130 }, + { url = "https://files.pythonhosted.org/packages/f4/d7/eb64d015c350b7cdb371145b54d96c919d4db516817f31cd1c650cae3b21/pydantic_core-2.27.2-cp313-cp313-musllinux_1_1_x86_64.whl", hash = "sha256:ba5dd002f88b78a4215ed2f8ddbdf85e8513382820ba15ad5ad8955ce0ca19a1", size = 2157946 }, + { url = "https://files.pythonhosted.org/packages/a4/99/bddde3ddde76c03b65dfd5a66ab436c4e58ffc42927d4ff1198ffbf96f5f/pydantic_core-2.27.2-cp313-cp313-win32.whl", hash = "sha256:1ebaf1d0481914d004a573394f4be3a7616334be70261007e47c2a6fe7e50130", size = 1834387 }, + { url = "https://files.pythonhosted.org/packages/71/47/82b5e846e01b26ac6f1893d3c5f9f3a2eb6ba79be26eef0b759b4fe72946/pydantic_core-2.27.2-cp313-cp313-win_amd64.whl", hash = "sha256:953101387ecf2f5652883208769a79e48db18c6df442568a0b5ccd8c2723abee", size = 1990453 }, + { url = "https://files.pythonhosted.org/packages/51/b2/b2b50d5ecf21acf870190ae5d093602d95f66c9c31f9d5de6062eb329ad1/pydantic_core-2.27.2-cp313-cp313-win_arm64.whl", hash = "sha256:ac4dbfd1691affb8f48c2c13241a2e3b60ff23247cbcf981759c768b6633cf8b", size = 1885186 }, + { url = "https://files.pythonhosted.org/packages/43/53/13e9917fc69c0a4aea06fd63ed6a8d6cda9cf140ca9584d49c1650b0ef5e/pydantic_core-2.27.2-cp38-cp38-macosx_10_12_x86_64.whl", hash = "sha256:d3e8d504bdd3f10835468f29008d72fc8359d95c9c415ce6e767203db6127506", size = 1899595 }, + { url = "https://files.pythonhosted.org/packages/f4/20/26c549249769ed84877f862f7bb93f89a6ee08b4bee1ed8781616b7fbb5e/pydantic_core-2.27.2-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:521eb9b7f036c9b6187f0b47318ab0d7ca14bd87f776240b90b21c1f4f149320", size = 1775010 }, + { url = "https://files.pythonhosted.org/packages/35/eb/8234e05452d92d2b102ffa1b56d801c3567e628fdc63f02080fdfc68fd5e/pydantic_core-2.27.2-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:85210c4d99a0114f5a9481b44560d7d1e35e32cc5634c656bc48e590b669b145", size = 1830727 }, + { url = "https://files.pythonhosted.org/packages/8f/df/59f915c8b929d5f61e5a46accf748a87110ba145156f9326d1a7d28912b2/pydantic_core-2.27.2-cp38-cp38-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:d716e2e30c6f140d7560ef1538953a5cd1a87264c737643d481f2779fc247fe1", size = 1868393 }, + { url = "https://files.pythonhosted.org/packages/d5/52/81cf4071dca654d485c277c581db368b0c95b2b883f4d7b736ab54f72ddf/pydantic_core-2.27.2-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:f66d89ba397d92f840f8654756196d93804278457b5fbede59598a1f9f90b228", size = 2040300 }, + { url = "https://files.pythonhosted.org/packages/9c/00/05197ce1614f5c08d7a06e1d39d5d8e704dc81971b2719af134b844e2eaf/pydantic_core-2.27.2-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:669e193c1c576a58f132e3158f9dfa9662969edb1a250c54d8fa52590045f046", size = 2738785 }, + { url = "https://files.pythonhosted.org/packages/f7/a3/5f19bc495793546825ab160e530330c2afcee2281c02b5ffafd0b32ac05e/pydantic_core-2.27.2-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:9fdbe7629b996647b99c01b37f11170a57ae675375b14b8c13b8518b8320ced5", size = 1996493 }, + { url = "https://files.pythonhosted.org/packages/ed/e8/e0102c2ec153dc3eed88aea03990e1b06cfbca532916b8a48173245afe60/pydantic_core-2.27.2-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:d262606bf386a5ba0b0af3b97f37c83d7011439e3dc1a9298f21efb292e42f1a", size = 1998544 }, + { url = "https://files.pythonhosted.org/packages/fb/a3/4be70845b555bd80aaee9f9812a7cf3df81550bce6dadb3cfee9c5d8421d/pydantic_core-2.27.2-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:cabb9bcb7e0d97f74df8646f34fc76fbf793b7f6dc2438517d7a9e50eee4f14d", size = 2007449 }, + { url = "https://files.pythonhosted.org/packages/e3/9f/b779ed2480ba355c054e6d7ea77792467631d674b13d8257085a4bc7dcda/pydantic_core-2.27.2-cp38-cp38-musllinux_1_1_armv7l.whl", hash = "sha256:d2d63f1215638d28221f664596b1ccb3944f6e25dd18cd3b86b0a4c408d5ebb9", size = 2129460 }, + { url = "https://files.pythonhosted.org/packages/a0/f0/a6ab0681f6e95260c7fbf552874af7302f2ea37b459f9b7f00698f875492/pydantic_core-2.27.2-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:bca101c00bff0adb45a833f8451b9105d9df18accb8743b08107d7ada14bd7da", size = 2159609 }, + { url = "https://files.pythonhosted.org/packages/8a/2b/e1059506795104349712fbca647b18b3f4a7fd541c099e6259717441e1e0/pydantic_core-2.27.2-cp38-cp38-win32.whl", hash = "sha256:f6f8e111843bbb0dee4cb6594cdc73e79b3329b526037ec242a3e49012495b3b", size = 1819886 }, + { url = "https://files.pythonhosted.org/packages/aa/6d/df49c17f024dfc58db0bacc7b03610058018dd2ea2eaf748ccbada4c3d06/pydantic_core-2.27.2-cp38-cp38-win_amd64.whl", hash = "sha256:fd1aea04935a508f62e0d0ef1f5ae968774a32afc306fb8545e06f5ff5cdf3ad", size = 1980773 }, + { url = "https://files.pythonhosted.org/packages/27/97/3aef1ddb65c5ccd6eda9050036c956ff6ecbfe66cb7eb40f280f121a5bb0/pydantic_core-2.27.2-cp39-cp39-macosx_10_12_x86_64.whl", hash = "sha256:c10eb4f1659290b523af58fa7cffb452a61ad6ae5613404519aee4bfbf1df993", size = 1896475 }, + { url = "https://files.pythonhosted.org/packages/ad/d3/5668da70e373c9904ed2f372cb52c0b996426f302e0dee2e65634c92007d/pydantic_core-2.27.2-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:ef592d4bad47296fb11f96cd7dc898b92e795032b4894dfb4076cfccd43a9308", size = 1772279 }, + { url = "https://files.pythonhosted.org/packages/8a/9e/e44b8cb0edf04a2f0a1f6425a65ee089c1d6f9c4c2dcab0209127b6fdfc2/pydantic_core-2.27.2-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:c61709a844acc6bf0b7dce7daae75195a10aac96a596ea1b776996414791ede4", size = 1829112 }, + { url = "https://files.pythonhosted.org/packages/1c/90/1160d7ac700102effe11616e8119e268770f2a2aa5afb935f3ee6832987d/pydantic_core-2.27.2-cp39-cp39-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:42c5f762659e47fdb7b16956c71598292f60a03aa92f8b6351504359dbdba6cf", size = 1866780 }, + { url = "https://files.pythonhosted.org/packages/ee/33/13983426df09a36d22c15980008f8d9c77674fc319351813b5a2739b70f3/pydantic_core-2.27.2-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:4c9775e339e42e79ec99c441d9730fccf07414af63eac2f0e48e08fd38a64d76", size = 2037943 }, + { url = "https://files.pythonhosted.org/packages/01/d7/ced164e376f6747e9158c89988c293cd524ab8d215ae4e185e9929655d5c/pydantic_core-2.27.2-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:57762139821c31847cfb2df63c12f725788bd9f04bc2fb392790959b8f70f118", size = 2740492 }, + { url = "https://files.pythonhosted.org/packages/8b/1f/3dc6e769d5b7461040778816aab2b00422427bcaa4b56cc89e9c653b2605/pydantic_core-2.27.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:0d1e85068e818c73e048fe28cfc769040bb1f475524f4745a5dc621f75ac7630", size = 1995714 }, + { url = "https://files.pythonhosted.org/packages/07/d7/a0bd09bc39283530b3f7c27033a814ef254ba3bd0b5cfd040b7abf1fe5da/pydantic_core-2.27.2-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:097830ed52fd9e427942ff3b9bc17fab52913b2f50f2880dc4a5611446606a54", size = 1997163 }, + { url = "https://files.pythonhosted.org/packages/2d/bb/2db4ad1762e1c5699d9b857eeb41959191980de6feb054e70f93085e1bcd/pydantic_core-2.27.2-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:044a50963a614ecfae59bb1eaf7ea7efc4bc62f49ed594e18fa1e5d953c40e9f", size = 2005217 }, + { url = "https://files.pythonhosted.org/packages/53/5f/23a5a3e7b8403f8dd8fc8a6f8b49f6b55c7d715b77dcf1f8ae919eeb5628/pydantic_core-2.27.2-cp39-cp39-musllinux_1_1_armv7l.whl", hash = "sha256:4e0b4220ba5b40d727c7f879eac379b822eee5d8fff418e9d3381ee45b3b0362", size = 2127899 }, + { url = "https://files.pythonhosted.org/packages/c2/ae/aa38bb8dd3d89c2f1d8362dd890ee8f3b967330821d03bbe08fa01ce3766/pydantic_core-2.27.2-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:5e4f4bb20d75e9325cc9696c6802657b58bc1dbbe3022f32cc2b2b632c3fbb96", size = 2155726 }, + { url = "https://files.pythonhosted.org/packages/98/61/4f784608cc9e98f70839187117ce840480f768fed5d386f924074bf6213c/pydantic_core-2.27.2-cp39-cp39-win32.whl", hash = "sha256:cca63613e90d001b9f2f9a9ceb276c308bfa2a43fafb75c8031c4f66039e8c6e", size = 1817219 }, + { url = "https://files.pythonhosted.org/packages/57/82/bb16a68e4a1a858bb3768c2c8f1ff8d8978014e16598f001ea29a25bf1d1/pydantic_core-2.27.2-cp39-cp39-win_amd64.whl", hash = "sha256:77d1bca19b0f7021b3a982e6f903dcd5b2b06076def36a652e3907f596e29f67", size = 1985382 }, + { url = "https://files.pythonhosted.org/packages/46/72/af70981a341500419e67d5cb45abe552a7c74b66326ac8877588488da1ac/pydantic_core-2.27.2-pp310-pypy310_pp73-macosx_10_12_x86_64.whl", hash = "sha256:2bf14caea37e91198329b828eae1618c068dfb8ef17bb33287a7ad4b61ac314e", size = 1891159 }, + { url = "https://files.pythonhosted.org/packages/ad/3d/c5913cccdef93e0a6a95c2d057d2c2cba347815c845cda79ddd3c0f5e17d/pydantic_core-2.27.2-pp310-pypy310_pp73-macosx_11_0_arm64.whl", hash = "sha256:b0cb791f5b45307caae8810c2023a184c74605ec3bcbb67d13846c28ff731ff8", size = 1768331 }, + { url = "https://files.pythonhosted.org/packages/f6/f0/a3ae8fbee269e4934f14e2e0e00928f9346c5943174f2811193113e58252/pydantic_core-2.27.2-pp310-pypy310_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:688d3fd9fcb71f41c4c015c023d12a79d1c4c0732ec9eb35d96e3388a120dcf3", size = 1822467 }, + { url = "https://files.pythonhosted.org/packages/d7/7a/7bbf241a04e9f9ea24cd5874354a83526d639b02674648af3f350554276c/pydantic_core-2.27.2-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:3d591580c34f4d731592f0e9fe40f9cc1b430d297eecc70b962e93c5c668f15f", size = 1979797 }, + { url = "https://files.pythonhosted.org/packages/4f/5f/4784c6107731f89e0005a92ecb8a2efeafdb55eb992b8e9d0a2be5199335/pydantic_core-2.27.2-pp310-pypy310_pp73-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:82f986faf4e644ffc189a7f1aafc86e46ef70372bb153e7001e8afccc6e54133", size = 1987839 }, + { url = "https://files.pythonhosted.org/packages/6d/a7/61246562b651dff00de86a5f01b6e4befb518df314c54dec187a78d81c84/pydantic_core-2.27.2-pp310-pypy310_pp73-musllinux_1_1_aarch64.whl", hash = "sha256:bec317a27290e2537f922639cafd54990551725fc844249e64c523301d0822fc", size = 1998861 }, + { url = "https://files.pythonhosted.org/packages/86/aa/837821ecf0c022bbb74ca132e117c358321e72e7f9702d1b6a03758545e2/pydantic_core-2.27.2-pp310-pypy310_pp73-musllinux_1_1_armv7l.whl", hash = "sha256:0296abcb83a797db256b773f45773da397da75a08f5fcaef41f2044adec05f50", size = 2116582 }, + { url = "https://files.pythonhosted.org/packages/81/b0/5e74656e95623cbaa0a6278d16cf15e10a51f6002e3ec126541e95c29ea3/pydantic_core-2.27.2-pp310-pypy310_pp73-musllinux_1_1_x86_64.whl", hash = "sha256:0d75070718e369e452075a6017fbf187f788e17ed67a3abd47fa934d001863d9", size = 2151985 }, + { url = "https://files.pythonhosted.org/packages/63/37/3e32eeb2a451fddaa3898e2163746b0cffbbdbb4740d38372db0490d67f3/pydantic_core-2.27.2-pp310-pypy310_pp73-win_amd64.whl", hash = "sha256:7e17b560be3c98a8e3aa66ce828bdebb9e9ac6ad5466fba92eb74c4c95cb1151", size = 2004715 }, + { url = "https://files.pythonhosted.org/packages/29/0e/dcaea00c9dbd0348b723cae82b0e0c122e0fa2b43fa933e1622fd237a3ee/pydantic_core-2.27.2-pp39-pypy39_pp73-macosx_10_12_x86_64.whl", hash = "sha256:c33939a82924da9ed65dab5a65d427205a73181d8098e79b6b426bdf8ad4e656", size = 1891733 }, + { url = "https://files.pythonhosted.org/packages/86/d3/e797bba8860ce650272bda6383a9d8cad1d1c9a75a640c9d0e848076f85e/pydantic_core-2.27.2-pp39-pypy39_pp73-macosx_11_0_arm64.whl", hash = "sha256:00bad2484fa6bda1e216e7345a798bd37c68fb2d97558edd584942aa41b7d278", size = 1768375 }, + { url = "https://files.pythonhosted.org/packages/41/f7/f847b15fb14978ca2b30262548f5fc4872b2724e90f116393eb69008299d/pydantic_core-2.27.2-pp39-pypy39_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:c817e2b40aba42bac6f457498dacabc568c3b7a986fc9ba7c8d9d260b71485fb", size = 1822307 }, + { url = "https://files.pythonhosted.org/packages/9c/63/ed80ec8255b587b2f108e514dc03eed1546cd00f0af281e699797f373f38/pydantic_core-2.27.2-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:251136cdad0cb722e93732cb45ca5299fb56e1344a833640bf93b2803f8d1bfd", size = 1979971 }, + { url = "https://files.pythonhosted.org/packages/a9/6d/6d18308a45454a0de0e975d70171cadaf454bc7a0bf86b9c7688e313f0bb/pydantic_core-2.27.2-pp39-pypy39_pp73-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:d2088237af596f0a524d3afc39ab3b036e8adb054ee57cbb1dcf8e09da5b29cc", size = 1987616 }, + { url = "https://files.pythonhosted.org/packages/82/8a/05f8780f2c1081b800a7ca54c1971e291c2d07d1a50fb23c7e4aef4ed403/pydantic_core-2.27.2-pp39-pypy39_pp73-musllinux_1_1_aarch64.whl", hash = "sha256:d4041c0b966a84b4ae7a09832eb691a35aec90910cd2dbe7a208de59be77965b", size = 1998943 }, + { url = "https://files.pythonhosted.org/packages/5e/3e/fe5b6613d9e4c0038434396b46c5303f5ade871166900b357ada4766c5b7/pydantic_core-2.27.2-pp39-pypy39_pp73-musllinux_1_1_armv7l.whl", hash = "sha256:8083d4e875ebe0b864ffef72a4304827015cff328a1be6e22cc850753bfb122b", size = 2116654 }, + { url = "https://files.pythonhosted.org/packages/db/ad/28869f58938fad8cc84739c4e592989730bfb69b7c90a8fff138dff18e1e/pydantic_core-2.27.2-pp39-pypy39_pp73-musllinux_1_1_x86_64.whl", hash = "sha256:f141ee28a0ad2123b6611b6ceff018039df17f32ada8b534e6aa039545a3efb2", size = 2152292 }, + { url = "https://files.pythonhosted.org/packages/a1/0c/c5c5cd3689c32ed1fe8c5d234b079c12c281c051759770c05b8bed6412b5/pydantic_core-2.27.2-pp39-pypy39_pp73-win_amd64.whl", hash = "sha256:7d0c8399fcc1848491f00e0314bd59fb34a9c008761bcb422a057670c3f65e35", size = 2004961 }, ] [[package]] @@ -226,52 +186,42 @@ wheels = [ ] [[package]] -name = "ruff" -version = "0.9.9" +name = "six" +version = "1.17.0" source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/6f/c3/418441a8170e8d53d05c0b9dad69760dbc7b8a12c10dbe6db1e1205d2377/ruff-0.9.9.tar.gz", hash = "sha256:0062ed13f22173e85f8f7056f9a24016e692efeea8704d1a5e8011b8aa850933", size = 3717448 } +sdist = { url = "https://files.pythonhosted.org/packages/94/e7/b2c673351809dca68a0e064b6af791aa332cf192da575fd474ed7d6f16a2/six-1.17.0.tar.gz", hash = "sha256:ff70335d468e7eb6ec65b95b99d3a2836546063f63acc5171de367e834932a81", size = 34031 } wheels = [ - { url = "https://files.pythonhosted.org/packages/bc/c3/2c4afa9ba467555d074b146d9aed0633a56ccdb900839fb008295d037b89/ruff-0.9.9-py3-none-linux_armv6l.whl", hash = "sha256:628abb5ea10345e53dff55b167595a159d3e174d6720bf19761f5e467e68d367", size = 10027252 }, - { url = "https://files.pythonhosted.org/packages/33/d1/439e58487cf9eac26378332e25e7d5ade4b800ce1eec7dc2cfc9b0d7ca96/ruff-0.9.9-py3-none-macosx_10_12_x86_64.whl", hash = "sha256:b6cd1428e834b35d7493354723543b28cc11dc14d1ce19b685f6e68e07c05ec7", size = 10840721 }, - { url = "https://files.pythonhosted.org/packages/50/44/fead822c38281ba0122f1b76b460488a175a9bd48b130650a6fb6dbcbcf9/ruff-0.9.9-py3-none-macosx_11_0_arm64.whl", hash = "sha256:5ee162652869120ad260670706f3cd36cd3f32b0c651f02b6da142652c54941d", size = 10161439 }, - { url = "https://files.pythonhosted.org/packages/11/ae/d404a2ab8e61ddf6342e09cc6b7f7846cce6b243e45c2007dbe0ca928a5d/ruff-0.9.9-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:3aa0f6b75082c9be1ec5a1db78c6d4b02e2375c3068438241dc19c7c306cc61a", size = 10336264 }, - { url = "https://files.pythonhosted.org/packages/6a/4e/7c268aa7d84cd709fb6f046b8972313142cffb40dfff1d2515c5e6288d54/ruff-0.9.9-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:584cc66e89fb5f80f84b05133dd677a17cdd86901d6479712c96597a3f28e7fe", size = 9908774 }, - { url = "https://files.pythonhosted.org/packages/cc/26/c618a878367ef1b76270fd027ca93692657d3f6122b84ba48911ef5f2edc/ruff-0.9.9-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:abf3369325761a35aba75cd5c55ba1b5eb17d772f12ab168fbfac54be85cf18c", size = 11428127 }, - { url = "https://files.pythonhosted.org/packages/d7/9a/c5588a93d9bfed29f565baf193fe802fa676a0c837938137ea6cf0576d8c/ruff-0.9.9-py3-none-manylinux_2_17_ppc64.manylinux2014_ppc64.whl", hash = "sha256:3403a53a32a90ce929aa2f758542aca9234befa133e29f4933dcef28a24317be", size = 12133187 }, - { url = "https://files.pythonhosted.org/packages/3e/ff/e7980a7704a60905ed7e156a8d73f604c846d9bd87deda9cabfa6cba073a/ruff-0.9.9-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:18454e7fa4e4d72cffe28a37cf6a73cb2594f81ec9f4eca31a0aaa9ccdfb1590", size = 11602937 }, - { url = "https://files.pythonhosted.org/packages/24/78/3690444ad9e3cab5c11abe56554c35f005b51d1d118b429765249095269f/ruff-0.9.9-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:0fadfe2c88724c9617339f62319ed40dcdadadf2888d5afb88bf3adee7b35bfb", size = 13771698 }, - { url = "https://files.pythonhosted.org/packages/6e/bf/e477c2faf86abe3988e0b5fd22a7f3520e820b2ee335131aca2e16120038/ruff-0.9.9-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6df104d08c442a1aabcfd254279b8cc1e2cbf41a605aa3e26610ba1ec4acf0b0", size = 11249026 }, - { url = "https://files.pythonhosted.org/packages/f7/82/cdaffd59e5a8cb5b14c408c73d7a555a577cf6645faaf83e52fe99521715/ruff-0.9.9-py3-none-musllinux_1_2_aarch64.whl", hash = "sha256:d7c62939daf5b2a15af48abbd23bea1efdd38c312d6e7c4cedf5a24e03207e17", size = 10220432 }, - { url = "https://files.pythonhosted.org/packages/fe/a4/2507d0026225efa5d4412b6e294dfe54725a78652a5c7e29e6bd0fc492f3/ruff-0.9.9-py3-none-musllinux_1_2_armv7l.whl", hash = "sha256:9494ba82a37a4b81b6a798076e4a3251c13243fc37967e998efe4cce58c8a8d1", size = 9874602 }, - { url = "https://files.pythonhosted.org/packages/d5/be/f3aab1813846b476c4bcffe052d232244979c3cd99d751c17afb530ca8e4/ruff-0.9.9-py3-none-musllinux_1_2_i686.whl", hash = "sha256:4efd7a96ed6d36ef011ae798bf794c5501a514be369296c672dab7921087fa57", size = 10851212 }, - { url = "https://files.pythonhosted.org/packages/8b/45/8e5fd559bea0d2f57c4e12bf197a2fade2fac465aa518284f157dfbca92b/ruff-0.9.9-py3-none-musllinux_1_2_x86_64.whl", hash = "sha256:ab90a7944c5a1296f3ecb08d1cbf8c2da34c7e68114b1271a431a3ad30cb660e", size = 11327490 }, - { url = "https://files.pythonhosted.org/packages/42/55/e6c90f13880aeef327746052907e7e930681f26a164fe130ddac28b08269/ruff-0.9.9-py3-none-win32.whl", hash = "sha256:6b4c376d929c25ecd6d87e182a230fa4377b8e5125a4ff52d506ee8c087153c1", size = 10227912 }, - { url = "https://files.pythonhosted.org/packages/35/b2/da925693cb82a1208aa34966c0f36cb222baca94e729dd22a587bc22d0f3/ruff-0.9.9-py3-none-win_amd64.whl", hash = "sha256:837982ea24091d4c1700ddb2f63b7070e5baec508e43b01de013dc7eff974ff1", size = 11355632 }, - { url = "https://files.pythonhosted.org/packages/31/d8/de873d1c1b020d668d8ec9855d390764cb90cf8f6486c0983da52be8b7b7/ruff-0.9.9-py3-none-win_arm64.whl", hash = "sha256:3ac78f127517209fe6d96ab00f3ba97cafe38718b23b1db3e96d8b2d39e37ddf", size = 10435860 }, + { url = "https://files.pythonhosted.org/packages/b7/ce/149a00dd41f10bc29e5921b496af8b574d8413afcd5e30dfa0ed46c2cc5e/six-1.17.0-py2.py3-none-any.whl", hash = "sha256:4721f391ed90541fddacab5acf947aa0d3dc7d27b2e1e8eda2be8970586c3274", size = 11050 }, ] [[package]] -name = "setuptools" -version = "75.8.2" +name = "typing-extensions" +version = "4.12.2" source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/d1/53/43d99d7687e8cdef5ab5f9ec5eaf2c0423c2b35133a2b7e7bc276fc32b21/setuptools-75.8.2.tar.gz", hash = "sha256:4880473a969e5f23f2a2be3646b2dfd84af9028716d398e46192f84bc36900d2", size = 1344083 } +sdist = { url = "https://files.pythonhosted.org/packages/df/db/f35a00659bc03fec321ba8bce9420de607a1d37f8342eee1863174c69557/typing_extensions-4.12.2.tar.gz", hash = "sha256:1a7ead55c7e559dd4dee8856e3a88b41225abfe1ce8df57b7c13915fe121ffb8", size = 85321 } wheels = [ - { url = "https://files.pythonhosted.org/packages/a9/38/7d7362e031bd6dc121e5081d8cb6aa6f6fedf2b67bf889962134c6da4705/setuptools-75.8.2-py3-none-any.whl", hash = "sha256:558e47c15f1811c1fa7adbd0096669bf76c1d3f433f58324df69f3f5ecac4e8f", size = 1229385 }, + { url = "https://files.pythonhosted.org/packages/26/9f/ad63fc0248c5379346306f8668cda6e2e2e9c95e01216d2b8ffd9ff037d0/typing_extensions-4.12.2-py3-none-any.whl", hash = "sha256:04e5ca0351e0f3f85c6853954072df659d0d13fac324d0072316b67d7794700d", size = 37438 }, ] [[package]] -name = "six" -version = "1.17.0" +name = "urllib3" +version = "2.2.3" source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/94/e7/b2c673351809dca68a0e064b6af791aa332cf192da575fd474ed7d6f16a2/six-1.17.0.tar.gz", hash = "sha256:ff70335d468e7eb6ec65b95b99d3a2836546063f63acc5171de367e834932a81", size = 34031 } +resolution-markers = [ + "python_full_version < '3.9'", +] +sdist = { url = "https://files.pythonhosted.org/packages/ed/63/22ba4ebfe7430b76388e7cd448d5478814d3032121827c12a2cc287e2260/urllib3-2.2.3.tar.gz", hash = "sha256:e7d814a81dad81e6caf2ec9fdedb284ecc9c73076b62654547cc64ccdcae26e9", size = 300677 } wheels = [ - { url = "https://files.pythonhosted.org/packages/b7/ce/149a00dd41f10bc29e5921b496af8b574d8413afcd5e30dfa0ed46c2cc5e/six-1.17.0-py2.py3-none-any.whl", hash = "sha256:4721f391ed90541fddacab5acf947aa0d3dc7d27b2e1e8eda2be8970586c3274", size = 11050 }, + { url = "https://files.pythonhosted.org/packages/ce/d9/5f4c13cecde62396b0d3fe530a50ccea91e7dfc1ccf0e09c228841bb5ba8/urllib3-2.2.3-py3-none-any.whl", hash = "sha256:ca899ca043dcb1bafa3e262d73aa25c465bfb49e0bd9dd5d59f1d0acba2f8fac", size = 126338 }, ] [[package]] name = "urllib3" version = "2.3.0" source = { registry = "https://pypi.org/simple" } +resolution-markers = [ + "python_full_version >= '3.9'", +] sdist = { url = "https://files.pythonhosted.org/packages/aa/63/e53da845320b757bf29ef6a9062f5c669fe997973f966045cb019c3f4b66/urllib3-2.3.0.tar.gz", hash = "sha256:f8c5449b3cf0861679ce7e0503c7b44b5ec981bec0d1d3795a07f1ba96f0204d", size = 307268 } wheels = [ { url = "https://files.pythonhosted.org/packages/c8/19/4ec628951a74043532ca2cf5d97b7b14863931476d117c471e8e2b1eb39f/urllib3-2.3.0-py3-none-any.whl", hash = "sha256:1cee9ad369867bfdbbb48b7dd50374c0967a0bb7710050facf0dd6911440e3df", size = 128369 }, diff --git a/yarn.lock b/yarn.lock index 018f3f7..72ca62a 100644 --- a/yarn.lock +++ b/yarn.lock @@ -278,59 +278,54 @@ __metadata: languageName: node linkType: hard -"@nestjs/axios@npm:0.1.0": - version: 0.1.0 - resolution: "@nestjs/axios@npm:0.1.0" - dependencies: - axios: "npm:0.27.2" +"@nestjs/axios@npm:3.1.3": + version: 3.1.3 + resolution: "@nestjs/axios@npm:3.1.3" peerDependencies: - "@nestjs/common": ^7.0.0 || ^8.0.0 || ^9.0.0 - reflect-metadata: ^0.1.12 + "@nestjs/common": ^7.0.0 || ^8.0.0 || ^9.0.0 || ^10.0.0 + axios: ^1.3.1 rxjs: ^6.0.0 || ^7.0.0 - checksum: 10c0/21ae5ccd7352c16b2f2f14177fc20b2a2aa0e556437980380175b92181a91b8498f43e5b132de5a6175fc30022e2f7fbc750c10dedd6316b7fe50c351a22942a + checksum: 10c0/3b3f5ecc9a17317daafbf6ffe0cb792c5bd44d9fe7c6e2bda5d87163b9c2ed05a71a49d4e2d810c455eaa94f25e85e63673da21d674917bd9c16dfb937771109 languageName: node linkType: hard -"@nestjs/common@npm:9.3.11": - version: 9.3.11 - resolution: "@nestjs/common@npm:9.3.11" +"@nestjs/common@npm:10.4.15": + version: 10.4.15 + resolution: "@nestjs/common@npm:10.4.15" dependencies: iterare: "npm:1.2.1" - tslib: "npm:2.5.0" - uid: "npm:2.0.1" + tslib: "npm:2.8.1" + uid: "npm:2.0.2" peerDependencies: - cache-manager: <=5 class-transformer: "*" class-validator: "*" - reflect-metadata: ^0.1.12 + reflect-metadata: ^0.1.12 || ^0.2.0 rxjs: ^7.1.0 peerDependenciesMeta: - cache-manager: - optional: true class-transformer: optional: true class-validator: optional: true - checksum: 10c0/bfc7c27d9ac7c0a83a16c9aa9139900e2328ea96b739444cf8b2afda6cc6218180634993baa739c292b337666f06a81d1d643fc64276544ededb48805d0f6a65 + checksum: 10c0/9566993fd3f805df2be632f5a16ca90d81b0deeb50e1e7cde4a49d4948c0d8d7db58b42ded70f35061e95e91a40d2adcd9e19cb2771090114eb737f62d2ea4c6 languageName: node linkType: hard -"@nestjs/core@npm:9.3.11": - version: 9.3.11 - resolution: "@nestjs/core@npm:9.3.11" +"@nestjs/core@npm:10.4.15": + version: 10.4.15 + resolution: "@nestjs/core@npm:10.4.15" dependencies: "@nuxtjs/opencollective": "npm:0.3.2" fast-safe-stringify: "npm:2.1.1" iterare: "npm:1.2.1" - path-to-regexp: "npm:3.2.0" - tslib: "npm:2.5.0" - uid: "npm:2.0.1" + path-to-regexp: "npm:3.3.0" + tslib: "npm:2.8.1" + uid: "npm:2.0.2" peerDependencies: - "@nestjs/common": ^9.0.0 - "@nestjs/microservices": ^9.0.0 - "@nestjs/platform-express": ^9.0.0 - "@nestjs/websockets": ^9.0.0 - reflect-metadata: ^0.1.12 + "@nestjs/common": ^10.0.0 + "@nestjs/microservices": ^10.0.0 + "@nestjs/platform-express": ^10.0.0 + "@nestjs/websockets": ^10.0.0 + reflect-metadata: ^0.1.12 || ^0.2.0 rxjs: ^7.1.0 peerDependenciesMeta: "@nestjs/microservices": @@ -339,7 +334,7 @@ __metadata: optional: true "@nestjs/websockets": optional: true - checksum: 10c0/d04e6968bc1a0200394cee5b4bc561920fb745f045a39f3f4b1bd37c311a35160a66415b0be6ba539dfcabda4f17a2f4d53736236ba9df9405028cc9ab54670a + checksum: 10c0/68958efca25b28ea38bcfc810751c626a913a848d9ec86aab0a6021e708632b95585f0da5d5c2b0513bb64cacfc97d391b45ec002b718a8e90fdda1b4354bed1 languageName: node linkType: hard @@ -507,29 +502,31 @@ __metadata: languageName: node linkType: hard -"@openapitools/openapi-generator-cli@npm:2.7.0": - version: 2.7.0 - resolution: "@openapitools/openapi-generator-cli@npm:2.7.0" +"@openapitools/openapi-generator-cli@npm:2.17.0": + version: 2.17.0 + resolution: "@openapitools/openapi-generator-cli@npm:2.17.0" dependencies: - "@nestjs/axios": "npm:0.1.0" - "@nestjs/common": "npm:9.3.11" - "@nestjs/core": "npm:9.3.11" + "@nestjs/axios": "npm:3.1.3" + "@nestjs/common": "npm:10.4.15" + "@nestjs/core": "npm:10.4.15" "@nuxtjs/opencollective": "npm:0.3.2" + axios: "npm:1.7.9" chalk: "npm:4.1.2" commander: "npm:8.3.0" compare-versions: "npm:4.1.4" concurrently: "npm:6.5.1" console.table: "npm:0.10.0" fs-extra: "npm:10.1.0" - glob: "npm:7.1.6" - inquirer: "npm:8.2.5" + glob: "npm:9.3.5" + inquirer: "npm:8.2.6" lodash: "npm:4.17.21" + proxy-agent: "npm:6.5.0" reflect-metadata: "npm:0.1.13" - rxjs: "npm:7.8.0" - tslib: "npm:2.0.3" + rxjs: "npm:7.8.1" + tslib: "npm:2.8.1" bin: openapi-generator-cli: main.js - checksum: 10c0/451e54750316a512563c9bca1c5ea2a5921e942763f9463795aab0a4dc8f1bb833fb67e4882ec7ce2b71afc81de1c75af156679ce4e660e895ba5e36f39fc0ff + checksum: 10c0/43cff421946c074706e2ad9c4c56ca9220caa0b675aad46ac31e7807d4ff728ea57c5a84c375150bc7e6bf36f29bc67a9bebb6ab1a157ba806913550d53b650f languageName: node linkType: hard @@ -710,13 +707,14 @@ __metadata: languageName: node linkType: hard -"axios@npm:0.27.2": - version: 0.27.2 - resolution: "axios@npm:0.27.2" +"axios@npm:1.7.9": + version: 1.7.9 + resolution: "axios@npm:1.7.9" dependencies: - follow-redirects: "npm:^1.14.9" + follow-redirects: "npm:^1.15.6" form-data: "npm:^4.0.0" - checksum: 10c0/76d673d2a90629944b44d6f345f01e58e9174690f635115d5ffd4aca495d99bcd8f95c590d5ccb473513f5ebc1d1a6e8934580d0c57cdd0498c3a101313ef771 + proxy-from-env: "npm:^1.1.0" + checksum: 10c0/b7a41e24b59fee5f0f26c1fc844b45b17442832eb3a0fb42dd4f1430eb4abc571fe168e67913e8a1d91c993232bd1d1ab03e20e4d1fee8c6147649b576fc1b0b languageName: node linkType: hard @@ -792,6 +790,15 @@ __metadata: languageName: node linkType: hard +"brace-expansion@npm:^2.0.1": + version: 2.0.1 + resolution: "brace-expansion@npm:2.0.1" + dependencies: + balanced-match: "npm:^1.0.0" + checksum: 10c0/b358f2fe060e2d7a87aa015979ecea07f3c37d4018f8d6deb5bd4c229ad3a0384fe6029bb76cd8be63c81e516ee52d1a0673edbe2023d53a5191732ae3c3e49f + languageName: node + linkType: hard + "braces@npm:^3.0.3": version: 3.0.3 resolution: "braces@npm:3.0.3" @@ -1541,7 +1548,7 @@ __metadata: languageName: node linkType: hard -"follow-redirects@npm:^1.14.9": +"follow-redirects@npm:^1.15.6": version: 1.15.9 resolution: "follow-redirects@npm:1.15.9" peerDependenciesMeta: @@ -1686,17 +1693,15 @@ __metadata: languageName: node linkType: hard -"glob@npm:7.1.6": - version: 7.1.6 - resolution: "glob@npm:7.1.6" +"glob@npm:9.3.5": + version: 9.3.5 + resolution: "glob@npm:9.3.5" dependencies: fs.realpath: "npm:^1.0.0" - inflight: "npm:^1.0.4" - inherits: "npm:2" - minimatch: "npm:^3.0.4" - once: "npm:^1.3.0" - path-is-absolute: "npm:^1.0.0" - checksum: 10c0/2575cce9306ac534388db751f0aa3e78afedb6af8f3b529ac6b2354f66765545145dba8530abf7bff49fb399a047d3f9b6901c38ee4c9503f592960d9af67763 + minimatch: "npm:^8.0.2" + minipass: "npm:^4.2.4" + path-scurry: "npm:^1.6.1" + checksum: 10c0/2f6c2b9ee019ee21dc258ae97a88719614591e4c979cb4580b1b9df6f0f778a3cb38b4bdaf18dfa584637ea10f89a3c5f2533a5e449cf8741514ad18b0951f2e languageName: node linkType: hard @@ -1933,9 +1938,9 @@ __metadata: languageName: node linkType: hard -"inquirer@npm:8.2.5": - version: 8.2.5 - resolution: "inquirer@npm:8.2.5" +"inquirer@npm:8.2.6": + version: 8.2.6 + resolution: "inquirer@npm:8.2.6" dependencies: ansi-escapes: "npm:^4.2.1" chalk: "npm:^4.1.1" @@ -1951,8 +1956,8 @@ __metadata: string-width: "npm:^4.1.0" strip-ansi: "npm:^6.0.0" through: "npm:^2.3.6" - wrap-ansi: "npm:^7.0.0" - checksum: 10c0/e3e64e10f5daeeb8f770f1310acceb4aab593c10d693e7676ecd4a5b023d5b865b484fec7ead516e5e394db70eff687ef85459f75890f11a99ceadc0f4adce18 + wrap-ansi: "npm:^6.0.1" + checksum: 10c0/eb5724de1778265323f3a68c80acfa899378cb43c24cdcb58661386500e5696b6b0b6c700e046b7aa767fe7b4823c6f04e6ddc268173e3f84116112529016296 languageName: node linkType: hard @@ -2310,6 +2315,13 @@ __metadata: languageName: node linkType: hard +"lru-cache@npm:^10.2.0": + version: 10.4.3 + resolution: "lru-cache@npm:10.4.3" + checksum: 10c0/ebd04fbca961e6c1d6c0af3799adcc966a1babe798f685bb84e6599266599cd95d94630b10262f5424539bc4640107e8a33aa28585374abf561d30d16f4b39fb + languageName: node + linkType: hard + "lru-cache@npm:^7.14.1": version: 7.18.3 resolution: "lru-cache@npm:7.18.3" @@ -2392,7 +2404,7 @@ __metadata: languageName: node linkType: hard -"minimatch@npm:^3.0.4, minimatch@npm:^3.1.1": +"minimatch@npm:^3.1.1": version: 3.1.2 resolution: "minimatch@npm:3.1.2" dependencies: @@ -2401,6 +2413,15 @@ __metadata: languageName: node linkType: hard +"minimatch@npm:^8.0.2": + version: 8.0.4 + resolution: "minimatch@npm:8.0.4" + dependencies: + brace-expansion: "npm:^2.0.1" + checksum: 10c0/a0a394c356dd5b4cb7f821720841a82fa6f07c9c562c5b716909d1b6ec5e56a7e4c4b5029da26dd256b7d2b3a3f38cbf9ddd8680e887b9b5282b09c05501c1ca + languageName: node + linkType: hard + "minimist@npm:^1.2.0": version: 1.2.8 resolution: "minimist@npm:1.2.8" @@ -2408,11 +2429,25 @@ __metadata: languageName: node linkType: hard +"minipass@npm:^4.2.4": + version: 4.2.8 + resolution: "minipass@npm:4.2.8" + checksum: 10c0/4ea76b030d97079f4429d6e8a8affd90baf1b6a1898977c8ccce4701c5a2ba2792e033abc6709373f25c2c4d4d95440d9d5e9464b46b7b76ca44d2ce26d939ce + languageName: node + linkType: hard + +"minipass@npm:^5.0.0 || ^6.0.2 || ^7.0.0": + version: 7.1.2 + resolution: "minipass@npm:7.1.2" + checksum: 10c0/b0fd20bb9fb56e5fa9a8bfac539e8915ae07430a619e4b86ff71f5fc757ef3924b23b2c4230393af1eda647ed3d75739e4e0acb250a6b1eb277cf7f8fe449557 + languageName: node + linkType: hard + "monei-python-sdk@workspace:.": version: 0.0.0-use.local resolution: "monei-python-sdk@workspace:." dependencies: - "@openapitools/openapi-generator-cli": "npm:2.7.0" + "@openapitools/openapi-generator-cli": "npm:2.17.0" "@release-it/bumper": "npm:^7.0.1" release-it: "npm:^18.1.2" languageName: unknown @@ -2737,10 +2772,20 @@ __metadata: languageName: node linkType: hard -"path-to-regexp@npm:3.2.0": - version: 3.2.0 - resolution: "path-to-regexp@npm:3.2.0" - checksum: 10c0/2eeb1c698293acf6f89fe5af33b4c20822b3cee3e4e910c43bbee098c8dde34232fc194d5c2bc02df72affada446a181784e24f7a46932af323706be029ed1ba +"path-scurry@npm:^1.6.1": + version: 1.11.1 + resolution: "path-scurry@npm:1.11.1" + dependencies: + lru-cache: "npm:^10.2.0" + minipass: "npm:^5.0.0 || ^6.0.2 || ^7.0.0" + checksum: 10c0/32a13711a2a505616ae1cc1b5076801e453e7aae6ac40ab55b388bb91b9d0547a52f5aaceff710ea400205f18691120d4431e520afbe4266b836fadede15872d + languageName: node + linkType: hard + +"path-to-regexp@npm:3.3.0": + version: 3.3.0 + resolution: "path-to-regexp@npm:3.3.0" + checksum: 10c0/ffa0ebe7088d38d435a8d08b0fe6e8c93ceb2a81a65d4dd1d9a538f52e09d5e3474ed5f553cb3b180d894b0caa10698a68737ab599fd1e56b4663d1a64c9f77b languageName: node linkType: hard @@ -3032,12 +3077,12 @@ __metadata: languageName: node linkType: hard -"rxjs@npm:7.8.0": - version: 7.8.0 - resolution: "rxjs@npm:7.8.0" +"rxjs@npm:7.8.1": + version: 7.8.1 + resolution: "rxjs@npm:7.8.1" dependencies: tslib: "npm:^2.1.0" - checksum: 10c0/c48833638ae5d339332f8b792e716c3c662950ba95ba04e9e97a8cfd4628d8f009129672793c6c067c872a4dab5757231d41d7256a2114a5fabbf30d8a5b9d67 + checksum: 10c0/3c49c1ecd66170b175c9cacf5cef67f8914dcbc7cd0162855538d365c83fea631167cacb644b3ce533b2ea0e9a4d0b12175186985f89d75abe73dbd8f7f06f68 languageName: node linkType: hard @@ -3340,17 +3385,10 @@ __metadata: languageName: node linkType: hard -"tslib@npm:2.0.3": - version: 2.0.3 - resolution: "tslib@npm:2.0.3" - checksum: 10c0/57d9f8e71a768c37a70fcabbb76d686b31773329200db7135faff905818038c742191a0c3791e452ae738d057522c6151d34beddc8e4d0d897f28df84e55a0c0 - languageName: node - linkType: hard - -"tslib@npm:2.5.0": - version: 2.5.0 - resolution: "tslib@npm:2.5.0" - checksum: 10c0/e32fc99cc730dd514e53c44e668d76016e738f0bcc726aad5dbd2d335cf19b87a95a9b1e4f0a9993e370f1d702b5e471cdd4acabcac428a3099d496b9af2021e +"tslib@npm:2.8.1, tslib@npm:^2.0.1, tslib@npm:^2.1.0": + version: 2.8.1 + resolution: "tslib@npm:2.8.1" + checksum: 10c0/9c4759110a19c53f992d9aae23aac5ced636e99887b51b9e61def52611732872ff7668757d4e4c61f19691e36f4da981cd9485e869b4a7408d689f6bf1f14e62 languageName: node linkType: hard @@ -3361,13 +3399,6 @@ __metadata: languageName: node linkType: hard -"tslib@npm:^2.0.1, tslib@npm:^2.1.0": - version: 2.8.1 - resolution: "tslib@npm:2.8.1" - checksum: 10c0/9c4759110a19c53f992d9aae23aac5ced636e99887b51b9e61def52611732872ff7668757d4e4c61f19691e36f4da981cd9485e869b4a7408d689f6bf1f14e62 - languageName: node - linkType: hard - "type-fest@npm:^0.21.3": version: 0.21.3 resolution: "type-fest@npm:0.21.3" @@ -3389,12 +3420,12 @@ __metadata: languageName: node linkType: hard -"uid@npm:2.0.1": - version: 2.0.1 - resolution: "uid@npm:2.0.1" +"uid@npm:2.0.2": + version: 2.0.2 + resolution: "uid@npm:2.0.2" dependencies: "@lukeed/csprng": "npm:^1.0.0" - checksum: 10c0/1c1e0e4fcb4d89ad7852b8d3043d9c79aebab8129f49390dcc2ef712b5997313fadedea17e12bde74204a472efbe79dc931afe252d3dfed28059e4c67f9969ab + checksum: 10c0/e9d02d0562c74e74b5a2519e586db9d7f8204978e476cddd191ee1a9efb85efafdbab2dbf3fc3dde0f5da01fd9da161f37d604dabf513447fd2c03d008f1324c languageName: node linkType: hard @@ -3550,7 +3581,7 @@ __metadata: languageName: node linkType: hard -"wrap-ansi@npm:^6.2.0": +"wrap-ansi@npm:^6.0.1, wrap-ansi@npm:^6.2.0": version: 6.2.0 resolution: "wrap-ansi@npm:6.2.0" dependencies: From 50addd46440bed8b874d13033a50d232335ca9b7 Mon Sep 17 00:00:00 2001 From: Dmitriy Date: Thu, 6 Mar 2025 20:30:02 +0100 Subject: [PATCH 08/13] Update SDK to version 1.5.4 - Bump OpenAPI document version from 1.5.3 to 1.5.4 - Update version references across all files - Add browser screen height and width to session and trace details - Minor improvements to client and model configurations --- Monei/__init__.py | 2 +- Monei/api/apple_pay_domain_api.py | 2 +- Monei/api/bizum_api.py | 2 +- Monei/api/payment_methods_api.py | 2 +- Monei/api/payments_api.py | 2 +- Monei/api/subscriptions_api.py | 2 +- Monei/api_client.py | 2 +- Monei/configuration.py | 4 +- Monei/exceptions.py | 2 +- Monei/model/activate_subscription_request.py | 2 +- Monei/model/address.py | 2 +- .../apple_pay_domain_register200_response.py | 2 +- .../apple_pay_domain_register400_response.py | 2 +- .../apple_pay_domain_register401_response.py | 2 +- .../apple_pay_domain_register404_response.py | 2 +- .../apple_pay_domain_register422_response.py | 2 +- .../apple_pay_domain_register500_response.py | 2 +- .../apple_pay_domain_register503_response.py | 2 +- .../model/bizum_validate_phone200_response.py | 2 +- Monei/model/browser_color_depth.py | 259 ++++++++++++++++++ Monei/model/browser_screen_height.py | 259 ++++++++++++++++++ Monei/model/browser_screen_width.py | 259 ++++++++++++++++++ Monei/model/browser_timezone_offset.py | 259 ++++++++++++++++++ Monei/model/cancel_payment_request.py | 2 +- Monei/model/cancel_subscription_request.py | 2 +- Monei/model/capture_payment_request.py | 2 +- Monei/model/confirm_payment_request.py | 2 +- .../confirm_payment_request_payment_method.py | 2 +- ...irm_payment_request_payment_method_card.py | 2 +- Monei/model/create_payment_request.py | 2 +- Monei/model/create_subscription_request.py | 2 +- Monei/model/error.py | 2 +- Monei/model/pause_subscription_request.py | 2 +- Monei/model/payment.py | 2 +- Monei/model/payment_billing_details.py | 2 +- Monei/model/payment_cancellation_reason.py | 2 +- Monei/model/payment_customer.py | 2 +- Monei/model/payment_last_refund_reason.py | 2 +- Monei/model/payment_message_channel.py | 2 +- Monei/model/payment_message_language.py | 2 +- Monei/model/payment_methods.py | 2 +- Monei/model/payment_methods_metadata.py | 2 +- .../model/payment_methods_metadata_alipay.py | 2 +- .../payment_methods_metadata_apple_pay.py | 2 +- .../payment_methods_metadata_bancontact.py | 2 +- Monei/model/payment_methods_metadata_bizum.py | 2 +- Monei/model/payment_methods_metadata_blik.py | 2 +- Monei/model/payment_methods_metadata_card.py | 2 +- .../payment_methods_metadata_click_to_pay.py | 2 +- ..._methods_metadata_click_to_pay_discover.py | 2 +- ...ethods_metadata_click_to_pay_mastercard.py | 2 +- ...ment_methods_metadata_click_to_pay_visa.py | 2 +- Monei/model/payment_methods_metadata_eps.py | 2 +- .../model/payment_methods_metadata_giropay.py | 2 +- .../payment_methods_metadata_google_pay.py | 2 +- .../model/payment_methods_metadata_i_deal.py | 2 +- .../model/payment_methods_metadata_klarna.py | 2 +- Monei/model/payment_methods_metadata_mbway.py | 2 +- Monei/model/payment_methods_metadata_sepa.py | 2 +- .../model/payment_methods_metadata_sofort.py | 2 +- .../model/payment_methods_metadata_trustly.py | 2 +- Monei/model/payment_methods_methods.py | 2 +- Monei/model/payment_next_action.py | 2 +- Monei/model/payment_payment_method.py | 2 +- Monei/model/payment_payment_method_bizum.py | 2 +- .../payment_payment_method_bizum_input.py | 2 +- Monei/model/payment_payment_method_card.py | 2 +- .../payment_payment_method_card_input.py | 2 +- Monei/model/payment_payment_method_cofidis.py | 2 +- Monei/model/payment_payment_method_input.py | 2 +- Monei/model/payment_payment_method_klarna.py | 2 +- Monei/model/payment_payment_method_mbway.py | 2 +- Monei/model/payment_payment_method_paypal.py | 2 +- Monei/model/payment_payment_method_sepa.py | 2 +- Monei/model/payment_payment_method_trustly.py | 2 +- Monei/model/payment_payment_methods.py | 2 +- Monei/model/payment_refund_reason.py | 2 +- Monei/model/payment_sequence.py | 2 +- Monei/model/payment_sequence_recurring.py | 2 +- Monei/model/payment_session_details.py | 20 +- Monei/model/payment_shipping_details.py | 2 +- Monei/model/payment_shop.py | 2 +- Monei/model/payment_status.py | 2 +- Monei/model/payment_trace_details.py | 20 +- Monei/model/payment_transaction_type.py | 2 +- Monei/model/recurring_payment_request.py | 2 +- Monei/model/refund_payment_request.py | 2 +- .../register_apple_pay_domain_request.py | 2 +- Monei/model/send_payment_link_request.py | 2 +- Monei/model/send_payment_receipt_request.py | 2 +- Monei/model/send_payment_request_request.py | 2 +- Monei/model/send_subscription_link_request.py | 2 +- .../model/send_subscription_status_request.py | 2 +- Monei/model/subscription.py | 2 +- Monei/model/subscription_interval.py | 2 +- Monei/model/subscription_last_payment.py | 2 +- Monei/model/subscription_payment_method.py | 2 +- .../model/subscription_payment_method_card.py | 2 +- Monei/model/subscription_retry_schedule.py | 2 +- .../subscription_retry_schedule_inner.py | 2 +- Monei/model/subscription_status.py | 2 +- Monei/model/update_subscription_request.py | 2 +- Monei/model/validate_bizum_phone_request.py | 2 +- Monei/model_utils.py | 2 +- Monei/monei_client.py | 39 ++- Monei/rest.py | 2 +- test/test_api_key_integration.py | 55 ++++ test/test_browser_color_depth.py | 35 +++ test/test_browser_screen_height.py | 35 +++ test/test_browser_screen_width.py | 35 +++ test/test_browser_timezone_offset.py | 35 +++ test/test_monei_client.py | 114 +++++++- 112 files changed, 1493 insertions(+), 131 deletions(-) create mode 100644 Monei/model/browser_color_depth.py create mode 100644 Monei/model/browser_screen_height.py create mode 100644 Monei/model/browser_screen_width.py create mode 100644 Monei/model/browser_timezone_offset.py create mode 100644 test/test_api_key_integration.py create mode 100644 test/test_browser_color_depth.py create mode 100644 test/test_browser_screen_height.py create mode 100644 test/test_browser_screen_width.py create mode 100644 test/test_browser_timezone_offset.py diff --git a/Monei/__init__.py b/Monei/__init__.py index 6a8eda7..c1cda74 100644 --- a/Monei/__init__.py +++ b/Monei/__init__.py @@ -5,7 +5,7 @@

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - The version of the OpenAPI document: 1.5.3 + The version of the OpenAPI document: 1.5.4 Generated by: https://openapi-generator.tech """ diff --git a/Monei/api/apple_pay_domain_api.py b/Monei/api/apple_pay_domain_api.py index 653b855..aa10ecb 100644 --- a/Monei/api/apple_pay_domain_api.py +++ b/Monei/api/apple_pay_domain_api.py @@ -3,7 +3,7 @@

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - The version of the OpenAPI document: 1.5.3 + The version of the OpenAPI document: 1.5.4 Generated by: https://openapi-generator.tech """ diff --git a/Monei/api/bizum_api.py b/Monei/api/bizum_api.py index 4184310..7ed1683 100644 --- a/Monei/api/bizum_api.py +++ b/Monei/api/bizum_api.py @@ -3,7 +3,7 @@

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - The version of the OpenAPI document: 1.5.3 + The version of the OpenAPI document: 1.5.4 Generated by: https://openapi-generator.tech """ diff --git a/Monei/api/payment_methods_api.py b/Monei/api/payment_methods_api.py index 689ed91..786fe8a 100644 --- a/Monei/api/payment_methods_api.py +++ b/Monei/api/payment_methods_api.py @@ -3,7 +3,7 @@

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - The version of the OpenAPI document: 1.5.3 + The version of the OpenAPI document: 1.5.4 Generated by: https://openapi-generator.tech """ diff --git a/Monei/api/payments_api.py b/Monei/api/payments_api.py index d64cbf4..9ec32aa 100644 --- a/Monei/api/payments_api.py +++ b/Monei/api/payments_api.py @@ -3,7 +3,7 @@

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - The version of the OpenAPI document: 1.5.3 + The version of the OpenAPI document: 1.5.4 Generated by: https://openapi-generator.tech """ diff --git a/Monei/api/subscriptions_api.py b/Monei/api/subscriptions_api.py index 3b14bef..d23d3d3 100644 --- a/Monei/api/subscriptions_api.py +++ b/Monei/api/subscriptions_api.py @@ -3,7 +3,7 @@

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - The version of the OpenAPI document: 1.5.3 + The version of the OpenAPI document: 1.5.4 Generated by: https://openapi-generator.tech """ diff --git a/Monei/api_client.py b/Monei/api_client.py index edff26f..5c5712d 100644 --- a/Monei/api_client.py +++ b/Monei/api_client.py @@ -3,7 +3,7 @@

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - The version of the OpenAPI document: 1.5.3 + The version of the OpenAPI document: 1.5.4 Generated by: https://openapi-generator.tech """ diff --git a/Monei/configuration.py b/Monei/configuration.py index fc74583..2ee0a73 100644 --- a/Monei/configuration.py +++ b/Monei/configuration.py @@ -3,7 +3,7 @@

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - The version of the OpenAPI document: 1.5.3 + The version of the OpenAPI document: 1.5.4 Generated by: https://openapi-generator.tech """ @@ -417,7 +417,7 @@ def to_debug_report(self): return "Python SDK Debug Report:\n"\ "OS: {env}\n"\ "Python Version: {pyversion}\n"\ - "Version of the API: 1.5.3\n"\ + "Version of the API: 1.5.4\n"\ "SDK Package Version: 1.2.6".\ format(env=sys.platform, pyversion=sys.version) diff --git a/Monei/exceptions.py b/Monei/exceptions.py index 2c82922..680a024 100644 --- a/Monei/exceptions.py +++ b/Monei/exceptions.py @@ -3,7 +3,7 @@

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - The version of the OpenAPI document: 1.5.3 + The version of the OpenAPI document: 1.5.4 Generated by: https://openapi-generator.tech """ diff --git a/Monei/model/activate_subscription_request.py b/Monei/model/activate_subscription_request.py index adab4b3..7e13945 100644 --- a/Monei/model/activate_subscription_request.py +++ b/Monei/model/activate_subscription_request.py @@ -3,7 +3,7 @@

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - The version of the OpenAPI document: 1.5.3 + The version of the OpenAPI document: 1.5.4 Generated by: https://openapi-generator.tech """ diff --git a/Monei/model/address.py b/Monei/model/address.py index ed41eb4..857b28e 100644 --- a/Monei/model/address.py +++ b/Monei/model/address.py @@ -3,7 +3,7 @@

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - The version of the OpenAPI document: 1.5.3 + The version of the OpenAPI document: 1.5.4 Generated by: https://openapi-generator.tech """ diff --git a/Monei/model/apple_pay_domain_register200_response.py b/Monei/model/apple_pay_domain_register200_response.py index 9001e3f..c165a49 100644 --- a/Monei/model/apple_pay_domain_register200_response.py +++ b/Monei/model/apple_pay_domain_register200_response.py @@ -3,7 +3,7 @@

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - The version of the OpenAPI document: 1.5.3 + The version of the OpenAPI document: 1.5.4 Generated by: https://openapi-generator.tech """ diff --git a/Monei/model/apple_pay_domain_register400_response.py b/Monei/model/apple_pay_domain_register400_response.py index 03e885a..32ccefe 100644 --- a/Monei/model/apple_pay_domain_register400_response.py +++ b/Monei/model/apple_pay_domain_register400_response.py @@ -3,7 +3,7 @@

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - The version of the OpenAPI document: 1.5.3 + The version of the OpenAPI document: 1.5.4 Generated by: https://openapi-generator.tech """ diff --git a/Monei/model/apple_pay_domain_register401_response.py b/Monei/model/apple_pay_domain_register401_response.py index 5224055..7e3edbd 100644 --- a/Monei/model/apple_pay_domain_register401_response.py +++ b/Monei/model/apple_pay_domain_register401_response.py @@ -3,7 +3,7 @@

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - The version of the OpenAPI document: 1.5.3 + The version of the OpenAPI document: 1.5.4 Generated by: https://openapi-generator.tech """ diff --git a/Monei/model/apple_pay_domain_register404_response.py b/Monei/model/apple_pay_domain_register404_response.py index 7dbc579..b86379a 100644 --- a/Monei/model/apple_pay_domain_register404_response.py +++ b/Monei/model/apple_pay_domain_register404_response.py @@ -3,7 +3,7 @@

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - The version of the OpenAPI document: 1.5.3 + The version of the OpenAPI document: 1.5.4 Generated by: https://openapi-generator.tech """ diff --git a/Monei/model/apple_pay_domain_register422_response.py b/Monei/model/apple_pay_domain_register422_response.py index 8129a11..79e6785 100644 --- a/Monei/model/apple_pay_domain_register422_response.py +++ b/Monei/model/apple_pay_domain_register422_response.py @@ -3,7 +3,7 @@

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - The version of the OpenAPI document: 1.5.3 + The version of the OpenAPI document: 1.5.4 Generated by: https://openapi-generator.tech """ diff --git a/Monei/model/apple_pay_domain_register500_response.py b/Monei/model/apple_pay_domain_register500_response.py index 19176a3..c0eb2dd 100644 --- a/Monei/model/apple_pay_domain_register500_response.py +++ b/Monei/model/apple_pay_domain_register500_response.py @@ -3,7 +3,7 @@

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - The version of the OpenAPI document: 1.5.3 + The version of the OpenAPI document: 1.5.4 Generated by: https://openapi-generator.tech """ diff --git a/Monei/model/apple_pay_domain_register503_response.py b/Monei/model/apple_pay_domain_register503_response.py index 3d875eb..58ba2f4 100644 --- a/Monei/model/apple_pay_domain_register503_response.py +++ b/Monei/model/apple_pay_domain_register503_response.py @@ -3,7 +3,7 @@

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - The version of the OpenAPI document: 1.5.3 + The version of the OpenAPI document: 1.5.4 Generated by: https://openapi-generator.tech """ diff --git a/Monei/model/bizum_validate_phone200_response.py b/Monei/model/bizum_validate_phone200_response.py index c21f6ef..0b8449f 100644 --- a/Monei/model/bizum_validate_phone200_response.py +++ b/Monei/model/bizum_validate_phone200_response.py @@ -3,7 +3,7 @@

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - The version of the OpenAPI document: 1.5.3 + The version of the OpenAPI document: 1.5.4 Generated by: https://openapi-generator.tech """ diff --git a/Monei/model/browser_color_depth.py b/Monei/model/browser_color_depth.py new file mode 100644 index 0000000..af0f98e --- /dev/null +++ b/Monei/model/browser_color_depth.py @@ -0,0 +1,259 @@ +""" + MONEI API v1 + +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 + + The version of the OpenAPI document: 1.5.3 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from Monei.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from Monei.exceptions import ApiAttributeError + + + +class BrowserColorDepth(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """BrowserColorDepth - 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 + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """BrowserColorDepth - 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 + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/Monei/model/browser_screen_height.py b/Monei/model/browser_screen_height.py new file mode 100644 index 0000000..727f180 --- /dev/null +++ b/Monei/model/browser_screen_height.py @@ -0,0 +1,259 @@ +""" + MONEI API v1 + +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 + + The version of the OpenAPI document: 1.5.3 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from Monei.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from Monei.exceptions import ApiAttributeError + + + +class BrowserScreenHeight(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """BrowserScreenHeight - 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 + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """BrowserScreenHeight - 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 + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/Monei/model/browser_screen_width.py b/Monei/model/browser_screen_width.py new file mode 100644 index 0000000..10d13ee --- /dev/null +++ b/Monei/model/browser_screen_width.py @@ -0,0 +1,259 @@ +""" + MONEI API v1 + +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 + + The version of the OpenAPI document: 1.5.3 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from Monei.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from Monei.exceptions import ApiAttributeError + + + +class BrowserScreenWidth(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """BrowserScreenWidth - 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 + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """BrowserScreenWidth - 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 + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/Monei/model/browser_timezone_offset.py b/Monei/model/browser_timezone_offset.py new file mode 100644 index 0000000..62b2ad7 --- /dev/null +++ b/Monei/model/browser_timezone_offset.py @@ -0,0 +1,259 @@ +""" + MONEI API v1 + +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 + + The version of the OpenAPI document: 1.5.3 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from Monei.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from Monei.exceptions import ApiAttributeError + + + +class BrowserTimezoneOffset(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """BrowserTimezoneOffset - 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 + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """BrowserTimezoneOffset - 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 + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/Monei/model/cancel_payment_request.py b/Monei/model/cancel_payment_request.py index e2a3910..29dd09c 100644 --- a/Monei/model/cancel_payment_request.py +++ b/Monei/model/cancel_payment_request.py @@ -3,7 +3,7 @@

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - The version of the OpenAPI document: 1.5.3 + The version of the OpenAPI document: 1.5.4 Generated by: https://openapi-generator.tech """ diff --git a/Monei/model/cancel_subscription_request.py b/Monei/model/cancel_subscription_request.py index 54edd03..1de3a2a 100644 --- a/Monei/model/cancel_subscription_request.py +++ b/Monei/model/cancel_subscription_request.py @@ -3,7 +3,7 @@

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - The version of the OpenAPI document: 1.5.3 + The version of the OpenAPI document: 1.5.4 Generated by: https://openapi-generator.tech """ diff --git a/Monei/model/capture_payment_request.py b/Monei/model/capture_payment_request.py index 4dfe2f0..02d5218 100644 --- a/Monei/model/capture_payment_request.py +++ b/Monei/model/capture_payment_request.py @@ -3,7 +3,7 @@

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - The version of the OpenAPI document: 1.5.3 + The version of the OpenAPI document: 1.5.4 Generated by: https://openapi-generator.tech """ diff --git a/Monei/model/confirm_payment_request.py b/Monei/model/confirm_payment_request.py index 9b45bc0..664a988 100644 --- a/Monei/model/confirm_payment_request.py +++ b/Monei/model/confirm_payment_request.py @@ -3,7 +3,7 @@

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - The version of the OpenAPI document: 1.5.3 + The version of the OpenAPI document: 1.5.4 Generated by: https://openapi-generator.tech """ diff --git a/Monei/model/confirm_payment_request_payment_method.py b/Monei/model/confirm_payment_request_payment_method.py index 354e4d1..c094db7 100644 --- a/Monei/model/confirm_payment_request_payment_method.py +++ b/Monei/model/confirm_payment_request_payment_method.py @@ -3,7 +3,7 @@

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - The version of the OpenAPI document: 1.5.3 + The version of the OpenAPI document: 1.5.4 Generated by: https://openapi-generator.tech """ diff --git a/Monei/model/confirm_payment_request_payment_method_card.py b/Monei/model/confirm_payment_request_payment_method_card.py index 76856f3..9e878ab 100644 --- a/Monei/model/confirm_payment_request_payment_method_card.py +++ b/Monei/model/confirm_payment_request_payment_method_card.py @@ -3,7 +3,7 @@

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - The version of the OpenAPI document: 1.5.3 + The version of the OpenAPI document: 1.5.4 Generated by: https://openapi-generator.tech """ diff --git a/Monei/model/create_payment_request.py b/Monei/model/create_payment_request.py index 54bb7f2..97ed20f 100644 --- a/Monei/model/create_payment_request.py +++ b/Monei/model/create_payment_request.py @@ -3,7 +3,7 @@

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - The version of the OpenAPI document: 1.5.3 + The version of the OpenAPI document: 1.5.4 Generated by: https://openapi-generator.tech """ diff --git a/Monei/model/create_subscription_request.py b/Monei/model/create_subscription_request.py index 7ca0a85..12c9f98 100644 --- a/Monei/model/create_subscription_request.py +++ b/Monei/model/create_subscription_request.py @@ -3,7 +3,7 @@

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - The version of the OpenAPI document: 1.5.3 + The version of the OpenAPI document: 1.5.4 Generated by: https://openapi-generator.tech """ diff --git a/Monei/model/error.py b/Monei/model/error.py index c3203e4..9dfc316 100644 --- a/Monei/model/error.py +++ b/Monei/model/error.py @@ -3,7 +3,7 @@

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - The version of the OpenAPI document: 1.5.3 + The version of the OpenAPI document: 1.5.4 Generated by: https://openapi-generator.tech """ diff --git a/Monei/model/pause_subscription_request.py b/Monei/model/pause_subscription_request.py index 134fb80..c6ae2d8 100644 --- a/Monei/model/pause_subscription_request.py +++ b/Monei/model/pause_subscription_request.py @@ -3,7 +3,7 @@

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - The version of the OpenAPI document: 1.5.3 + The version of the OpenAPI document: 1.5.4 Generated by: https://openapi-generator.tech """ diff --git a/Monei/model/payment.py b/Monei/model/payment.py index 205311d..a01fdb6 100644 --- a/Monei/model/payment.py +++ b/Monei/model/payment.py @@ -3,7 +3,7 @@

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - The version of the OpenAPI document: 1.5.3 + The version of the OpenAPI document: 1.5.4 Generated by: https://openapi-generator.tech """ diff --git a/Monei/model/payment_billing_details.py b/Monei/model/payment_billing_details.py index 0398e69..d54843f 100644 --- a/Monei/model/payment_billing_details.py +++ b/Monei/model/payment_billing_details.py @@ -3,7 +3,7 @@

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - The version of the OpenAPI document: 1.5.3 + The version of the OpenAPI document: 1.5.4 Generated by: https://openapi-generator.tech """ diff --git a/Monei/model/payment_cancellation_reason.py b/Monei/model/payment_cancellation_reason.py index b84412b..c10e8a2 100644 --- a/Monei/model/payment_cancellation_reason.py +++ b/Monei/model/payment_cancellation_reason.py @@ -3,7 +3,7 @@

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - The version of the OpenAPI document: 1.5.3 + The version of the OpenAPI document: 1.5.4 Generated by: https://openapi-generator.tech """ diff --git a/Monei/model/payment_customer.py b/Monei/model/payment_customer.py index 6caad93..1cc96e7 100644 --- a/Monei/model/payment_customer.py +++ b/Monei/model/payment_customer.py @@ -3,7 +3,7 @@

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - The version of the OpenAPI document: 1.5.3 + The version of the OpenAPI document: 1.5.4 Generated by: https://openapi-generator.tech """ diff --git a/Monei/model/payment_last_refund_reason.py b/Monei/model/payment_last_refund_reason.py index ec72522..6401a50 100644 --- a/Monei/model/payment_last_refund_reason.py +++ b/Monei/model/payment_last_refund_reason.py @@ -3,7 +3,7 @@

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - The version of the OpenAPI document: 1.5.3 + The version of the OpenAPI document: 1.5.4 Generated by: https://openapi-generator.tech """ diff --git a/Monei/model/payment_message_channel.py b/Monei/model/payment_message_channel.py index 0031125..331a4dc 100644 --- a/Monei/model/payment_message_channel.py +++ b/Monei/model/payment_message_channel.py @@ -3,7 +3,7 @@

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - The version of the OpenAPI document: 1.5.3 + The version of the OpenAPI document: 1.5.4 Generated by: https://openapi-generator.tech """ diff --git a/Monei/model/payment_message_language.py b/Monei/model/payment_message_language.py index 54395fc..5366644 100644 --- a/Monei/model/payment_message_language.py +++ b/Monei/model/payment_message_language.py @@ -3,7 +3,7 @@

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - The version of the OpenAPI document: 1.5.3 + The version of the OpenAPI document: 1.5.4 Generated by: https://openapi-generator.tech """ diff --git a/Monei/model/payment_methods.py b/Monei/model/payment_methods.py index 38c6c7c..7ff0bd2 100644 --- a/Monei/model/payment_methods.py +++ b/Monei/model/payment_methods.py @@ -3,7 +3,7 @@

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - The version of the OpenAPI document: 1.5.3 + The version of the OpenAPI document: 1.5.4 Generated by: https://openapi-generator.tech """ diff --git a/Monei/model/payment_methods_metadata.py b/Monei/model/payment_methods_metadata.py index 3378846..051f61b 100644 --- a/Monei/model/payment_methods_metadata.py +++ b/Monei/model/payment_methods_metadata.py @@ -3,7 +3,7 @@

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - The version of the OpenAPI document: 1.5.3 + The version of the OpenAPI document: 1.5.4 Generated by: https://openapi-generator.tech """ diff --git a/Monei/model/payment_methods_metadata_alipay.py b/Monei/model/payment_methods_metadata_alipay.py index 8c972c1..bdb2146 100644 --- a/Monei/model/payment_methods_metadata_alipay.py +++ b/Monei/model/payment_methods_metadata_alipay.py @@ -3,7 +3,7 @@

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - The version of the OpenAPI document: 1.5.3 + The version of the OpenAPI document: 1.5.4 Generated by: https://openapi-generator.tech """ diff --git a/Monei/model/payment_methods_metadata_apple_pay.py b/Monei/model/payment_methods_metadata_apple_pay.py index fc59ccb..5cd9cd1 100644 --- a/Monei/model/payment_methods_metadata_apple_pay.py +++ b/Monei/model/payment_methods_metadata_apple_pay.py @@ -3,7 +3,7 @@

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - The version of the OpenAPI document: 1.5.3 + The version of the OpenAPI document: 1.5.4 Generated by: https://openapi-generator.tech """ diff --git a/Monei/model/payment_methods_metadata_bancontact.py b/Monei/model/payment_methods_metadata_bancontact.py index 858b387..6fe8c21 100644 --- a/Monei/model/payment_methods_metadata_bancontact.py +++ b/Monei/model/payment_methods_metadata_bancontact.py @@ -3,7 +3,7 @@

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - The version of the OpenAPI document: 1.5.3 + The version of the OpenAPI document: 1.5.4 Generated by: https://openapi-generator.tech """ diff --git a/Monei/model/payment_methods_metadata_bizum.py b/Monei/model/payment_methods_metadata_bizum.py index d5da320..5814713 100644 --- a/Monei/model/payment_methods_metadata_bizum.py +++ b/Monei/model/payment_methods_metadata_bizum.py @@ -3,7 +3,7 @@

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - The version of the OpenAPI document: 1.5.3 + The version of the OpenAPI document: 1.5.4 Generated by: https://openapi-generator.tech """ diff --git a/Monei/model/payment_methods_metadata_blik.py b/Monei/model/payment_methods_metadata_blik.py index 0e7c878..37281d0 100644 --- a/Monei/model/payment_methods_metadata_blik.py +++ b/Monei/model/payment_methods_metadata_blik.py @@ -3,7 +3,7 @@

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - The version of the OpenAPI document: 1.5.3 + The version of the OpenAPI document: 1.5.4 Generated by: https://openapi-generator.tech """ diff --git a/Monei/model/payment_methods_metadata_card.py b/Monei/model/payment_methods_metadata_card.py index 37de01f..4296fbf 100644 --- a/Monei/model/payment_methods_metadata_card.py +++ b/Monei/model/payment_methods_metadata_card.py @@ -3,7 +3,7 @@

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - The version of the OpenAPI document: 1.5.3 + The version of the OpenAPI document: 1.5.4 Generated by: https://openapi-generator.tech """ diff --git a/Monei/model/payment_methods_metadata_click_to_pay.py b/Monei/model/payment_methods_metadata_click_to_pay.py index fdc3f00..19dce56 100644 --- a/Monei/model/payment_methods_metadata_click_to_pay.py +++ b/Monei/model/payment_methods_metadata_click_to_pay.py @@ -3,7 +3,7 @@

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - The version of the OpenAPI document: 1.5.3 + The version of the OpenAPI document: 1.5.4 Generated by: https://openapi-generator.tech """ diff --git a/Monei/model/payment_methods_metadata_click_to_pay_discover.py b/Monei/model/payment_methods_metadata_click_to_pay_discover.py index 0dcc4b5..8aff4f8 100644 --- a/Monei/model/payment_methods_metadata_click_to_pay_discover.py +++ b/Monei/model/payment_methods_metadata_click_to_pay_discover.py @@ -3,7 +3,7 @@

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - The version of the OpenAPI document: 1.5.3 + The version of the OpenAPI document: 1.5.4 Generated by: https://openapi-generator.tech """ diff --git a/Monei/model/payment_methods_metadata_click_to_pay_mastercard.py b/Monei/model/payment_methods_metadata_click_to_pay_mastercard.py index 3820153..373c34a 100644 --- a/Monei/model/payment_methods_metadata_click_to_pay_mastercard.py +++ b/Monei/model/payment_methods_metadata_click_to_pay_mastercard.py @@ -3,7 +3,7 @@

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - The version of the OpenAPI document: 1.5.3 + The version of the OpenAPI document: 1.5.4 Generated by: https://openapi-generator.tech """ diff --git a/Monei/model/payment_methods_metadata_click_to_pay_visa.py b/Monei/model/payment_methods_metadata_click_to_pay_visa.py index e7fc4e8..1bf71fb 100644 --- a/Monei/model/payment_methods_metadata_click_to_pay_visa.py +++ b/Monei/model/payment_methods_metadata_click_to_pay_visa.py @@ -3,7 +3,7 @@

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - The version of the OpenAPI document: 1.5.3 + The version of the OpenAPI document: 1.5.4 Generated by: https://openapi-generator.tech """ diff --git a/Monei/model/payment_methods_metadata_eps.py b/Monei/model/payment_methods_metadata_eps.py index 6a461ff..9c90c45 100644 --- a/Monei/model/payment_methods_metadata_eps.py +++ b/Monei/model/payment_methods_metadata_eps.py @@ -3,7 +3,7 @@

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - The version of the OpenAPI document: 1.5.3 + The version of the OpenAPI document: 1.5.4 Generated by: https://openapi-generator.tech """ diff --git a/Monei/model/payment_methods_metadata_giropay.py b/Monei/model/payment_methods_metadata_giropay.py index b54467f..d467dd5 100644 --- a/Monei/model/payment_methods_metadata_giropay.py +++ b/Monei/model/payment_methods_metadata_giropay.py @@ -3,7 +3,7 @@

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - The version of the OpenAPI document: 1.5.3 + The version of the OpenAPI document: 1.5.4 Generated by: https://openapi-generator.tech """ diff --git a/Monei/model/payment_methods_metadata_google_pay.py b/Monei/model/payment_methods_metadata_google_pay.py index 72ce6c0..7468b3a 100644 --- a/Monei/model/payment_methods_metadata_google_pay.py +++ b/Monei/model/payment_methods_metadata_google_pay.py @@ -3,7 +3,7 @@

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - The version of the OpenAPI document: 1.5.3 + The version of the OpenAPI document: 1.5.4 Generated by: https://openapi-generator.tech """ diff --git a/Monei/model/payment_methods_metadata_i_deal.py b/Monei/model/payment_methods_metadata_i_deal.py index 9f0ba92..631176f 100644 --- a/Monei/model/payment_methods_metadata_i_deal.py +++ b/Monei/model/payment_methods_metadata_i_deal.py @@ -3,7 +3,7 @@

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - The version of the OpenAPI document: 1.5.3 + The version of the OpenAPI document: 1.5.4 Generated by: https://openapi-generator.tech """ diff --git a/Monei/model/payment_methods_metadata_klarna.py b/Monei/model/payment_methods_metadata_klarna.py index 31fc440..41a7454 100644 --- a/Monei/model/payment_methods_metadata_klarna.py +++ b/Monei/model/payment_methods_metadata_klarna.py @@ -3,7 +3,7 @@

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - The version of the OpenAPI document: 1.5.3 + The version of the OpenAPI document: 1.5.4 Generated by: https://openapi-generator.tech """ diff --git a/Monei/model/payment_methods_metadata_mbway.py b/Monei/model/payment_methods_metadata_mbway.py index c1d9e53..17d3ed3 100644 --- a/Monei/model/payment_methods_metadata_mbway.py +++ b/Monei/model/payment_methods_metadata_mbway.py @@ -3,7 +3,7 @@

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - The version of the OpenAPI document: 1.5.3 + The version of the OpenAPI document: 1.5.4 Generated by: https://openapi-generator.tech """ diff --git a/Monei/model/payment_methods_metadata_sepa.py b/Monei/model/payment_methods_metadata_sepa.py index d8c0007..99c0df5 100644 --- a/Monei/model/payment_methods_metadata_sepa.py +++ b/Monei/model/payment_methods_metadata_sepa.py @@ -3,7 +3,7 @@

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - The version of the OpenAPI document: 1.5.3 + The version of the OpenAPI document: 1.5.4 Generated by: https://openapi-generator.tech """ diff --git a/Monei/model/payment_methods_metadata_sofort.py b/Monei/model/payment_methods_metadata_sofort.py index e010d29..f1c8253 100644 --- a/Monei/model/payment_methods_metadata_sofort.py +++ b/Monei/model/payment_methods_metadata_sofort.py @@ -3,7 +3,7 @@

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - The version of the OpenAPI document: 1.5.3 + The version of the OpenAPI document: 1.5.4 Generated by: https://openapi-generator.tech """ diff --git a/Monei/model/payment_methods_metadata_trustly.py b/Monei/model/payment_methods_metadata_trustly.py index 22c05ca..c9e2c32 100644 --- a/Monei/model/payment_methods_metadata_trustly.py +++ b/Monei/model/payment_methods_metadata_trustly.py @@ -3,7 +3,7 @@

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - The version of the OpenAPI document: 1.5.3 + The version of the OpenAPI document: 1.5.4 Generated by: https://openapi-generator.tech """ diff --git a/Monei/model/payment_methods_methods.py b/Monei/model/payment_methods_methods.py index a7ce245..485cc43 100644 --- a/Monei/model/payment_methods_methods.py +++ b/Monei/model/payment_methods_methods.py @@ -3,7 +3,7 @@

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - The version of the OpenAPI document: 1.5.3 + The version of the OpenAPI document: 1.5.4 Generated by: https://openapi-generator.tech """ diff --git a/Monei/model/payment_next_action.py b/Monei/model/payment_next_action.py index 8b37a58..4c9f3b3 100644 --- a/Monei/model/payment_next_action.py +++ b/Monei/model/payment_next_action.py @@ -3,7 +3,7 @@

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - The version of the OpenAPI document: 1.5.3 + The version of the OpenAPI document: 1.5.4 Generated by: https://openapi-generator.tech """ diff --git a/Monei/model/payment_payment_method.py b/Monei/model/payment_payment_method.py index 7729be5..1f62022 100644 --- a/Monei/model/payment_payment_method.py +++ b/Monei/model/payment_payment_method.py @@ -3,7 +3,7 @@

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - The version of the OpenAPI document: 1.5.3 + The version of the OpenAPI document: 1.5.4 Generated by: https://openapi-generator.tech """ diff --git a/Monei/model/payment_payment_method_bizum.py b/Monei/model/payment_payment_method_bizum.py index 9bc1619..5af41c5 100644 --- a/Monei/model/payment_payment_method_bizum.py +++ b/Monei/model/payment_payment_method_bizum.py @@ -3,7 +3,7 @@

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - The version of the OpenAPI document: 1.5.3 + The version of the OpenAPI document: 1.5.4 Generated by: https://openapi-generator.tech """ diff --git a/Monei/model/payment_payment_method_bizum_input.py b/Monei/model/payment_payment_method_bizum_input.py index 9735295..31777e1 100644 --- a/Monei/model/payment_payment_method_bizum_input.py +++ b/Monei/model/payment_payment_method_bizum_input.py @@ -3,7 +3,7 @@

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - The version of the OpenAPI document: 1.5.3 + The version of the OpenAPI document: 1.5.4 Generated by: https://openapi-generator.tech """ diff --git a/Monei/model/payment_payment_method_card.py b/Monei/model/payment_payment_method_card.py index 64a45de..2c07b58 100644 --- a/Monei/model/payment_payment_method_card.py +++ b/Monei/model/payment_payment_method_card.py @@ -3,7 +3,7 @@

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - The version of the OpenAPI document: 1.5.3 + The version of the OpenAPI document: 1.5.4 Generated by: https://openapi-generator.tech """ diff --git a/Monei/model/payment_payment_method_card_input.py b/Monei/model/payment_payment_method_card_input.py index adaac82..8e20f69 100644 --- a/Monei/model/payment_payment_method_card_input.py +++ b/Monei/model/payment_payment_method_card_input.py @@ -3,7 +3,7 @@

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - The version of the OpenAPI document: 1.5.3 + The version of the OpenAPI document: 1.5.4 Generated by: https://openapi-generator.tech """ diff --git a/Monei/model/payment_payment_method_cofidis.py b/Monei/model/payment_payment_method_cofidis.py index 95601c6..d0e26bd 100644 --- a/Monei/model/payment_payment_method_cofidis.py +++ b/Monei/model/payment_payment_method_cofidis.py @@ -3,7 +3,7 @@

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - The version of the OpenAPI document: 1.5.3 + The version of the OpenAPI document: 1.5.4 Generated by: https://openapi-generator.tech """ diff --git a/Monei/model/payment_payment_method_input.py b/Monei/model/payment_payment_method_input.py index e3a129e..8a7ff5a 100644 --- a/Monei/model/payment_payment_method_input.py +++ b/Monei/model/payment_payment_method_input.py @@ -3,7 +3,7 @@

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - The version of the OpenAPI document: 1.5.3 + The version of the OpenAPI document: 1.5.4 Generated by: https://openapi-generator.tech """ diff --git a/Monei/model/payment_payment_method_klarna.py b/Monei/model/payment_payment_method_klarna.py index fa1eb97..f09e5da 100644 --- a/Monei/model/payment_payment_method_klarna.py +++ b/Monei/model/payment_payment_method_klarna.py @@ -3,7 +3,7 @@

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - The version of the OpenAPI document: 1.5.3 + The version of the OpenAPI document: 1.5.4 Generated by: https://openapi-generator.tech """ diff --git a/Monei/model/payment_payment_method_mbway.py b/Monei/model/payment_payment_method_mbway.py index 6410c53..b1cc766 100644 --- a/Monei/model/payment_payment_method_mbway.py +++ b/Monei/model/payment_payment_method_mbway.py @@ -3,7 +3,7 @@

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - The version of the OpenAPI document: 1.5.3 + The version of the OpenAPI document: 1.5.4 Generated by: https://openapi-generator.tech """ diff --git a/Monei/model/payment_payment_method_paypal.py b/Monei/model/payment_payment_method_paypal.py index d56bed8..6faeeea 100644 --- a/Monei/model/payment_payment_method_paypal.py +++ b/Monei/model/payment_payment_method_paypal.py @@ -3,7 +3,7 @@

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - The version of the OpenAPI document: 1.5.3 + The version of the OpenAPI document: 1.5.4 Generated by: https://openapi-generator.tech """ diff --git a/Monei/model/payment_payment_method_sepa.py b/Monei/model/payment_payment_method_sepa.py index 56f91e3..5b29d56 100644 --- a/Monei/model/payment_payment_method_sepa.py +++ b/Monei/model/payment_payment_method_sepa.py @@ -3,7 +3,7 @@

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - The version of the OpenAPI document: 1.5.3 + The version of the OpenAPI document: 1.5.4 Generated by: https://openapi-generator.tech """ diff --git a/Monei/model/payment_payment_method_trustly.py b/Monei/model/payment_payment_method_trustly.py index 0b6c0da..7da9cf3 100644 --- a/Monei/model/payment_payment_method_trustly.py +++ b/Monei/model/payment_payment_method_trustly.py @@ -3,7 +3,7 @@

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - The version of the OpenAPI document: 1.5.3 + The version of the OpenAPI document: 1.5.4 Generated by: https://openapi-generator.tech """ diff --git a/Monei/model/payment_payment_methods.py b/Monei/model/payment_payment_methods.py index 7ad83b7..dc53e71 100644 --- a/Monei/model/payment_payment_methods.py +++ b/Monei/model/payment_payment_methods.py @@ -3,7 +3,7 @@

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - The version of the OpenAPI document: 1.5.3 + The version of the OpenAPI document: 1.5.4 Generated by: https://openapi-generator.tech """ diff --git a/Monei/model/payment_refund_reason.py b/Monei/model/payment_refund_reason.py index 353c751..c5d24cb 100644 --- a/Monei/model/payment_refund_reason.py +++ b/Monei/model/payment_refund_reason.py @@ -3,7 +3,7 @@

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - The version of the OpenAPI document: 1.5.3 + The version of the OpenAPI document: 1.5.4 Generated by: https://openapi-generator.tech """ diff --git a/Monei/model/payment_sequence.py b/Monei/model/payment_sequence.py index 2610ed4..7ae6910 100644 --- a/Monei/model/payment_sequence.py +++ b/Monei/model/payment_sequence.py @@ -3,7 +3,7 @@

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - The version of the OpenAPI document: 1.5.3 + The version of the OpenAPI document: 1.5.4 Generated by: https://openapi-generator.tech """ diff --git a/Monei/model/payment_sequence_recurring.py b/Monei/model/payment_sequence_recurring.py index 2270026..11dd967 100644 --- a/Monei/model/payment_sequence_recurring.py +++ b/Monei/model/payment_sequence_recurring.py @@ -3,7 +3,7 @@

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - The version of the OpenAPI document: 1.5.3 + The version of the OpenAPI document: 1.5.4 Generated by: https://openapi-generator.tech """ diff --git a/Monei/model/payment_session_details.py b/Monei/model/payment_session_details.py index ae6e825..80bff93 100644 --- a/Monei/model/payment_session_details.py +++ b/Monei/model/payment_session_details.py @@ -3,7 +3,7 @@

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - The version of the OpenAPI document: 1.5.3 + The version of the OpenAPI document: 1.5.4 Generated by: https://openapi-generator.tech """ @@ -94,9 +94,9 @@ def openapi_types(): 'source_version': (str,), # noqa: E501 'user_agent': (str,), # noqa: E501 'browser_accept': (str,), # noqa: E501 - 'browser_color_depth': (int,), # noqa: E501 - 'browser_screen_height': (int,), # noqa: E501 - 'browser_screen_width': (int,), # noqa: E501 + 'browser_color_depth': (str,), # noqa: E501 + 'browser_screen_height': (str,), # noqa: E501 + 'browser_screen_width': (str,), # noqa: E501 'browser_timezone_offset': (str,), # noqa: E501 } @@ -179,9 +179,9 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 source_version (str): The source component version from where the operation was generated (mostly for our SDK's).. [optional] # noqa: E501 user_agent (str): Full user agent string of the browser session.. [optional] # noqa: E501 browser_accept (str): Browser accept header.. [optional] # noqa: E501 - browser_color_depth (int): The color depth of the browser session (e.g., `24`).. [optional] # noqa: E501 - browser_screen_height (int): The screen height of the browser session (e.g., `1152`).. [optional] # noqa: E501 - browser_screen_width (int): The screen width of the browser session (e.g., `2048`).. [optional] # noqa: E501 + browser_color_depth (str): The color depth of the browser session (e.g., `24`).. [optional] # noqa: E501 + browser_screen_height (str): The screen height of the browser session (e.g., `1152`).. [optional] # noqa: E501 + browser_screen_width (str): The screen width of the browser session (e.g., `2048`).. [optional] # noqa: E501 browser_timezone_offset (str): The timezone offset of the browser session (e.g., `-120`).. [optional] # noqa: E501 """ @@ -281,9 +281,9 @@ def __init__(self, *args, **kwargs): # noqa: E501 source_version (str): The source component version from where the operation was generated (mostly for our SDK's).. [optional] # noqa: E501 user_agent (str): Full user agent string of the browser session.. [optional] # noqa: E501 browser_accept (str): Browser accept header.. [optional] # noqa: E501 - browser_color_depth (int): The color depth of the browser session (e.g., `24`).. [optional] # noqa: E501 - browser_screen_height (int): The screen height of the browser session (e.g., `1152`).. [optional] # noqa: E501 - browser_screen_width (int): The screen width of the browser session (e.g., `2048`).. [optional] # noqa: E501 + browser_color_depth (str): The color depth of the browser session (e.g., `24`).. [optional] # noqa: E501 + browser_screen_height (str): The screen height of the browser session (e.g., `1152`).. [optional] # noqa: E501 + browser_screen_width (str): The screen width of the browser session (e.g., `2048`).. [optional] # noqa: E501 browser_timezone_offset (str): The timezone offset of the browser session (e.g., `-120`).. [optional] # noqa: E501 """ diff --git a/Monei/model/payment_shipping_details.py b/Monei/model/payment_shipping_details.py index 1f9fff4..71510b4 100644 --- a/Monei/model/payment_shipping_details.py +++ b/Monei/model/payment_shipping_details.py @@ -3,7 +3,7 @@

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - The version of the OpenAPI document: 1.5.3 + The version of the OpenAPI document: 1.5.4 Generated by: https://openapi-generator.tech """ diff --git a/Monei/model/payment_shop.py b/Monei/model/payment_shop.py index 0f4032e..47da7eb 100644 --- a/Monei/model/payment_shop.py +++ b/Monei/model/payment_shop.py @@ -3,7 +3,7 @@

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - The version of the OpenAPI document: 1.5.3 + The version of the OpenAPI document: 1.5.4 Generated by: https://openapi-generator.tech """ diff --git a/Monei/model/payment_status.py b/Monei/model/payment_status.py index 99a5210..1ce885b 100644 --- a/Monei/model/payment_status.py +++ b/Monei/model/payment_status.py @@ -3,7 +3,7 @@

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - The version of the OpenAPI document: 1.5.3 + The version of the OpenAPI document: 1.5.4 Generated by: https://openapi-generator.tech """ diff --git a/Monei/model/payment_trace_details.py b/Monei/model/payment_trace_details.py index 45199cd..6e0d51f 100644 --- a/Monei/model/payment_trace_details.py +++ b/Monei/model/payment_trace_details.py @@ -3,7 +3,7 @@

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - The version of the OpenAPI document: 1.5.3 + The version of the OpenAPI document: 1.5.4 Generated by: https://openapi-generator.tech """ @@ -94,9 +94,9 @@ def openapi_types(): 'source_version': (str,), # noqa: E501 'user_agent': (str,), # noqa: E501 'browser_accept': (str,), # noqa: E501 - 'browser_color_depth': (int,), # noqa: E501 - 'browser_screen_height': (int,), # noqa: E501 - 'browser_screen_width': (int,), # noqa: E501 + 'browser_color_depth': (str,), # noqa: E501 + 'browser_screen_height': (str,), # noqa: E501 + 'browser_screen_width': (str,), # noqa: E501 'browser_timezone_offset': (str,), # noqa: E501 'user_id': (str,), # noqa: E501 'user_email': (str,), # noqa: E501 @@ -183,9 +183,9 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 source_version (str): The source component version from where the operation was generated (mostly for our SDK's).. [optional] # noqa: E501 user_agent (str): Full user agent string of the browser session.. [optional] # noqa: E501 browser_accept (str): Browser accept header.. [optional] # noqa: E501 - browser_color_depth (int): The color depth of the browser session (e.g., `24`).. [optional] # noqa: E501 - browser_screen_height (int): The screen height of the browser session (e.g., `1152`).. [optional] # noqa: E501 - browser_screen_width (int): The screen width of the browser session (e.g., `2048`).. [optional] # noqa: E501 + browser_color_depth (str): The color depth of the browser session (e.g., `24`).. [optional] # noqa: E501 + browser_screen_height (str): The screen height of the browser session (e.g., `1152`).. [optional] # noqa: E501 + browser_screen_width (str): The screen width of the browser session (e.g., `2048`).. [optional] # noqa: E501 browser_timezone_offset (str): The timezone offset of the browser session (e.g., `-120`).. [optional] # noqa: E501 user_id (str): The ID of the user that started the operation.. [optional] # noqa: E501 user_email (str): The email of the user that started the operation.. [optional] # noqa: E501 @@ -287,9 +287,9 @@ def __init__(self, *args, **kwargs): # noqa: E501 source_version (str): The source component version from where the operation was generated (mostly for our SDK's).. [optional] # noqa: E501 user_agent (str): Full user agent string of the browser session.. [optional] # noqa: E501 browser_accept (str): Browser accept header.. [optional] # noqa: E501 - browser_color_depth (int): The color depth of the browser session (e.g., `24`).. [optional] # noqa: E501 - browser_screen_height (int): The screen height of the browser session (e.g., `1152`).. [optional] # noqa: E501 - browser_screen_width (int): The screen width of the browser session (e.g., `2048`).. [optional] # noqa: E501 + browser_color_depth (str): The color depth of the browser session (e.g., `24`).. [optional] # noqa: E501 + browser_screen_height (str): The screen height of the browser session (e.g., `1152`).. [optional] # noqa: E501 + browser_screen_width (str): The screen width of the browser session (e.g., `2048`).. [optional] # noqa: E501 browser_timezone_offset (str): The timezone offset of the browser session (e.g., `-120`).. [optional] # noqa: E501 user_id (str): The ID of the user that started the operation.. [optional] # noqa: E501 user_email (str): The email of the user that started the operation.. [optional] # noqa: E501 diff --git a/Monei/model/payment_transaction_type.py b/Monei/model/payment_transaction_type.py index 2765f46..883bcf6 100644 --- a/Monei/model/payment_transaction_type.py +++ b/Monei/model/payment_transaction_type.py @@ -3,7 +3,7 @@

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - The version of the OpenAPI document: 1.5.3 + The version of the OpenAPI document: 1.5.4 Generated by: https://openapi-generator.tech """ diff --git a/Monei/model/recurring_payment_request.py b/Monei/model/recurring_payment_request.py index 0a42f04..f8d1519 100644 --- a/Monei/model/recurring_payment_request.py +++ b/Monei/model/recurring_payment_request.py @@ -3,7 +3,7 @@

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - The version of the OpenAPI document: 1.5.3 + The version of the OpenAPI document: 1.5.4 Generated by: https://openapi-generator.tech """ diff --git a/Monei/model/refund_payment_request.py b/Monei/model/refund_payment_request.py index c8ee586..66f63ae 100644 --- a/Monei/model/refund_payment_request.py +++ b/Monei/model/refund_payment_request.py @@ -3,7 +3,7 @@

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - The version of the OpenAPI document: 1.5.3 + The version of the OpenAPI document: 1.5.4 Generated by: https://openapi-generator.tech """ diff --git a/Monei/model/register_apple_pay_domain_request.py b/Monei/model/register_apple_pay_domain_request.py index 51b2f65..63b1777 100644 --- a/Monei/model/register_apple_pay_domain_request.py +++ b/Monei/model/register_apple_pay_domain_request.py @@ -3,7 +3,7 @@

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - The version of the OpenAPI document: 1.5.3 + The version of the OpenAPI document: 1.5.4 Generated by: https://openapi-generator.tech """ diff --git a/Monei/model/send_payment_link_request.py b/Monei/model/send_payment_link_request.py index 4c01f98..ca4ab16 100644 --- a/Monei/model/send_payment_link_request.py +++ b/Monei/model/send_payment_link_request.py @@ -3,7 +3,7 @@

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - The version of the OpenAPI document: 1.5.3 + The version of the OpenAPI document: 1.5.4 Generated by: https://openapi-generator.tech """ diff --git a/Monei/model/send_payment_receipt_request.py b/Monei/model/send_payment_receipt_request.py index 74024d1..62db806 100644 --- a/Monei/model/send_payment_receipt_request.py +++ b/Monei/model/send_payment_receipt_request.py @@ -3,7 +3,7 @@

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - The version of the OpenAPI document: 1.5.3 + The version of the OpenAPI document: 1.5.4 Generated by: https://openapi-generator.tech """ diff --git a/Monei/model/send_payment_request_request.py b/Monei/model/send_payment_request_request.py index b0e9dea..c2f132b 100644 --- a/Monei/model/send_payment_request_request.py +++ b/Monei/model/send_payment_request_request.py @@ -3,7 +3,7 @@

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - The version of the OpenAPI document: 1.5.3 + The version of the OpenAPI document: 1.5.4 Generated by: https://openapi-generator.tech """ diff --git a/Monei/model/send_subscription_link_request.py b/Monei/model/send_subscription_link_request.py index 76c2b9f..673dc52 100644 --- a/Monei/model/send_subscription_link_request.py +++ b/Monei/model/send_subscription_link_request.py @@ -3,7 +3,7 @@

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - The version of the OpenAPI document: 1.5.3 + The version of the OpenAPI document: 1.5.4 Generated by: https://openapi-generator.tech """ diff --git a/Monei/model/send_subscription_status_request.py b/Monei/model/send_subscription_status_request.py index e6b7e84..c28f66a 100644 --- a/Monei/model/send_subscription_status_request.py +++ b/Monei/model/send_subscription_status_request.py @@ -3,7 +3,7 @@

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - The version of the OpenAPI document: 1.5.3 + The version of the OpenAPI document: 1.5.4 Generated by: https://openapi-generator.tech """ diff --git a/Monei/model/subscription.py b/Monei/model/subscription.py index 7b72568..94914ee 100644 --- a/Monei/model/subscription.py +++ b/Monei/model/subscription.py @@ -3,7 +3,7 @@

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - The version of the OpenAPI document: 1.5.3 + The version of the OpenAPI document: 1.5.4 Generated by: https://openapi-generator.tech """ diff --git a/Monei/model/subscription_interval.py b/Monei/model/subscription_interval.py index 62c5c23..d95b0f5 100644 --- a/Monei/model/subscription_interval.py +++ b/Monei/model/subscription_interval.py @@ -3,7 +3,7 @@

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - The version of the OpenAPI document: 1.5.3 + The version of the OpenAPI document: 1.5.4 Generated by: https://openapi-generator.tech """ diff --git a/Monei/model/subscription_last_payment.py b/Monei/model/subscription_last_payment.py index 9920b22..2833607 100644 --- a/Monei/model/subscription_last_payment.py +++ b/Monei/model/subscription_last_payment.py @@ -3,7 +3,7 @@

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - The version of the OpenAPI document: 1.5.3 + The version of the OpenAPI document: 1.5.4 Generated by: https://openapi-generator.tech """ diff --git a/Monei/model/subscription_payment_method.py b/Monei/model/subscription_payment_method.py index 3f0b758..eceea0f 100644 --- a/Monei/model/subscription_payment_method.py +++ b/Monei/model/subscription_payment_method.py @@ -3,7 +3,7 @@

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - The version of the OpenAPI document: 1.5.3 + The version of the OpenAPI document: 1.5.4 Generated by: https://openapi-generator.tech """ diff --git a/Monei/model/subscription_payment_method_card.py b/Monei/model/subscription_payment_method_card.py index 8b82fe0..6487c0a 100644 --- a/Monei/model/subscription_payment_method_card.py +++ b/Monei/model/subscription_payment_method_card.py @@ -3,7 +3,7 @@

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - The version of the OpenAPI document: 1.5.3 + The version of the OpenAPI document: 1.5.4 Generated by: https://openapi-generator.tech """ diff --git a/Monei/model/subscription_retry_schedule.py b/Monei/model/subscription_retry_schedule.py index bfed196..fcf09ad 100644 --- a/Monei/model/subscription_retry_schedule.py +++ b/Monei/model/subscription_retry_schedule.py @@ -3,7 +3,7 @@

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - The version of the OpenAPI document: 1.5.3 + The version of the OpenAPI document: 1.5.4 Generated by: https://openapi-generator.tech """ diff --git a/Monei/model/subscription_retry_schedule_inner.py b/Monei/model/subscription_retry_schedule_inner.py index d457eef..ff3cfa1 100644 --- a/Monei/model/subscription_retry_schedule_inner.py +++ b/Monei/model/subscription_retry_schedule_inner.py @@ -3,7 +3,7 @@

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - The version of the OpenAPI document: 1.5.3 + The version of the OpenAPI document: 1.5.4 Generated by: https://openapi-generator.tech """ diff --git a/Monei/model/subscription_status.py b/Monei/model/subscription_status.py index 4961717..c6b2b95 100644 --- a/Monei/model/subscription_status.py +++ b/Monei/model/subscription_status.py @@ -3,7 +3,7 @@

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - The version of the OpenAPI document: 1.5.3 + The version of the OpenAPI document: 1.5.4 Generated by: https://openapi-generator.tech """ diff --git a/Monei/model/update_subscription_request.py b/Monei/model/update_subscription_request.py index 135b49f..f1fe83f 100644 --- a/Monei/model/update_subscription_request.py +++ b/Monei/model/update_subscription_request.py @@ -3,7 +3,7 @@

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - The version of the OpenAPI document: 1.5.3 + The version of the OpenAPI document: 1.5.4 Generated by: https://openapi-generator.tech """ diff --git a/Monei/model/validate_bizum_phone_request.py b/Monei/model/validate_bizum_phone_request.py index c87b9ad..b459bc0 100644 --- a/Monei/model/validate_bizum_phone_request.py +++ b/Monei/model/validate_bizum_phone_request.py @@ -3,7 +3,7 @@

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - The version of the OpenAPI document: 1.5.3 + The version of the OpenAPI document: 1.5.4 Generated by: https://openapi-generator.tech """ diff --git a/Monei/model_utils.py b/Monei/model_utils.py index 81575dc..6adfabe 100644 --- a/Monei/model_utils.py +++ b/Monei/model_utils.py @@ -3,7 +3,7 @@

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - The version of the OpenAPI document: 1.5.3 + The version of the OpenAPI document: 1.5.4 Generated by: https://openapi-generator.tech """ diff --git a/Monei/monei_client.py b/Monei/monei_client.py index b136648..2f5f3ae 100644 --- a/Monei/monei_client.py +++ b/Monei/monei_client.py @@ -33,22 +33,44 @@ def __init__(self, api_key=None, config=None, account_id=None, user_agent=None): self.account_id = account_id self.user_agent = user_agent or DEFAULT_USER_AGENT - self.config = config if config else Configuration() - - self.config.api_key = {"Authorization": api_key} + # Create a new configuration if one wasn't provided + if config is None: + self.config = Configuration() + # Set the API key directly in the configuration + self.config.api_key["APIKey"] = api_key + else: + self.config = config + # If a config was provided, ensure the API key is set + if "APIKey" not in self.config.api_key: + self.config.api_key["APIKey"] = api_key # Enter a context with an instance of the API client with ApiClient(self.config) as api_client: # Set user agent api_client.user_agent = self.user_agent - # Set account ID if provided - if self.account_id: + # Validate user agent when using account ID + # Similar to Node.js SDK implementation + if self.account_id and self.user_agent == DEFAULT_USER_AGENT: + raise ApiException( + status=400, reason="User-Agent must be provided when using Account ID" + ) + + # Add a request interceptor to validate user agent before each request + original_call_api = api_client.call_api + + def call_api_with_validation(*args, **kwargs): # Validate that a custom user agent is set when using account ID - if self.user_agent == DEFAULT_USER_AGENT: + if self.account_id and self.user_agent == DEFAULT_USER_AGENT: raise ApiException( status=400, reason="User-Agent must be provided when using Account ID" ) + return original_call_api(*args, **kwargs) + + api_client.call_api = call_api_with_validation + + # Set account ID if provided + if self.account_id: api_client.set_default_header("MONEI-Account-ID", self.account_id) # Initialize API instances @@ -60,7 +82,7 @@ def __init__(self, api_key=None, config=None, account_id=None, user_agent=None): # Store the api_client for later use self._api_client = api_client - + # aliases self.payments = self.Payments self.payment_methods = self.PaymentMethods @@ -68,9 +90,6 @@ def __init__(self, api_key=None, config=None, account_id=None, user_agent=None): self.apple_pay_domain = self.ApplePayDomain self.bizum = self.Bizum - # aliases - self.payments = self.Payments - def set_account_id(self, account_id): """Set the account ID to act on behalf of a merchant diff --git a/Monei/rest.py b/Monei/rest.py index dd372b4..5f71df1 100644 --- a/Monei/rest.py +++ b/Monei/rest.py @@ -3,7 +3,7 @@

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 - The version of the OpenAPI document: 1.5.3 + The version of the OpenAPI document: 1.5.4 Generated by: https://openapi-generator.tech """ diff --git a/test/test_api_key_integration.py b/test/test_api_key_integration.py new file mode 100644 index 0000000..ad8cbee --- /dev/null +++ b/test/test_api_key_integration.py @@ -0,0 +1,55 @@ +import unittest +from unittest.mock import patch, MagicMock +import requests + +from Monei.monei_client import MoneiClient + + +class TestApiKeyIntegration(unittest.TestCase): + """Integration tests for API key handling""" + + def setUp(self): + """Set up test fixtures, if any.""" + self.api_key = "test_api_key_12345" + self.user_agent = "MONEI/TestPlatform/1.0.0" + + def test_api_key_in_real_request(self): + """Test that the API key is correctly passed in the Authorization header in a real request.""" + # Create a client with a test API key + client = MoneiClient(api_key=self.api_key, user_agent=self.user_agent) + + # Mock the requests.request method to capture the headers + with patch("requests.request") as mock_request: + # Configure the mock to return a successful response + mock_response = MagicMock() + mock_response.status_code = 200 + mock_response.text = "{}" + mock_response.headers = {} + mock_request.return_value = mock_response + + # Make a request using the client + try: + # Call a method that will make a real HTTP request + client.payments.get("dummy_payment_id") + except Exception: + # We don't care about the actual API call, just the headers + pass + + # Check that request was called + mock_request.assert_called() + + # Get the headers from the call arguments + call_args = mock_request.call_args + headers = call_args[1].get("headers", {}) + + # Verify that the Authorization header contains the API key + self.assertIn("Authorization", headers) + self.assertEqual(headers["Authorization"], self.api_key) + + # Verify that the User-Agent header is set + self.assertIn("User-Agent", headers) + self.assertEqual(headers["User-Agent"], self.user_agent) + + +if __name__ == "__main__": + unittest.main() diff --git a/test/test_browser_color_depth.py b/test/test_browser_color_depth.py new file mode 100644 index 0000000..45b0f0c --- /dev/null +++ b/test/test_browser_color_depth.py @@ -0,0 +1,35 @@ +""" + MONEI API v1 + +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 + + The version of the OpenAPI document: 1.5.3 + Generated by: https://openapi-generator.tech +""" + + +import sys +import unittest + +import Monei +from Monei.model.browser_color_depth import BrowserColorDepth + + +class TestBrowserColorDepth(unittest.TestCase): + """BrowserColorDepth unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testBrowserColorDepth(self): + """Test BrowserColorDepth""" + # FIXME: construct object with mandatory attributes with example values + # model = BrowserColorDepth() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_browser_screen_height.py b/test/test_browser_screen_height.py new file mode 100644 index 0000000..df79cde --- /dev/null +++ b/test/test_browser_screen_height.py @@ -0,0 +1,35 @@ +""" + MONEI API v1 + +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 + + The version of the OpenAPI document: 1.5.3 + Generated by: https://openapi-generator.tech +""" + + +import sys +import unittest + +import Monei +from Monei.model.browser_screen_height import BrowserScreenHeight + + +class TestBrowserScreenHeight(unittest.TestCase): + """BrowserScreenHeight unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testBrowserScreenHeight(self): + """Test BrowserScreenHeight""" + # FIXME: construct object with mandatory attributes with example values + # model = BrowserScreenHeight() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_browser_screen_width.py b/test/test_browser_screen_width.py new file mode 100644 index 0000000..9ff8f1d --- /dev/null +++ b/test/test_browser_screen_width.py @@ -0,0 +1,35 @@ +""" + MONEI API v1 + +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 + + The version of the OpenAPI document: 1.5.3 + Generated by: https://openapi-generator.tech +""" + + +import sys +import unittest + +import Monei +from Monei.model.browser_screen_width import BrowserScreenWidth + + +class TestBrowserScreenWidth(unittest.TestCase): + """BrowserScreenWidth unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testBrowserScreenWidth(self): + """Test BrowserScreenWidth""" + # FIXME: construct object with mandatory attributes with example values + # model = BrowserScreenWidth() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_browser_timezone_offset.py b/test/test_browser_timezone_offset.py new file mode 100644 index 0000000..2d354ca --- /dev/null +++ b/test/test_browser_timezone_offset.py @@ -0,0 +1,35 @@ +""" + MONEI API v1 + +

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.

Base URL

All API requests should be made to:

https://api.monei.com/v1 

Environment

MONEI provides two environments:

  • Test Environment: For development and testing without processing real payments
  • Live Environment: For processing real transactions in production

Client Libraries

We provide official SDKs to simplify integration:

Our SDKs handle authentication, error handling, and request formatting automatically.

You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the OpenAPI Generator.

Important Requirements

  • All API requests must be made over HTTPS
  • If you are not using our official SDKs, you must provide a valid User-Agent header with each request
  • Requests without proper authentication will return a 401 Unauthorized error

Error Handling

The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a statusCode attribute indicating the outcome of your request.

Rate Limits

The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a 429 Too Many Requests status code.

# noqa: E501 + + The version of the OpenAPI document: 1.5.3 + Generated by: https://openapi-generator.tech +""" + + +import sys +import unittest + +import Monei +from Monei.model.browser_timezone_offset import BrowserTimezoneOffset + + +class TestBrowserTimezoneOffset(unittest.TestCase): + """BrowserTimezoneOffset unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testBrowserTimezoneOffset(self): + """Test BrowserTimezoneOffset""" + # FIXME: construct object with mandatory attributes with example values + # model = BrowserTimezoneOffset() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_monei_client.py b/test/test_monei_client.py index 699f02b..187fae4 100644 --- a/test/test_monei_client.py +++ b/test/test_monei_client.py @@ -4,7 +4,6 @@ import hashlib from unittest.mock import patch, MagicMock -import Monei from Monei.monei_client import MoneiClient, DEFAULT_USER_AGENT from Monei.exceptions import ApiException from Monei.api.payments_api import PaymentsApi @@ -49,6 +48,9 @@ def test_init_with_api_key_only(self): self.assertEqual(client.apple_pay_domain, client.ApplePayDomain) self.assertEqual(client.bizum, client.Bizum) + # Check that the API key is correctly set in the configuration + self.assertEqual(client.config.api_key["APIKey"], self.api_key) + def test_init_with_account_id_and_user_agent(self): """Test initializing with API key, account ID, and user agent.""" client = MoneiClient( @@ -98,6 +100,105 @@ def test_set_user_agent(self): client.set_user_agent(self.user_agent) self.assertEqual(client.user_agent, self.user_agent) + def test_api_key_in_configuration(self): + """Test that the API key is correctly set in the configuration.""" + # Create a client with a test API key + client = MoneiClient(api_key=self.api_key) + + # Check that the API key is correctly set in the configuration + self.assertEqual(client.config.api_key["APIKey"], self.api_key) + + # Check the auth_settings in the configuration + auth_settings = client.config.auth_settings() + self.assertIn("APIKey", auth_settings) + self.assertEqual(auth_settings["APIKey"]["key"], "Authorization") + self.assertEqual(auth_settings["APIKey"]["value"], self.api_key) + + def test_api_key_in_request_headers(self): + """Test that the API key is correctly passed in the request headers.""" + # Create a client with a test API key + client = MoneiClient(api_key=self.api_key) + + # Mock the RESTClientObject.request method to capture the headers + with patch("Monei.rest.RESTClientObject.request") as mock_request: + # Configure the mock to return a successful response + mock_response = MagicMock() + mock_response.status = 200 + mock_response.data = b"{}" + mock_response.getheaders.return_value = {} + mock_request.return_value = mock_response + + # Make a request using the client + try: + # Call a method that will make a real HTTP request + client.payments.get("dummy_payment_id") + except Exception: + # We don't care about the actual API call, just the headers + pass + + # Check that request was called + mock_request.assert_called() + + # Get the headers from the call arguments + call_args = mock_request.call_args + headers = call_args[1].get("headers", {}) + + # Verify that the Authorization header contains the API key + self.assertIn("Authorization", headers) + self.assertEqual(headers["Authorization"], self.api_key) + + # Verify that the User-Agent header is set + self.assertIn("User-Agent", headers) + self.assertEqual(headers["User-Agent"], client.user_agent) + + def test_user_agent_validation_before_request(self): + """Test that the user agent is validated before making a request.""" + # Create a client with account_id but without custom user agent + client = MoneiClient(api_key=self.api_key) + + # Set account_id after initialization but don't set user_agent + # This should not raise an exception yet + with patch("Monei.monei_client.ApiException") as mock_exception: + client.account_id = self.account_id + mock_exception.assert_not_called() + + # Now try to make a request, which should validate the user agent + with self.assertRaises(ApiException) as context: + # Directly call the validation function to test it + client._api_client.call_api( + "/payments/{id}", + "GET", + path_params={"id": "dummy_payment_id"}, + header_params={"Accept": "application/json"}, + auth_settings=["APIKey"], + ) + + # Check that the exception has the correct message + self.assertEqual(context.exception.status, 400) + self.assertEqual( + context.exception.reason, "User-Agent must be provided when using Account ID" + ) + + # Now set a custom user agent and try again + client.set_user_agent(self.user_agent) + + # Mock the __call_api method to avoid actual API calls + with patch("Monei.api_client.ApiClient._ApiClient__call_api") as mock_call_api: + mock_call_api.return_value = (None, 200, {}) + + # This should not raise an exception now + try: + client._api_client.call_api( + "/payments/{id}", + "GET", + path_params={"id": "dummy_payment_id"}, + header_params={"Accept": "application/json"}, + auth_settings=["APIKey"], + ) + except ApiException as e: + if "User-Agent must be provided" in str(e): + self.fail("User agent validation failed even with custom user agent") + def test_verify_signature_valid(self): """Test verifying a valid signature.""" client = MoneiClient(api_key=self.api_key) @@ -147,6 +248,17 @@ def test_verify_signature_malformed(self): with self.assertRaises(Exception): client.verify_signature(body, malformed_signature) + def test_default_user_agent_always_set(self): + """Test that DEFAULT_USER_AGENT is always set when user_agent is None.""" + # Create a client without specifying a user agent + client = MoneiClient(api_key=self.api_key) + + # Check that the user agent is set to DEFAULT_USER_AGENT + self.assertEqual(client.user_agent, DEFAULT_USER_AGENT) + + # Check that the user agent is set in the API client + self.assertEqual(client._api_client.user_agent, DEFAULT_USER_AGENT) + if __name__ == "__main__": unittest.main() From b005b52579e4b61d0648ae28f88deffb0c13e85c Mon Sep 17 00:00:00 2001 From: Dmitriy Date: Thu, 6 Mar 2025 20:36:53 +0100 Subject: [PATCH 09/13] Update GitHub Actions workflow to run tests only on pull requests - Modify test workflow to trigger only on pull requests - Update uv sync command to use `--all-groups` flag --- .github/workflows/test.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index be5a9d0..1ae8ffb 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -1,6 +1,6 @@ name: Test -on: [push, pull_request] +on: [pull_request] jobs: test: @@ -20,7 +20,7 @@ jobs: cache-dependency-glob: "requirements*.txt uv.lock" - name: Install dependencies - run: uv sync --all + run: uv sync --all-groups - name: Run tests with pytest run: uv run pytest --cov=Monei --cov-report=xml From 5c9b48dcd696ae505d9eb0af0bd73d0533d4ecdb Mon Sep 17 00:00:00 2001 From: Dmitriy Date: Thu, 6 Mar 2025 20:39:02 +0100 Subject: [PATCH 10/13] Update test requirements and remove API key integration test - Upgrade pytest to version 7.0.0 in test-requirements.txt - Remove deprecated API key integration test file --- test-requirements.txt | 1 + test/test_api_key_integration.py | 55 -------------------------------- 2 files changed, 1 insertion(+), 55 deletions(-) delete mode 100644 test/test_api_key_integration.py diff --git a/test-requirements.txt b/test-requirements.txt index bb4f22b..713d328 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -1 +1,2 @@ +pytest>=7.0.0 pytest-cov>=2.8.1 diff --git a/test/test_api_key_integration.py b/test/test_api_key_integration.py deleted file mode 100644 index ad8cbee..0000000 --- a/test/test_api_key_integration.py +++ /dev/null @@ -1,55 +0,0 @@ -import unittest -from unittest.mock import patch, MagicMock -import requests - -from Monei.monei_client import MoneiClient - - -class TestApiKeyIntegration(unittest.TestCase): - """Integration tests for API key handling""" - - def setUp(self): - """Set up test fixtures, if any.""" - self.api_key = "test_api_key_12345" - self.user_agent = "MONEI/TestPlatform/1.0.0" - - def test_api_key_in_real_request(self): - """Test that the API key is correctly passed in the Authorization header in a real request.""" - # Create a client with a test API key - client = MoneiClient(api_key=self.api_key, user_agent=self.user_agent) - - # Mock the requests.request method to capture the headers - with patch("requests.request") as mock_request: - # Configure the mock to return a successful response - mock_response = MagicMock() - mock_response.status_code = 200 - mock_response.text = "{}" - mock_response.headers = {} - mock_request.return_value = mock_response - - # Make a request using the client - try: - # Call a method that will make a real HTTP request - client.payments.get("dummy_payment_id") - except Exception: - # We don't care about the actual API call, just the headers - pass - - # Check that request was called - mock_request.assert_called() - - # Get the headers from the call arguments - call_args = mock_request.call_args - headers = call_args[1].get("headers", {}) - - # Verify that the Authorization header contains the API key - self.assertIn("Authorization", headers) - self.assertEqual(headers["Authorization"], self.api_key) - - # Verify that the User-Agent header is set - self.assertIn("User-Agent", headers) - self.assertEqual(headers["User-Agent"], self.user_agent) - - -if __name__ == "__main__": - unittest.main() From f7e6a7bc4005b203411c6b34f347495994afca65 Mon Sep 17 00:00:00 2001 From: Dmitriy Date: Thu, 6 Mar 2025 20:43:35 +0100 Subject: [PATCH 11/13] Remove requirements files and update GitHub Actions workflow cache - Delete requirements.txt and test-requirements.txt - Update test workflow cache to use pyproject.toml instead of requirements files --- .github/workflows/test.yml | 2 +- requirements.txt | 3 --- test-requirements.txt | 2 -- 3 files changed, 1 insertion(+), 6 deletions(-) delete mode 100644 requirements.txt delete mode 100644 test-requirements.txt diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 1ae8ffb..e49dcd1 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -17,7 +17,7 @@ jobs: with: python-version: ${{ matrix.python-version }} enable-cache: true - cache-dependency-glob: "requirements*.txt uv.lock" + cache-dependency-glob: "pyproject.toml uv.lock" - name: Install dependencies run: uv sync --all-groups diff --git a/requirements.txt b/requirements.txt deleted file mode 100644 index 96947f6..0000000 --- a/requirements.txt +++ /dev/null @@ -1,3 +0,0 @@ -python_dateutil >= 2.5.3 -setuptools >= 21.0.0 -urllib3 >= 1.25.3 diff --git a/test-requirements.txt b/test-requirements.txt deleted file mode 100644 index 713d328..0000000 --- a/test-requirements.txt +++ /dev/null @@ -1,2 +0,0 @@ -pytest>=7.0.0 -pytest-cov>=2.8.1 From ffb841bed0403ccf3756fb352f59e515dce43629 Mon Sep 17 00:00:00 2001 From: Dmitriy Date: Thu, 6 Mar 2025 20:44:47 +0100 Subject: [PATCH 12/13] Update GitHub Actions workflow to use dev dependencies - Modify test workflow to run uv sync with --group dev flag - Simplify dependency installation for test environment --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index e49dcd1..0cabcad 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -20,7 +20,7 @@ jobs: cache-dependency-glob: "pyproject.toml uv.lock" - name: Install dependencies - run: uv sync --all-groups + run: uv sync --group dev - name: Run tests with pytest run: uv run pytest --cov=Monei --cov-report=xml From b1185df9245324e117cc15b0f198cd8e17d2fb9d Mon Sep 17 00:00:00 2001 From: Dmitriy Date: Thu, 6 Mar 2025 20:47:07 +0100 Subject: [PATCH 13/13] Add dependency groups to pyproject.toml and update GitHub Actions workflow - Define main and dev dependency groups in pyproject.toml - Update test workflow to use `uv sync --all-groups` --- .github/workflows/test.yml | 2 +- pyproject.toml | 15 +++++++++++++++ 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 0cabcad..e49dcd1 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -20,7 +20,7 @@ jobs: cache-dependency-glob: "pyproject.toml uv.lock" - name: Install dependencies - run: uv sync --group dev + run: uv sync --all-groups - name: Run tests with pytest run: uv run pytest --cov=Monei --cov-report=xml diff --git a/pyproject.toml b/pyproject.toml index 2792148..4709be2 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -78,6 +78,21 @@ pytest-cov = ">= 2.8.1" types-python-dateutil = ">= 2.8.19.14" mypy = ">= 1.5" +[dependency-groups] +main = [ + "urllib3 >= 1.25.3, < 3.0.0", + "python-dateutil >= 2.8.2", + "pydantic >= 2", + "typing-extensions >= 4.7.1", + "certifi", +] +dev = [ + "pytest >= 7.2.1", + "pytest-cov >= 2.8.1", + "types-python-dateutil >= 2.8.19.14", + "mypy >= 1.5", +] + [tool.pytest.ini_options] testpaths = ["test"] python_files = "test_*.py"