diff --git a/.openapi-generator/FILES b/.openapi-generator/FILES index f074516..2e89e0b 100644 --- a/.openapi-generator/FILES +++ b/.openapi-generator/FILES @@ -7,7 +7,10 @@ Monei/api/customers_api.py Monei/api/payment_methods_api.py Monei/api/payments_api.py Monei/api/pos_auth_token_api.py +Monei/api/prices_api.py +Monei/api/products_api.py Monei/api/subscriptions_api.py +Monei/api/tax_rates_api.py Monei/api_client.py Monei/apis/__init__.py Monei/configuration.py @@ -33,7 +36,10 @@ Monei/model/conflict_error_all_of.py Monei/model/create_customer_request.py Monei/model/create_payment_request.py Monei/model/create_pos_auth_token_request.py +Monei/model/create_price_request.py +Monei/model/create_product_request.py Monei/model/create_subscription_request.py +Monei/model/create_tax_rate_request.py Monei/model/customer.py Monei/model/customer_payment_method.py Monei/model/deleted_resource.py @@ -95,6 +101,22 @@ Monei/model/payment_trace_details.py Monei/model/payment_transaction_type.py Monei/model/pos_auth_token_create200_response.py Monei/model/preview_subscription_update_request.py +Monei/model/price.py +Monei/model/price_interval.py +Monei/model/price_interval_count.py +Monei/model/price_list.py +Monei/model/price_nickname.py +Monei/model/price_recurring.py +Monei/model/price_trial_period_days.py +Monei/model/price_unit_amount.py +Monei/model/product.py +Monei/model/product_description.py +Monei/model/product_descriptor.py +Monei/model/product_images.py +Monei/model/product_list.py +Monei/model/product_name.py +Monei/model/product_slug.py +Monei/model/product_unit_label.py Monei/model/recurring_payment_request.py Monei/model/refund_payment_request.py Monei/model/register_apple_pay_domain_request.py @@ -118,13 +140,21 @@ Monei/model/subscription_status.py Monei/model/subscription_trial_amount.py Monei/model/subscription_trial_interval_count.py Monei/model/subscription_update_preview.py +Monei/model/tax_details.py +Monei/model/tax_rate.py +Monei/model/tax_rate_display_name.py +Monei/model/tax_rate_list.py +Monei/model/tax_rate_percentage.py Monei/model/unauthorized_error.py Monei/model/unauthorized_error_all_of.py Monei/model/unprocessable_entity_error.py Monei/model/unprocessable_entity_error_all_of.py Monei/model/update_apple_pay_certificate_request.py Monei/model/update_customer_request.py +Monei/model/update_price_request.py +Monei/model/update_product_request.py Monei/model/update_subscription_request.py +Monei/model/update_tax_rate_request.py Monei/model/validate_bizum_phone_request.py Monei/model_utils.py Monei/models/__init__.py diff --git a/Monei/__init__.py b/Monei/__init__.py index b79739e..f2be386 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: - [PHP SDK](https://github.com/MONEI/monei-php-sdk) - [Python SDK](https://github.com/MONEI/monei-python-sdk) - [Node.js SDK](https://github.com/MONEI/monei-node-sdk) - [Postman Collection](https://postman.monei.com/) Our SDKs handle authentication, error handling, and request formatting automatically. You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the [OpenAPI Generator](https://openapi-generator.tech/). ### Important Requirements - All API requests must be made over HTTPS - If you are not using our official SDKs, you **must provide a valid `User-Agent` header** with each request - Requests without proper authentication will return a `401 Unauthorized` error ### Error Handling The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a `statusCode` attribute indicating the outcome of your request. ### Rate Limits The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a `429 Too Many Requests` status code. # noqa: E501 -The version of the OpenAPI document: 1.12.3 +The version of the OpenAPI document: 1.13.0 Generated by: https://openapi-generator.tech """ diff --git a/Monei/api/apple_pay_certificate_api.py b/Monei/api/apple_pay_certificate_api.py index 8ad6fa5..94db523 100644 --- a/Monei/api/apple_pay_certificate_api.py +++ b/Monei/api/apple_pay_certificate_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: - [PHP SDK](https://github.com/MONEI/monei-php-sdk) - [Python SDK](https://github.com/MONEI/monei-python-sdk) - [Node.js SDK](https://github.com/MONEI/monei-node-sdk) - [Postman Collection](https://postman.monei.com/) Our SDKs handle authentication, error handling, and request formatting automatically. You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the [OpenAPI Generator](https://openapi-generator.tech/). ### Important Requirements - All API requests must be made over HTTPS - If you are not using our official SDKs, you **must provide a valid `User-Agent` header** with each request - Requests without proper authentication will return a `401 Unauthorized` error ### Error Handling The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a `statusCode` attribute indicating the outcome of your request. ### Rate Limits The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a `429 Too Many Requests` status code. # noqa: E501 -The version of the OpenAPI document: 1.12.3 +The version of the OpenAPI document: 1.13.0 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 d0dee8c..74596ab 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: - [PHP SDK](https://github.com/MONEI/monei-php-sdk) - [Python SDK](https://github.com/MONEI/monei-python-sdk) - [Node.js SDK](https://github.com/MONEI/monei-node-sdk) - [Postman Collection](https://postman.monei.com/) Our SDKs handle authentication, error handling, and request formatting automatically. You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the [OpenAPI Generator](https://openapi-generator.tech/). ### Important Requirements - All API requests must be made over HTTPS - If you are not using our official SDKs, you **must provide a valid `User-Agent` header** with each request - Requests without proper authentication will return a `401 Unauthorized` error ### Error Handling The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a `statusCode` attribute indicating the outcome of your request. ### Rate Limits The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a `429 Too Many Requests` status code. # noqa: E501 -The version of the OpenAPI document: 1.12.3 +The version of the OpenAPI document: 1.13.0 Generated by: https://openapi-generator.tech """ diff --git a/Monei/api/bizum_api.py b/Monei/api/bizum_api.py index a75d364..664b416 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: - [PHP SDK](https://github.com/MONEI/monei-php-sdk) - [Python SDK](https://github.com/MONEI/monei-python-sdk) - [Node.js SDK](https://github.com/MONEI/monei-node-sdk) - [Postman Collection](https://postman.monei.com/) Our SDKs handle authentication, error handling, and request formatting automatically. You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the [OpenAPI Generator](https://openapi-generator.tech/). ### Important Requirements - All API requests must be made over HTTPS - If you are not using our official SDKs, you **must provide a valid `User-Agent` header** with each request - Requests without proper authentication will return a `401 Unauthorized` error ### Error Handling The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a `statusCode` attribute indicating the outcome of your request. ### Rate Limits The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a `429 Too Many Requests` status code. # noqa: E501 -The version of the OpenAPI document: 1.12.3 +The version of the OpenAPI document: 1.13.0 Generated by: https://openapi-generator.tech """ diff --git a/Monei/api/customers_api.py b/Monei/api/customers_api.py index 6758afb..69c7ea9 100644 --- a/Monei/api/customers_api.py +++ b/Monei/api/customers_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: - [PHP SDK](https://github.com/MONEI/monei-php-sdk) - [Python SDK](https://github.com/MONEI/monei-python-sdk) - [Node.js SDK](https://github.com/MONEI/monei-node-sdk) - [Postman Collection](https://postman.monei.com/) Our SDKs handle authentication, error handling, and request formatting automatically. You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the [OpenAPI Generator](https://openapi-generator.tech/). ### Important Requirements - All API requests must be made over HTTPS - If you are not using our official SDKs, you **must provide a valid `User-Agent` header** with each request - Requests without proper authentication will return a `401 Unauthorized` error ### Error Handling The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a `statusCode` attribute indicating the outcome of your request. ### Rate Limits The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a `429 Too Many Requests` status code. # noqa: E501 -The version of the OpenAPI document: 1.12.3 +The version of the OpenAPI document: 1.13.0 Generated by: https://openapi-generator.tech """ diff --git a/Monei/api/payment_methods_api.py b/Monei/api/payment_methods_api.py index 3b99538..db28ca0 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: - [PHP SDK](https://github.com/MONEI/monei-php-sdk) - [Python SDK](https://github.com/MONEI/monei-python-sdk) - [Node.js SDK](https://github.com/MONEI/monei-node-sdk) - [Postman Collection](https://postman.monei.com/) Our SDKs handle authentication, error handling, and request formatting automatically. You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the [OpenAPI Generator](https://openapi-generator.tech/). ### Important Requirements - All API requests must be made over HTTPS - If you are not using our official SDKs, you **must provide a valid `User-Agent` header** with each request - Requests without proper authentication will return a `401 Unauthorized` error ### Error Handling The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a `statusCode` attribute indicating the outcome of your request. ### Rate Limits The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a `429 Too Many Requests` status code. # noqa: E501 -The version of the OpenAPI document: 1.12.3 +The version of the OpenAPI document: 1.13.0 Generated by: https://openapi-generator.tech """ diff --git a/Monei/api/payments_api.py b/Monei/api/payments_api.py index ffca9c4..d9ea485 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: - [PHP SDK](https://github.com/MONEI/monei-php-sdk) - [Python SDK](https://github.com/MONEI/monei-python-sdk) - [Node.js SDK](https://github.com/MONEI/monei-node-sdk) - [Postman Collection](https://postman.monei.com/) Our SDKs handle authentication, error handling, and request formatting automatically. You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the [OpenAPI Generator](https://openapi-generator.tech/). ### Important Requirements - All API requests must be made over HTTPS - If you are not using our official SDKs, you **must provide a valid `User-Agent` header** with each request - Requests without proper authentication will return a `401 Unauthorized` error ### Error Handling The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a `statusCode` attribute indicating the outcome of your request. ### Rate Limits The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a `429 Too Many Requests` status code. # noqa: E501 -The version of the OpenAPI document: 1.12.3 +The version of the OpenAPI document: 1.13.0 Generated by: https://openapi-generator.tech """ diff --git a/Monei/api/pos_auth_token_api.py b/Monei/api/pos_auth_token_api.py index 4fcdc02..b55645e 100644 --- a/Monei/api/pos_auth_token_api.py +++ b/Monei/api/pos_auth_token_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: - [PHP SDK](https://github.com/MONEI/monei-php-sdk) - [Python SDK](https://github.com/MONEI/monei-python-sdk) - [Node.js SDK](https://github.com/MONEI/monei-node-sdk) - [Postman Collection](https://postman.monei.com/) Our SDKs handle authentication, error handling, and request formatting automatically. You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the [OpenAPI Generator](https://openapi-generator.tech/). ### Important Requirements - All API requests must be made over HTTPS - If you are not using our official SDKs, you **must provide a valid `User-Agent` header** with each request - Requests without proper authentication will return a `401 Unauthorized` error ### Error Handling The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a `statusCode` attribute indicating the outcome of your request. ### Rate Limits The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a `429 Too Many Requests` status code. # noqa: E501 -The version of the OpenAPI document: 1.12.3 +The version of the OpenAPI document: 1.13.0 Generated by: https://openapi-generator.tech """ diff --git a/Monei/api/prices_api.py b/Monei/api/prices_api.py new file mode 100644 index 0000000..a795c5c --- /dev/null +++ b/Monei/api/prices_api.py @@ -0,0 +1,478 @@ +""" +MONEI API v1 + +The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly. ### Base URL All API requests should be made to: ``` https://api.monei.com/v1 ``` ### Environment MONEI provides two environments: - **Test Environment**: For development and testing without processing real payments - **Live Environment**: For processing real transactions in production ### Client Libraries We provide official SDKs to simplify integration: - [PHP SDK](https://github.com/MONEI/monei-php-sdk) - [Python SDK](https://github.com/MONEI/monei-python-sdk) - [Node.js SDK](https://github.com/MONEI/monei-node-sdk) - [Postman Collection](https://postman.monei.com/) Our SDKs handle authentication, error handling, and request formatting automatically. You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the [OpenAPI Generator](https://openapi-generator.tech/). ### Important Requirements - All API requests must be made over HTTPS - If you are not using our official SDKs, you **must provide a valid `User-Agent` header** with each request - Requests without proper authentication will return a `401 Unauthorized` error ### Error Handling The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a `statusCode` attribute indicating the outcome of your request. ### Rate Limits The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a `429 Too Many Requests` status code. # noqa: E501 + +The version of the OpenAPI document: 1.13.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.bad_request_error import BadRequestError +from Monei.model.create_price_request import CreatePriceRequest +from Monei.model.internal_server_error import InternalServerError +from Monei.model.not_found_error import NotFoundError +from Monei.model.price import Price +from Monei.model.price_list import PriceList +from Monei.model.service_unavailable_error import ServiceUnavailableError +from Monei.model.unauthorized_error import UnauthorizedError +from Monei.model.unprocessable_entity_error import UnprocessableEntityError +from Monei.model.update_price_request import UpdatePriceRequest + + +class PricesApi(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.create_endpoint = _Endpoint( + settings={ + "response_type": (Price,), + "auth": ["APIKey"], + "endpoint_path": "/prices", + "operation_id": "create", + "http_method": "POST", + "servers": None, + }, + params_map={ + "all": [ + "create_price_request", + ], + "required": [ + "create_price_request", + ], + "nullable": [], + "enum": [], + "validation": [], + }, + root_map={ + "validations": {}, + "allowed_values": {}, + "openapi_types": { + "create_price_request": (CreatePriceRequest,), + }, + "attribute_map": {}, + "location_map": { + "create_price_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": (Price,), + "auth": ["APIKey"], + "endpoint_path": "/prices/{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.list_endpoint = _Endpoint( + settings={ + "response_type": (PriceList,), + "auth": ["APIKey"], + "endpoint_path": "/prices", + "operation_id": "list", + "http_method": "GET", + "servers": None, + }, + params_map={ + "all": [ + "product_id", + "limit", + "cursor", + ], + "required": [ + "product_id", + ], + "nullable": [], + "enum": [], + "validation": [ + "limit", + ], + }, + root_map={ + "validations": { + ("limit",): { + "inclusive_maximum": 100, + "inclusive_minimum": 1, + }, + }, + "allowed_values": {}, + "openapi_types": { + "product_id": (str,), + "limit": (int,), + "cursor": (str,), + }, + "attribute_map": { + "product_id": "productId", + "limit": "limit", + "cursor": "cursor", + }, + "location_map": { + "product_id": "query", + "limit": "query", + "cursor": "query", + }, + "collection_format_map": {}, + }, + headers_map={ + "accept": ["application/json"], + "content_type": [], + }, + api_client=api_client, + ) + self.update_endpoint = _Endpoint( + settings={ + "response_type": (Price,), + "auth": ["APIKey"], + "endpoint_path": "/prices/{id}", + "operation_id": "update", + "http_method": "PUT", + "servers": None, + }, + params_map={ + "all": [ + "id", + "update_price_request", + ], + "required": [ + "id", + "update_price_request", + ], + "nullable": [], + "enum": [], + "validation": [], + }, + root_map={ + "validations": {}, + "allowed_values": {}, + "openapi_types": { + "id": (str,), + "update_price_request": (UpdatePriceRequest,), + }, + "attribute_map": { + "id": "id", + }, + "location_map": { + "id": "path", + "update_price_request": "body", + }, + "collection_format_map": {}, + }, + headers_map={ + "accept": ["application/json"], + "content_type": ["application/json"], + }, + api_client=api_client, + ) + + def create(self, create_price_request, **kwargs): + """Create Price # noqa: E501 + + Creates a price of a product. The product must be in your account. It can be archived. **Rules**: - `currency` defaults to the default currency of your account, else `EUR` - A `RECURRING` price (the default) requires `recurring`; a `ONE_TIME` price must not have it - `minute` and `hour` intervals are accepted in test mode only - The billing period (`intervalCount` intervals) cannot be longer than one year - `trialPeriodDays` is from 1 to 1825 - When the product has a tax rate, the rate must be active, and the amount with tax cannot exceed the maximum amount of a payment The amount, the currency, the billing period and `taxBehavior` cannot change later. To change them, create a new price. # 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_price_request, async_req=True) + >>> result = thread.get() + + Args: + create_price_request (CreatePriceRequest): + + 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: + Price + 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_price_request"] = create_price_request + return self.create_endpoint.call_with_http_info(**kwargs) + + def get(self, id, **kwargs): + """Get Price # noqa: E501 + + Retrieves a price by its unique ID. A price of another merchant account is reported as not found. # 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 price 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: + Price + 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) + + def list(self, product_id, **kwargs): + """List Prices # noqa: E501 + + Lists the prices of one product, newest first, one page at a time. `productId` is required. A product of another merchant account is reported as not found. To get the next page, send the `nextCursor` of the response as `cursor`. When there are no more items, the response has no `nextCursor`. The last page can still carry one, and the next call then returns no items. A price you just created can take a moment to appear in the list. [Get Price](https://docs.monei.com/apis/rest/prices-get/) returns it at once. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.list(product_id, async_req=True) + >>> result = thread.get() + + Args: + product_id (str): The product whose prices to list. + + Keyword Args: + limit (int): Number of items in one page, from 1 to 100.. [optional] if omitted the server will use the default value of 20 + cursor (str): The `nextCursor` of the previous page. Omit it to get the first page.. [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: + PriceList + 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["product_id"] = product_id + return self.list_endpoint.call_with_http_info(**kwargs) + + def update(self, id, update_price_request, **kwargs): + """Update Price # noqa: E501 + + Updates a price. Only `active`, `nickname` and `metadata` can change. Any other field is rejected. **Archiving**: Set `active` to `false` to archive the price. Subscriptions that already use it keep their copy of its values. A subscription cannot start from an archived price or switch to it. # 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_price_request, async_req=True) + >>> result = thread.get() + + Args: + id (str): The price ID + update_price_request (UpdatePriceRequest): + + 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: + Price + 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_price_request"] = update_price_request + return self.update_endpoint.call_with_http_info(**kwargs) diff --git a/Monei/api/products_api.py b/Monei/api/products_api.py new file mode 100644 index 0000000..d49008c --- /dev/null +++ b/Monei/api/products_api.py @@ -0,0 +1,470 @@ +""" +MONEI API v1 + +The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly. ### Base URL All API requests should be made to: ``` https://api.monei.com/v1 ``` ### Environment MONEI provides two environments: - **Test Environment**: For development and testing without processing real payments - **Live Environment**: For processing real transactions in production ### Client Libraries We provide official SDKs to simplify integration: - [PHP SDK](https://github.com/MONEI/monei-php-sdk) - [Python SDK](https://github.com/MONEI/monei-python-sdk) - [Node.js SDK](https://github.com/MONEI/monei-node-sdk) - [Postman Collection](https://postman.monei.com/) Our SDKs handle authentication, error handling, and request formatting automatically. You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the [OpenAPI Generator](https://openapi-generator.tech/). ### Important Requirements - All API requests must be made over HTTPS - If you are not using our official SDKs, you **must provide a valid `User-Agent` header** with each request - Requests without proper authentication will return a `401 Unauthorized` error ### Error Handling The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a `statusCode` attribute indicating the outcome of your request. ### Rate Limits The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a `429 Too Many Requests` status code. # noqa: E501 + +The version of the OpenAPI document: 1.13.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.bad_request_error import BadRequestError +from Monei.model.conflict_error import ConflictError +from Monei.model.create_product_request import CreateProductRequest +from Monei.model.internal_server_error import InternalServerError +from Monei.model.not_found_error import NotFoundError +from Monei.model.product import Product +from Monei.model.product_list import ProductList +from Monei.model.service_unavailable_error import ServiceUnavailableError +from Monei.model.unauthorized_error import UnauthorizedError +from Monei.model.unprocessable_entity_error import UnprocessableEntityError +from Monei.model.update_product_request import UpdateProductRequest + + +class ProductsApi(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.create_endpoint = _Endpoint( + settings={ + "response_type": (Product,), + "auth": ["APIKey"], + "endpoint_path": "/products", + "operation_id": "create", + "http_method": "POST", + "servers": None, + }, + params_map={ + "all": [ + "create_product_request", + ], + "required": [ + "create_product_request", + ], + "nullable": [], + "enum": [], + "validation": [], + }, + root_map={ + "validations": {}, + "allowed_values": {}, + "openapi_types": { + "create_product_request": (CreateProductRequest,), + }, + "attribute_map": {}, + "location_map": { + "create_product_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": (Product,), + "auth": ["APIKey"], + "endpoint_path": "/products/{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.list_endpoint = _Endpoint( + settings={ + "response_type": (ProductList,), + "auth": ["APIKey"], + "endpoint_path": "/products", + "operation_id": "list", + "http_method": "GET", + "servers": None, + }, + params_map={ + "all": [ + "limit", + "cursor", + ], + "required": [], + "nullable": [], + "enum": [], + "validation": [ + "limit", + ], + }, + root_map={ + "validations": { + ("limit",): { + "inclusive_maximum": 100, + "inclusive_minimum": 1, + }, + }, + "allowed_values": {}, + "openapi_types": { + "limit": (int,), + "cursor": (str,), + }, + "attribute_map": { + "limit": "limit", + "cursor": "cursor", + }, + "location_map": { + "limit": "query", + "cursor": "query", + }, + "collection_format_map": {}, + }, + headers_map={ + "accept": ["application/json"], + "content_type": [], + }, + api_client=api_client, + ) + self.update_endpoint = _Endpoint( + settings={ + "response_type": (Product,), + "auth": ["APIKey"], + "endpoint_path": "/products/{id}", + "operation_id": "update", + "http_method": "PUT", + "servers": None, + }, + params_map={ + "all": [ + "id", + "update_product_request", + ], + "required": [ + "id", + "update_product_request", + ], + "nullable": [], + "enum": [], + "validation": [], + }, + root_map={ + "validations": {}, + "allowed_values": {}, + "openapi_types": { + "id": (str,), + "update_product_request": (UpdateProductRequest,), + }, + "attribute_map": { + "id": "id", + }, + "location_map": { + "id": "path", + "update_product_request": "body", + }, + "collection_format_map": {}, + }, + headers_map={ + "accept": ["application/json"], + "content_type": ["application/json"], + }, + api_client=api_client, + ) + + def create(self, create_product_request, **kwargs): + """Create Product # noqa: E501 + + Creates a product. Only `name` is required. To give the product a default price, first [create the price](https://docs.monei.com/apis/rest/prices-create/), then set `defaultPriceId` with [Update Product](https://docs.monei.com/apis/rest/products-update/). **Slug**: A `slug` is unique in your account. A slug another product already has is rejected with `409`. # 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_product_request, async_req=True) + >>> result = thread.get() + + Args: + create_product_request (CreateProductRequest): + + 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: + Product + 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_product_request"] = create_product_request + return self.create_endpoint.call_with_http_info(**kwargs) + + def get(self, id, **kwargs): + """Get Product # noqa: E501 + + Retrieves a product by its unique ID. The prices of the product are not included. Use [List Prices](https://docs.monei.com/apis/rest/prices-list/) for those. A product of another merchant account is reported as not found. # 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 product 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: + Product + 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) + + def list(self, **kwargs): + """List Products # noqa: E501 + + Lists the products of your account, newest first, one page at a time. To get the next page, send the `nextCursor` of the response as `cursor`. When there are no more items, the response has no `nextCursor`. The last page can still carry one, and the next call then returns no items. A product you just created can take a moment to appear in the list. [Get Product](https://docs.monei.com/apis/rest/products-get/) returns it at once. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.list(async_req=True) + >>> result = thread.get() + + + Keyword Args: + limit (int): Number of items in one page, from 1 to 100.. [optional] if omitted the server will use the default value of 20 + cursor (str): The `nextCursor` of the previous page. Omit it to get the first page.. [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: + ProductList + 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.list_endpoint.call_with_http_info(**kwargs) + + def update(self, id, update_product_request, **kwargs): + """Update Product # noqa: E501 + + Updates a product. Only the fields you send are changed. A field that this endpoint does not accept, such as `id` or `createdAt`, is rejected. **Clearing fields**: Send `null` for `slug`, `defaultPriceId` or `taxRateId` to remove it. Other fields cannot be cleared. **Default price**: `defaultPriceId` must be an active price of this product. A price that is archived later stays the default until you change it. **Archiving**: Set `active` to `false` to archive the product. Products are never deleted. # 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_product_request, async_req=True) + >>> result = thread.get() + + Args: + id (str): The product ID + update_product_request (UpdateProductRequest): + + 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: + Product + 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_product_request"] = update_product_request + return self.update_endpoint.call_with_http_info(**kwargs) diff --git a/Monei/api/subscriptions_api.py b/Monei/api/subscriptions_api.py index 091b371..da0fa44 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: - [PHP SDK](https://github.com/MONEI/monei-php-sdk) - [Python SDK](https://github.com/MONEI/monei-python-sdk) - [Node.js SDK](https://github.com/MONEI/monei-node-sdk) - [Postman Collection](https://postman.monei.com/) Our SDKs handle authentication, error handling, and request formatting automatically. You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the [OpenAPI Generator](https://openapi-generator.tech/). ### Important Requirements - All API requests must be made over HTTPS - If you are not using our official SDKs, you **must provide a valid `User-Agent` header** with each request - Requests without proper authentication will return a `401 Unauthorized` error ### Error Handling The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a `statusCode` attribute indicating the outcome of your request. ### Rate Limits The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a `429 Too Many Requests` status code. # noqa: E501 -The version of the OpenAPI document: 1.12.3 +The version of the OpenAPI document: 1.13.0 Generated by: https://openapi-generator.tech """ @@ -609,7 +609,7 @@ def cancel(self, id, **kwargs): def create(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](https://docs.monei.com/apis/rest/subscriptions-activate/) 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 - **Trial pricing**: Offer a free trial with `trialPeriodDays`/`trialPeriodEnd` (no charge until the trial ends), or discounted introductory pricing with `trialAmount` + `trialIntervalCount` (the `trialAmount` is charged each billing cycle for that many cycles, then the regular `amount` applies). `trialAmount` can also be combined with `trialPeriodDays`/`trialPeriodEnd` to charge it once at activation for the whole trial period. `trialIntervalCount` requires `trialAmount` and cannot be combined with `trialPeriodDays`/`trialPeriodEnd` **Example — 5 EUR for the first 3 months, then 10 EUR/month**: ```json { \"amount\": 1000, \"currency\": \"EUR\", \"interval\": \"month\", \"intervalCount\": 1, \"trialAmount\": 500, \"trialIntervalCount\": 3 } ``` The customer pays 5.00 EUR at activation and for the next two monthly cycles (3 discounted cycles in total), then 10.00 EUR every month. - **Allowed payment methods**: An array of strings specifying which payment methods are allowed for this subscription (e.g., `card`, `bizum`) - **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 + 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](https://docs.monei.com/apis/rest/subscriptions-activate/) with payment details 3. Once activated, the subscription will automatically bill according to the configured interval **Create from a price**: Send `priceId` instead of the billing settings. The subscription copies the [price](https://docs.monei.com/apis/rest/prices-create/)'s amount, currency, interval, interval count and trial days, and stores `priceId` and `productId`. With `priceId`, the billing and trial fields are rejected. A later change to the price never changes the subscription. ```json { \"priceId\": \"3c5a1f8e-2b7d-4e9a-9c41-7d2e6b0f5a13\" } ``` **Key Configuration Parameters**: - **Billing settings**: Amount, currency, interval (daily, weekly, monthly, yearly). Send either these or `priceId` - **Schedule customization**: Interval count, trial period duration - **Trial pricing**: Offer a free trial with `trialPeriodDays`/`trialPeriodEnd` (no charge until the trial ends), or discounted introductory pricing with `trialAmount` + `trialIntervalCount` (the `trialAmount` is charged each billing cycle for that many cycles, then the regular `amount` applies). `trialAmount` can also be combined with `trialPeriodDays`/`trialPeriodEnd` to charge it once at activation for the whole trial period. `trialIntervalCount` requires `trialAmount` and cannot be combined with `trialPeriodDays`/`trialPeriodEnd` **Example — 5 EUR for the first 3 months, then 10 EUR/month**: ```json { \"amount\": 1000, \"currency\": \"EUR\", \"interval\": \"month\", \"intervalCount\": 1, \"trialAmount\": 500, \"trialIntervalCount\": 3 } ``` The customer pays 5.00 EUR at activation and for the next two monthly cycles (3 discounted cycles in total), then 10.00 EUR every month. - **Allowed payment methods**: An array of strings specifying which payment methods are allowed for this subscription (e.g., `card`, `bizum`) - **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 @@ -799,7 +799,7 @@ def pause(self, id, **kwargs): def preview(self, id, preview_subscription_update_request, **kwargs): """Preview Subscription Update # noqa: E501 - Calculate what a prorated change to a subscription would settle, without applying it. Send the `amount`, `interval`, `intervalCount` or `nextPaymentAt` you intend to set. The response reports the credit for unused time, the charge for the new price or the extra time, and the net difference that would move. Nothing is charged, refunded or stored. Use this to show a customer the cost of a plan change, or of moving their next charge date, before they confirm it. Then apply the change with [Update Subscription](https://docs.monei.com/apis/rest/subscriptions-update/) and `prorate: true`. The figures are an estimate. Applying the change recalculates them at that moment, so a preview taken much earlier can differ. The same validation runs here as on the update, so a change this endpoint rejects would also be rejected when applied. # noqa: E501 + Calculate what a prorated change to a subscription would settle, without applying it. Send the `priceId`, `amount`, `interval`, `intervalCount` or `nextPaymentAt` you intend to set. The response reports the credit for unused time, the charge for the new price or the extra time, and the net difference that would move. Nothing is charged, refunded or stored. Use this to show a customer the cost of a plan change, or of moving their next charge date, before they confirm it. Then apply the change with [Update Subscription](https://docs.monei.com/apis/rest/subscriptions-update/) and `prorate: true`. The figures are an estimate. Applying the change recalculates them at that moment, so a preview taken much earlier can differ. The same validation runs here as on the update, so a change this endpoint rejects would also be rejected when applied. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -1057,7 +1057,7 @@ def send_status(self, id, **kwargs): def update(self, id, update_subscription_request, **kwargs): """Update Subscription # noqa: E501 - Updates the configuration of an existing subscription. **Modifiable Parameters**: - Billing information (amount, interval, intervalCount, description, allowedPaymentMethods) - Customer details (contact information, billing/shipping addresses) - Subscription settings (cancelAtPeriodEnd, pauseAtPeriodEnd, skipIntervalCount) - Metadata (for your internal tracking) **Update Effects**: - Amount changes apply to the next billing cycle - Interval changes apply from the next period, leaving the current one to run out - Setting `prorate` to true settles the price difference immediately instead, and an interval change then restarts the billing period from now - `nextPaymentAt` moves the next charge date on its own, leaving the price alone. With `prorate` it also settles the time that moves: later charges for it, earlier refunds it - 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 - Setting `skipIntervalCount` skips billing for the specified number of intervals without changing subscription status **Note**: The currency cannot be changed once a subscription is created. To change it, cancel the subscription and create a new one. # noqa: E501 + Updates the configuration of an existing subscription. **Modifiable Parameters**: - Billing information (priceId, amount, interval, intervalCount, description, allowedPaymentMethods) - Customer details (contact information, billing/shipping addresses) - Subscription settings (cancelAtPeriodEnd, pauseAtPeriodEnd, skipIntervalCount) - Metadata (for your internal tracking) **Update Effects**: - Amount changes apply to the next billing cycle - Interval changes apply from the next period, leaving the current one to run out - Setting `prorate` to true settles the price difference immediately instead, and an interval change then restarts the billing period from now - `nextPaymentAt` moves the next charge date on its own, leaving the price alone. With `prorate` it also settles the time that moves: later charges for it, earlier refunds it - 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 - Setting `skipIntervalCount` skips billing for the specified number of intervals without changing subscription status **Switching price**: - A new `priceId` replaces `amount`, `interval` and `intervalCount` with the price's values. The price must be active and in the subscription's currency - On a `PENDING` subscription the switch also replaces the trial with the price's trial - The switch follows the same rules as a manual change: it applies from the next period, or settles at once with `prorate` - Without `priceId`, changing `amount`, `interval` or `intervalCount` removes `priceId` and `productId` **Note**: The currency cannot be changed once a subscription is created. To change it, cancel the 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 diff --git a/Monei/api/tax_rates_api.py b/Monei/api/tax_rates_api.py new file mode 100644 index 0000000..165fccf --- /dev/null +++ b/Monei/api/tax_rates_api.py @@ -0,0 +1,469 @@ +""" +MONEI API v1 + +The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly. ### Base URL All API requests should be made to: ``` https://api.monei.com/v1 ``` ### Environment MONEI provides two environments: - **Test Environment**: For development and testing without processing real payments - **Live Environment**: For processing real transactions in production ### Client Libraries We provide official SDKs to simplify integration: - [PHP SDK](https://github.com/MONEI/monei-php-sdk) - [Python SDK](https://github.com/MONEI/monei-python-sdk) - [Node.js SDK](https://github.com/MONEI/monei-node-sdk) - [Postman Collection](https://postman.monei.com/) Our SDKs handle authentication, error handling, and request formatting automatically. You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the [OpenAPI Generator](https://openapi-generator.tech/). ### Important Requirements - All API requests must be made over HTTPS - If you are not using our official SDKs, you **must provide a valid `User-Agent` header** with each request - Requests without proper authentication will return a `401 Unauthorized` error ### Error Handling The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a `statusCode` attribute indicating the outcome of your request. ### Rate Limits The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a `429 Too Many Requests` status code. # noqa: E501 + +The version of the OpenAPI document: 1.13.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.bad_request_error import BadRequestError +from Monei.model.create_tax_rate_request import CreateTaxRateRequest +from Monei.model.internal_server_error import InternalServerError +from Monei.model.not_found_error import NotFoundError +from Monei.model.service_unavailable_error import ServiceUnavailableError +from Monei.model.tax_rate import TaxRate +from Monei.model.tax_rate_list import TaxRateList +from Monei.model.unauthorized_error import UnauthorizedError +from Monei.model.unprocessable_entity_error import UnprocessableEntityError +from Monei.model.update_tax_rate_request import UpdateTaxRateRequest + + +class TaxRatesApi(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.create_endpoint = _Endpoint( + settings={ + "response_type": (TaxRate,), + "auth": ["APIKey"], + "endpoint_path": "/tax-rates", + "operation_id": "create", + "http_method": "POST", + "servers": None, + }, + params_map={ + "all": [ + "create_tax_rate_request", + ], + "required": [ + "create_tax_rate_request", + ], + "nullable": [], + "enum": [], + "validation": [], + }, + root_map={ + "validations": {}, + "allowed_values": {}, + "openapi_types": { + "create_tax_rate_request": (CreateTaxRateRequest,), + }, + "attribute_map": {}, + "location_map": { + "create_tax_rate_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": (TaxRate,), + "auth": ["APIKey"], + "endpoint_path": "/tax-rates/{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.list_endpoint = _Endpoint( + settings={ + "response_type": (TaxRateList,), + "auth": ["APIKey"], + "endpoint_path": "/tax-rates", + "operation_id": "list", + "http_method": "GET", + "servers": None, + }, + params_map={ + "all": [ + "limit", + "cursor", + ], + "required": [], + "nullable": [], + "enum": [], + "validation": [ + "limit", + ], + }, + root_map={ + "validations": { + ("limit",): { + "inclusive_maximum": 100, + "inclusive_minimum": 1, + }, + }, + "allowed_values": {}, + "openapi_types": { + "limit": (int,), + "cursor": (str,), + }, + "attribute_map": { + "limit": "limit", + "cursor": "cursor", + }, + "location_map": { + "limit": "query", + "cursor": "query", + }, + "collection_format_map": {}, + }, + headers_map={ + "accept": ["application/json"], + "content_type": [], + }, + api_client=api_client, + ) + self.update_endpoint = _Endpoint( + settings={ + "response_type": (TaxRate,), + "auth": ["APIKey"], + "endpoint_path": "/tax-rates/{id}", + "operation_id": "update", + "http_method": "PUT", + "servers": None, + }, + params_map={ + "all": [ + "id", + "update_tax_rate_request", + ], + "required": [ + "id", + "update_tax_rate_request", + ], + "nullable": [], + "enum": [], + "validation": [], + }, + root_map={ + "validations": {}, + "allowed_values": {}, + "openapi_types": { + "id": (str,), + "update_tax_rate_request": (UpdateTaxRateRequest,), + }, + "attribute_map": { + "id": "id", + }, + "location_map": { + "id": "path", + "update_tax_rate_request": "body", + }, + "collection_format_map": {}, + }, + headers_map={ + "accept": ["application/json"], + "content_type": ["application/json"], + }, + api_client=api_client, + ) + + def create(self, create_tax_rate_request, **kwargs): + """Create Tax Rate # noqa: E501 + + Creates a tax rate. `displayName` and `percentage` are required. `taxType` defaults to `VAT`. `percentage` and `taxType` cannot change later. To charge the tax, set the tax rate on a product with [Update Product](https://docs.monei.com/apis/rest/products-update/). # 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_tax_rate_request, async_req=True) + >>> result = thread.get() + + Args: + create_tax_rate_request (CreateTaxRateRequest): + + 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: + TaxRate + 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_tax_rate_request"] = create_tax_rate_request + return self.create_endpoint.call_with_http_info(**kwargs) + + def get(self, id, **kwargs): + """Get Tax Rate # noqa: E501 + + Retrieves a tax rate by its unique ID. A tax rate of another merchant account is reported as not found. # 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 tax rate 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: + TaxRate + 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) + + def list(self, **kwargs): + """List Tax Rates # noqa: E501 + + Lists the tax rates of your account, newest first, one page at a time. To get the next page, send the `nextCursor` of the response as `cursor`. When there are no more items, the response has no `nextCursor`. The last page can still carry one, and the next call then returns no items. A tax rate you just created can take a moment to appear in the list. [Get Tax Rate](https://docs.monei.com/apis/rest/tax-rates-get/) returns it at once. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.list(async_req=True) + >>> result = thread.get() + + + Keyword Args: + limit (int): Number of items in one page, from 1 to 100.. [optional] if omitted the server will use the default value of 20 + cursor (str): The `nextCursor` of the previous page. Omit it to get the first page.. [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: + TaxRateList + 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.list_endpoint.call_with_http_info(**kwargs) + + def update(self, id, update_tax_rate_request, **kwargs): + """Update Tax Rate # noqa: E501 + + Updates a tax rate. Only `displayName` and `active` can change. Any other field, such as `percentage` or `taxType`, is rejected. **Archiving**: Set `active` to `false` to archive the tax rate. An archived rate cannot be set on a product. While a product still has it, the product cannot get new prices and its prices cannot start or switch a subscription. Tax rates are never deleted. # 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_tax_rate_request, async_req=True) + >>> result = thread.get() + + Args: + id (str): The tax rate ID + update_tax_rate_request (UpdateTaxRateRequest): + + 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: + TaxRate + 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_tax_rate_request"] = update_tax_rate_request + return self.update_endpoint.call_with_http_info(**kwargs) diff --git a/Monei/api_client.py b/Monei/api_client.py index 1299c19..7d99fba 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: - [PHP SDK](https://github.com/MONEI/monei-php-sdk) - [Python SDK](https://github.com/MONEI/monei-python-sdk) - [Node.js SDK](https://github.com/MONEI/monei-node-sdk) - [Postman Collection](https://postman.monei.com/) Our SDKs handle authentication, error handling, and request formatting automatically. You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the [OpenAPI Generator](https://openapi-generator.tech/). ### Important Requirements - All API requests must be made over HTTPS - If you are not using our official SDKs, you **must provide a valid `User-Agent` header** with each request - Requests without proper authentication will return a `401 Unauthorized` error ### Error Handling The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a `statusCode` attribute indicating the outcome of your request. ### Rate Limits The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a `429 Too Many Requests` status code. # noqa: E501 -The version of the OpenAPI document: 1.12.3 +The version of the OpenAPI document: 1.13.0 Generated by: https://openapi-generator.tech """ diff --git a/Monei/apis/__init__.py b/Monei/apis/__init__.py index dd83d28..00e8dcc 100644 --- a/Monei/apis/__init__.py +++ b/Monei/apis/__init__.py @@ -20,4 +20,7 @@ from Monei.api.pos_auth_token_api import POSAuthTokenApi from Monei.api.payment_methods_api import PaymentMethodsApi from Monei.api.payments_api import PaymentsApi +from Monei.api.prices_api import PricesApi +from Monei.api.products_api import ProductsApi from Monei.api.subscriptions_api import SubscriptionsApi +from Monei.api.tax_rates_api import TaxRatesApi diff --git a/Monei/configuration.py b/Monei/configuration.py index e5b17ad..a7c7879 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: - [PHP SDK](https://github.com/MONEI/monei-php-sdk) - [Python SDK](https://github.com/MONEI/monei-python-sdk) - [Node.js SDK](https://github.com/MONEI/monei-node-sdk) - [Postman Collection](https://postman.monei.com/) Our SDKs handle authentication, error handling, and request formatting automatically. You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the [OpenAPI Generator](https://openapi-generator.tech/). ### Important Requirements - All API requests must be made over HTTPS - If you are not using our official SDKs, you **must provide a valid `User-Agent` header** with each request - Requests without proper authentication will return a `401 Unauthorized` error ### Error Handling The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a `statusCode` attribute indicating the outcome of your request. ### Rate Limits The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a `429 Too Many Requests` status code. # noqa: E501 -The version of the OpenAPI document: 1.12.3 +The version of the OpenAPI document: 1.13.0 Generated by: https://openapi-generator.tech """ @@ -431,7 +431,7 @@ def to_debug_report(self): "Python SDK Debug Report:\n" "OS: {env}\n" "Python Version: {pyversion}\n" - "Version of the API: 1.12.3\n" + "Version of the API: 1.13.0\n" "SDK Package Version: 2.0.2".format(env=sys.platform, pyversion=sys.version) ) diff --git a/Monei/exceptions.py b/Monei/exceptions.py index a903604..2c7afa5 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: - [PHP SDK](https://github.com/MONEI/monei-php-sdk) - [Python SDK](https://github.com/MONEI/monei-python-sdk) - [Node.js SDK](https://github.com/MONEI/monei-node-sdk) - [Postman Collection](https://postman.monei.com/) Our SDKs handle authentication, error handling, and request formatting automatically. You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the [OpenAPI Generator](https://openapi-generator.tech/). ### Important Requirements - All API requests must be made over HTTPS - If you are not using our official SDKs, you **must provide a valid `User-Agent` header** with each request - Requests without proper authentication will return a `401 Unauthorized` error ### Error Handling The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a `statusCode` attribute indicating the outcome of your request. ### Rate Limits The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a `429 Too Many Requests` status code. # noqa: E501 -The version of the OpenAPI document: 1.12.3 +The version of the OpenAPI document: 1.13.0 Generated by: https://openapi-generator.tech """ diff --git a/Monei/model/activate_apple_pay_certificate_request.py b/Monei/model/activate_apple_pay_certificate_request.py index 54bb73c..1496f2c 100644 --- a/Monei/model/activate_apple_pay_certificate_request.py +++ b/Monei/model/activate_apple_pay_certificate_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: - [PHP SDK](https://github.com/MONEI/monei-php-sdk) - [Python SDK](https://github.com/MONEI/monei-python-sdk) - [Node.js SDK](https://github.com/MONEI/monei-node-sdk) - [Postman Collection](https://postman.monei.com/) Our SDKs handle authentication, error handling, and request formatting automatically. You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the [OpenAPI Generator](https://openapi-generator.tech/). ### Important Requirements - All API requests must be made over HTTPS - If you are not using our official SDKs, you **must provide a valid `User-Agent` header** with each request - Requests without proper authentication will return a `401 Unauthorized` error ### Error Handling The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a `statusCode` attribute indicating the outcome of your request. ### Rate Limits The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a `429 Too Many Requests` status code. # noqa: E501 -The version of the OpenAPI document: 1.12.3 +The version of the OpenAPI document: 1.13.0 Generated by: https://openapi-generator.tech """ diff --git a/Monei/model/activate_subscription_request.py b/Monei/model/activate_subscription_request.py index 0fe8927..4018bf1 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: - [PHP SDK](https://github.com/MONEI/monei-php-sdk) - [Python SDK](https://github.com/MONEI/monei-python-sdk) - [Node.js SDK](https://github.com/MONEI/monei-node-sdk) - [Postman Collection](https://postman.monei.com/) Our SDKs handle authentication, error handling, and request formatting automatically. You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the [OpenAPI Generator](https://openapi-generator.tech/). ### Important Requirements - All API requests must be made over HTTPS - If you are not using our official SDKs, you **must provide a valid `User-Agent` header** with each request - Requests without proper authentication will return a `401 Unauthorized` error ### Error Handling The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a `statusCode` attribute indicating the outcome of your request. ### Rate Limits The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a `429 Too Many Requests` status code. # noqa: E501 -The version of the OpenAPI document: 1.12.3 +The version of the OpenAPI document: 1.13.0 Generated by: https://openapi-generator.tech """ diff --git a/Monei/model/address.py b/Monei/model/address.py index 6df5c93..ea0808b 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: - [PHP SDK](https://github.com/MONEI/monei-php-sdk) - [Python SDK](https://github.com/MONEI/monei-python-sdk) - [Node.js SDK](https://github.com/MONEI/monei-node-sdk) - [Postman Collection](https://postman.monei.com/) Our SDKs handle authentication, error handling, and request formatting automatically. You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the [OpenAPI Generator](https://openapi-generator.tech/). ### Important Requirements - All API requests must be made over HTTPS - If you are not using our official SDKs, you **must provide a valid `User-Agent` header** with each request - Requests without proper authentication will return a `401 Unauthorized` error ### Error Handling The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a `statusCode` attribute indicating the outcome of your request. ### Rate Limits The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a `429 Too Many Requests` status code. # noqa: E501 -The version of the OpenAPI document: 1.12.3 +The version of the OpenAPI document: 1.13.0 Generated by: https://openapi-generator.tech """ diff --git a/Monei/model/api_exception.py b/Monei/model/api_exception.py index e082a5c..303e384 100644 --- a/Monei/model/api_exception.py +++ b/Monei/model/api_exception.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: - [PHP SDK](https://github.com/MONEI/monei-php-sdk) - [Python SDK](https://github.com/MONEI/monei-python-sdk) - [Node.js SDK](https://github.com/MONEI/monei-node-sdk) - [Postman Collection](https://postman.monei.com/) Our SDKs handle authentication, error handling, and request formatting automatically. You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the [OpenAPI Generator](https://openapi-generator.tech/). ### Important Requirements - All API requests must be made over HTTPS - If you are not using our official SDKs, you **must provide a valid `User-Agent` header** with each request - Requests without proper authentication will return a `401 Unauthorized` error ### Error Handling The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a `statusCode` attribute indicating the outcome of your request. ### Rate Limits The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a `429 Too Many Requests` status code. # noqa: E501 -The version of the OpenAPI document: 1.12.3 +The version of the OpenAPI document: 1.13.0 Generated by: https://openapi-generator.tech """ diff --git a/Monei/model/apple_pay_certificate.py b/Monei/model/apple_pay_certificate.py index 1ca307b..51ce9cd 100644 --- a/Monei/model/apple_pay_certificate.py +++ b/Monei/model/apple_pay_certificate.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: - [PHP SDK](https://github.com/MONEI/monei-php-sdk) - [Python SDK](https://github.com/MONEI/monei-python-sdk) - [Node.js SDK](https://github.com/MONEI/monei-node-sdk) - [Postman Collection](https://postman.monei.com/) Our SDKs handle authentication, error handling, and request formatting automatically. You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the [OpenAPI Generator](https://openapi-generator.tech/). ### Important Requirements - All API requests must be made over HTTPS - If you are not using our official SDKs, you **must provide a valid `User-Agent` header** with each request - Requests without proper authentication will return a `401 Unauthorized` error ### Error Handling The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a `statusCode` attribute indicating the outcome of your request. ### Rate Limits The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a `429 Too Many Requests` status code. # noqa: E501 -The version of the OpenAPI document: 1.12.3 +The version of the OpenAPI document: 1.13.0 Generated by: https://openapi-generator.tech """ diff --git a/Monei/model/apple_pay_certificates_remove200_response.py b/Monei/model/apple_pay_certificates_remove200_response.py index d6d13b9..a5315c5 100644 --- a/Monei/model/apple_pay_certificates_remove200_response.py +++ b/Monei/model/apple_pay_certificates_remove200_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: - [PHP SDK](https://github.com/MONEI/monei-php-sdk) - [Python SDK](https://github.com/MONEI/monei-python-sdk) - [Node.js SDK](https://github.com/MONEI/monei-node-sdk) - [Postman Collection](https://postman.monei.com/) Our SDKs handle authentication, error handling, and request formatting automatically. You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the [OpenAPI Generator](https://openapi-generator.tech/). ### Important Requirements - All API requests must be made over HTTPS - If you are not using our official SDKs, you **must provide a valid `User-Agent` header** with each request - Requests without proper authentication will return a `401 Unauthorized` error ### Error Handling The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a `statusCode` attribute indicating the outcome of your request. ### Rate Limits The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a `429 Too Many Requests` status code. # noqa: E501 -The version of the OpenAPI document: 1.12.3 +The version of the OpenAPI document: 1.13.0 Generated by: https://openapi-generator.tech """ diff --git a/Monei/model/bad_request_error.py b/Monei/model/bad_request_error.py index ba7d0dc..54be59b 100644 --- a/Monei/model/bad_request_error.py +++ b/Monei/model/bad_request_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: - [PHP SDK](https://github.com/MONEI/monei-php-sdk) - [Python SDK](https://github.com/MONEI/monei-python-sdk) - [Node.js SDK](https://github.com/MONEI/monei-node-sdk) - [Postman Collection](https://postman.monei.com/) Our SDKs handle authentication, error handling, and request formatting automatically. You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the [OpenAPI Generator](https://openapi-generator.tech/). ### Important Requirements - All API requests must be made over HTTPS - If you are not using our official SDKs, you **must provide a valid `User-Agent` header** with each request - Requests without proper authentication will return a `401 Unauthorized` error ### Error Handling The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a `statusCode` attribute indicating the outcome of your request. ### Rate Limits The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a `429 Too Many Requests` status code. # noqa: E501 -The version of the OpenAPI document: 1.12.3 +The version of the OpenAPI document: 1.13.0 Generated by: https://openapi-generator.tech """ diff --git a/Monei/model/bad_request_error_all_of.py b/Monei/model/bad_request_error_all_of.py index 8161c67..ef2fe09 100644 --- a/Monei/model/bad_request_error_all_of.py +++ b/Monei/model/bad_request_error_all_of.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: - [PHP SDK](https://github.com/MONEI/monei-php-sdk) - [Python SDK](https://github.com/MONEI/monei-python-sdk) - [Node.js SDK](https://github.com/MONEI/monei-node-sdk) - [Postman Collection](https://postman.monei.com/) Our SDKs handle authentication, error handling, and request formatting automatically. You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the [OpenAPI Generator](https://openapi-generator.tech/). ### Important Requirements - All API requests must be made over HTTPS - If you are not using our official SDKs, you **must provide a valid `User-Agent` header** with each request - Requests without proper authentication will return a `401 Unauthorized` error ### Error Handling The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a `statusCode` attribute indicating the outcome of your request. ### Rate Limits The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a `429 Too Many Requests` status code. # noqa: E501 -The version of the OpenAPI document: 1.12.3 +The version of the OpenAPI document: 1.13.0 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 fab0639..6306138 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: - [PHP SDK](https://github.com/MONEI/monei-php-sdk) - [Python SDK](https://github.com/MONEI/monei-python-sdk) - [Node.js SDK](https://github.com/MONEI/monei-node-sdk) - [Postman Collection](https://postman.monei.com/) Our SDKs handle authentication, error handling, and request formatting automatically. You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the [OpenAPI Generator](https://openapi-generator.tech/). ### Important Requirements - All API requests must be made over HTTPS - If you are not using our official SDKs, you **must provide a valid `User-Agent` header** with each request - Requests without proper authentication will return a `401 Unauthorized` error ### Error Handling The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a `statusCode` attribute indicating the outcome of your request. ### Rate Limits The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a `429 Too Many Requests` status code. # noqa: E501 -The version of the OpenAPI document: 1.12.3 +The version of the OpenAPI document: 1.13.0 Generated by: https://openapi-generator.tech """ diff --git a/Monei/model/cancel_payment_request.py b/Monei/model/cancel_payment_request.py index f4a8911..c73ce0b 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: - [PHP SDK](https://github.com/MONEI/monei-php-sdk) - [Python SDK](https://github.com/MONEI/monei-python-sdk) - [Node.js SDK](https://github.com/MONEI/monei-node-sdk) - [Postman Collection](https://postman.monei.com/) Our SDKs handle authentication, error handling, and request formatting automatically. You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the [OpenAPI Generator](https://openapi-generator.tech/). ### Important Requirements - All API requests must be made over HTTPS - If you are not using our official SDKs, you **must provide a valid `User-Agent` header** with each request - Requests without proper authentication will return a `401 Unauthorized` error ### Error Handling The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a `statusCode` attribute indicating the outcome of your request. ### Rate Limits The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a `429 Too Many Requests` status code. # noqa: E501 -The version of the OpenAPI document: 1.12.3 +The version of the OpenAPI document: 1.13.0 Generated by: https://openapi-generator.tech """ diff --git a/Monei/model/cancel_subscription_request.py b/Monei/model/cancel_subscription_request.py index a06d9cf..dcebcbe 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: - [PHP SDK](https://github.com/MONEI/monei-php-sdk) - [Python SDK](https://github.com/MONEI/monei-python-sdk) - [Node.js SDK](https://github.com/MONEI/monei-node-sdk) - [Postman Collection](https://postman.monei.com/) Our SDKs handle authentication, error handling, and request formatting automatically. You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the [OpenAPI Generator](https://openapi-generator.tech/). ### Important Requirements - All API requests must be made over HTTPS - If you are not using our official SDKs, you **must provide a valid `User-Agent` header** with each request - Requests without proper authentication will return a `401 Unauthorized` error ### Error Handling The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a `statusCode` attribute indicating the outcome of your request. ### Rate Limits The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a `429 Too Many Requests` status code. # noqa: E501 -The version of the OpenAPI document: 1.12.3 +The version of the OpenAPI document: 1.13.0 Generated by: https://openapi-generator.tech """ diff --git a/Monei/model/capture_payment_request.py b/Monei/model/capture_payment_request.py index 20cd3f0..db28445 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: - [PHP SDK](https://github.com/MONEI/monei-php-sdk) - [Python SDK](https://github.com/MONEI/monei-python-sdk) - [Node.js SDK](https://github.com/MONEI/monei-node-sdk) - [Postman Collection](https://postman.monei.com/) Our SDKs handle authentication, error handling, and request formatting automatically. You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the [OpenAPI Generator](https://openapi-generator.tech/). ### Important Requirements - All API requests must be made over HTTPS - If you are not using our official SDKs, you **must provide a valid `User-Agent` header** with each request - Requests without proper authentication will return a `401 Unauthorized` error ### Error Handling The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a `statusCode` attribute indicating the outcome of your request. ### Rate Limits The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a `429 Too Many Requests` status code. # noqa: E501 -The version of the OpenAPI document: 1.12.3 +The version of the OpenAPI document: 1.13.0 Generated by: https://openapi-generator.tech """ diff --git a/Monei/model/confirm_payment_request.py b/Monei/model/confirm_payment_request.py index 2aa4bc0..415218f 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: - [PHP SDK](https://github.com/MONEI/monei-php-sdk) - [Python SDK](https://github.com/MONEI/monei-python-sdk) - [Node.js SDK](https://github.com/MONEI/monei-node-sdk) - [Postman Collection](https://postman.monei.com/) Our SDKs handle authentication, error handling, and request formatting automatically. You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the [OpenAPI Generator](https://openapi-generator.tech/). ### Important Requirements - All API requests must be made over HTTPS - If you are not using our official SDKs, you **must provide a valid `User-Agent` header** with each request - Requests without proper authentication will return a `401 Unauthorized` error ### Error Handling The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a `statusCode` attribute indicating the outcome of your request. ### Rate Limits The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a `429 Too Many Requests` status code. # noqa: E501 -The version of the OpenAPI document: 1.12.3 +The version of the OpenAPI document: 1.13.0 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 08894c7..ef4d073 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: - [PHP SDK](https://github.com/MONEI/monei-php-sdk) - [Python SDK](https://github.com/MONEI/monei-python-sdk) - [Node.js SDK](https://github.com/MONEI/monei-node-sdk) - [Postman Collection](https://postman.monei.com/) Our SDKs handle authentication, error handling, and request formatting automatically. You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the [OpenAPI Generator](https://openapi-generator.tech/). ### Important Requirements - All API requests must be made over HTTPS - If you are not using our official SDKs, you **must provide a valid `User-Agent` header** with each request - Requests without proper authentication will return a `401 Unauthorized` error ### Error Handling The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a `statusCode` attribute indicating the outcome of your request. ### Rate Limits The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a `429 Too Many Requests` status code. # noqa: E501 -The version of the OpenAPI document: 1.12.3 +The version of the OpenAPI document: 1.13.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 06fcbe5..c552445 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: - [PHP SDK](https://github.com/MONEI/monei-php-sdk) - [Python SDK](https://github.com/MONEI/monei-python-sdk) - [Node.js SDK](https://github.com/MONEI/monei-node-sdk) - [Postman Collection](https://postman.monei.com/) Our SDKs handle authentication, error handling, and request formatting automatically. You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the [OpenAPI Generator](https://openapi-generator.tech/). ### Important Requirements - All API requests must be made over HTTPS - If you are not using our official SDKs, you **must provide a valid `User-Agent` header** with each request - Requests without proper authentication will return a `401 Unauthorized` error ### Error Handling The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a `statusCode` attribute indicating the outcome of your request. ### Rate Limits The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a `429 Too Many Requests` status code. # noqa: E501 -The version of the OpenAPI document: 1.12.3 +The version of the OpenAPI document: 1.13.0 Generated by: https://openapi-generator.tech """ diff --git a/Monei/model/conflict_error.py b/Monei/model/conflict_error.py index a1ac282..4c2b5e6 100644 --- a/Monei/model/conflict_error.py +++ b/Monei/model/conflict_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: - [PHP SDK](https://github.com/MONEI/monei-php-sdk) - [Python SDK](https://github.com/MONEI/monei-python-sdk) - [Node.js SDK](https://github.com/MONEI/monei-node-sdk) - [Postman Collection](https://postman.monei.com/) Our SDKs handle authentication, error handling, and request formatting automatically. You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the [OpenAPI Generator](https://openapi-generator.tech/). ### Important Requirements - All API requests must be made over HTTPS - If you are not using our official SDKs, you **must provide a valid `User-Agent` header** with each request - Requests without proper authentication will return a `401 Unauthorized` error ### Error Handling The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a `statusCode` attribute indicating the outcome of your request. ### Rate Limits The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a `429 Too Many Requests` status code. # noqa: E501 -The version of the OpenAPI document: 1.12.3 +The version of the OpenAPI document: 1.13.0 Generated by: https://openapi-generator.tech """ diff --git a/Monei/model/conflict_error_all_of.py b/Monei/model/conflict_error_all_of.py index e87847e..ad47c49 100644 --- a/Monei/model/conflict_error_all_of.py +++ b/Monei/model/conflict_error_all_of.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: - [PHP SDK](https://github.com/MONEI/monei-php-sdk) - [Python SDK](https://github.com/MONEI/monei-python-sdk) - [Node.js SDK](https://github.com/MONEI/monei-node-sdk) - [Postman Collection](https://postman.monei.com/) Our SDKs handle authentication, error handling, and request formatting automatically. You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the [OpenAPI Generator](https://openapi-generator.tech/). ### Important Requirements - All API requests must be made over HTTPS - If you are not using our official SDKs, you **must provide a valid `User-Agent` header** with each request - Requests without proper authentication will return a `401 Unauthorized` error ### Error Handling The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a `statusCode` attribute indicating the outcome of your request. ### Rate Limits The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a `429 Too Many Requests` status code. # noqa: E501 -The version of the OpenAPI document: 1.12.3 +The version of the OpenAPI document: 1.13.0 Generated by: https://openapi-generator.tech """ diff --git a/Monei/model/create_customer_request.py b/Monei/model/create_customer_request.py index 088c4ff..c02b8f4 100644 --- a/Monei/model/create_customer_request.py +++ b/Monei/model/create_customer_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: - [PHP SDK](https://github.com/MONEI/monei-php-sdk) - [Python SDK](https://github.com/MONEI/monei-python-sdk) - [Node.js SDK](https://github.com/MONEI/monei-node-sdk) - [Postman Collection](https://postman.monei.com/) Our SDKs handle authentication, error handling, and request formatting automatically. You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the [OpenAPI Generator](https://openapi-generator.tech/). ### Important Requirements - All API requests must be made over HTTPS - If you are not using our official SDKs, you **must provide a valid `User-Agent` header** with each request - Requests without proper authentication will return a `401 Unauthorized` error ### Error Handling The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a `statusCode` attribute indicating the outcome of your request. ### Rate Limits The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a `429 Too Many Requests` status code. # noqa: E501 -The version of the OpenAPI document: 1.12.3 +The version of the OpenAPI document: 1.13.0 Generated by: https://openapi-generator.tech """ diff --git a/Monei/model/create_payment_request.py b/Monei/model/create_payment_request.py index f9ec18d..bf9a382 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: - [PHP SDK](https://github.com/MONEI/monei-php-sdk) - [Python SDK](https://github.com/MONEI/monei-python-sdk) - [Node.js SDK](https://github.com/MONEI/monei-node-sdk) - [Postman Collection](https://postman.monei.com/) Our SDKs handle authentication, error handling, and request formatting automatically. You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the [OpenAPI Generator](https://openapi-generator.tech/). ### Important Requirements - All API requests must be made over HTTPS - If you are not using our official SDKs, you **must provide a valid `User-Agent` header** with each request - Requests without proper authentication will return a `401 Unauthorized` error ### Error Handling The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a `statusCode` attribute indicating the outcome of your request. ### Rate Limits The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a `429 Too Many Requests` status code. # noqa: E501 -The version of the OpenAPI document: 1.12.3 +The version of the OpenAPI document: 1.13.0 Generated by: https://openapi-generator.tech """ @@ -198,7 +198,7 @@ def _from_openapi_data( 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. + order_id (str): An order ID from your system. A unique identifier that can be used to reconcile the payment with your internal system. Up to 40 characters: ASCII letters, digits and `_ @ . / # & + -` (no spaces). Keyword Args: _check_type (bool): if True, values for parameters in openapi_types @@ -320,7 +320,7 @@ def __init__(self, amount, currency, order_id, *args, **kwargs): # noqa: E501 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. + order_id (str): An order ID from your system. A unique identifier that can be used to reconcile the payment with your internal system. Up to 40 characters: ASCII letters, digits and `_ @ . / # & + -` (no spaces). Keyword Args: _check_type (bool): if True, values for parameters in openapi_types diff --git a/Monei/model/create_pos_auth_token_request.py b/Monei/model/create_pos_auth_token_request.py index d250553..c8a3e97 100644 --- a/Monei/model/create_pos_auth_token_request.py +++ b/Monei/model/create_pos_auth_token_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: - [PHP SDK](https://github.com/MONEI/monei-php-sdk) - [Python SDK](https://github.com/MONEI/monei-python-sdk) - [Node.js SDK](https://github.com/MONEI/monei-node-sdk) - [Postman Collection](https://postman.monei.com/) Our SDKs handle authentication, error handling, and request formatting automatically. You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the [OpenAPI Generator](https://openapi-generator.tech/). ### Important Requirements - All API requests must be made over HTTPS - If you are not using our official SDKs, you **must provide a valid `User-Agent` header** with each request - Requests without proper authentication will return a `401 Unauthorized` error ### Error Handling The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a `statusCode` attribute indicating the outcome of your request. ### Rate Limits The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a `429 Too Many Requests` status code. # noqa: E501 -The version of the OpenAPI document: 1.12.3 +The version of the OpenAPI document: 1.13.0 Generated by: https://openapi-generator.tech """ diff --git a/Monei/model/create_price_request.py b/Monei/model/create_price_request.py new file mode 100644 index 0000000..8f0100b --- /dev/null +++ b/Monei/model/create_price_request.py @@ -0,0 +1,341 @@ +""" +MONEI API v1 + +The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly. ### Base URL All API requests should be made to: ``` https://api.monei.com/v1 ``` ### Environment MONEI provides two environments: - **Test Environment**: For development and testing without processing real payments - **Live Environment**: For processing real transactions in production ### Client Libraries We provide official SDKs to simplify integration: - [PHP SDK](https://github.com/MONEI/monei-php-sdk) - [Python SDK](https://github.com/MONEI/monei-python-sdk) - [Node.js SDK](https://github.com/MONEI/monei-node-sdk) - [Postman Collection](https://postman.monei.com/) Our SDKs handle authentication, error handling, and request formatting automatically. You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the [OpenAPI Generator](https://openapi-generator.tech/). ### Important Requirements - All API requests must be made over HTTPS - If you are not using our official SDKs, you **must provide a valid `User-Agent` header** with each request - Requests without proper authentication will return a `401 Unauthorized` error ### Error Handling The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a `statusCode` attribute indicating the outcome of your request. ### Rate Limits The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a `429 Too Many Requests` status code. # noqa: E501 + +The version of the OpenAPI document: 1.13.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.price_nickname import PriceNickname + from Monei.model.price_recurring import PriceRecurring + from Monei.model.price_unit_amount import PriceUnitAmount + + globals()["PriceNickname"] = PriceNickname + globals()["PriceRecurring"] = PriceRecurring + globals()["PriceUnitAmount"] = PriceUnitAmount + + +class CreatePriceRequest(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 { + "product_id": (str,), # noqa: E501 + "unit_amount": (PriceUnitAmount,), # noqa: E501 + "currency": ( + bool, + date, + datetime, + dict, + float, + int, + list, + str, + none_type, + ), # noqa: E501 + "type": (str,), # noqa: E501 + "recurring": (PriceRecurring,), # noqa: E501 + "tax_behavior": (str,), # noqa: E501 + "active": (bool,), # noqa: E501 + "nickname": (PriceNickname,), # noqa: E501 + "metadata": ( + {str: (bool, date, datetime, dict, float, int, list, str, none_type)}, + ), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + attribute_map = { + "product_id": "productId", # noqa: E501 + "unit_amount": "unitAmount", # noqa: E501 + "currency": "currency", # noqa: E501 + "type": "type", # noqa: E501 + "recurring": "recurring", # noqa: E501 + "tax_behavior": "taxBehavior", # noqa: E501 + "active": "active", # noqa: E501 + "nickname": "nickname", # noqa: E501 + "metadata": "metadata", # noqa: E501 + } + + read_only_vars = {} + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, product_id, unit_amount, *args, **kwargs): # noqa: E501 + """CreatePriceRequest - a model defined in OpenAPI + + Args: + product_id (str): The [product](https://docs.monei.com/apis/rest/products-create/) of the price. It cannot change after the price is created. + unit_amount (PriceUnitAmount): + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + currency (bool, date, datetime, dict, float, int, list, str, none_type): Three-letter [ISO currency code](https://en.wikipedia.org/wiki/ISO_4217), in uppercase. Defaults to the default currency of your account, else `EUR`. . [optional] # noqa: E501 + type (str): How the price bills: `RECURRING` (the default) or `ONE_TIME`. Only a `RECURRING` price can start or switch a subscription. Treat the set as open: more values can be added later. . [optional] if omitted the server will use the default value of "RECURRING" # noqa: E501 + recurring (PriceRecurring): [optional] # noqa: E501 + tax_behavior (str): How the tax of the product's tax rate applies to `unitAmount`: - `INCLUSIVE`: `unitAmount` holds the tax. - `EXCLUSIVE`: the tax is added to `unitAmount`. No value means `INCLUSIVE`. Treat the set as open: more values can be added later. . [optional] # noqa: E501 + active (bool): Whether the price is active. An inactive price cannot start a subscription, and a subscription cannot switch to it. Prices are never deleted: set `active` to `false` to archive one. Subscriptions that already use it keep their copy of its values. A new price is active unless created with `active: false`. . [optional] # noqa: E501 + nickname (PriceNickname): [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.product_id = product_id + self.unit_amount = unit_amount + for var_name, var_value in kwargs.items(): + if ( + var_name not in self.attribute_map + and self._configuration is 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, product_id, unit_amount, *args, **kwargs): # noqa: E501 + """CreatePriceRequest - a model defined in OpenAPI + + Args: + product_id (str): The [product](https://docs.monei.com/apis/rest/products-create/) of the price. It cannot change after the price is created. + unit_amount (PriceUnitAmount): + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + currency (bool, date, datetime, dict, float, int, list, str, none_type): Three-letter [ISO currency code](https://en.wikipedia.org/wiki/ISO_4217), in uppercase. Defaults to the default currency of your account, else `EUR`. . [optional] # noqa: E501 + type (str): How the price bills: `RECURRING` (the default) or `ONE_TIME`. Only a `RECURRING` price can start or switch a subscription. Treat the set as open: more values can be added later. . [optional] if omitted the server will use the default value of "RECURRING" # noqa: E501 + recurring (PriceRecurring): [optional] # noqa: E501 + tax_behavior (str): How the tax of the product's tax rate applies to `unitAmount`: - `INCLUSIVE`: `unitAmount` holds the tax. - `EXCLUSIVE`: the tax is added to `unitAmount`. No value means `INCLUSIVE`. Treat the set as open: more values can be added later. . [optional] # noqa: E501 + active (bool): Whether the price is active. An inactive price cannot start a subscription, and a subscription cannot switch to it. Prices are never deleted: set `active` to `false` to archive one. Subscriptions that already use it keep their copy of its values. A new price is active unless created with `active: false`. . [optional] # noqa: E501 + nickname (PriceNickname): [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.product_id = product_id + self.unit_amount = unit_amount + for var_name, var_value in kwargs.items(): + if ( + var_name not in self.attribute_map + and self._configuration is 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_product_request.py b/Monei/model/create_product_request.py new file mode 100644 index 0000000..2f6bb11 --- /dev/null +++ b/Monei/model/create_product_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: - [PHP SDK](https://github.com/MONEI/monei-php-sdk) - [Python SDK](https://github.com/MONEI/monei-python-sdk) - [Node.js SDK](https://github.com/MONEI/monei-node-sdk) - [Postman Collection](https://postman.monei.com/) Our SDKs handle authentication, error handling, and request formatting automatically. You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the [OpenAPI Generator](https://openapi-generator.tech/). ### Important Requirements - All API requests must be made over HTTPS - If you are not using our official SDKs, you **must provide a valid `User-Agent` header** with each request - Requests without proper authentication will return a `401 Unauthorized` error ### Error Handling The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a `statusCode` attribute indicating the outcome of your request. ### Rate Limits The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a `429 Too Many Requests` status code. # noqa: E501 + +The version of the OpenAPI document: 1.13.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.product_description import ProductDescription + from Monei.model.product_descriptor import ProductDescriptor + from Monei.model.product_images import ProductImages + from Monei.model.product_name import ProductName + from Monei.model.product_slug import ProductSlug + from Monei.model.product_unit_label import ProductUnitLabel + + globals()["ProductDescription"] = ProductDescription + globals()["ProductDescriptor"] = ProductDescriptor + globals()["ProductImages"] = ProductImages + globals()["ProductName"] = ProductName + globals()["ProductSlug"] = ProductSlug + globals()["ProductUnitLabel"] = ProductUnitLabel + + +class CreateProductRequest(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": (ProductName,), # noqa: E501 + "description": (ProductDescription,), # noqa: E501 + "images": (ProductImages,), # noqa: E501 + "slug": (ProductSlug,), # noqa: E501 + "shippable": (bool,), # noqa: E501 + "unit_label": (ProductUnitLabel,), # noqa: E501 + "descriptor": (ProductDescriptor,), # noqa: E501 + "tax_rate_id": (str,), # noqa: E501 + "active": (bool,), # noqa: E501 + "metadata": ( + {str: (bool, date, datetime, dict, float, int, list, str, none_type)}, + ), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + attribute_map = { + "name": "name", # noqa: E501 + "description": "description", # noqa: E501 + "images": "images", # noqa: E501 + "slug": "slug", # noqa: E501 + "shippable": "shippable", # noqa: E501 + "unit_label": "unitLabel", # noqa: E501 + "descriptor": "descriptor", # noqa: E501 + "tax_rate_id": "taxRateId", # noqa: E501 + "active": "active", # noqa: E501 + "metadata": "metadata", # noqa: E501 + } + + read_only_vars = {} + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, name, *args, **kwargs): # noqa: E501 + """CreateProductRequest - a model defined in OpenAPI + + Args: + name (ProductName): + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + description (ProductDescription): [optional] # noqa: E501 + images (ProductImages): [optional] # noqa: E501 + slug (ProductSlug): [optional] # noqa: E501 + shippable (bool): Whether the product is shipped to the buyer.. [optional] # noqa: E501 + unit_label (ProductUnitLabel): [optional] # noqa: E501 + descriptor (ProductDescriptor): [optional] # noqa: E501 + tax_rate_id (str): The [tax rate](https://docs.monei.com/apis/rest/tax-rates-create/) the prices of the product charge. Absent when the product has no tax. It must be an active tax rate of your account when you set it. A change of the tax rate changes the amount of the product's `EXCLUSIVE` prices for new subscriptions and price switches. Existing subscriptions keep their tax until they switch price. . [optional] # noqa: E501 + active (bool): Whether the product is active. Products are never deleted: set `active` to `false` to archive one. Archiving a product does not archive its prices, and its prices can still start subscriptions. A new product is active unless created with `active: false`. . [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.name = 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, name, *args, **kwargs): # noqa: E501 + """CreateProductRequest - a model defined in OpenAPI + + Args: + name (ProductName): + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + description (ProductDescription): [optional] # noqa: E501 + images (ProductImages): [optional] # noqa: E501 + slug (ProductSlug): [optional] # noqa: E501 + shippable (bool): Whether the product is shipped to the buyer.. [optional] # noqa: E501 + unit_label (ProductUnitLabel): [optional] # noqa: E501 + descriptor (ProductDescriptor): [optional] # noqa: E501 + tax_rate_id (str): The [tax rate](https://docs.monei.com/apis/rest/tax-rates-create/) the prices of the product charge. Absent when the product has no tax. It must be an active tax rate of your account when you set it. A change of the tax rate changes the amount of the product's `EXCLUSIVE` prices for new subscriptions and price switches. Existing subscriptions keep their tax until they switch price. . [optional] # noqa: E501 + active (bool): Whether the product is active. Products are never deleted: set `active` to `false` to archive one. Archiving a product does not archive its prices, and its prices can still start subscriptions. A new product is active unless created with `active: false`. . [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.name = 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/create_subscription_request.py b/Monei/model/create_subscription_request.py index fb44ac7..a171353 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: - [PHP SDK](https://github.com/MONEI/monei-php-sdk) - [Python SDK](https://github.com/MONEI/monei-python-sdk) - [Node.js SDK](https://github.com/MONEI/monei-node-sdk) - [Postman Collection](https://postman.monei.com/) Our SDKs handle authentication, error handling, and request formatting automatically. You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the [OpenAPI Generator](https://openapi-generator.tech/). ### Important Requirements - All API requests must be made over HTTPS - If you are not using our official SDKs, you **must provide a valid `User-Agent` header** with each request - Requests without proper authentication will return a `401 Unauthorized` error ### Error Handling The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a `statusCode` attribute indicating the outcome of your request. ### Rate Limits The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a `429 Too Many Requests` status code. # noqa: E501 -The version of the OpenAPI document: 1.12.3 +The version of the OpenAPI document: 1.13.0 Generated by: https://openapi-generator.tech """ @@ -111,6 +111,7 @@ def openapi_types(): """ lazy_import() return { + "price_id": (str,), # noqa: E501 "amount": (int,), # noqa: E501 "currency": (str,), # noqa: E501 "interval": (SubscriptionInterval,), # noqa: E501 @@ -138,6 +139,7 @@ def discriminator(): return None attribute_map = { + "price_id": "priceId", # noqa: E501 "amount": "amount", # noqa: E501 "currency": "currency", # noqa: E501 "interval": "interval", # noqa: E501 @@ -164,16 +166,9 @@ def discriminator(): @classmethod @convert_js_args_to_python_args - def _from_openapi_data( - cls, amount, currency, interval, *args, **kwargs - ): # noqa: E501 + def _from_openapi_data(cls, *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 @@ -205,6 +200,10 @@ def _from_openapi_data( Animal class but this time we won't travel through its discriminator because we passed in _visited_composed_classes = (Animal,) + price_id (str): The [price](https://docs.monei.com/apis/rest/prices-create/) the subscription bills. The subscription copies the price's values when it is created or switched to the price. A later change to the price never changes 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 + interval (SubscriptionInterval): [optional] # noqa: E501 interval_count (int): Number of intervals between subscription payments.. [optional] # noqa: E501 allowed_payment_methods (SubscriptionPaymentMethods): [optional] # noqa: E501 description (str): An arbitrary string attached to the subscription. Often useful for displaying to users. . [optional] # noqa: E501 @@ -252,9 +251,6 @@ def _from_openapi_data( 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 @@ -279,14 +275,9 @@ def _from_openapi_data( ) @convert_js_args_to_python_args - def __init__(self, amount, currency, interval, *args, **kwargs): # noqa: E501 + def __init__(self, *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 @@ -318,6 +309,10 @@ def __init__(self, amount, currency, interval, *args, **kwargs): # noqa: E501 Animal class but this time we won't travel through its discriminator because we passed in _visited_composed_classes = (Animal,) + price_id (str): The [price](https://docs.monei.com/apis/rest/prices-create/) the subscription bills. The subscription copies the price's values when it is created or switched to the price. A later change to the price never changes 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 + interval (SubscriptionInterval): [optional] # noqa: E501 interval_count (int): Number of intervals between subscription payments.. [optional] # noqa: E501 allowed_payment_methods (SubscriptionPaymentMethods): [optional] # noqa: E501 description (str): An arbitrary string attached to the subscription. Often useful for displaying to users. . [optional] # noqa: E501 @@ -363,9 +358,6 @@ def __init__(self, amount, currency, interval, *args, **kwargs): # noqa: E501 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 diff --git a/Monei/model/create_tax_rate_request.py b/Monei/model/create_tax_rate_request.py new file mode 100644 index 0000000..85e8655 --- /dev/null +++ b/Monei/model/create_tax_rate_request.py @@ -0,0 +1,309 @@ +""" +MONEI API v1 + +The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly. ### Base URL All API requests should be made to: ``` https://api.monei.com/v1 ``` ### Environment MONEI provides two environments: - **Test Environment**: For development and testing without processing real payments - **Live Environment**: For processing real transactions in production ### Client Libraries We provide official SDKs to simplify integration: - [PHP SDK](https://github.com/MONEI/monei-php-sdk) - [Python SDK](https://github.com/MONEI/monei-python-sdk) - [Node.js SDK](https://github.com/MONEI/monei-node-sdk) - [Postman Collection](https://postman.monei.com/) Our SDKs handle authentication, error handling, and request formatting automatically. You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the [OpenAPI Generator](https://openapi-generator.tech/). ### Important Requirements - All API requests must be made over HTTPS - If you are not using our official SDKs, you **must provide a valid `User-Agent` header** with each request - Requests without proper authentication will return a `401 Unauthorized` error ### Error Handling The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a `statusCode` attribute indicating the outcome of your request. ### Rate Limits The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a `429 Too Many Requests` status code. # noqa: E501 + +The version of the OpenAPI document: 1.13.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.tax_rate_display_name import TaxRateDisplayName + from Monei.model.tax_rate_percentage import TaxRatePercentage + + globals()["TaxRateDisplayName"] = TaxRateDisplayName + globals()["TaxRatePercentage"] = TaxRatePercentage + + +class CreateTaxRateRequest(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 { + "display_name": (TaxRateDisplayName,), # noqa: E501 + "percentage": (TaxRatePercentage,), # noqa: E501 + "tax_type": (str,), # noqa: E501 + "active": (bool,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + attribute_map = { + "display_name": "displayName", # noqa: E501 + "percentage": "percentage", # noqa: E501 + "tax_type": "taxType", # noqa: E501 + "active": "active", # noqa: E501 + } + + read_only_vars = {} + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data( + cls, display_name, percentage, *args, **kwargs + ): # noqa: E501 + """CreateTaxRateRequest - a model defined in OpenAPI + + Args: + display_name (TaxRateDisplayName): + percentage (TaxRatePercentage): + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + tax_type (str): The kind of tax: `VAT`, `IGIC` (Canary Islands) or `IPSI` (Ceuta and Melilla). It cannot change after the tax rate is created. Treat the set as open: more values can be added later. . [optional] if omitted the server will use the default value of "VAT" # noqa: E501 + active (bool): Whether the tax rate is active. Tax rates are never deleted: set `active` to `false` to archive one. An archived rate cannot be set on a product. While a product still has it, the product cannot get new prices and its prices cannot start or switch a subscription. Subscriptions that already use it keep their copy. A new tax rate is active unless created with `active: false`. . [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.display_name = display_name + self.percentage = percentage + for var_name, var_value in kwargs.items(): + if ( + var_name not in self.attribute_map + and self._configuration is 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, display_name, percentage, *args, **kwargs): # noqa: E501 + """CreateTaxRateRequest - a model defined in OpenAPI + + Args: + display_name (TaxRateDisplayName): + percentage (TaxRatePercentage): + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + tax_type (str): The kind of tax: `VAT`, `IGIC` (Canary Islands) or `IPSI` (Ceuta and Melilla). It cannot change after the tax rate is created. Treat the set as open: more values can be added later. . [optional] if omitted the server will use the default value of "VAT" # noqa: E501 + active (bool): Whether the tax rate is active. Tax rates are never deleted: set `active` to `false` to archive one. An archived rate cannot be set on a product. While a product still has it, the product cannot get new prices and its prices cannot start or switch a subscription. Subscriptions that already use it keep their copy. A new tax rate is active unless created with `active: false`. . [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.display_name = display_name + self.percentage = percentage + for var_name, var_value in kwargs.items(): + if ( + var_name not in self.attribute_map + and self._configuration is 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/customer.py b/Monei/model/customer.py index 62f8168..df6d6c3 100644 --- a/Monei/model/customer.py +++ b/Monei/model/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: - [PHP SDK](https://github.com/MONEI/monei-php-sdk) - [Python SDK](https://github.com/MONEI/monei-python-sdk) - [Node.js SDK](https://github.com/MONEI/monei-node-sdk) - [Postman Collection](https://postman.monei.com/) Our SDKs handle authentication, error handling, and request formatting automatically. You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the [OpenAPI Generator](https://openapi-generator.tech/). ### Important Requirements - All API requests must be made over HTTPS - If you are not using our official SDKs, you **must provide a valid `User-Agent` header** with each request - Requests without proper authentication will return a `401 Unauthorized` error ### Error Handling The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a `statusCode` attribute indicating the outcome of your request. ### Rate Limits The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a `429 Too Many Requests` status code. # noqa: E501 -The version of the OpenAPI document: 1.12.3 +The version of the OpenAPI document: 1.13.0 Generated by: https://openapi-generator.tech """ diff --git a/Monei/model/customer_payment_method.py b/Monei/model/customer_payment_method.py index 983b256..2871454 100644 --- a/Monei/model/customer_payment_method.py +++ b/Monei/model/customer_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: - [PHP SDK](https://github.com/MONEI/monei-php-sdk) - [Python SDK](https://github.com/MONEI/monei-python-sdk) - [Node.js SDK](https://github.com/MONEI/monei-node-sdk) - [Postman Collection](https://postman.monei.com/) Our SDKs handle authentication, error handling, and request formatting automatically. You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the [OpenAPI Generator](https://openapi-generator.tech/). ### Important Requirements - All API requests must be made over HTTPS - If you are not using our official SDKs, you **must provide a valid `User-Agent` header** with each request - Requests without proper authentication will return a `401 Unauthorized` error ### Error Handling The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a `statusCode` attribute indicating the outcome of your request. ### Rate Limits The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a `429 Too Many Requests` status code. # noqa: E501 -The version of the OpenAPI document: 1.12.3 +The version of the OpenAPI document: 1.13.0 Generated by: https://openapi-generator.tech """ diff --git a/Monei/model/deleted_resource.py b/Monei/model/deleted_resource.py index 5834539..346ab55 100644 --- a/Monei/model/deleted_resource.py +++ b/Monei/model/deleted_resource.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: - [PHP SDK](https://github.com/MONEI/monei-php-sdk) - [Python SDK](https://github.com/MONEI/monei-python-sdk) - [Node.js SDK](https://github.com/MONEI/monei-node-sdk) - [Postman Collection](https://postman.monei.com/) Our SDKs handle authentication, error handling, and request formatting automatically. You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the [OpenAPI Generator](https://openapi-generator.tech/). ### Important Requirements - All API requests must be made over HTTPS - If you are not using our official SDKs, you **must provide a valid `User-Agent` header** with each request - Requests without proper authentication will return a `401 Unauthorized` error ### Error Handling The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a `statusCode` attribute indicating the outcome of your request. ### Rate Limits The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a `429 Too Many Requests` status code. # noqa: E501 -The version of the OpenAPI document: 1.12.3 +The version of the OpenAPI document: 1.13.0 Generated by: https://openapi-generator.tech """ diff --git a/Monei/model/internal_server_error.py b/Monei/model/internal_server_error.py index 0602182..132f39a 100644 --- a/Monei/model/internal_server_error.py +++ b/Monei/model/internal_server_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: - [PHP SDK](https://github.com/MONEI/monei-php-sdk) - [Python SDK](https://github.com/MONEI/monei-python-sdk) - [Node.js SDK](https://github.com/MONEI/monei-node-sdk) - [Postman Collection](https://postman.monei.com/) Our SDKs handle authentication, error handling, and request formatting automatically. You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the [OpenAPI Generator](https://openapi-generator.tech/). ### Important Requirements - All API requests must be made over HTTPS - If you are not using our official SDKs, you **must provide a valid `User-Agent` header** with each request - Requests without proper authentication will return a `401 Unauthorized` error ### Error Handling The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a `statusCode` attribute indicating the outcome of your request. ### Rate Limits The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a `429 Too Many Requests` status code. # noqa: E501 -The version of the OpenAPI document: 1.12.3 +The version of the OpenAPI document: 1.13.0 Generated by: https://openapi-generator.tech """ diff --git a/Monei/model/internal_server_error_all_of.py b/Monei/model/internal_server_error_all_of.py index 425b8e4..440fd46 100644 --- a/Monei/model/internal_server_error_all_of.py +++ b/Monei/model/internal_server_error_all_of.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: - [PHP SDK](https://github.com/MONEI/monei-php-sdk) - [Python SDK](https://github.com/MONEI/monei-python-sdk) - [Node.js SDK](https://github.com/MONEI/monei-node-sdk) - [Postman Collection](https://postman.monei.com/) Our SDKs handle authentication, error handling, and request formatting automatically. You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the [OpenAPI Generator](https://openapi-generator.tech/). ### Important Requirements - All API requests must be made over HTTPS - If you are not using our official SDKs, you **must provide a valid `User-Agent` header** with each request - Requests without proper authentication will return a `401 Unauthorized` error ### Error Handling The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a `statusCode` attribute indicating the outcome of your request. ### Rate Limits The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a `429 Too Many Requests` status code. # noqa: E501 -The version of the OpenAPI document: 1.12.3 +The version of the OpenAPI document: 1.13.0 Generated by: https://openapi-generator.tech """ diff --git a/Monei/model/not_found_error.py b/Monei/model/not_found_error.py index cef5cbc..e4a09dc 100644 --- a/Monei/model/not_found_error.py +++ b/Monei/model/not_found_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: - [PHP SDK](https://github.com/MONEI/monei-php-sdk) - [Python SDK](https://github.com/MONEI/monei-python-sdk) - [Node.js SDK](https://github.com/MONEI/monei-node-sdk) - [Postman Collection](https://postman.monei.com/) Our SDKs handle authentication, error handling, and request formatting automatically. You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the [OpenAPI Generator](https://openapi-generator.tech/). ### Important Requirements - All API requests must be made over HTTPS - If you are not using our official SDKs, you **must provide a valid `User-Agent` header** with each request - Requests without proper authentication will return a `401 Unauthorized` error ### Error Handling The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a `statusCode` attribute indicating the outcome of your request. ### Rate Limits The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a `429 Too Many Requests` status code. # noqa: E501 -The version of the OpenAPI document: 1.12.3 +The version of the OpenAPI document: 1.13.0 Generated by: https://openapi-generator.tech """ diff --git a/Monei/model/not_found_error_all_of.py b/Monei/model/not_found_error_all_of.py index f1d012d..9e86934 100644 --- a/Monei/model/not_found_error_all_of.py +++ b/Monei/model/not_found_error_all_of.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: - [PHP SDK](https://github.com/MONEI/monei-php-sdk) - [Python SDK](https://github.com/MONEI/monei-python-sdk) - [Node.js SDK](https://github.com/MONEI/monei-node-sdk) - [Postman Collection](https://postman.monei.com/) Our SDKs handle authentication, error handling, and request formatting automatically. You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the [OpenAPI Generator](https://openapi-generator.tech/). ### Important Requirements - All API requests must be made over HTTPS - If you are not using our official SDKs, you **must provide a valid `User-Agent` header** with each request - Requests without proper authentication will return a `401 Unauthorized` error ### Error Handling The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a `statusCode` attribute indicating the outcome of your request. ### Rate Limits The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a `429 Too Many Requests` status code. # noqa: E501 -The version of the OpenAPI document: 1.12.3 +The version of the OpenAPI document: 1.13.0 Generated by: https://openapi-generator.tech """ diff --git a/Monei/model/pause_subscription_request.py b/Monei/model/pause_subscription_request.py index 5c4d4d9..4430b0b 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: - [PHP SDK](https://github.com/MONEI/monei-php-sdk) - [Python SDK](https://github.com/MONEI/monei-python-sdk) - [Node.js SDK](https://github.com/MONEI/monei-node-sdk) - [Postman Collection](https://postman.monei.com/) Our SDKs handle authentication, error handling, and request formatting automatically. You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the [OpenAPI Generator](https://openapi-generator.tech/). ### Important Requirements - All API requests must be made over HTTPS - If you are not using our official SDKs, you **must provide a valid `User-Agent` header** with each request - Requests without proper authentication will return a `401 Unauthorized` error ### Error Handling The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a `statusCode` attribute indicating the outcome of your request. ### Rate Limits The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a `429 Too Many Requests` status code. # noqa: E501 -The version of the OpenAPI document: 1.12.3 +The version of the OpenAPI document: 1.13.0 Generated by: https://openapi-generator.tech """ diff --git a/Monei/model/payment.py b/Monei/model/payment.py index 8c2d847..b31d22a 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: - [PHP SDK](https://github.com/MONEI/monei-php-sdk) - [Python SDK](https://github.com/MONEI/monei-python-sdk) - [Node.js SDK](https://github.com/MONEI/monei-node-sdk) - [Postman Collection](https://postman.monei.com/) Our SDKs handle authentication, error handling, and request formatting automatically. You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the [OpenAPI Generator](https://openapi-generator.tech/). ### Important Requirements - All API requests must be made over HTTPS - If you are not using our official SDKs, you **must provide a valid `User-Agent` header** with each request - Requests without proper authentication will return a `401 Unauthorized` error ### Error Handling The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a `statusCode` attribute indicating the outcome of your request. ### Rate Limits The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a `429 Too Many Requests` status code. # noqa: E501 -The version of the OpenAPI document: 1.12.3 +The version of the OpenAPI document: 1.13.0 Generated by: https://openapi-generator.tech """ @@ -242,7 +242,7 @@ def _from_openapi_data( Animal class but this time we won't travel through its discriminator because we passed in _visited_composed_classes = (Animal,) - 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 + order_id (str): An order ID from your system. A unique identifier that can be used to reconcile the payment with your internal system. Up to 40 characters: ASCII letters, digits and `_ @ . / # & + -` (no spaces). . [optional] # noqa: E501 description (str): An arbitrary string attached to the payment. Often useful for displaying to users. . [optional] # noqa: E501 authorization_code (str): Unique identifier provided by the bank performing transaction. . [optional] # noqa: E501 status_code (str): Payment status code. . [optional] # noqa: E501 @@ -374,7 +374,7 @@ def __init__( Animal class but this time we won't travel through its discriminator because we passed in _visited_composed_classes = (Animal,) - 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 + order_id (str): An order ID from your system. A unique identifier that can be used to reconcile the payment with your internal system. Up to 40 characters: ASCII letters, digits and `_ @ . / # & + -` (no spaces). . [optional] # noqa: E501 description (str): An arbitrary string attached to the payment. Often useful for displaying to users. . [optional] # noqa: E501 authorization_code (str): Unique identifier provided by the bank performing transaction. . [optional] # noqa: E501 status_code (str): Payment status code. . [optional] # noqa: E501 diff --git a/Monei/model/payment_billing_details.py b/Monei/model/payment_billing_details.py index e1319ff..5e54e04 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: - [PHP SDK](https://github.com/MONEI/monei-php-sdk) - [Python SDK](https://github.com/MONEI/monei-python-sdk) - [Node.js SDK](https://github.com/MONEI/monei-node-sdk) - [Postman Collection](https://postman.monei.com/) Our SDKs handle authentication, error handling, and request formatting automatically. You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the [OpenAPI Generator](https://openapi-generator.tech/). ### Important Requirements - All API requests must be made over HTTPS - If you are not using our official SDKs, you **must provide a valid `User-Agent` header** with each request - Requests without proper authentication will return a `401 Unauthorized` error ### Error Handling The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a `statusCode` attribute indicating the outcome of your request. ### Rate Limits The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a `429 Too Many Requests` status code. # noqa: E501 -The version of the OpenAPI document: 1.12.3 +The version of the OpenAPI document: 1.13.0 Generated by: https://openapi-generator.tech """ diff --git a/Monei/model/payment_cancellation_reason.py b/Monei/model/payment_cancellation_reason.py index 99d3916..1524be1 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: - [PHP SDK](https://github.com/MONEI/monei-php-sdk) - [Python SDK](https://github.com/MONEI/monei-python-sdk) - [Node.js SDK](https://github.com/MONEI/monei-node-sdk) - [Postman Collection](https://postman.monei.com/) Our SDKs handle authentication, error handling, and request formatting automatically. You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the [OpenAPI Generator](https://openapi-generator.tech/). ### Important Requirements - All API requests must be made over HTTPS - If you are not using our official SDKs, you **must provide a valid `User-Agent` header** with each request - Requests without proper authentication will return a `401 Unauthorized` error ### Error Handling The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a `statusCode` attribute indicating the outcome of your request. ### Rate Limits The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a `429 Too Many Requests` status code. # noqa: E501 -The version of the OpenAPI document: 1.12.3 +The version of the OpenAPI document: 1.13.0 Generated by: https://openapi-generator.tech """ diff --git a/Monei/model/payment_customer.py b/Monei/model/payment_customer.py index ca482ef..333de9a 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: - [PHP SDK](https://github.com/MONEI/monei-php-sdk) - [Python SDK](https://github.com/MONEI/monei-python-sdk) - [Node.js SDK](https://github.com/MONEI/monei-node-sdk) - [Postman Collection](https://postman.monei.com/) Our SDKs handle authentication, error handling, and request formatting automatically. You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the [OpenAPI Generator](https://openapi-generator.tech/). ### Important Requirements - All API requests must be made over HTTPS - If you are not using our official SDKs, you **must provide a valid `User-Agent` header** with each request - Requests without proper authentication will return a `401 Unauthorized` error ### Error Handling The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a `statusCode` attribute indicating the outcome of your request. ### Rate Limits The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a `429 Too Many Requests` status code. # noqa: E501 -The version of the OpenAPI document: 1.12.3 +The version of the OpenAPI document: 1.13.0 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 f1f9853..66e8f1e 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: - [PHP SDK](https://github.com/MONEI/monei-php-sdk) - [Python SDK](https://github.com/MONEI/monei-python-sdk) - [Node.js SDK](https://github.com/MONEI/monei-node-sdk) - [Postman Collection](https://postman.monei.com/) Our SDKs handle authentication, error handling, and request formatting automatically. You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the [OpenAPI Generator](https://openapi-generator.tech/). ### Important Requirements - All API requests must be made over HTTPS - If you are not using our official SDKs, you **must provide a valid `User-Agent` header** with each request - Requests without proper authentication will return a `401 Unauthorized` error ### Error Handling The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a `statusCode` attribute indicating the outcome of your request. ### Rate Limits The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a `429 Too Many Requests` status code. # noqa: E501 -The version of the OpenAPI document: 1.12.3 +The version of the OpenAPI document: 1.13.0 Generated by: https://openapi-generator.tech """ diff --git a/Monei/model/payment_message_channel.py b/Monei/model/payment_message_channel.py index 2ccf6f3..8cd62ff 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: - [PHP SDK](https://github.com/MONEI/monei-php-sdk) - [Python SDK](https://github.com/MONEI/monei-python-sdk) - [Node.js SDK](https://github.com/MONEI/monei-node-sdk) - [Postman Collection](https://postman.monei.com/) Our SDKs handle authentication, error handling, and request formatting automatically. You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the [OpenAPI Generator](https://openapi-generator.tech/). ### Important Requirements - All API requests must be made over HTTPS - If you are not using our official SDKs, you **must provide a valid `User-Agent` header** with each request - Requests without proper authentication will return a `401 Unauthorized` error ### Error Handling The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a `statusCode` attribute indicating the outcome of your request. ### Rate Limits The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a `429 Too Many Requests` status code. # noqa: E501 -The version of the OpenAPI document: 1.12.3 +The version of the OpenAPI document: 1.13.0 Generated by: https://openapi-generator.tech """ diff --git a/Monei/model/payment_message_language.py b/Monei/model/payment_message_language.py index 13767a1..3ffbcec 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: - [PHP SDK](https://github.com/MONEI/monei-php-sdk) - [Python SDK](https://github.com/MONEI/monei-python-sdk) - [Node.js SDK](https://github.com/MONEI/monei-node-sdk) - [Postman Collection](https://postman.monei.com/) Our SDKs handle authentication, error handling, and request formatting automatically. You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the [OpenAPI Generator](https://openapi-generator.tech/). ### Important Requirements - All API requests must be made over HTTPS - If you are not using our official SDKs, you **must provide a valid `User-Agent` header** with each request - Requests without proper authentication will return a `401 Unauthorized` error ### Error Handling The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a `statusCode` attribute indicating the outcome of your request. ### Rate Limits The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a `429 Too Many Requests` status code. # noqa: E501 -The version of the OpenAPI document: 1.12.3 +The version of the OpenAPI document: 1.13.0 Generated by: https://openapi-generator.tech """ diff --git a/Monei/model/payment_methods.py b/Monei/model/payment_methods.py index 9a9ec5e..4aa54d7 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: - [PHP SDK](https://github.com/MONEI/monei-php-sdk) - [Python SDK](https://github.com/MONEI/monei-python-sdk) - [Node.js SDK](https://github.com/MONEI/monei-node-sdk) - [Postman Collection](https://postman.monei.com/) Our SDKs handle authentication, error handling, and request formatting automatically. You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the [OpenAPI Generator](https://openapi-generator.tech/). ### Important Requirements - All API requests must be made over HTTPS - If you are not using our official SDKs, you **must provide a valid `User-Agent` header** with each request - Requests without proper authentication will return a `401 Unauthorized` error ### Error Handling The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a `statusCode` attribute indicating the outcome of your request. ### Rate Limits The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a `429 Too Many Requests` status code. # noqa: E501 -The version of the OpenAPI document: 1.12.3 +The version of the OpenAPI document: 1.13.0 Generated by: https://openapi-generator.tech """ diff --git a/Monei/model/payment_methods_metadata.py b/Monei/model/payment_methods_metadata.py index 7824296..a9cc21f 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: - [PHP SDK](https://github.com/MONEI/monei-php-sdk) - [Python SDK](https://github.com/MONEI/monei-python-sdk) - [Node.js SDK](https://github.com/MONEI/monei-node-sdk) - [Postman Collection](https://postman.monei.com/) Our SDKs handle authentication, error handling, and request formatting automatically. You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the [OpenAPI Generator](https://openapi-generator.tech/). ### Important Requirements - All API requests must be made over HTTPS - If you are not using our official SDKs, you **must provide a valid `User-Agent` header** with each request - Requests without proper authentication will return a `401 Unauthorized` error ### Error Handling The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a `statusCode` attribute indicating the outcome of your request. ### Rate Limits The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a `429 Too Many Requests` status code. # noqa: E501 -The version of the OpenAPI document: 1.12.3 +The version of the OpenAPI document: 1.13.0 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 a7573ee..32602e9 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: - [PHP SDK](https://github.com/MONEI/monei-php-sdk) - [Python SDK](https://github.com/MONEI/monei-python-sdk) - [Node.js SDK](https://github.com/MONEI/monei-node-sdk) - [Postman Collection](https://postman.monei.com/) Our SDKs handle authentication, error handling, and request formatting automatically. You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the [OpenAPI Generator](https://openapi-generator.tech/). ### Important Requirements - All API requests must be made over HTTPS - If you are not using our official SDKs, you **must provide a valid `User-Agent` header** with each request - Requests without proper authentication will return a `401 Unauthorized` error ### Error Handling The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a `statusCode` attribute indicating the outcome of your request. ### Rate Limits The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a `429 Too Many Requests` status code. # noqa: E501 -The version of the OpenAPI document: 1.12.3 +The version of the OpenAPI document: 1.13.0 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 0fd9690..e10fd03 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: - [PHP SDK](https://github.com/MONEI/monei-php-sdk) - [Python SDK](https://github.com/MONEI/monei-python-sdk) - [Node.js SDK](https://github.com/MONEI/monei-node-sdk) - [Postman Collection](https://postman.monei.com/) Our SDKs handle authentication, error handling, and request formatting automatically. You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the [OpenAPI Generator](https://openapi-generator.tech/). ### Important Requirements - All API requests must be made over HTTPS - If you are not using our official SDKs, you **must provide a valid `User-Agent` header** with each request - Requests without proper authentication will return a `401 Unauthorized` error ### Error Handling The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a `statusCode` attribute indicating the outcome of your request. ### Rate Limits The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a `429 Too Many Requests` status code. # noqa: E501 -The version of the OpenAPI document: 1.12.3 +The version of the OpenAPI document: 1.13.0 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 00e9860..246f144 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: - [PHP SDK](https://github.com/MONEI/monei-php-sdk) - [Python SDK](https://github.com/MONEI/monei-python-sdk) - [Node.js SDK](https://github.com/MONEI/monei-node-sdk) - [Postman Collection](https://postman.monei.com/) Our SDKs handle authentication, error handling, and request formatting automatically. You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the [OpenAPI Generator](https://openapi-generator.tech/). ### Important Requirements - All API requests must be made over HTTPS - If you are not using our official SDKs, you **must provide a valid `User-Agent` header** with each request - Requests without proper authentication will return a `401 Unauthorized` error ### Error Handling The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a `statusCode` attribute indicating the outcome of your request. ### Rate Limits The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a `429 Too Many Requests` status code. # noqa: E501 -The version of the OpenAPI document: 1.12.3 +The version of the OpenAPI document: 1.13.0 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 cfc7867..cc86e95 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: - [PHP SDK](https://github.com/MONEI/monei-php-sdk) - [Python SDK](https://github.com/MONEI/monei-python-sdk) - [Node.js SDK](https://github.com/MONEI/monei-node-sdk) - [Postman Collection](https://postman.monei.com/) Our SDKs handle authentication, error handling, and request formatting automatically. You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the [OpenAPI Generator](https://openapi-generator.tech/). ### Important Requirements - All API requests must be made over HTTPS - If you are not using our official SDKs, you **must provide a valid `User-Agent` header** with each request - Requests without proper authentication will return a `401 Unauthorized` error ### Error Handling The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a `statusCode` attribute indicating the outcome of your request. ### Rate Limits The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a `429 Too Many Requests` status code. # noqa: E501 -The version of the OpenAPI document: 1.12.3 +The version of the OpenAPI document: 1.13.0 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 9d7b8c9..cf1a055 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: - [PHP SDK](https://github.com/MONEI/monei-php-sdk) - [Python SDK](https://github.com/MONEI/monei-python-sdk) - [Node.js SDK](https://github.com/MONEI/monei-node-sdk) - [Postman Collection](https://postman.monei.com/) Our SDKs handle authentication, error handling, and request formatting automatically. You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the [OpenAPI Generator](https://openapi-generator.tech/). ### Important Requirements - All API requests must be made over HTTPS - If you are not using our official SDKs, you **must provide a valid `User-Agent` header** with each request - Requests without proper authentication will return a `401 Unauthorized` error ### Error Handling The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a `statusCode` attribute indicating the outcome of your request. ### Rate Limits The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a `429 Too Many Requests` status code. # noqa: E501 -The version of the OpenAPI document: 1.12.3 +The version of the OpenAPI document: 1.13.0 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 9b116aa..e6afbe8 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: - [PHP SDK](https://github.com/MONEI/monei-php-sdk) - [Python SDK](https://github.com/MONEI/monei-python-sdk) - [Node.js SDK](https://github.com/MONEI/monei-node-sdk) - [Postman Collection](https://postman.monei.com/) Our SDKs handle authentication, error handling, and request formatting automatically. You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the [OpenAPI Generator](https://openapi-generator.tech/). ### Important Requirements - All API requests must be made over HTTPS - If you are not using our official SDKs, you **must provide a valid `User-Agent` header** with each request - Requests without proper authentication will return a `401 Unauthorized` error ### Error Handling The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a `statusCode` attribute indicating the outcome of your request. ### Rate Limits The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a `429 Too Many Requests` status code. # noqa: E501 -The version of the OpenAPI document: 1.12.3 +The version of the OpenAPI document: 1.13.0 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 879b398..a4f76f4 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: - [PHP SDK](https://github.com/MONEI/monei-php-sdk) - [Python SDK](https://github.com/MONEI/monei-python-sdk) - [Node.js SDK](https://github.com/MONEI/monei-node-sdk) - [Postman Collection](https://postman.monei.com/) Our SDKs handle authentication, error handling, and request formatting automatically. You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the [OpenAPI Generator](https://openapi-generator.tech/). ### Important Requirements - All API requests must be made over HTTPS - If you are not using our official SDKs, you **must provide a valid `User-Agent` header** with each request - Requests without proper authentication will return a `401 Unauthorized` error ### Error Handling The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a `statusCode` attribute indicating the outcome of your request. ### Rate Limits The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a `429 Too Many Requests` status code. # noqa: E501 -The version of the OpenAPI document: 1.12.3 +The version of the OpenAPI document: 1.13.0 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 32f7235..7a93c00 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: - [PHP SDK](https://github.com/MONEI/monei-php-sdk) - [Python SDK](https://github.com/MONEI/monei-python-sdk) - [Node.js SDK](https://github.com/MONEI/monei-node-sdk) - [Postman Collection](https://postman.monei.com/) Our SDKs handle authentication, error handling, and request formatting automatically. You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the [OpenAPI Generator](https://openapi-generator.tech/). ### Important Requirements - All API requests must be made over HTTPS - If you are not using our official SDKs, you **must provide a valid `User-Agent` header** with each request - Requests without proper authentication will return a `401 Unauthorized` error ### Error Handling The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a `statusCode` attribute indicating the outcome of your request. ### Rate Limits The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a `429 Too Many Requests` status code. # noqa: E501 -The version of the OpenAPI document: 1.12.3 +The version of the OpenAPI document: 1.13.0 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 0ebe0df..f4af12f 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: - [PHP SDK](https://github.com/MONEI/monei-php-sdk) - [Python SDK](https://github.com/MONEI/monei-python-sdk) - [Node.js SDK](https://github.com/MONEI/monei-node-sdk) - [Postman Collection](https://postman.monei.com/) Our SDKs handle authentication, error handling, and request formatting automatically. You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the [OpenAPI Generator](https://openapi-generator.tech/). ### Important Requirements - All API requests must be made over HTTPS - If you are not using our official SDKs, you **must provide a valid `User-Agent` header** with each request - Requests without proper authentication will return a `401 Unauthorized` error ### Error Handling The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a `statusCode` attribute indicating the outcome of your request. ### Rate Limits The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a `429 Too Many Requests` status code. # noqa: E501 -The version of the OpenAPI document: 1.12.3 +The version of the OpenAPI document: 1.13.0 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 f94d073..f1160db 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: - [PHP SDK](https://github.com/MONEI/monei-php-sdk) - [Python SDK](https://github.com/MONEI/monei-python-sdk) - [Node.js SDK](https://github.com/MONEI/monei-node-sdk) - [Postman Collection](https://postman.monei.com/) Our SDKs handle authentication, error handling, and request formatting automatically. You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the [OpenAPI Generator](https://openapi-generator.tech/). ### Important Requirements - All API requests must be made over HTTPS - If you are not using our official SDKs, you **must provide a valid `User-Agent` header** with each request - Requests without proper authentication will return a `401 Unauthorized` error ### Error Handling The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a `statusCode` attribute indicating the outcome of your request. ### Rate Limits The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a `429 Too Many Requests` status code. # noqa: E501 -The version of the OpenAPI document: 1.12.3 +The version of the OpenAPI document: 1.13.0 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 a77fb8a..1609489 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: - [PHP SDK](https://github.com/MONEI/monei-php-sdk) - [Python SDK](https://github.com/MONEI/monei-python-sdk) - [Node.js SDK](https://github.com/MONEI/monei-node-sdk) - [Postman Collection](https://postman.monei.com/) Our SDKs handle authentication, error handling, and request formatting automatically. You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the [OpenAPI Generator](https://openapi-generator.tech/). ### Important Requirements - All API requests must be made over HTTPS - If you are not using our official SDKs, you **must provide a valid `User-Agent` header** with each request - Requests without proper authentication will return a `401 Unauthorized` error ### Error Handling The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a `statusCode` attribute indicating the outcome of your request. ### Rate Limits The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a `429 Too Many Requests` status code. # noqa: E501 -The version of the OpenAPI document: 1.12.3 +The version of the OpenAPI document: 1.13.0 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 8fb4704..9184b70 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: - [PHP SDK](https://github.com/MONEI/monei-php-sdk) - [Python SDK](https://github.com/MONEI/monei-python-sdk) - [Node.js SDK](https://github.com/MONEI/monei-node-sdk) - [Postman Collection](https://postman.monei.com/) Our SDKs handle authentication, error handling, and request formatting automatically. You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the [OpenAPI Generator](https://openapi-generator.tech/). ### Important Requirements - All API requests must be made over HTTPS - If you are not using our official SDKs, you **must provide a valid `User-Agent` header** with each request - Requests without proper authentication will return a `401 Unauthorized` error ### Error Handling The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a `statusCode` attribute indicating the outcome of your request. ### Rate Limits The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a `429 Too Many Requests` status code. # noqa: E501 -The version of the OpenAPI document: 1.12.3 +The version of the OpenAPI document: 1.13.0 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 dd50aa5..34ffbd7 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: - [PHP SDK](https://github.com/MONEI/monei-php-sdk) - [Python SDK](https://github.com/MONEI/monei-python-sdk) - [Node.js SDK](https://github.com/MONEI/monei-node-sdk) - [Postman Collection](https://postman.monei.com/) Our SDKs handle authentication, error handling, and request formatting automatically. You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the [OpenAPI Generator](https://openapi-generator.tech/). ### Important Requirements - All API requests must be made over HTTPS - If you are not using our official SDKs, you **must provide a valid `User-Agent` header** with each request - Requests without proper authentication will return a `401 Unauthorized` error ### Error Handling The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a `statusCode` attribute indicating the outcome of your request. ### Rate Limits The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a `429 Too Many Requests` status code. # noqa: E501 -The version of the OpenAPI document: 1.12.3 +The version of the OpenAPI document: 1.13.0 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 eb5df17..ed320a3 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: - [PHP SDK](https://github.com/MONEI/monei-php-sdk) - [Python SDK](https://github.com/MONEI/monei-python-sdk) - [Node.js SDK](https://github.com/MONEI/monei-node-sdk) - [Postman Collection](https://postman.monei.com/) Our SDKs handle authentication, error handling, and request formatting automatically. You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the [OpenAPI Generator](https://openapi-generator.tech/). ### Important Requirements - All API requests must be made over HTTPS - If you are not using our official SDKs, you **must provide a valid `User-Agent` header** with each request - Requests without proper authentication will return a `401 Unauthorized` error ### Error Handling The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a `statusCode` attribute indicating the outcome of your request. ### Rate Limits The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a `429 Too Many Requests` status code. # noqa: E501 -The version of the OpenAPI document: 1.12.3 +The version of the OpenAPI document: 1.13.0 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 d812e3d..7f094b0 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: - [PHP SDK](https://github.com/MONEI/monei-php-sdk) - [Python SDK](https://github.com/MONEI/monei-python-sdk) - [Node.js SDK](https://github.com/MONEI/monei-node-sdk) - [Postman Collection](https://postman.monei.com/) Our SDKs handle authentication, error handling, and request formatting automatically. You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the [OpenAPI Generator](https://openapi-generator.tech/). ### Important Requirements - All API requests must be made over HTTPS - If you are not using our official SDKs, you **must provide a valid `User-Agent` header** with each request - Requests without proper authentication will return a `401 Unauthorized` error ### Error Handling The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a `statusCode` attribute indicating the outcome of your request. ### Rate Limits The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a `429 Too Many Requests` status code. # noqa: E501 -The version of the OpenAPI document: 1.12.3 +The version of the OpenAPI document: 1.13.0 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 4a24639..3fa6068 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: - [PHP SDK](https://github.com/MONEI/monei-php-sdk) - [Python SDK](https://github.com/MONEI/monei-python-sdk) - [Node.js SDK](https://github.com/MONEI/monei-node-sdk) - [Postman Collection](https://postman.monei.com/) Our SDKs handle authentication, error handling, and request formatting automatically. You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the [OpenAPI Generator](https://openapi-generator.tech/). ### Important Requirements - All API requests must be made over HTTPS - If you are not using our official SDKs, you **must provide a valid `User-Agent` header** with each request - Requests without proper authentication will return a `401 Unauthorized` error ### Error Handling The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a `statusCode` attribute indicating the outcome of your request. ### Rate Limits The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a `429 Too Many Requests` status code. # noqa: E501 -The version of the OpenAPI document: 1.12.3 +The version of the OpenAPI document: 1.13.0 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 f8ba82f..587b337 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: - [PHP SDK](https://github.com/MONEI/monei-php-sdk) - [Python SDK](https://github.com/MONEI/monei-python-sdk) - [Node.js SDK](https://github.com/MONEI/monei-node-sdk) - [Postman Collection](https://postman.monei.com/) Our SDKs handle authentication, error handling, and request formatting automatically. You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the [OpenAPI Generator](https://openapi-generator.tech/). ### Important Requirements - All API requests must be made over HTTPS - If you are not using our official SDKs, you **must provide a valid `User-Agent` header** with each request - Requests without proper authentication will return a `401 Unauthorized` error ### Error Handling The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a `statusCode` attribute indicating the outcome of your request. ### Rate Limits The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a `429 Too Many Requests` status code. # noqa: E501 -The version of the OpenAPI document: 1.12.3 +The version of the OpenAPI document: 1.13.0 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 0355f7f..94efeb3 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: - [PHP SDK](https://github.com/MONEI/monei-php-sdk) - [Python SDK](https://github.com/MONEI/monei-python-sdk) - [Node.js SDK](https://github.com/MONEI/monei-node-sdk) - [Postman Collection](https://postman.monei.com/) Our SDKs handle authentication, error handling, and request formatting automatically. You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the [OpenAPI Generator](https://openapi-generator.tech/). ### Important Requirements - All API requests must be made over HTTPS - If you are not using our official SDKs, you **must provide a valid `User-Agent` header** with each request - Requests without proper authentication will return a `401 Unauthorized` error ### Error Handling The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a `statusCode` attribute indicating the outcome of your request. ### Rate Limits The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a `429 Too Many Requests` status code. # noqa: E501 -The version of the OpenAPI document: 1.12.3 +The version of the OpenAPI document: 1.13.0 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 200942e..a11cefa 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: - [PHP SDK](https://github.com/MONEI/monei-php-sdk) - [Python SDK](https://github.com/MONEI/monei-python-sdk) - [Node.js SDK](https://github.com/MONEI/monei-node-sdk) - [Postman Collection](https://postman.monei.com/) Our SDKs handle authentication, error handling, and request formatting automatically. You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the [OpenAPI Generator](https://openapi-generator.tech/). ### Important Requirements - All API requests must be made over HTTPS - If you are not using our official SDKs, you **must provide a valid `User-Agent` header** with each request - Requests without proper authentication will return a `401 Unauthorized` error ### Error Handling The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a `statusCode` attribute indicating the outcome of your request. ### Rate Limits The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a `429 Too Many Requests` status code. # noqa: E501 -The version of the OpenAPI document: 1.12.3 +The version of the OpenAPI document: 1.13.0 Generated by: https://openapi-generator.tech """ diff --git a/Monei/model/payment_methods_methods.py b/Monei/model/payment_methods_methods.py index f88a1a8..abc8193 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: - [PHP SDK](https://github.com/MONEI/monei-php-sdk) - [Python SDK](https://github.com/MONEI/monei-python-sdk) - [Node.js SDK](https://github.com/MONEI/monei-node-sdk) - [Postman Collection](https://postman.monei.com/) Our SDKs handle authentication, error handling, and request formatting automatically. You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the [OpenAPI Generator](https://openapi-generator.tech/). ### Important Requirements - All API requests must be made over HTTPS - If you are not using our official SDKs, you **must provide a valid `User-Agent` header** with each request - Requests without proper authentication will return a `401 Unauthorized` error ### Error Handling The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a `statusCode` attribute indicating the outcome of your request. ### Rate Limits The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a `429 Too Many Requests` status code. # noqa: E501 -The version of the OpenAPI document: 1.12.3 +The version of the OpenAPI document: 1.13.0 Generated by: https://openapi-generator.tech """ diff --git a/Monei/model/payment_next_action.py b/Monei/model/payment_next_action.py index 9879ea4..fc3e816 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: - [PHP SDK](https://github.com/MONEI/monei-php-sdk) - [Python SDK](https://github.com/MONEI/monei-python-sdk) - [Node.js SDK](https://github.com/MONEI/monei-node-sdk) - [Postman Collection](https://postman.monei.com/) Our SDKs handle authentication, error handling, and request formatting automatically. You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the [OpenAPI Generator](https://openapi-generator.tech/). ### Important Requirements - All API requests must be made over HTTPS - If you are not using our official SDKs, you **must provide a valid `User-Agent` header** with each request - Requests without proper authentication will return a `401 Unauthorized` error ### Error Handling The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a `statusCode` attribute indicating the outcome of your request. ### Rate Limits The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a `429 Too Many Requests` status code. # noqa: E501 -The version of the OpenAPI document: 1.12.3 +The version of the OpenAPI document: 1.13.0 Generated by: https://openapi-generator.tech """ diff --git a/Monei/model/payment_payment_method.py b/Monei/model/payment_payment_method.py index 6bcb130..8de6145 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: - [PHP SDK](https://github.com/MONEI/monei-php-sdk) - [Python SDK](https://github.com/MONEI/monei-python-sdk) - [Node.js SDK](https://github.com/MONEI/monei-node-sdk) - [Postman Collection](https://postman.monei.com/) Our SDKs handle authentication, error handling, and request formatting automatically. You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the [OpenAPI Generator](https://openapi-generator.tech/). ### Important Requirements - All API requests must be made over HTTPS - If you are not using our official SDKs, you **must provide a valid `User-Agent` header** with each request - Requests without proper authentication will return a `401 Unauthorized` error ### Error Handling The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a `statusCode` attribute indicating the outcome of your request. ### Rate Limits The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a `429 Too Many Requests` status code. # noqa: E501 -The version of the OpenAPI document: 1.12.3 +The version of the OpenAPI document: 1.13.0 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 7190ad0..4660865 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: - [PHP SDK](https://github.com/MONEI/monei-php-sdk) - [Python SDK](https://github.com/MONEI/monei-python-sdk) - [Node.js SDK](https://github.com/MONEI/monei-node-sdk) - [Postman Collection](https://postman.monei.com/) Our SDKs handle authentication, error handling, and request formatting automatically. You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the [OpenAPI Generator](https://openapi-generator.tech/). ### Important Requirements - All API requests must be made over HTTPS - If you are not using our official SDKs, you **must provide a valid `User-Agent` header** with each request - Requests without proper authentication will return a `401 Unauthorized` error ### Error Handling The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a `statusCode` attribute indicating the outcome of your request. ### Rate Limits The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a `429 Too Many Requests` status code. # noqa: E501 -The version of the OpenAPI document: 1.12.3 +The version of the OpenAPI document: 1.13.0 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 f3d1950..4644ea2 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: - [PHP SDK](https://github.com/MONEI/monei-php-sdk) - [Python SDK](https://github.com/MONEI/monei-python-sdk) - [Node.js SDK](https://github.com/MONEI/monei-node-sdk) - [Postman Collection](https://postman.monei.com/) Our SDKs handle authentication, error handling, and request formatting automatically. You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the [OpenAPI Generator](https://openapi-generator.tech/). ### Important Requirements - All API requests must be made over HTTPS - If you are not using our official SDKs, you **must provide a valid `User-Agent` header** with each request - Requests without proper authentication will return a `401 Unauthorized` error ### Error Handling The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a `statusCode` attribute indicating the outcome of your request. ### Rate Limits The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a `429 Too Many Requests` status code. # noqa: E501 -The version of the OpenAPI document: 1.12.3 +The version of the OpenAPI document: 1.13.0 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 746982c..e58cc7c 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: - [PHP SDK](https://github.com/MONEI/monei-php-sdk) - [Python SDK](https://github.com/MONEI/monei-python-sdk) - [Node.js SDK](https://github.com/MONEI/monei-node-sdk) - [Postman Collection](https://postman.monei.com/) Our SDKs handle authentication, error handling, and request formatting automatically. You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the [OpenAPI Generator](https://openapi-generator.tech/). ### Important Requirements - All API requests must be made over HTTPS - If you are not using our official SDKs, you **must provide a valid `User-Agent` header** with each request - Requests without proper authentication will return a `401 Unauthorized` error ### Error Handling The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a `statusCode` attribute indicating the outcome of your request. ### Rate Limits The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a `429 Too Many Requests` status code. # noqa: E501 -The version of the OpenAPI document: 1.12.3 +The version of the OpenAPI document: 1.13.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 index 93ece0b..9509517 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: - [PHP SDK](https://github.com/MONEI/monei-php-sdk) - [Python SDK](https://github.com/MONEI/monei-python-sdk) - [Node.js SDK](https://github.com/MONEI/monei-node-sdk) - [Postman Collection](https://postman.monei.com/) Our SDKs handle authentication, error handling, and request formatting automatically. You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the [OpenAPI Generator](https://openapi-generator.tech/). ### Important Requirements - All API requests must be made over HTTPS - If you are not using our official SDKs, you **must provide a valid `User-Agent` header** with each request - Requests without proper authentication will return a `401 Unauthorized` error ### Error Handling The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a `statusCode` attribute indicating the outcome of your request. ### Rate Limits The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a `429 Too Many Requests` status code. # noqa: E501 -The version of the OpenAPI document: 1.12.3 +The version of the OpenAPI document: 1.13.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 5ad8410..fcb0a94 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: - [PHP SDK](https://github.com/MONEI/monei-php-sdk) - [Python SDK](https://github.com/MONEI/monei-python-sdk) - [Node.js SDK](https://github.com/MONEI/monei-node-sdk) - [Postman Collection](https://postman.monei.com/) Our SDKs handle authentication, error handling, and request formatting automatically. You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the [OpenAPI Generator](https://openapi-generator.tech/). ### Important Requirements - All API requests must be made over HTTPS - If you are not using our official SDKs, you **must provide a valid `User-Agent` header** with each request - Requests without proper authentication will return a `401 Unauthorized` error ### Error Handling The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a `statusCode` attribute indicating the outcome of your request. ### Rate Limits The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a `429 Too Many Requests` status code. # noqa: E501 -The version of the OpenAPI document: 1.12.3 +The version of the OpenAPI document: 1.13.0 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 092b47b..521346d 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: - [PHP SDK](https://github.com/MONEI/monei-php-sdk) - [Python SDK](https://github.com/MONEI/monei-python-sdk) - [Node.js SDK](https://github.com/MONEI/monei-node-sdk) - [Postman Collection](https://postman.monei.com/) Our SDKs handle authentication, error handling, and request formatting automatically. You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the [OpenAPI Generator](https://openapi-generator.tech/). ### Important Requirements - All API requests must be made over HTTPS - If you are not using our official SDKs, you **must provide a valid `User-Agent` header** with each request - Requests without proper authentication will return a `401 Unauthorized` error ### Error Handling The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a `statusCode` attribute indicating the outcome of your request. ### Rate Limits The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a `429 Too Many Requests` status code. # noqa: E501 -The version of the OpenAPI document: 1.12.3 +The version of the OpenAPI document: 1.13.0 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 31d90fc..6a8513a 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: - [PHP SDK](https://github.com/MONEI/monei-php-sdk) - [Python SDK](https://github.com/MONEI/monei-python-sdk) - [Node.js SDK](https://github.com/MONEI/monei-node-sdk) - [Postman Collection](https://postman.monei.com/) Our SDKs handle authentication, error handling, and request formatting automatically. You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the [OpenAPI Generator](https://openapi-generator.tech/). ### Important Requirements - All API requests must be made over HTTPS - If you are not using our official SDKs, you **must provide a valid `User-Agent` header** with each request - Requests without proper authentication will return a `401 Unauthorized` error ### Error Handling The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a `statusCode` attribute indicating the outcome of your request. ### Rate Limits The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a `429 Too Many Requests` status code. # noqa: E501 -The version of the OpenAPI document: 1.12.3 +The version of the OpenAPI document: 1.13.0 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 ee02347..648d26a 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: - [PHP SDK](https://github.com/MONEI/monei-php-sdk) - [Python SDK](https://github.com/MONEI/monei-python-sdk) - [Node.js SDK](https://github.com/MONEI/monei-node-sdk) - [Postman Collection](https://postman.monei.com/) Our SDKs handle authentication, error handling, and request formatting automatically. You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the [OpenAPI Generator](https://openapi-generator.tech/). ### Important Requirements - All API requests must be made over HTTPS - If you are not using our official SDKs, you **must provide a valid `User-Agent` header** with each request - Requests without proper authentication will return a `401 Unauthorized` error ### Error Handling The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a `statusCode` attribute indicating the outcome of your request. ### Rate Limits The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a `429 Too Many Requests` status code. # noqa: E501 -The version of the OpenAPI document: 1.12.3 +The version of the OpenAPI document: 1.13.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 index 617fb9d..928ee5e 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: - [PHP SDK](https://github.com/MONEI/monei-php-sdk) - [Python SDK](https://github.com/MONEI/monei-python-sdk) - [Node.js SDK](https://github.com/MONEI/monei-node-sdk) - [Postman Collection](https://postman.monei.com/) Our SDKs handle authentication, error handling, and request formatting automatically. You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the [OpenAPI Generator](https://openapi-generator.tech/). ### Important Requirements - All API requests must be made over HTTPS - If you are not using our official SDKs, you **must provide a valid `User-Agent` header** with each request - Requests without proper authentication will return a `401 Unauthorized` error ### Error Handling The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a `statusCode` attribute indicating the outcome of your request. ### Rate Limits The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a `429 Too Many Requests` status code. # noqa: E501 -The version of the OpenAPI document: 1.12.3 +The version of the OpenAPI document: 1.13.0 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 76f3532..e5204d0 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: - [PHP SDK](https://github.com/MONEI/monei-php-sdk) - [Python SDK](https://github.com/MONEI/monei-python-sdk) - [Node.js SDK](https://github.com/MONEI/monei-node-sdk) - [Postman Collection](https://postman.monei.com/) Our SDKs handle authentication, error handling, and request formatting automatically. You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the [OpenAPI Generator](https://openapi-generator.tech/). ### Important Requirements - All API requests must be made over HTTPS - If you are not using our official SDKs, you **must provide a valid `User-Agent` header** with each request - Requests without proper authentication will return a `401 Unauthorized` error ### Error Handling The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a `statusCode` attribute indicating the outcome of your request. ### Rate Limits The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a `429 Too Many Requests` status code. # noqa: E501 -The version of the OpenAPI document: 1.12.3 +The version of the OpenAPI document: 1.13.0 Generated by: https://openapi-generator.tech """ diff --git a/Monei/model/payment_payment_methods.py b/Monei/model/payment_payment_methods.py index 2bab413..76d856c 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: - [PHP SDK](https://github.com/MONEI/monei-php-sdk) - [Python SDK](https://github.com/MONEI/monei-python-sdk) - [Node.js SDK](https://github.com/MONEI/monei-node-sdk) - [Postman Collection](https://postman.monei.com/) Our SDKs handle authentication, error handling, and request formatting automatically. You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the [OpenAPI Generator](https://openapi-generator.tech/). ### Important Requirements - All API requests must be made over HTTPS - If you are not using our official SDKs, you **must provide a valid `User-Agent` header** with each request - Requests without proper authentication will return a `401 Unauthorized` error ### Error Handling The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a `statusCode` attribute indicating the outcome of your request. ### Rate Limits The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a `429 Too Many Requests` status code. # noqa: E501 -The version of the OpenAPI document: 1.12.3 +The version of the OpenAPI document: 1.13.0 Generated by: https://openapi-generator.tech """ diff --git a/Monei/model/payment_refund_reason.py b/Monei/model/payment_refund_reason.py index fc1b5ff..eb50ac4 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: - [PHP SDK](https://github.com/MONEI/monei-php-sdk) - [Python SDK](https://github.com/MONEI/monei-python-sdk) - [Node.js SDK](https://github.com/MONEI/monei-node-sdk) - [Postman Collection](https://postman.monei.com/) Our SDKs handle authentication, error handling, and request formatting automatically. You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the [OpenAPI Generator](https://openapi-generator.tech/). ### Important Requirements - All API requests must be made over HTTPS - If you are not using our official SDKs, you **must provide a valid `User-Agent` header** with each request - Requests without proper authentication will return a `401 Unauthorized` error ### Error Handling The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a `statusCode` attribute indicating the outcome of your request. ### Rate Limits The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a `429 Too Many Requests` status code. # noqa: E501 -The version of the OpenAPI document: 1.12.3 +The version of the OpenAPI document: 1.13.0 Generated by: https://openapi-generator.tech """ diff --git a/Monei/model/payment_sequence.py b/Monei/model/payment_sequence.py index 3341fa8..53eaa9c 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: - [PHP SDK](https://github.com/MONEI/monei-php-sdk) - [Python SDK](https://github.com/MONEI/monei-python-sdk) - [Node.js SDK](https://github.com/MONEI/monei-node-sdk) - [Postman Collection](https://postman.monei.com/) Our SDKs handle authentication, error handling, and request formatting automatically. You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the [OpenAPI Generator](https://openapi-generator.tech/). ### Important Requirements - All API requests must be made over HTTPS - If you are not using our official SDKs, you **must provide a valid `User-Agent` header** with each request - Requests without proper authentication will return a `401 Unauthorized` error ### Error Handling The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a `statusCode` attribute indicating the outcome of your request. ### Rate Limits The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a `429 Too Many Requests` status code. # noqa: E501 -The version of the OpenAPI document: 1.12.3 +The version of the OpenAPI document: 1.13.0 Generated by: https://openapi-generator.tech """ diff --git a/Monei/model/payment_sequence_recurring.py b/Monei/model/payment_sequence_recurring.py index f1fd47e..49721aa 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: - [PHP SDK](https://github.com/MONEI/monei-php-sdk) - [Python SDK](https://github.com/MONEI/monei-python-sdk) - [Node.js SDK](https://github.com/MONEI/monei-node-sdk) - [Postman Collection](https://postman.monei.com/) Our SDKs handle authentication, error handling, and request formatting automatically. You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the [OpenAPI Generator](https://openapi-generator.tech/). ### Important Requirements - All API requests must be made over HTTPS - If you are not using our official SDKs, you **must provide a valid `User-Agent` header** with each request - Requests without proper authentication will return a `401 Unauthorized` error ### Error Handling The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a `statusCode` attribute indicating the outcome of your request. ### Rate Limits The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a `429 Too Many Requests` status code. # noqa: E501 -The version of the OpenAPI document: 1.12.3 +The version of the OpenAPI document: 1.13.0 Generated by: https://openapi-generator.tech """ diff --git a/Monei/model/payment_session_details.py b/Monei/model/payment_session_details.py index 162d3ee..1778f5d 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: - [PHP SDK](https://github.com/MONEI/monei-php-sdk) - [Python SDK](https://github.com/MONEI/monei-python-sdk) - [Node.js SDK](https://github.com/MONEI/monei-node-sdk) - [Postman Collection](https://postman.monei.com/) Our SDKs handle authentication, error handling, and request formatting automatically. You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the [OpenAPI Generator](https://openapi-generator.tech/). ### Important Requirements - All API requests must be made over HTTPS - If you are not using our official SDKs, you **must provide a valid `User-Agent` header** with each request - Requests without proper authentication will return a `401 Unauthorized` error ### Error Handling The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a `statusCode` attribute indicating the outcome of your request. ### Rate Limits The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a `429 Too Many Requests` status code. # noqa: E501 -The version of the OpenAPI document: 1.12.3 +The version of the OpenAPI document: 1.13.0 Generated by: https://openapi-generator.tech """ diff --git a/Monei/model/payment_shipping_details.py b/Monei/model/payment_shipping_details.py index 264825e..2478920 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: - [PHP SDK](https://github.com/MONEI/monei-php-sdk) - [Python SDK](https://github.com/MONEI/monei-python-sdk) - [Node.js SDK](https://github.com/MONEI/monei-node-sdk) - [Postman Collection](https://postman.monei.com/) Our SDKs handle authentication, error handling, and request formatting automatically. You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the [OpenAPI Generator](https://openapi-generator.tech/). ### Important Requirements - All API requests must be made over HTTPS - If you are not using our official SDKs, you **must provide a valid `User-Agent` header** with each request - Requests without proper authentication will return a `401 Unauthorized` error ### Error Handling The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a `statusCode` attribute indicating the outcome of your request. ### Rate Limits The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a `429 Too Many Requests` status code. # noqa: E501 -The version of the OpenAPI document: 1.12.3 +The version of the OpenAPI document: 1.13.0 Generated by: https://openapi-generator.tech """ diff --git a/Monei/model/payment_shop.py b/Monei/model/payment_shop.py index 9c3d84b..9b1e2f4 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: - [PHP SDK](https://github.com/MONEI/monei-php-sdk) - [Python SDK](https://github.com/MONEI/monei-python-sdk) - [Node.js SDK](https://github.com/MONEI/monei-node-sdk) - [Postman Collection](https://postman.monei.com/) Our SDKs handle authentication, error handling, and request formatting automatically. You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the [OpenAPI Generator](https://openapi-generator.tech/). ### Important Requirements - All API requests must be made over HTTPS - If you are not using our official SDKs, you **must provide a valid `User-Agent` header** with each request - Requests without proper authentication will return a `401 Unauthorized` error ### Error Handling The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a `statusCode` attribute indicating the outcome of your request. ### Rate Limits The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a `429 Too Many Requests` status code. # noqa: E501 -The version of the OpenAPI document: 1.12.3 +The version of the OpenAPI document: 1.13.0 Generated by: https://openapi-generator.tech """ diff --git a/Monei/model/payment_status.py b/Monei/model/payment_status.py index d9c6a23..9cfb4d7 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: - [PHP SDK](https://github.com/MONEI/monei-php-sdk) - [Python SDK](https://github.com/MONEI/monei-python-sdk) - [Node.js SDK](https://github.com/MONEI/monei-node-sdk) - [Postman Collection](https://postman.monei.com/) Our SDKs handle authentication, error handling, and request formatting automatically. You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the [OpenAPI Generator](https://openapi-generator.tech/). ### Important Requirements - All API requests must be made over HTTPS - If you are not using our official SDKs, you **must provide a valid `User-Agent` header** with each request - Requests without proper authentication will return a `401 Unauthorized` error ### Error Handling The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a `statusCode` attribute indicating the outcome of your request. ### Rate Limits The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a `429 Too Many Requests` status code. # noqa: E501 -The version of the OpenAPI document: 1.12.3 +The version of the OpenAPI document: 1.13.0 Generated by: https://openapi-generator.tech """ diff --git a/Monei/model/payment_trace_details.py b/Monei/model/payment_trace_details.py index e438a68..09aac7b 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: - [PHP SDK](https://github.com/MONEI/monei-php-sdk) - [Python SDK](https://github.com/MONEI/monei-python-sdk) - [Node.js SDK](https://github.com/MONEI/monei-node-sdk) - [Postman Collection](https://postman.monei.com/) Our SDKs handle authentication, error handling, and request formatting automatically. You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the [OpenAPI Generator](https://openapi-generator.tech/). ### Important Requirements - All API requests must be made over HTTPS - If you are not using our official SDKs, you **must provide a valid `User-Agent` header** with each request - Requests without proper authentication will return a `401 Unauthorized` error ### Error Handling The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a `statusCode` attribute indicating the outcome of your request. ### Rate Limits The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a `429 Too Many Requests` status code. # noqa: E501 -The version of the OpenAPI document: 1.12.3 +The version of the OpenAPI document: 1.13.0 Generated by: https://openapi-generator.tech """ diff --git a/Monei/model/payment_transaction_type.py b/Monei/model/payment_transaction_type.py index 5d7449c..36b70c0 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: - [PHP SDK](https://github.com/MONEI/monei-php-sdk) - [Python SDK](https://github.com/MONEI/monei-python-sdk) - [Node.js SDK](https://github.com/MONEI/monei-node-sdk) - [Postman Collection](https://postman.monei.com/) Our SDKs handle authentication, error handling, and request formatting automatically. You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the [OpenAPI Generator](https://openapi-generator.tech/). ### Important Requirements - All API requests must be made over HTTPS - If you are not using our official SDKs, you **must provide a valid `User-Agent` header** with each request - Requests without proper authentication will return a `401 Unauthorized` error ### Error Handling The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a `statusCode` attribute indicating the outcome of your request. ### Rate Limits The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a `429 Too Many Requests` status code. # noqa: E501 -The version of the OpenAPI document: 1.12.3 +The version of the OpenAPI document: 1.13.0 Generated by: https://openapi-generator.tech """ diff --git a/Monei/model/pos_auth_token_create200_response.py b/Monei/model/pos_auth_token_create200_response.py index dc46eb1..ef3a7d4 100644 --- a/Monei/model/pos_auth_token_create200_response.py +++ b/Monei/model/pos_auth_token_create200_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: - [PHP SDK](https://github.com/MONEI/monei-php-sdk) - [Python SDK](https://github.com/MONEI/monei-python-sdk) - [Node.js SDK](https://github.com/MONEI/monei-node-sdk) - [Postman Collection](https://postman.monei.com/) Our SDKs handle authentication, error handling, and request formatting automatically. You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the [OpenAPI Generator](https://openapi-generator.tech/). ### Important Requirements - All API requests must be made over HTTPS - If you are not using our official SDKs, you **must provide a valid `User-Agent` header** with each request - Requests without proper authentication will return a `401 Unauthorized` error ### Error Handling The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a `statusCode` attribute indicating the outcome of your request. ### Rate Limits The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a `429 Too Many Requests` status code. # noqa: E501 -The version of the OpenAPI document: 1.12.3 +The version of the OpenAPI document: 1.13.0 Generated by: https://openapi-generator.tech """ diff --git a/Monei/model/preview_subscription_update_request.py b/Monei/model/preview_subscription_update_request.py index 4e87ac5..9f5f34c 100644 --- a/Monei/model/preview_subscription_update_request.py +++ b/Monei/model/preview_subscription_update_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: - [PHP SDK](https://github.com/MONEI/monei-php-sdk) - [Python SDK](https://github.com/MONEI/monei-python-sdk) - [Node.js SDK](https://github.com/MONEI/monei-node-sdk) - [Postman Collection](https://postman.monei.com/) Our SDKs handle authentication, error handling, and request formatting automatically. You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the [OpenAPI Generator](https://openapi-generator.tech/). ### Important Requirements - All API requests must be made over HTTPS - If you are not using our official SDKs, you **must provide a valid `User-Agent` header** with each request - Requests without proper authentication will return a `401 Unauthorized` error ### Error Handling The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a `statusCode` attribute indicating the outcome of your request. ### Rate Limits The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a `429 Too Many Requests` status code. # noqa: E501 -The version of the OpenAPI document: 1.12.3 +The version of the OpenAPI document: 1.13.0 Generated by: https://openapi-generator.tech """ @@ -95,6 +95,7 @@ def openapi_types(): """ lazy_import() return { + "price_id": (str,), # noqa: E501 "amount": (int,), # noqa: E501 "interval": (SubscriptionInterval,), # noqa: E501 "interval_count": (int,), # noqa: E501 @@ -106,6 +107,7 @@ def discriminator(): return None attribute_map = { + "price_id": "priceId", # noqa: E501 "amount": "amount", # noqa: E501 "interval": "interval", # noqa: E501 "interval_count": "intervalCount", # noqa: E501 @@ -152,6 +154,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,) + price_id (str): The [price](https://docs.monei.com/apis/rest/prices-create/) the subscription bills. The subscription copies the price's values when it is created or switched to the price. A later change to the price never changes 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 interval (SubscriptionInterval): [optional] # noqa: E501 interval_count (int): Number of intervals between subscription payments.. [optional] # noqa: E501 @@ -246,6 +249,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,) + price_id (str): The [price](https://docs.monei.com/apis/rest/prices-create/) the subscription bills. The subscription copies the price's values when it is created or switched to the price. A later change to the price never changes 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 interval (SubscriptionInterval): [optional] # noqa: E501 interval_count (int): Number of intervals between subscription payments.. [optional] # noqa: E501 diff --git a/Monei/model/price.py b/Monei/model/price.py new file mode 100644 index 0000000..8f95209 --- /dev/null +++ b/Monei/model/price.py @@ -0,0 +1,359 @@ +""" +MONEI API v1 + +The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly. ### Base URL All API requests should be made to: ``` https://api.monei.com/v1 ``` ### Environment MONEI provides two environments: - **Test Environment**: For development and testing without processing real payments - **Live Environment**: For processing real transactions in production ### Client Libraries We provide official SDKs to simplify integration: - [PHP SDK](https://github.com/MONEI/monei-php-sdk) - [Python SDK](https://github.com/MONEI/monei-python-sdk) - [Node.js SDK](https://github.com/MONEI/monei-node-sdk) - [Postman Collection](https://postman.monei.com/) Our SDKs handle authentication, error handling, and request formatting automatically. You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the [OpenAPI Generator](https://openapi-generator.tech/). ### Important Requirements - All API requests must be made over HTTPS - If you are not using our official SDKs, you **must provide a valid `User-Agent` header** with each request - Requests without proper authentication will return a `401 Unauthorized` error ### Error Handling The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a `statusCode` attribute indicating the outcome of your request. ### Rate Limits The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a `429 Too Many Requests` status code. # noqa: E501 + +The version of the OpenAPI document: 1.13.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.price_nickname import PriceNickname + from Monei.model.price_recurring import PriceRecurring + from Monei.model.price_unit_amount import PriceUnitAmount + + globals()["PriceNickname"] = PriceNickname + globals()["PriceRecurring"] = PriceRecurring + globals()["PriceUnitAmount"] = PriceUnitAmount + + +class Price(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 + "product_id": (str,), # noqa: E501 + "currency": (str,), # noqa: E501 + "unit_amount": (PriceUnitAmount,), # noqa: E501 + "type": (str,), # noqa: E501 + "active": (bool,), # noqa: E501 + "created_at": (int,), # noqa: E501 + "recurring": (PriceRecurring,), # noqa: E501 + "tax_behavior": (str,), # noqa: E501 + "nickname": (PriceNickname,), # noqa: E501 + "metadata": ( + {str: (bool, date, datetime, dict, float, int, list, str, none_type)}, + ), # noqa: E501 + "updated_at": (int,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + attribute_map = { + "id": "id", # noqa: E501 + "product_id": "productId", # noqa: E501 + "currency": "currency", # noqa: E501 + "unit_amount": "unitAmount", # noqa: E501 + "type": "type", # noqa: E501 + "active": "active", # noqa: E501 + "created_at": "createdAt", # noqa: E501 + "recurring": "recurring", # noqa: E501 + "tax_behavior": "taxBehavior", # noqa: E501 + "nickname": "nickname", # noqa: E501 + "metadata": "metadata", # noqa: E501 + "updated_at": "updatedAt", # noqa: E501 + } + + read_only_vars = {} + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data( + cls, id, product_id, currency, unit_amount, active, created_at, *args, **kwargs + ): # noqa: E501 + """Price - a model defined in OpenAPI + + Args: + id (str): Unique identifier for the price. + product_id (str): The [product](https://docs.monei.com/apis/rest/products-create/) of the price. It cannot change after the price is created. + currency (str): Three-letter [ISO currency code](https://en.wikipedia.org/wiki/ISO_4217), in uppercase. Must be a supported currency. + unit_amount (PriceUnitAmount): + active (bool): Whether the price is active. An inactive price cannot start a subscription, and a subscription cannot switch to it. Prices are never deleted: set `active` to `false` to archive one. Subscriptions that already use it keep their copy of its values. A new price is active unless created with `active: false`. + created_at (int): Time at which the resource was created. Measured in seconds since the Unix epoch. + + Keyword Args: + type (str): How the price bills: `RECURRING` (the default) or `ONE_TIME`. Only a `RECURRING` price can start or switch a subscription. Treat the set as open: more values can be added later. . defaults to "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 (PriceRecurring): [optional] # noqa: E501 + tax_behavior (str): How the tax of the product's tax rate applies to `unitAmount`: - `INCLUSIVE`: `unitAmount` holds the tax. - `EXCLUSIVE`: the tax is added to `unitAmount`. No value means `INCLUSIVE`. Treat the set as open: more values can be added later. . [optional] # noqa: E501 + nickname (PriceNickname): [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 + updated_at (int): Time at which the resource updated last time. Measured in seconds since the Unix epoch.. [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.id = id + self.product_id = product_id + self.currency = currency + self.unit_amount = unit_amount + self.type = type + self.active = active + self.created_at = created_at + for var_name, var_value in kwargs.items(): + if ( + var_name not in self.attribute_map + and self._configuration is 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, id, product_id, currency, unit_amount, active, created_at, *args, **kwargs + ): # noqa: E501 + """Price - a model defined in OpenAPI + + Args: + id (str): Unique identifier for the price. + product_id (str): The [product](https://docs.monei.com/apis/rest/products-create/) of the price. It cannot change after the price is created. + currency (str): Three-letter [ISO currency code](https://en.wikipedia.org/wiki/ISO_4217), in uppercase. Must be a supported currency. + unit_amount (PriceUnitAmount): + active (bool): Whether the price is active. An inactive price cannot start a subscription, and a subscription cannot switch to it. Prices are never deleted: set `active` to `false` to archive one. Subscriptions that already use it keep their copy of its values. A new price is active unless created with `active: false`. + created_at (int): Time at which the resource was created. Measured in seconds since the Unix epoch. + + Keyword Args: + type (str): How the price bills: `RECURRING` (the default) or `ONE_TIME`. Only a `RECURRING` price can start or switch a subscription. Treat the set as open: more values can be added later. . defaults to "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 (PriceRecurring): [optional] # noqa: E501 + tax_behavior (str): How the tax of the product's tax rate applies to `unitAmount`: - `INCLUSIVE`: `unitAmount` holds the tax. - `EXCLUSIVE`: the tax is added to `unitAmount`. No value means `INCLUSIVE`. Treat the set as open: more values can be added later. . [optional] # noqa: E501 + nickname (PriceNickname): [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 + updated_at (int): Time at which the resource updated last time. Measured in seconds since the Unix epoch.. [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.id = id + self.product_id = product_id + self.currency = currency + self.unit_amount = unit_amount + self.type = type + self.active = active + self.created_at = created_at + for var_name, var_value in kwargs.items(): + if ( + var_name not in self.attribute_map + and self._configuration is 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/price_interval.py b/Monei/model/price_interval.py new file mode 100644 index 0000000..c2a38b4 --- /dev/null +++ b/Monei/model/price_interval.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: - [PHP SDK](https://github.com/MONEI/monei-php-sdk) - [Python SDK](https://github.com/MONEI/monei-python-sdk) - [Node.js SDK](https://github.com/MONEI/monei-node-sdk) - [Postman Collection](https://postman.monei.com/) Our SDKs handle authentication, error handling, and request formatting automatically. You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the [OpenAPI Generator](https://openapi-generator.tech/). ### Important Requirements - All API requests must be made over HTTPS - If you are not using our official SDKs, you **must provide a valid `User-Agent` header** with each request - Requests without proper authentication will return a `401 Unauthorized` error ### Error Handling The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a `statusCode` attribute indicating the outcome of your request. ### Rate Limits The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a `429 Too Many Requests` status code. # noqa: E501 + +The version of the OpenAPI document: 1.13.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 PriceInterval(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",): { + "MINUTE": "minute", + "HOUR": "hour", + "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): + """PriceInterval - 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 unit of the billing period. `minute` and `hour` are accepted in test mode only.., must be one of ["minute", "hour", "day", "week", "month", "year", ] # noqa: E501 + + Keyword Args: + value (str): The unit of the billing period. `minute` and `hour` are accepted in test mode only.., must be one of ["minute", "hour", "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): + """PriceInterval - 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 unit of the billing period. `minute` and `hour` are accepted in test mode only.., must be one of ["minute", "hour", "day", "week", "month", "year", ] # noqa: E501 + + Keyword Args: + value (str): The unit of the billing period. `minute` and `hour` are accepted in test mode only.., must be one of ["minute", "hour", "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/price_interval_count.py b/Monei/model/price_interval_count.py new file mode 100644 index 0000000..962d075 --- /dev/null +++ b/Monei/model/price_interval_count.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: - [PHP SDK](https://github.com/MONEI/monei-php-sdk) - [Python SDK](https://github.com/MONEI/monei-python-sdk) - [Node.js SDK](https://github.com/MONEI/monei-node-sdk) - [Postman Collection](https://postman.monei.com/) Our SDKs handle authentication, error handling, and request formatting automatically. You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the [OpenAPI Generator](https://openapi-generator.tech/). ### Important Requirements - All API requests must be made over HTTPS - If you are not using our official SDKs, you **must provide a valid `User-Agent` header** with each request - Requests without proper authentication will return a `401 Unauthorized` error ### Error Handling The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a `statusCode` attribute indicating the outcome of your request. ### Rate Limits The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a `429 Too Many Requests` status code. # noqa: E501 + +The version of the OpenAPI document: 1.13.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 PriceIntervalCount(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 = { + ("value",): { + "inclusive_minimum": 1, + }, + } + + 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": (int,), + } + + @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): + """PriceIntervalCount - a model defined in OpenAPI + + Note that value can be passed either in args or in kwargs, but not in both. + + Args: + args[0] (int): Number of intervals between payments. The billing period cannot be longer than one year. . # noqa: E501 + + Keyword Args: + value (int): Number of intervals between payments. The billing period cannot be longer than one 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): + """PriceIntervalCount - a model defined in OpenAPI + + Note that value can be passed either in args or in kwargs, but not in both. + + Args: + args[0] (int): Number of intervals between payments. The billing period cannot be longer than one year. . # noqa: E501 + + Keyword Args: + value (int): Number of intervals between payments. The billing period cannot be longer than one 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/price_list.py b/Monei/model/price_list.py new file mode 100644 index 0000000..b4fd34a --- /dev/null +++ b/Monei/model/price_list.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: - [PHP SDK](https://github.com/MONEI/monei-php-sdk) - [Python SDK](https://github.com/MONEI/monei-python-sdk) - [Node.js SDK](https://github.com/MONEI/monei-node-sdk) - [Postman Collection](https://postman.monei.com/) Our SDKs handle authentication, error handling, and request formatting automatically. You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the [OpenAPI Generator](https://openapi-generator.tech/). ### Important Requirements - All API requests must be made over HTTPS - If you are not using our official SDKs, you **must provide a valid `User-Agent` header** with each request - Requests without proper authentication will return a `401 Unauthorized` error ### Error Handling The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a `statusCode` attribute indicating the outcome of your request. ### Rate Limits The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a `429 Too Many Requests` status code. # noqa: E501 + +The version of the OpenAPI document: 1.13.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.price import Price + + globals()["Price"] = Price + + +class PriceList(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 { + "items": ([Price],), # noqa: E501 + "next_cursor": (str,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + attribute_map = { + "items": "items", # noqa: E501 + "next_cursor": "nextCursor", # noqa: E501 + } + + read_only_vars = {} + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, items, *args, **kwargs): # noqa: E501 + """PriceList - a model defined in OpenAPI + + Args: + items ([Price]): The prices in this page, newest first. + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + next_cursor (str): Pass this value as `cursor` to get the next page. Absent when there are no more items. The last page can still carry it, and the next call then returns no items. . [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.items = items + for var_name, var_value in kwargs.items(): + if ( + var_name not in self.attribute_map + and self._configuration is not None + and 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, items, *args, **kwargs): # noqa: E501 + """PriceList - a model defined in OpenAPI + + Args: + items ([Price]): The prices in this page, newest first. + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + next_cursor (str): Pass this value as `cursor` to get the next page. Absent when there are no more items. The last page can still carry it, and the next call then returns no items. . [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.items = items + for var_name, var_value in kwargs.items(): + if ( + var_name not in self.attribute_map + and self._configuration is not None + and 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/price_nickname.py b/Monei/model/price_nickname.py new file mode 100644 index 0000000..305381c --- /dev/null +++ b/Monei/model/price_nickname.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: - [PHP SDK](https://github.com/MONEI/monei-php-sdk) - [Python SDK](https://github.com/MONEI/monei-python-sdk) - [Node.js SDK](https://github.com/MONEI/monei-node-sdk) - [Postman Collection](https://postman.monei.com/) Our SDKs handle authentication, error handling, and request formatting automatically. You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the [OpenAPI Generator](https://openapi-generator.tech/). ### Important Requirements - All API requests must be made over HTTPS - If you are not using our official SDKs, you **must provide a valid `User-Agent` header** with each request - Requests without proper authentication will return a `401 Unauthorized` error ### Error Handling The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a `statusCode` attribute indicating the outcome of your request. ### Rate Limits The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a `429 Too Many Requests` status code. # noqa: E501 + +The version of the OpenAPI document: 1.13.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 PriceNickname(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 = { + ("value",): { + "max_length": 100, + }, + } + + 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): + """PriceNickname - 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 internal label of the price. Buyers never see it.. # noqa: E501 + + Keyword Args: + value (str): An internal label of the price. Buyers never see it.. # 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): + """PriceNickname - 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 internal label of the price. Buyers never see it.. # noqa: E501 + + Keyword Args: + value (str): An internal label of the price. Buyers never see it.. # 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/price_recurring.py b/Monei/model/price_recurring.py new file mode 100644 index 0000000..ccf4365 --- /dev/null +++ b/Monei/model/price_recurring.py @@ -0,0 +1,307 @@ +""" +MONEI API v1 + +The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly. ### Base URL All API requests should be made to: ``` https://api.monei.com/v1 ``` ### Environment MONEI provides two environments: - **Test Environment**: For development and testing without processing real payments - **Live Environment**: For processing real transactions in production ### Client Libraries We provide official SDKs to simplify integration: - [PHP SDK](https://github.com/MONEI/monei-php-sdk) - [Python SDK](https://github.com/MONEI/monei-python-sdk) - [Node.js SDK](https://github.com/MONEI/monei-node-sdk) - [Postman Collection](https://postman.monei.com/) Our SDKs handle authentication, error handling, and request formatting automatically. You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the [OpenAPI Generator](https://openapi-generator.tech/). ### Important Requirements - All API requests must be made over HTTPS - If you are not using our official SDKs, you **must provide a valid `User-Agent` header** with each request - Requests without proper authentication will return a `401 Unauthorized` error ### Error Handling The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a `statusCode` attribute indicating the outcome of your request. ### Rate Limits The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a `429 Too Many Requests` status code. # noqa: E501 + +The version of the OpenAPI document: 1.13.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.price_interval import PriceInterval + from Monei.model.price_interval_count import PriceIntervalCount + from Monei.model.price_trial_period_days import PriceTrialPeriodDays + + globals()["PriceInterval"] = PriceInterval + globals()["PriceIntervalCount"] = PriceIntervalCount + globals()["PriceTrialPeriodDays"] = PriceTrialPeriodDays + + +class PriceRecurring(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 { + "interval": (PriceInterval,), # noqa: E501 + "interval_count": (PriceIntervalCount,), # noqa: E501 + "trial_period_days": (PriceTrialPeriodDays,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + attribute_map = { + "interval": "interval", # noqa: E501 + "interval_count": "intervalCount", # noqa: E501 + "trial_period_days": "trialPeriodDays", # 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 + """PriceRecurring - a model defined in OpenAPI + + Args: + interval (PriceInterval): + interval_count (PriceIntervalCount): + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + trial_period_days (PriceTrialPeriodDays): [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.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 + """PriceRecurring - a model defined in OpenAPI + + Args: + interval (PriceInterval): + interval_count (PriceIntervalCount): + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + trial_period_days (PriceTrialPeriodDays): [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.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/price_trial_period_days.py b/Monei/model/price_trial_period_days.py new file mode 100644 index 0000000..43873e6 --- /dev/null +++ b/Monei/model/price_trial_period_days.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: - [PHP SDK](https://github.com/MONEI/monei-php-sdk) - [Python SDK](https://github.com/MONEI/monei-python-sdk) - [Node.js SDK](https://github.com/MONEI/monei-node-sdk) - [Postman Collection](https://postman.monei.com/) Our SDKs handle authentication, error handling, and request formatting automatically. You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the [OpenAPI Generator](https://openapi-generator.tech/). ### Important Requirements - All API requests must be made over HTTPS - If you are not using our official SDKs, you **must provide a valid `User-Agent` header** with each request - Requests without proper authentication will return a `401 Unauthorized` error ### Error Handling The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a `statusCode` attribute indicating the outcome of your request. ### Rate Limits The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a `429 Too Many Requests` status code. # noqa: E501 + +The version of the OpenAPI document: 1.13.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 PriceTrialPeriodDays(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 = { + ("value",): { + "inclusive_maximum": 1825, + "inclusive_minimum": 1, + }, + } + + 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": (int,), + } + + @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): + """PriceTrialPeriodDays - a model defined in OpenAPI + + Note that value can be passed either in args or in kwargs, but not in both. + + Args: + args[0] (int): Number of trial days of a subscription created from the price.. # noqa: E501 + + Keyword Args: + value (int): Number of trial days of a subscription created from the price.. # 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): + """PriceTrialPeriodDays - a model defined in OpenAPI + + Note that value can be passed either in args or in kwargs, but not in both. + + Args: + args[0] (int): Number of trial days of a subscription created from the price.. # noqa: E501 + + Keyword Args: + value (int): Number of trial days of a subscription created from the price.. # 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/price_unit_amount.py b/Monei/model/price_unit_amount.py new file mode 100644 index 0000000..04b463f --- /dev/null +++ b/Monei/model/price_unit_amount.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: - [PHP SDK](https://github.com/MONEI/monei-php-sdk) - [Python SDK](https://github.com/MONEI/monei-python-sdk) - [Node.js SDK](https://github.com/MONEI/monei-node-sdk) - [Postman Collection](https://postman.monei.com/) Our SDKs handle authentication, error handling, and request formatting automatically. You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the [OpenAPI Generator](https://openapi-generator.tech/). ### Important Requirements - All API requests must be made over HTTPS - If you are not using our official SDKs, you **must provide a valid `User-Agent` header** with each request - Requests without proper authentication will return a `401 Unauthorized` error ### Error Handling The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a `statusCode` attribute indicating the outcome of your request. ### Rate Limits The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a `429 Too Many Requests` status code. # noqa: E501 + +The version of the OpenAPI document: 1.13.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 PriceUnitAmount(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 = { + ("value",): { + "inclusive_minimum": 1, + }, + } + + 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": (int,), + } + + @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): + """PriceUnitAmount - a model defined in OpenAPI + + Note that value can be passed either in args or in kwargs, but not in both. + + Args: + args[0] (int): The amount of the price: for each billing period of a `RECURRING` price, once for a `ONE_TIME` price. A positive integer in the smallest currency unit (for example, 1990 cents to charge 19.90 EUR). Without tax for an `EXCLUSIVE` price. . # noqa: E501 + + Keyword Args: + value (int): The amount of the price: for each billing period of a `RECURRING` price, once for a `ONE_TIME` price. A positive integer in the smallest currency unit (for example, 1990 cents to charge 19.90 EUR). Without tax for an `EXCLUSIVE` price. . # 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): + """PriceUnitAmount - a model defined in OpenAPI + + Note that value can be passed either in args or in kwargs, but not in both. + + Args: + args[0] (int): The amount of the price: for each billing period of a `RECURRING` price, once for a `ONE_TIME` price. A positive integer in the smallest currency unit (for example, 1990 cents to charge 19.90 EUR). Without tax for an `EXCLUSIVE` price. . # noqa: E501 + + Keyword Args: + value (int): The amount of the price: for each billing period of a `RECURRING` price, once for a `ONE_TIME` price. A positive integer in the smallest currency unit (for example, 1990 cents to charge 19.90 EUR). Without tax for an `EXCLUSIVE` price. . # 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/product.py b/Monei/model/product.py new file mode 100644 index 0000000..cf45a09 --- /dev/null +++ b/Monei/model/product.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: - [PHP SDK](https://github.com/MONEI/monei-php-sdk) - [Python SDK](https://github.com/MONEI/monei-python-sdk) - [Node.js SDK](https://github.com/MONEI/monei-node-sdk) - [Postman Collection](https://postman.monei.com/) Our SDKs handle authentication, error handling, and request formatting automatically. You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the [OpenAPI Generator](https://openapi-generator.tech/). ### Important Requirements - All API requests must be made over HTTPS - If you are not using our official SDKs, you **must provide a valid `User-Agent` header** with each request - Requests without proper authentication will return a `401 Unauthorized` error ### Error Handling The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a `statusCode` attribute indicating the outcome of your request. ### Rate Limits The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a `429 Too Many Requests` status code. # noqa: E501 + +The version of the OpenAPI document: 1.13.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.product_description import ProductDescription + from Monei.model.product_descriptor import ProductDescriptor + from Monei.model.product_images import ProductImages + from Monei.model.product_name import ProductName + from Monei.model.product_slug import ProductSlug + from Monei.model.product_unit_label import ProductUnitLabel + + globals()["ProductDescription"] = ProductDescription + globals()["ProductDescriptor"] = ProductDescriptor + globals()["ProductImages"] = ProductImages + globals()["ProductName"] = ProductName + globals()["ProductSlug"] = ProductSlug + globals()["ProductUnitLabel"] = ProductUnitLabel + + +class Product(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 + "name": (ProductName,), # noqa: E501 + "active": (bool,), # noqa: E501 + "created_at": (int,), # noqa: E501 + "description": (ProductDescription,), # noqa: E501 + "images": (ProductImages,), # noqa: E501 + "slug": (ProductSlug,), # noqa: E501 + "shippable": (bool,), # noqa: E501 + "unit_label": (ProductUnitLabel,), # noqa: E501 + "descriptor": (ProductDescriptor,), # noqa: E501 + "default_price_id": (str,), # noqa: E501 + "tax_rate_id": (str,), # noqa: E501 + "metadata": ( + {str: (bool, date, datetime, dict, float, int, list, str, none_type)}, + ), # noqa: E501 + "updated_at": (int,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + attribute_map = { + "id": "id", # noqa: E501 + "name": "name", # noqa: E501 + "active": "active", # noqa: E501 + "created_at": "createdAt", # noqa: E501 + "description": "description", # noqa: E501 + "images": "images", # noqa: E501 + "slug": "slug", # noqa: E501 + "shippable": "shippable", # noqa: E501 + "unit_label": "unitLabel", # noqa: E501 + "descriptor": "descriptor", # noqa: E501 + "default_price_id": "defaultPriceId", # noqa: E501 + "tax_rate_id": "taxRateId", # noqa: E501 + "metadata": "metadata", # noqa: E501 + "updated_at": "updatedAt", # noqa: E501 + } + + read_only_vars = {} + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data( + cls, id, name, active, created_at, *args, **kwargs + ): # noqa: E501 + """Product - a model defined in OpenAPI + + Args: + id (str): Unique identifier for the product. + name (ProductName): + active (bool): Whether the product is active. Products are never deleted: set `active` to `false` to archive one. Archiving a product does not archive its prices, and its prices can still start subscriptions. A new product is active unless created with `active: false`. + created_at (int): Time at which the resource was created. Measured in seconds since the Unix epoch. + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + description (ProductDescription): [optional] # noqa: E501 + images (ProductImages): [optional] # noqa: E501 + slug (ProductSlug): [optional] # noqa: E501 + shippable (bool): Whether the product is shipped to the buyer.. [optional] # noqa: E501 + unit_label (ProductUnitLabel): [optional] # noqa: E501 + descriptor (ProductDescriptor): [optional] # noqa: E501 + default_price_id (str): The default [price](https://docs.monei.com/apis/rest/prices-create/) of the product. It is always a price of this product. You set it with [Update Product](https://docs.monei.com/apis/rest/products-update/), after you create the price. . [optional] # noqa: E501 + tax_rate_id (str): The [tax rate](https://docs.monei.com/apis/rest/tax-rates-create/) the prices of the product charge. Absent when the product has no tax. It must be an active tax rate of your account when you set it. A change of the tax rate changes the amount of the product's `EXCLUSIVE` prices for new subscriptions and price switches. Existing subscriptions keep their tax until they switch price. . [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 + 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__,) + + self.id = id + self.name = name + self.active = active + self.created_at = created_at + for var_name, var_value in kwargs.items(): + if ( + var_name not in self.attribute_map + and self._configuration is 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, id, name, active, created_at, *args, **kwargs): # noqa: E501 + """Product - a model defined in OpenAPI + + Args: + id (str): Unique identifier for the product. + name (ProductName): + active (bool): Whether the product is active. Products are never deleted: set `active` to `false` to archive one. Archiving a product does not archive its prices, and its prices can still start subscriptions. A new product is active unless created with `active: false`. + created_at (int): Time at which the resource was created. Measured in seconds since the Unix epoch. + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + description (ProductDescription): [optional] # noqa: E501 + images (ProductImages): [optional] # noqa: E501 + slug (ProductSlug): [optional] # noqa: E501 + shippable (bool): Whether the product is shipped to the buyer.. [optional] # noqa: E501 + unit_label (ProductUnitLabel): [optional] # noqa: E501 + descriptor (ProductDescriptor): [optional] # noqa: E501 + default_price_id (str): The default [price](https://docs.monei.com/apis/rest/prices-create/) of the product. It is always a price of this product. You set it with [Update Product](https://docs.monei.com/apis/rest/products-update/), after you create the price. . [optional] # noqa: E501 + tax_rate_id (str): The [tax rate](https://docs.monei.com/apis/rest/tax-rates-create/) the prices of the product charge. Absent when the product has no tax. It must be an active tax rate of your account when you set it. A change of the tax rate changes the amount of the product's `EXCLUSIVE` prices for new subscriptions and price switches. Existing subscriptions keep their tax until they switch price. . [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 + 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__,) + + self.id = id + self.name = name + self.active = active + self.created_at = created_at + for var_name, var_value in kwargs.items(): + if ( + var_name not in self.attribute_map + and self._configuration is 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/product_description.py b/Monei/model/product_description.py new file mode 100644 index 0000000..a4a30f0 --- /dev/null +++ b/Monei/model/product_description.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: - [PHP SDK](https://github.com/MONEI/monei-php-sdk) - [Python SDK](https://github.com/MONEI/monei-python-sdk) - [Node.js SDK](https://github.com/MONEI/monei-node-sdk) - [Postman Collection](https://postman.monei.com/) Our SDKs handle authentication, error handling, and request formatting automatically. You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the [OpenAPI Generator](https://openapi-generator.tech/). ### Important Requirements - All API requests must be made over HTTPS - If you are not using our official SDKs, you **must provide a valid `User-Agent` header** with each request - Requests without proper authentication will return a `401 Unauthorized` error ### Error Handling The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a `statusCode` attribute indicating the outcome of your request. ### Rate Limits The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a `429 Too Many Requests` status code. # noqa: E501 + +The version of the OpenAPI document: 1.13.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 ProductDescription(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 = { + ("value",): { + "max_length": 1000, + }, + } + + 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): + """ProductDescription - 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): A description of the product.. # noqa: E501 + + Keyword Args: + value (str): A description of the product.. # 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): + """ProductDescription - 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): A description of the product.. # noqa: E501 + + Keyword Args: + value (str): A description of the product.. # 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/product_descriptor.py b/Monei/model/product_descriptor.py new file mode 100644 index 0000000..79232d7 --- /dev/null +++ b/Monei/model/product_descriptor.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: - [PHP SDK](https://github.com/MONEI/monei-php-sdk) - [Python SDK](https://github.com/MONEI/monei-python-sdk) - [Node.js SDK](https://github.com/MONEI/monei-node-sdk) - [Postman Collection](https://postman.monei.com/) Our SDKs handle authentication, error handling, and request formatting automatically. You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the [OpenAPI Generator](https://openapi-generator.tech/). ### Important Requirements - All API requests must be made over HTTPS - If you are not using our official SDKs, you **must provide a valid `User-Agent` header** with each request - Requests without proper authentication will return a `401 Unauthorized` error ### Error Handling The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a `statusCode` attribute indicating the outcome of your request. ### Rate Limits The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a `429 Too Many Requests` status code. # noqa: E501 + +The version of the OpenAPI document: 1.13.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 ProductDescriptor(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 = { + ("value",): { + "max_length": 25, + }, + } + + 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): + """ProductDescriptor - 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): A statement descriptor stored on the product and returned in its responses. It is not applied to payments or subscriptions yet: set `descriptor` on the subscription instead. . # noqa: E501 + + Keyword Args: + value (str): A statement descriptor stored on the product and returned in its responses. It is not applied to payments or subscriptions yet: set `descriptor` on the subscription instead. . # 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): + """ProductDescriptor - 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): A statement descriptor stored on the product and returned in its responses. It is not applied to payments or subscriptions yet: set `descriptor` on the subscription instead. . # noqa: E501 + + Keyword Args: + value (str): A statement descriptor stored on the product and returned in its responses. It is not applied to payments or subscriptions yet: set `descriptor` on the subscription instead. . # 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/product_images.py b/Monei/model/product_images.py new file mode 100644 index 0000000..19c7eed --- /dev/null +++ b/Monei/model/product_images.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: - [PHP SDK](https://github.com/MONEI/monei-php-sdk) - [Python SDK](https://github.com/MONEI/monei-python-sdk) - [Node.js SDK](https://github.com/MONEI/monei-node-sdk) - [Postman Collection](https://postman.monei.com/) Our SDKs handle authentication, error handling, and request formatting automatically. You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the [OpenAPI Generator](https://openapi-generator.tech/). ### Important Requirements - All API requests must be made over HTTPS - If you are not using our official SDKs, you **must provide a valid `User-Agent` header** with each request - Requests without proper authentication will return a `401 Unauthorized` error ### Error Handling The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a `statusCode` attribute indicating the outcome of your request. ### Rate Limits The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a `429 Too Many Requests` status code. # noqa: E501 + +The version of the OpenAPI document: 1.13.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 ProductImages(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 = { + ("value",): { + "max_items": 8, + }, + } + + 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): + """ProductImages - 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]): Up to 8 image URLs of the product. Each URL must use `https`.. # noqa: E501 + + Keyword Args: + value ([str]): Up to 8 image URLs of the product. Each URL must use `https`.. # 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): + """ProductImages - 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]): Up to 8 image URLs of the product. Each URL must use `https`.. # noqa: E501 + + Keyword Args: + value ([str]): Up to 8 image URLs of the product. Each URL must use `https`.. # 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/product_list.py b/Monei/model/product_list.py new file mode 100644 index 0000000..b254892 --- /dev/null +++ b/Monei/model/product_list.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: - [PHP SDK](https://github.com/MONEI/monei-php-sdk) - [Python SDK](https://github.com/MONEI/monei-python-sdk) - [Node.js SDK](https://github.com/MONEI/monei-node-sdk) - [Postman Collection](https://postman.monei.com/) Our SDKs handle authentication, error handling, and request formatting automatically. You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the [OpenAPI Generator](https://openapi-generator.tech/). ### Important Requirements - All API requests must be made over HTTPS - If you are not using our official SDKs, you **must provide a valid `User-Agent` header** with each request - Requests without proper authentication will return a `401 Unauthorized` error ### Error Handling The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a `statusCode` attribute indicating the outcome of your request. ### Rate Limits The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a `429 Too Many Requests` status code. # noqa: E501 + +The version of the OpenAPI document: 1.13.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.product import Product + + globals()["Product"] = Product + + +class ProductList(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 { + "items": ([Product],), # noqa: E501 + "next_cursor": (str,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + attribute_map = { + "items": "items", # noqa: E501 + "next_cursor": "nextCursor", # noqa: E501 + } + + read_only_vars = {} + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, items, *args, **kwargs): # noqa: E501 + """ProductList - a model defined in OpenAPI + + Args: + items ([Product]): The products in this page, newest first. + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + next_cursor (str): Pass this value as `cursor` to get the next page. Absent when there are no more items. The last page can still carry it, and the next call then returns no items. . [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.items = items + for var_name, var_value in kwargs.items(): + if ( + var_name not in self.attribute_map + and self._configuration is not None + and 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, items, *args, **kwargs): # noqa: E501 + """ProductList - a model defined in OpenAPI + + Args: + items ([Product]): The products in this page, newest first. + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + next_cursor (str): Pass this value as `cursor` to get the next page. Absent when there are no more items. The last page can still carry it, and the next call then returns no items. . [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.items = items + for var_name, var_value in kwargs.items(): + if ( + var_name not in self.attribute_map + and self._configuration is not None + and 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/product_name.py b/Monei/model/product_name.py new file mode 100644 index 0000000..dd38dc3 --- /dev/null +++ b/Monei/model/product_name.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: - [PHP SDK](https://github.com/MONEI/monei-php-sdk) - [Python SDK](https://github.com/MONEI/monei-python-sdk) - [Node.js SDK](https://github.com/MONEI/monei-node-sdk) - [Postman Collection](https://postman.monei.com/) Our SDKs handle authentication, error handling, and request formatting automatically. You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the [OpenAPI Generator](https://openapi-generator.tech/). ### Important Requirements - All API requests must be made over HTTPS - If you are not using our official SDKs, you **must provide a valid `User-Agent` header** with each request - Requests without proper authentication will return a `401 Unauthorized` error ### Error Handling The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a `statusCode` attribute indicating the outcome of your request. ### Rate Limits The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a `429 Too Many Requests` status code. # noqa: E501 + +The version of the OpenAPI document: 1.13.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 ProductName(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 = { + ("value",): { + "max_length": 100, + "min_length": 1, + }, + } + + 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): + """ProductName - 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 name of the product.. # noqa: E501 + + Keyword Args: + value (str): The name of the product.. # 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): + """ProductName - 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 name of the product.. # noqa: E501 + + Keyword Args: + value (str): The name of the product.. # 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/product_slug.py b/Monei/model/product_slug.py new file mode 100644 index 0000000..9c32756 --- /dev/null +++ b/Monei/model/product_slug.py @@ -0,0 +1,294 @@ +""" +MONEI API v1 + +The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly. ### Base URL All API requests should be made to: ``` https://api.monei.com/v1 ``` ### Environment MONEI provides two environments: - **Test Environment**: For development and testing without processing real payments - **Live Environment**: For processing real transactions in production ### Client Libraries We provide official SDKs to simplify integration: - [PHP SDK](https://github.com/MONEI/monei-php-sdk) - [Python SDK](https://github.com/MONEI/monei-python-sdk) - [Node.js SDK](https://github.com/MONEI/monei-node-sdk) - [Postman Collection](https://postman.monei.com/) Our SDKs handle authentication, error handling, and request formatting automatically. You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the [OpenAPI Generator](https://openapi-generator.tech/). ### Important Requirements - All API requests must be made over HTTPS - If you are not using our official SDKs, you **must provide a valid `User-Agent` header** with each request - Requests without proper authentication will return a `401 Unauthorized` error ### Error Handling The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a `statusCode` attribute indicating the outcome of your request. ### Rate Limits The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a `429 Too Many Requests` status code. # noqa: E501 + +The version of the OpenAPI document: 1.13.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 ProductSlug(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 = { + ("value",): { + "max_length": 100, + "regex": { + "pattern": r"", # noqa: E501 + }, + }, + } + + 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): + """ProductSlug - 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): A short name of the product: lowercase letters and digits, joined by single hyphens. A slug is unique in your account. A request that sets a slug another product already has is rejected with `409`. An archived product keeps its slug until you remove it. . # noqa: E501 + + Keyword Args: + value (str): A short name of the product: lowercase letters and digits, joined by single hyphens. A slug is unique in your account. A request that sets a slug another product already has is rejected with `409`. An archived product keeps its slug until you remove it. . # 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): + """ProductSlug - 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): A short name of the product: lowercase letters and digits, joined by single hyphens. A slug is unique in your account. A request that sets a slug another product already has is rejected with `409`. An archived product keeps its slug until you remove it. . # noqa: E501 + + Keyword Args: + value (str): A short name of the product: lowercase letters and digits, joined by single hyphens. A slug is unique in your account. A request that sets a slug another product already has is rejected with `409`. An archived product keeps its slug until you remove it. . # 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/product_unit_label.py b/Monei/model/product_unit_label.py new file mode 100644 index 0000000..0e36a85 --- /dev/null +++ b/Monei/model/product_unit_label.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: - [PHP SDK](https://github.com/MONEI/monei-php-sdk) - [Python SDK](https://github.com/MONEI/monei-python-sdk) - [Node.js SDK](https://github.com/MONEI/monei-node-sdk) - [Postman Collection](https://postman.monei.com/) Our SDKs handle authentication, error handling, and request formatting automatically. You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the [OpenAPI Generator](https://openapi-generator.tech/). ### Important Requirements - All API requests must be made over HTTPS - If you are not using our official SDKs, you **must provide a valid `User-Agent` header** with each request - Requests without proper authentication will return a `401 Unauthorized` error ### Error Handling The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a `statusCode` attribute indicating the outcome of your request. ### Rate Limits The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a `429 Too Many Requests` status code. # noqa: E501 + +The version of the OpenAPI document: 1.13.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 ProductUnitLabel(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 = { + ("value",): { + "max_length": 12, + }, + } + + 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): + """ProductUnitLabel - 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 name of one unit of the product, for example `seat` or `hour`.. # noqa: E501 + + Keyword Args: + value (str): The name of one unit of the product, for example `seat` or `hour`.. # 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): + """ProductUnitLabel - 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 name of one unit of the product, for example `seat` or `hour`.. # noqa: E501 + + Keyword Args: + value (str): The name of one unit of the product, for example `seat` or `hour`.. # 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/recurring_payment_request.py b/Monei/model/recurring_payment_request.py index 9e754d8..2b75ed9 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: - [PHP SDK](https://github.com/MONEI/monei-php-sdk) - [Python SDK](https://github.com/MONEI/monei-python-sdk) - [Node.js SDK](https://github.com/MONEI/monei-node-sdk) - [Postman Collection](https://postman.monei.com/) Our SDKs handle authentication, error handling, and request formatting automatically. You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the [OpenAPI Generator](https://openapi-generator.tech/). ### Important Requirements - All API requests must be made over HTTPS - If you are not using our official SDKs, you **must provide a valid `User-Agent` header** with each request - Requests without proper authentication will return a `401 Unauthorized` error ### Error Handling The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a `statusCode` attribute indicating the outcome of your request. ### Rate Limits The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a `429 Too Many Requests` status code. # noqa: E501 -The version of the OpenAPI document: 1.12.3 +The version of the OpenAPI document: 1.13.0 Generated by: https://openapi-generator.tech """ @@ -160,7 +160,7 @@ 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. + order_id (str): An order ID from your system. A unique identifier that can be used to reconcile the payment with your internal system. Up to 40 characters: ASCII letters, digits and `_ @ . / # & + -` (no spaces). Keyword Args: _check_type (bool): if True, values for parameters in openapi_types @@ -262,7 +262,7 @@ 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. + order_id (str): An order ID from your system. A unique identifier that can be used to reconcile the payment with your internal system. Up to 40 characters: ASCII letters, digits and `_ @ . / # & + -` (no spaces). Keyword Args: _check_type (bool): if True, values for parameters in openapi_types diff --git a/Monei/model/refund_payment_request.py b/Monei/model/refund_payment_request.py index 6490401..e5e95a3 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: - [PHP SDK](https://github.com/MONEI/monei-php-sdk) - [Python SDK](https://github.com/MONEI/monei-python-sdk) - [Node.js SDK](https://github.com/MONEI/monei-node-sdk) - [Postman Collection](https://postman.monei.com/) Our SDKs handle authentication, error handling, and request formatting automatically. You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the [OpenAPI Generator](https://openapi-generator.tech/). ### Important Requirements - All API requests must be made over HTTPS - If you are not using our official SDKs, you **must provide a valid `User-Agent` header** with each request - Requests without proper authentication will return a `401 Unauthorized` error ### Error Handling The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a `statusCode` attribute indicating the outcome of your request. ### Rate Limits The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a `429 Too Many Requests` status code. # noqa: E501 -The version of the OpenAPI document: 1.12.3 +The version of the OpenAPI document: 1.13.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 index b709df2..df29b81 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: - [PHP SDK](https://github.com/MONEI/monei-php-sdk) - [Python SDK](https://github.com/MONEI/monei-python-sdk) - [Node.js SDK](https://github.com/MONEI/monei-node-sdk) - [Postman Collection](https://postman.monei.com/) Our SDKs handle authentication, error handling, and request formatting automatically. You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the [OpenAPI Generator](https://openapi-generator.tech/). ### Important Requirements - All API requests must be made over HTTPS - If you are not using our official SDKs, you **must provide a valid `User-Agent` header** with each request - Requests without proper authentication will return a `401 Unauthorized` error ### Error Handling The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a `statusCode` attribute indicating the outcome of your request. ### Rate Limits The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a `429 Too Many Requests` status code. # noqa: E501 -The version of the OpenAPI document: 1.12.3 +The version of the OpenAPI document: 1.13.0 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 49fb68d..32ae4a1 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: - [PHP SDK](https://github.com/MONEI/monei-php-sdk) - [Python SDK](https://github.com/MONEI/monei-python-sdk) - [Node.js SDK](https://github.com/MONEI/monei-node-sdk) - [Postman Collection](https://postman.monei.com/) Our SDKs handle authentication, error handling, and request formatting automatically. You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the [OpenAPI Generator](https://openapi-generator.tech/). ### Important Requirements - All API requests must be made over HTTPS - If you are not using our official SDKs, you **must provide a valid `User-Agent` header** with each request - Requests without proper authentication will return a `401 Unauthorized` error ### Error Handling The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a `statusCode` attribute indicating the outcome of your request. ### Rate Limits The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a `429 Too Many Requests` status code. # noqa: E501 -The version of the OpenAPI document: 1.12.3 +The version of the OpenAPI document: 1.13.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 b43bf15..7867fc4 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: - [PHP SDK](https://github.com/MONEI/monei-php-sdk) - [Python SDK](https://github.com/MONEI/monei-python-sdk) - [Node.js SDK](https://github.com/MONEI/monei-node-sdk) - [Postman Collection](https://postman.monei.com/) Our SDKs handle authentication, error handling, and request formatting automatically. You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the [OpenAPI Generator](https://openapi-generator.tech/). ### Important Requirements - All API requests must be made over HTTPS - If you are not using our official SDKs, you **must provide a valid `User-Agent` header** with each request - Requests without proper authentication will return a `401 Unauthorized` error ### Error Handling The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a `statusCode` attribute indicating the outcome of your request. ### Rate Limits The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a `429 Too Many Requests` status code. # noqa: E501 -The version of the OpenAPI document: 1.12.3 +The version of the OpenAPI document: 1.13.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 index 63a70a2..9283bde 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: - [PHP SDK](https://github.com/MONEI/monei-php-sdk) - [Python SDK](https://github.com/MONEI/monei-python-sdk) - [Node.js SDK](https://github.com/MONEI/monei-node-sdk) - [Postman Collection](https://postman.monei.com/) Our SDKs handle authentication, error handling, and request formatting automatically. You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the [OpenAPI Generator](https://openapi-generator.tech/). ### Important Requirements - All API requests must be made over HTTPS - If you are not using our official SDKs, you **must provide a valid `User-Agent` header** with each request - Requests without proper authentication will return a `401 Unauthorized` error ### Error Handling The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a `statusCode` attribute indicating the outcome of your request. ### Rate Limits The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a `429 Too Many Requests` status code. # noqa: E501 -The version of the OpenAPI document: 1.12.3 +The version of the OpenAPI document: 1.13.0 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 7b16ea4..5bf6190 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: - [PHP SDK](https://github.com/MONEI/monei-php-sdk) - [Python SDK](https://github.com/MONEI/monei-python-sdk) - [Node.js SDK](https://github.com/MONEI/monei-node-sdk) - [Postman Collection](https://postman.monei.com/) Our SDKs handle authentication, error handling, and request formatting automatically. You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the [OpenAPI Generator](https://openapi-generator.tech/). ### Important Requirements - All API requests must be made over HTTPS - If you are not using our official SDKs, you **must provide a valid `User-Agent` header** with each request - Requests without proper authentication will return a `401 Unauthorized` error ### Error Handling The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a `statusCode` attribute indicating the outcome of your request. ### Rate Limits The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a `429 Too Many Requests` status code. # noqa: E501 -The version of the OpenAPI document: 1.12.3 +The version of the OpenAPI document: 1.13.0 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 a646d9c..7789189 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: - [PHP SDK](https://github.com/MONEI/monei-php-sdk) - [Python SDK](https://github.com/MONEI/monei-python-sdk) - [Node.js SDK](https://github.com/MONEI/monei-node-sdk) - [Postman Collection](https://postman.monei.com/) Our SDKs handle authentication, error handling, and request formatting automatically. You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the [OpenAPI Generator](https://openapi-generator.tech/). ### Important Requirements - All API requests must be made over HTTPS - If you are not using our official SDKs, you **must provide a valid `User-Agent` header** with each request - Requests without proper authentication will return a `401 Unauthorized` error ### Error Handling The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a `statusCode` attribute indicating the outcome of your request. ### Rate Limits The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a `429 Too Many Requests` status code. # noqa: E501 -The version of the OpenAPI document: 1.12.3 +The version of the OpenAPI document: 1.13.0 Generated by: https://openapi-generator.tech """ diff --git a/Monei/model/service_unavailable_error.py b/Monei/model/service_unavailable_error.py index 750362c..4b7d5b9 100644 --- a/Monei/model/service_unavailable_error.py +++ b/Monei/model/service_unavailable_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: - [PHP SDK](https://github.com/MONEI/monei-php-sdk) - [Python SDK](https://github.com/MONEI/monei-python-sdk) - [Node.js SDK](https://github.com/MONEI/monei-node-sdk) - [Postman Collection](https://postman.monei.com/) Our SDKs handle authentication, error handling, and request formatting automatically. You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the [OpenAPI Generator](https://openapi-generator.tech/). ### Important Requirements - All API requests must be made over HTTPS - If you are not using our official SDKs, you **must provide a valid `User-Agent` header** with each request - Requests without proper authentication will return a `401 Unauthorized` error ### Error Handling The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a `statusCode` attribute indicating the outcome of your request. ### Rate Limits The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a `429 Too Many Requests` status code. # noqa: E501 -The version of the OpenAPI document: 1.12.3 +The version of the OpenAPI document: 1.13.0 Generated by: https://openapi-generator.tech """ diff --git a/Monei/model/service_unavailable_error_all_of.py b/Monei/model/service_unavailable_error_all_of.py index 995c751..abdaa9f 100644 --- a/Monei/model/service_unavailable_error_all_of.py +++ b/Monei/model/service_unavailable_error_all_of.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: - [PHP SDK](https://github.com/MONEI/monei-php-sdk) - [Python SDK](https://github.com/MONEI/monei-python-sdk) - [Node.js SDK](https://github.com/MONEI/monei-node-sdk) - [Postman Collection](https://postman.monei.com/) Our SDKs handle authentication, error handling, and request formatting automatically. You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the [OpenAPI Generator](https://openapi-generator.tech/). ### Important Requirements - All API requests must be made over HTTPS - If you are not using our official SDKs, you **must provide a valid `User-Agent` header** with each request - Requests without proper authentication will return a `401 Unauthorized` error ### Error Handling The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a `statusCode` attribute indicating the outcome of your request. ### Rate Limits The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a `429 Too Many Requests` status code. # noqa: E501 -The version of the OpenAPI document: 1.12.3 +The version of the OpenAPI document: 1.13.0 Generated by: https://openapi-generator.tech """ diff --git a/Monei/model/subscription.py b/Monei/model/subscription.py index c3dbc43..7c06706 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: - [PHP SDK](https://github.com/MONEI/monei-php-sdk) - [Python SDK](https://github.com/MONEI/monei-python-sdk) - [Node.js SDK](https://github.com/MONEI/monei-node-sdk) - [Postman Collection](https://postman.monei.com/) Our SDKs handle authentication, error handling, and request formatting automatically. You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the [OpenAPI Generator](https://openapi-generator.tech/). ### Important Requirements - All API requests must be made over HTTPS - If you are not using our official SDKs, you **must provide a valid `User-Agent` header** with each request - Requests without proper authentication will return a `401 Unauthorized` error ### Error Handling The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a `statusCode` attribute indicating the outcome of your request. ### Rate Limits The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a `429 Too Many Requests` status code. # noqa: E501 -The version of the OpenAPI document: 1.12.3 +The version of the OpenAPI document: 1.13.0 Generated by: https://openapi-generator.tech """ @@ -44,6 +44,7 @@ def lazy_import(): from Monei.model.subscription_trial_interval_count import ( SubscriptionTrialIntervalCount, ) + from Monei.model.tax_details import TaxDetails globals()["PaymentBillingDetails"] = PaymentBillingDetails globals()["PaymentCustomer"] = PaymentCustomer @@ -58,6 +59,7 @@ def lazy_import(): globals()["SubscriptionStatus"] = SubscriptionStatus globals()["SubscriptionTrialAmount"] = SubscriptionTrialAmount globals()["SubscriptionTrialIntervalCount"] = SubscriptionTrialIntervalCount + globals()["TaxDetails"] = TaxDetails class Subscription(ModelNormal): @@ -131,6 +133,9 @@ def openapi_types(): "currency": (str,), # noqa: E501 "allowed_payment_methods": (SubscriptionPaymentMethods,), # noqa: E501 "description": (str,), # noqa: E501 + "price_id": (str,), # noqa: E501 + "product_id": (str,), # noqa: E501 + "tax": (TaxDetails,), # noqa: E501 "customer_id": (str,), # noqa: E501 "customer": (PaymentCustomer,), # noqa: E501 "billing_details": (PaymentBillingDetails,), # noqa: E501 @@ -178,6 +183,9 @@ def discriminator(): "currency": "currency", # noqa: E501 "allowed_payment_methods": "allowedPaymentMethods", # noqa: E501 "description": "description", # noqa: E501 + "price_id": "priceId", # noqa: E501 + "product_id": "productId", # noqa: E501 + "tax": "tax", # noqa: E501 "customer_id": "customerId", # noqa: E501 "customer": "customer", # noqa: E501 "billing_details": "billingDetails", # noqa: E501 @@ -271,13 +279,16 @@ def _from_openapi_data( currency (str): Three-letter [ISO currency code](https://en.wikipedia.org/wiki/ISO_4217), in uppercase. Must be a supported currency. . [optional] # noqa: E501 allowed_payment_methods (SubscriptionPaymentMethods): [optional] # noqa: E501 description (str): An arbitrary string attached to the subscription. Often useful for displaying to users. . [optional] # noqa: E501 + price_id (str): The [price](https://docs.monei.com/apis/rest/prices-create/) the subscription bills. The subscription copies the price's values when it is created or switched to the price. A later change to the price never changes the subscription. . [optional] # noqa: E501 + product_id (str): The [product](https://docs.monei.com/apis/rest/products-create/) of the subscription's price. MONEI sets it from `priceId`, and removes it together with `priceId`. . [optional] # noqa: E501 + tax (TaxDetails): [optional] # noqa: E501 customer_id (str): The [customer](https://docs.monei.com/apis/rest/customers-create/) this subscription belongs to. Linking a subscription to a customer turns on **renewal failover**: when a renewal is declined by the issuing bank, MONEI retries it against up to two of the customer's other saved payment methods within the same attempt, before the subscription goes `PAST_DUE`. One declined renewal can therefore produce up to three charge attempts on different cards. If one succeeds the subscription continues and moves to that payment method. . [optional] # noqa: E501 customer (PaymentCustomer): [optional] # noqa: E501 billing_details (PaymentBillingDetails): [optional] # noqa: E501 shipping_details (PaymentShippingDetails): [optional] # noqa: E501 pause_interval_count (int): Number of intervals when subscription will be paused before it activates again.. [optional] # noqa: E501 skip_interval_count (int): The number of intervals during which the subscription billing cycle will be skipped without altering the subscription status. This is useful when payment for a specific period is received through different methods. . [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_order_id (str): An order ID from your system. A unique identifier that can be used to reconcile the payment with your internal system. Up to 40 characters: ASCII letters, digits and `_ @ . / # & + -` (no spaces). . [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 @@ -419,13 +430,16 @@ def __init__( currency (str): Three-letter [ISO currency code](https://en.wikipedia.org/wiki/ISO_4217), in uppercase. Must be a supported currency. . [optional] # noqa: E501 allowed_payment_methods (SubscriptionPaymentMethods): [optional] # noqa: E501 description (str): An arbitrary string attached to the subscription. Often useful for displaying to users. . [optional] # noqa: E501 + price_id (str): The [price](https://docs.monei.com/apis/rest/prices-create/) the subscription bills. The subscription copies the price's values when it is created or switched to the price. A later change to the price never changes the subscription. . [optional] # noqa: E501 + product_id (str): The [product](https://docs.monei.com/apis/rest/products-create/) of the subscription's price. MONEI sets it from `priceId`, and removes it together with `priceId`. . [optional] # noqa: E501 + tax (TaxDetails): [optional] # noqa: E501 customer_id (str): The [customer](https://docs.monei.com/apis/rest/customers-create/) this subscription belongs to. Linking a subscription to a customer turns on **renewal failover**: when a renewal is declined by the issuing bank, MONEI retries it against up to two of the customer's other saved payment methods within the same attempt, before the subscription goes `PAST_DUE`. One declined renewal can therefore produce up to three charge attempts on different cards. If one succeeds the subscription continues and moves to that payment method. . [optional] # noqa: E501 customer (PaymentCustomer): [optional] # noqa: E501 billing_details (PaymentBillingDetails): [optional] # noqa: E501 shipping_details (PaymentShippingDetails): [optional] # noqa: E501 pause_interval_count (int): Number of intervals when subscription will be paused before it activates again.. [optional] # noqa: E501 skip_interval_count (int): The number of intervals during which the subscription billing cycle will be skipped without altering the subscription status. This is useful when payment for a specific period is received through different methods. . [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_order_id (str): An order ID from your system. A unique identifier that can be used to reconcile the payment with your internal system. Up to 40 characters: ASCII letters, digits and `_ @ . / # & + -` (no spaces). . [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 diff --git a/Monei/model/subscription_interval.py b/Monei/model/subscription_interval.py index a2f8d5f..12eb6df 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: - [PHP SDK](https://github.com/MONEI/monei-php-sdk) - [Python SDK](https://github.com/MONEI/monei-python-sdk) - [Node.js SDK](https://github.com/MONEI/monei-node-sdk) - [Postman Collection](https://postman.monei.com/) Our SDKs handle authentication, error handling, and request formatting automatically. You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the [OpenAPI Generator](https://openapi-generator.tech/). ### Important Requirements - All API requests must be made over HTTPS - If you are not using our official SDKs, you **must provide a valid `User-Agent` header** with each request - Requests without proper authentication will return a `401 Unauthorized` error ### Error Handling The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a `statusCode` attribute indicating the outcome of your request. ### Rate Limits The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a `429 Too Many Requests` status code. # noqa: E501 -The version of the OpenAPI document: 1.12.3 +The version of the OpenAPI document: 1.13.0 Generated by: https://openapi-generator.tech """ diff --git a/Monei/model/subscription_last_payment.py b/Monei/model/subscription_last_payment.py index 0e46caa..da4663f 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: - [PHP SDK](https://github.com/MONEI/monei-php-sdk) - [Python SDK](https://github.com/MONEI/monei-python-sdk) - [Node.js SDK](https://github.com/MONEI/monei-node-sdk) - [Postman Collection](https://postman.monei.com/) Our SDKs handle authentication, error handling, and request formatting automatically. You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the [OpenAPI Generator](https://openapi-generator.tech/). ### Important Requirements - All API requests must be made over HTTPS - If you are not using our official SDKs, you **must provide a valid `User-Agent` header** with each request - Requests without proper authentication will return a `401 Unauthorized` error ### Error Handling The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a `statusCode` attribute indicating the outcome of your request. ### Rate Limits The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a `429 Too Many Requests` status code. # noqa: E501 -The version of the OpenAPI document: 1.12.3 +The version of the OpenAPI document: 1.13.0 Generated by: https://openapi-generator.tech """ diff --git a/Monei/model/subscription_last_proration.py b/Monei/model/subscription_last_proration.py index a361b29..b22ee98 100644 --- a/Monei/model/subscription_last_proration.py +++ b/Monei/model/subscription_last_proration.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: - [PHP SDK](https://github.com/MONEI/monei-php-sdk) - [Python SDK](https://github.com/MONEI/monei-python-sdk) - [Node.js SDK](https://github.com/MONEI/monei-node-sdk) - [Postman Collection](https://postman.monei.com/) Our SDKs handle authentication, error handling, and request formatting automatically. You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the [OpenAPI Generator](https://openapi-generator.tech/). ### Important Requirements - All API requests must be made over HTTPS - If you are not using our official SDKs, you **must provide a valid `User-Agent` header** with each request - Requests without proper authentication will return a `401 Unauthorized` error ### Error Handling The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a `statusCode` attribute indicating the outcome of your request. ### Rate Limits The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a `429 Too Many Requests` status code. # noqa: E501 -The version of the OpenAPI document: 1.12.3 +The version of the OpenAPI document: 1.13.0 Generated by: https://openapi-generator.tech """ diff --git a/Monei/model/subscription_payment_method.py b/Monei/model/subscription_payment_method.py index c9e574c..3991bb6 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: - [PHP SDK](https://github.com/MONEI/monei-php-sdk) - [Python SDK](https://github.com/MONEI/monei-python-sdk) - [Node.js SDK](https://github.com/MONEI/monei-node-sdk) - [Postman Collection](https://postman.monei.com/) Our SDKs handle authentication, error handling, and request formatting automatically. You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the [OpenAPI Generator](https://openapi-generator.tech/). ### Important Requirements - All API requests must be made over HTTPS - If you are not using our official SDKs, you **must provide a valid `User-Agent` header** with each request - Requests without proper authentication will return a `401 Unauthorized` error ### Error Handling The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a `statusCode` attribute indicating the outcome of your request. ### Rate Limits The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a `429 Too Many Requests` status code. # noqa: E501 -The version of the OpenAPI document: 1.12.3 +The version of the OpenAPI document: 1.13.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 94c642c..e709f74 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: - [PHP SDK](https://github.com/MONEI/monei-php-sdk) - [Python SDK](https://github.com/MONEI/monei-python-sdk) - [Node.js SDK](https://github.com/MONEI/monei-node-sdk) - [Postman Collection](https://postman.monei.com/) Our SDKs handle authentication, error handling, and request formatting automatically. You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the [OpenAPI Generator](https://openapi-generator.tech/). ### Important Requirements - All API requests must be made over HTTPS - If you are not using our official SDKs, you **must provide a valid `User-Agent` header** with each request - Requests without proper authentication will return a `401 Unauthorized` error ### Error Handling The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a `statusCode` attribute indicating the outcome of your request. ### Rate Limits The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a `429 Too Many Requests` status code. # noqa: E501 -The version of the OpenAPI document: 1.12.3 +The version of the OpenAPI document: 1.13.0 Generated by: https://openapi-generator.tech """ diff --git a/Monei/model/subscription_payment_methods.py b/Monei/model/subscription_payment_methods.py index 37ab7cd..28cfafc 100644 --- a/Monei/model/subscription_payment_methods.py +++ b/Monei/model/subscription_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: - [PHP SDK](https://github.com/MONEI/monei-php-sdk) - [Python SDK](https://github.com/MONEI/monei-python-sdk) - [Node.js SDK](https://github.com/MONEI/monei-node-sdk) - [Postman Collection](https://postman.monei.com/) Our SDKs handle authentication, error handling, and request formatting automatically. You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the [OpenAPI Generator](https://openapi-generator.tech/). ### Important Requirements - All API requests must be made over HTTPS - If you are not using our official SDKs, you **must provide a valid `User-Agent` header** with each request - Requests without proper authentication will return a `401 Unauthorized` error ### Error Handling The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a `statusCode` attribute indicating the outcome of your request. ### Rate Limits The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a `429 Too Many Requests` status code. # noqa: E501 -The version of the OpenAPI document: 1.12.3 +The version of the OpenAPI document: 1.13.0 Generated by: https://openapi-generator.tech """ diff --git a/Monei/model/subscription_retry_schedule.py b/Monei/model/subscription_retry_schedule.py index 1b334eb..1787af8 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: - [PHP SDK](https://github.com/MONEI/monei-php-sdk) - [Python SDK](https://github.com/MONEI/monei-python-sdk) - [Node.js SDK](https://github.com/MONEI/monei-node-sdk) - [Postman Collection](https://postman.monei.com/) Our SDKs handle authentication, error handling, and request formatting automatically. You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the [OpenAPI Generator](https://openapi-generator.tech/). ### Important Requirements - All API requests must be made over HTTPS - If you are not using our official SDKs, you **must provide a valid `User-Agent` header** with each request - Requests without proper authentication will return a `401 Unauthorized` error ### Error Handling The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a `statusCode` attribute indicating the outcome of your request. ### Rate Limits The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a `429 Too Many Requests` status code. # noqa: E501 -The version of the OpenAPI document: 1.12.3 +The version of the OpenAPI document: 1.13.0 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 eb85f9c..bef4674 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: - [PHP SDK](https://github.com/MONEI/monei-php-sdk) - [Python SDK](https://github.com/MONEI/monei-python-sdk) - [Node.js SDK](https://github.com/MONEI/monei-node-sdk) - [Postman Collection](https://postman.monei.com/) Our SDKs handle authentication, error handling, and request formatting automatically. You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the [OpenAPI Generator](https://openapi-generator.tech/). ### Important Requirements - All API requests must be made over HTTPS - If you are not using our official SDKs, you **must provide a valid `User-Agent` header** with each request - Requests without proper authentication will return a `401 Unauthorized` error ### Error Handling The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a `statusCode` attribute indicating the outcome of your request. ### Rate Limits The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a `429 Too Many Requests` status code. # noqa: E501 -The version of the OpenAPI document: 1.12.3 +The version of the OpenAPI document: 1.13.0 Generated by: https://openapi-generator.tech """ diff --git a/Monei/model/subscription_status.py b/Monei/model/subscription_status.py index 2f03532..5754890 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: - [PHP SDK](https://github.com/MONEI/monei-php-sdk) - [Python SDK](https://github.com/MONEI/monei-python-sdk) - [Node.js SDK](https://github.com/MONEI/monei-node-sdk) - [Postman Collection](https://postman.monei.com/) Our SDKs handle authentication, error handling, and request formatting automatically. You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the [OpenAPI Generator](https://openapi-generator.tech/). ### Important Requirements - All API requests must be made over HTTPS - If you are not using our official SDKs, you **must provide a valid `User-Agent` header** with each request - Requests without proper authentication will return a `401 Unauthorized` error ### Error Handling The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a `statusCode` attribute indicating the outcome of your request. ### Rate Limits The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a `429 Too Many Requests` status code. # noqa: E501 -The version of the OpenAPI document: 1.12.3 +The version of the OpenAPI document: 1.13.0 Generated by: https://openapi-generator.tech """ diff --git a/Monei/model/subscription_trial_amount.py b/Monei/model/subscription_trial_amount.py index 4a1f827..d67dc93 100644 --- a/Monei/model/subscription_trial_amount.py +++ b/Monei/model/subscription_trial_amount.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: - [PHP SDK](https://github.com/MONEI/monei-php-sdk) - [Python SDK](https://github.com/MONEI/monei-python-sdk) - [Node.js SDK](https://github.com/MONEI/monei-node-sdk) - [Postman Collection](https://postman.monei.com/) Our SDKs handle authentication, error handling, and request formatting automatically. You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the [OpenAPI Generator](https://openapi-generator.tech/). ### Important Requirements - All API requests must be made over HTTPS - If you are not using our official SDKs, you **must provide a valid `User-Agent` header** with each request - Requests without proper authentication will return a `401 Unauthorized` error ### Error Handling The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a `statusCode` attribute indicating the outcome of your request. ### Rate Limits The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a `429 Too Many Requests` status code. # noqa: E501 -The version of the OpenAPI document: 1.12.3 +The version of the OpenAPI document: 1.13.0 Generated by: https://openapi-generator.tech """ diff --git a/Monei/model/subscription_trial_interval_count.py b/Monei/model/subscription_trial_interval_count.py index 287afc5..8dffdc0 100644 --- a/Monei/model/subscription_trial_interval_count.py +++ b/Monei/model/subscription_trial_interval_count.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: - [PHP SDK](https://github.com/MONEI/monei-php-sdk) - [Python SDK](https://github.com/MONEI/monei-python-sdk) - [Node.js SDK](https://github.com/MONEI/monei-node-sdk) - [Postman Collection](https://postman.monei.com/) Our SDKs handle authentication, error handling, and request formatting automatically. You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the [OpenAPI Generator](https://openapi-generator.tech/). ### Important Requirements - All API requests must be made over HTTPS - If you are not using our official SDKs, you **must provide a valid `User-Agent` header** with each request - Requests without proper authentication will return a `401 Unauthorized` error ### Error Handling The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a `statusCode` attribute indicating the outcome of your request. ### Rate Limits The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a `429 Too Many Requests` status code. # noqa: E501 -The version of the OpenAPI document: 1.12.3 +The version of the OpenAPI document: 1.13.0 Generated by: https://openapi-generator.tech """ diff --git a/Monei/model/subscription_update_preview.py b/Monei/model/subscription_update_preview.py index 6be02c3..c071e39 100644 --- a/Monei/model/subscription_update_preview.py +++ b/Monei/model/subscription_update_preview.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: - [PHP SDK](https://github.com/MONEI/monei-php-sdk) - [Python SDK](https://github.com/MONEI/monei-python-sdk) - [Node.js SDK](https://github.com/MONEI/monei-node-sdk) - [Postman Collection](https://postman.monei.com/) Our SDKs handle authentication, error handling, and request formatting automatically. You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the [OpenAPI Generator](https://openapi-generator.tech/). ### Important Requirements - All API requests must be made over HTTPS - If you are not using our official SDKs, you **must provide a valid `User-Agent` header** with each request - Requests without proper authentication will return a `401 Unauthorized` error ### Error Handling The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a `statusCode` attribute indicating the outcome of your request. ### Rate Limits The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a `429 Too Many Requests` status code. # noqa: E501 -The version of the OpenAPI document: 1.12.3 +The version of the OpenAPI document: 1.13.0 Generated by: https://openapi-generator.tech """ diff --git a/Monei/model/tax_details.py b/Monei/model/tax_details.py new file mode 100644 index 0000000..e47de77 --- /dev/null +++ b/Monei/model/tax_details.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: - [PHP SDK](https://github.com/MONEI/monei-php-sdk) - [Python SDK](https://github.com/MONEI/monei-python-sdk) - [Node.js SDK](https://github.com/MONEI/monei-node-sdk) - [Postman Collection](https://postman.monei.com/) Our SDKs handle authentication, error handling, and request formatting automatically. You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the [OpenAPI Generator](https://openapi-generator.tech/). ### Important Requirements - All API requests must be made over HTTPS - If you are not using our official SDKs, you **must provide a valid `User-Agent` header** with each request - Requests without proper authentication will return a `401 Unauthorized` error ### Error Handling The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a `statusCode` attribute indicating the outcome of your request. ### Rate Limits The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a `429 Too Many Requests` status code. # noqa: E501 + +The version of the OpenAPI document: 1.13.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.tax_rate_display_name import TaxRateDisplayName + from Monei.model.tax_rate_percentage import TaxRatePercentage + + globals()["TaxRateDisplayName"] = TaxRateDisplayName + globals()["TaxRatePercentage"] = TaxRatePercentage + + +class TaxDetails(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 = { + ("amount",): { + "inclusive_minimum": 0, + }, + } + + @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 { + "tax_rate_id": (str,), # noqa: E501 + "display_name": (TaxRateDisplayName,), # noqa: E501 + "percentage": (TaxRatePercentage,), # noqa: E501 + "tax_type": (str,), # noqa: E501 + "behavior": (str,), # noqa: E501 + "amount": (int,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + attribute_map = { + "tax_rate_id": "taxRateId", # noqa: E501 + "display_name": "displayName", # noqa: E501 + "percentage": "percentage", # noqa: E501 + "tax_type": "taxType", # noqa: E501 + "behavior": "behavior", # noqa: E501 + "amount": "amount", # noqa: E501 + } + + read_only_vars = {} + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data( + cls, tax_rate_id, display_name, percentage, behavior, amount, *args, **kwargs + ): # noqa: E501 + """TaxDetails - a model defined in OpenAPI + + Args: + tax_rate_id (str): Unique identifier for the tax rate. + display_name (TaxRateDisplayName): + percentage (TaxRatePercentage): + behavior (str): How the tax of the product's tax rate applies to `unitAmount`: - `INCLUSIVE`: `unitAmount` holds the tax. - `EXCLUSIVE`: the tax is added to `unitAmount`. No value means `INCLUSIVE`. Treat the set as open: more values can be added later. + amount (int): The tax part of the subscription `amount`, in the smallest currency unit. `0` for a 0% rate. + + Keyword Args: + tax_type (str): The kind of tax: `VAT`, `IGIC` (Canary Islands) or `IPSI` (Ceuta and Melilla). It cannot change after the tax rate is created. Treat the set as open: more values can be added later. . defaults to "VAT" # 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,) + """ + + tax_type = kwargs.get("tax_type", "VAT") + _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.tax_rate_id = tax_rate_id + self.display_name = display_name + self.percentage = percentage + self.tax_type = tax_type + self.behavior = behavior + self.amount = amount + for var_name, var_value in kwargs.items(): + if ( + var_name not in self.attribute_map + and self._configuration is not None + and 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, tax_rate_id, display_name, percentage, behavior, amount, *args, **kwargs + ): # noqa: E501 + """TaxDetails - a model defined in OpenAPI + + Args: + tax_rate_id (str): Unique identifier for the tax rate. + display_name (TaxRateDisplayName): + percentage (TaxRatePercentage): + behavior (str): How the tax of the product's tax rate applies to `unitAmount`: - `INCLUSIVE`: `unitAmount` holds the tax. - `EXCLUSIVE`: the tax is added to `unitAmount`. No value means `INCLUSIVE`. Treat the set as open: more values can be added later. + amount (int): The tax part of the subscription `amount`, in the smallest currency unit. `0` for a 0% rate. + + Keyword Args: + tax_type (str): The kind of tax: `VAT`, `IGIC` (Canary Islands) or `IPSI` (Ceuta and Melilla). It cannot change after the tax rate is created. Treat the set as open: more values can be added later. . defaults to "VAT" # 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,) + """ + + tax_type = kwargs.get("tax_type", "VAT") + _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.tax_rate_id = tax_rate_id + self.display_name = display_name + self.percentage = percentage + self.tax_type = tax_type + self.behavior = behavior + self.amount = amount + for var_name, var_value in kwargs.items(): + if ( + var_name not in self.attribute_map + and self._configuration is not None + and 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/tax_rate.py b/Monei/model/tax_rate.py new file mode 100644 index 0000000..828d051 --- /dev/null +++ b/Monei/model/tax_rate.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: - [PHP SDK](https://github.com/MONEI/monei-php-sdk) - [Python SDK](https://github.com/MONEI/monei-python-sdk) - [Node.js SDK](https://github.com/MONEI/monei-node-sdk) - [Postman Collection](https://postman.monei.com/) Our SDKs handle authentication, error handling, and request formatting automatically. You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the [OpenAPI Generator](https://openapi-generator.tech/). ### Important Requirements - All API requests must be made over HTTPS - If you are not using our official SDKs, you **must provide a valid `User-Agent` header** with each request - Requests without proper authentication will return a `401 Unauthorized` error ### Error Handling The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a `statusCode` attribute indicating the outcome of your request. ### Rate Limits The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a `429 Too Many Requests` status code. # noqa: E501 + +The version of the OpenAPI document: 1.13.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.tax_rate_display_name import TaxRateDisplayName + from Monei.model.tax_rate_percentage import TaxRatePercentage + + globals()["TaxRateDisplayName"] = TaxRateDisplayName + globals()["TaxRatePercentage"] = TaxRatePercentage + + +class TaxRate(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 + "display_name": (TaxRateDisplayName,), # noqa: E501 + "percentage": (TaxRatePercentage,), # noqa: E501 + "tax_type": (str,), # noqa: E501 + "active": (bool,), # noqa: E501 + "created_at": (int,), # noqa: E501 + "updated_at": (int,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + attribute_map = { + "id": "id", # noqa: E501 + "display_name": "displayName", # noqa: E501 + "percentage": "percentage", # noqa: E501 + "tax_type": "taxType", # noqa: E501 + "active": "active", # 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, id, display_name, percentage, active, created_at, *args, **kwargs + ): # noqa: E501 + """TaxRate - a model defined in OpenAPI + + Args: + id (str): Unique identifier for the tax rate. + display_name (TaxRateDisplayName): + percentage (TaxRatePercentage): + active (bool): Whether the tax rate is active. Tax rates are never deleted: set `active` to `false` to archive one. An archived rate cannot be set on a product. While a product still has it, the product cannot get new prices and its prices cannot start or switch a subscription. Subscriptions that already use it keep their copy. A new tax rate is active unless created with `active: false`. + created_at (int): Time at which the resource was created. Measured in seconds since the Unix epoch. + + Keyword Args: + tax_type (str): The kind of tax: `VAT`, `IGIC` (Canary Islands) or `IPSI` (Ceuta and Melilla). It cannot change after the tax rate is created. Treat the set as open: more values can be added later. . defaults to "VAT" # 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,) + updated_at (int): Time at which the resource updated last time. Measured in seconds since the Unix epoch.. [optional] # noqa: E501 + """ + + tax_type = kwargs.get("tax_type", "VAT") + _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.id = id + self.display_name = display_name + self.percentage = percentage + self.tax_type = tax_type + self.active = active + self.created_at = created_at + for var_name, var_value in kwargs.items(): + if ( + var_name not in self.attribute_map + and self._configuration is 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, id, display_name, percentage, active, created_at, *args, **kwargs + ): # noqa: E501 + """TaxRate - a model defined in OpenAPI + + Args: + id (str): Unique identifier for the tax rate. + display_name (TaxRateDisplayName): + percentage (TaxRatePercentage): + active (bool): Whether the tax rate is active. Tax rates are never deleted: set `active` to `false` to archive one. An archived rate cannot be set on a product. While a product still has it, the product cannot get new prices and its prices cannot start or switch a subscription. Subscriptions that already use it keep their copy. A new tax rate is active unless created with `active: false`. + created_at (int): Time at which the resource was created. Measured in seconds since the Unix epoch. + + Keyword Args: + tax_type (str): The kind of tax: `VAT`, `IGIC` (Canary Islands) or `IPSI` (Ceuta and Melilla). It cannot change after the tax rate is created. Treat the set as open: more values can be added later. . defaults to "VAT" # 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,) + updated_at (int): Time at which the resource updated last time. Measured in seconds since the Unix epoch.. [optional] # noqa: E501 + """ + + tax_type = kwargs.get("tax_type", "VAT") + _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.id = id + self.display_name = display_name + self.percentage = percentage + self.tax_type = tax_type + self.active = active + self.created_at = created_at + for var_name, var_value in kwargs.items(): + if ( + var_name not in self.attribute_map + and self._configuration is 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/tax_rate_display_name.py b/Monei/model/tax_rate_display_name.py new file mode 100644 index 0000000..4f6e3d1 --- /dev/null +++ b/Monei/model/tax_rate_display_name.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: - [PHP SDK](https://github.com/MONEI/monei-php-sdk) - [Python SDK](https://github.com/MONEI/monei-python-sdk) - [Node.js SDK](https://github.com/MONEI/monei-node-sdk) - [Postman Collection](https://postman.monei.com/) Our SDKs handle authentication, error handling, and request formatting automatically. You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the [OpenAPI Generator](https://openapi-generator.tech/). ### Important Requirements - All API requests must be made over HTTPS - If you are not using our official SDKs, you **must provide a valid `User-Agent` header** with each request - Requests without proper authentication will return a `401 Unauthorized` error ### Error Handling The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a `statusCode` attribute indicating the outcome of your request. ### Rate Limits The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a `429 Too Many Requests` status code. # noqa: E501 + +The version of the OpenAPI document: 1.13.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 TaxRateDisplayName(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 = { + ("value",): { + "max_length": 50, + "min_length": 1, + }, + } + + 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): + """TaxRateDisplayName - 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 name of the tax shown to the buyer.. # noqa: E501 + + Keyword Args: + value (str): The name of the tax shown to the buyer.. # 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): + """TaxRateDisplayName - 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 name of the tax shown to the buyer.. # noqa: E501 + + Keyword Args: + value (str): The name of the tax shown to the buyer.. # 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/tax_rate_list.py b/Monei/model/tax_rate_list.py new file mode 100644 index 0000000..02a0c8b --- /dev/null +++ b/Monei/model/tax_rate_list.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: - [PHP SDK](https://github.com/MONEI/monei-php-sdk) - [Python SDK](https://github.com/MONEI/monei-python-sdk) - [Node.js SDK](https://github.com/MONEI/monei-node-sdk) - [Postman Collection](https://postman.monei.com/) Our SDKs handle authentication, error handling, and request formatting automatically. You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the [OpenAPI Generator](https://openapi-generator.tech/). ### Important Requirements - All API requests must be made over HTTPS - If you are not using our official SDKs, you **must provide a valid `User-Agent` header** with each request - Requests without proper authentication will return a `401 Unauthorized` error ### Error Handling The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a `statusCode` attribute indicating the outcome of your request. ### Rate Limits The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a `429 Too Many Requests` status code. # noqa: E501 + +The version of the OpenAPI document: 1.13.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.tax_rate import TaxRate + + globals()["TaxRate"] = TaxRate + + +class TaxRateList(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 { + "items": ([TaxRate],), # noqa: E501 + "next_cursor": (str,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + attribute_map = { + "items": "items", # noqa: E501 + "next_cursor": "nextCursor", # noqa: E501 + } + + read_only_vars = {} + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, items, *args, **kwargs): # noqa: E501 + """TaxRateList - a model defined in OpenAPI + + Args: + items ([TaxRate]): The tax rates in this page, newest first. + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + next_cursor (str): Pass this value as `cursor` to get the next page. Absent when there are no more items. The last page can still carry it, and the next call then returns no items. . [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.items = items + for var_name, var_value in kwargs.items(): + if ( + var_name not in self.attribute_map + and self._configuration is not None + and 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, items, *args, **kwargs): # noqa: E501 + """TaxRateList - a model defined in OpenAPI + + Args: + items ([TaxRate]): The tax rates in this page, newest first. + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + next_cursor (str): Pass this value as `cursor` to get the next page. Absent when there are no more items. The last page can still carry it, and the next call then returns no items. . [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.items = items + for var_name, var_value in kwargs.items(): + if ( + var_name not in self.attribute_map + and self._configuration is not None + and 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/tax_rate_percentage.py b/Monei/model/tax_rate_percentage.py new file mode 100644 index 0000000..1882b09 --- /dev/null +++ b/Monei/model/tax_rate_percentage.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: - [PHP SDK](https://github.com/MONEI/monei-php-sdk) - [Python SDK](https://github.com/MONEI/monei-python-sdk) - [Node.js SDK](https://github.com/MONEI/monei-node-sdk) - [Postman Collection](https://postman.monei.com/) Our SDKs handle authentication, error handling, and request formatting automatically. You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the [OpenAPI Generator](https://openapi-generator.tech/). ### Important Requirements - All API requests must be made over HTTPS - If you are not using our official SDKs, you **must provide a valid `User-Agent` header** with each request - Requests without proper authentication will return a `401 Unauthorized` error ### Error Handling The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a `statusCode` attribute indicating the outcome of your request. ### Rate Limits The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a `429 Too Many Requests` status code. # noqa: E501 + +The version of the OpenAPI document: 1.13.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 TaxRatePercentage(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 = { + ("value",): { + "inclusive_maximum": 100, + "inclusive_minimum": 0, + "multiple_of": 0.00010, + }, + } + + 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": (float,), + } + + @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): + """TaxRatePercentage - a model defined in OpenAPI + + Note that value can be passed either in args or in kwargs, but not in both. + + Args: + args[0] (float): The rate in percent, with up to 4 decimals. It cannot change after the tax rate is created.. # noqa: E501 + + Keyword Args: + value (float): The rate in percent, with up to 4 decimals. It cannot change after the tax rate is created.. # 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): + """TaxRatePercentage - a model defined in OpenAPI + + Note that value can be passed either in args or in kwargs, but not in both. + + Args: + args[0] (float): The rate in percent, with up to 4 decimals. It cannot change after the tax rate is created.. # noqa: E501 + + Keyword Args: + value (float): The rate in percent, with up to 4 decimals. It cannot change after the tax rate is created.. # 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/unauthorized_error.py b/Monei/model/unauthorized_error.py index 79e75b4..3905c5f 100644 --- a/Monei/model/unauthorized_error.py +++ b/Monei/model/unauthorized_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: - [PHP SDK](https://github.com/MONEI/monei-php-sdk) - [Python SDK](https://github.com/MONEI/monei-python-sdk) - [Node.js SDK](https://github.com/MONEI/monei-node-sdk) - [Postman Collection](https://postman.monei.com/) Our SDKs handle authentication, error handling, and request formatting automatically. You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the [OpenAPI Generator](https://openapi-generator.tech/). ### Important Requirements - All API requests must be made over HTTPS - If you are not using our official SDKs, you **must provide a valid `User-Agent` header** with each request - Requests without proper authentication will return a `401 Unauthorized` error ### Error Handling The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a `statusCode` attribute indicating the outcome of your request. ### Rate Limits The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a `429 Too Many Requests` status code. # noqa: E501 -The version of the OpenAPI document: 1.12.3 +The version of the OpenAPI document: 1.13.0 Generated by: https://openapi-generator.tech """ diff --git a/Monei/model/unauthorized_error_all_of.py b/Monei/model/unauthorized_error_all_of.py index ca63ec1..9f3f91a 100644 --- a/Monei/model/unauthorized_error_all_of.py +++ b/Monei/model/unauthorized_error_all_of.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: - [PHP SDK](https://github.com/MONEI/monei-php-sdk) - [Python SDK](https://github.com/MONEI/monei-python-sdk) - [Node.js SDK](https://github.com/MONEI/monei-node-sdk) - [Postman Collection](https://postman.monei.com/) Our SDKs handle authentication, error handling, and request formatting automatically. You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the [OpenAPI Generator](https://openapi-generator.tech/). ### Important Requirements - All API requests must be made over HTTPS - If you are not using our official SDKs, you **must provide a valid `User-Agent` header** with each request - Requests without proper authentication will return a `401 Unauthorized` error ### Error Handling The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a `statusCode` attribute indicating the outcome of your request. ### Rate Limits The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a `429 Too Many Requests` status code. # noqa: E501 -The version of the OpenAPI document: 1.12.3 +The version of the OpenAPI document: 1.13.0 Generated by: https://openapi-generator.tech """ diff --git a/Monei/model/unprocessable_entity_error.py b/Monei/model/unprocessable_entity_error.py index 4a58019..b947964 100644 --- a/Monei/model/unprocessable_entity_error.py +++ b/Monei/model/unprocessable_entity_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: - [PHP SDK](https://github.com/MONEI/monei-php-sdk) - [Python SDK](https://github.com/MONEI/monei-python-sdk) - [Node.js SDK](https://github.com/MONEI/monei-node-sdk) - [Postman Collection](https://postman.monei.com/) Our SDKs handle authentication, error handling, and request formatting automatically. You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the [OpenAPI Generator](https://openapi-generator.tech/). ### Important Requirements - All API requests must be made over HTTPS - If you are not using our official SDKs, you **must provide a valid `User-Agent` header** with each request - Requests without proper authentication will return a `401 Unauthorized` error ### Error Handling The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a `statusCode` attribute indicating the outcome of your request. ### Rate Limits The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a `429 Too Many Requests` status code. # noqa: E501 -The version of the OpenAPI document: 1.12.3 +The version of the OpenAPI document: 1.13.0 Generated by: https://openapi-generator.tech """ diff --git a/Monei/model/unprocessable_entity_error_all_of.py b/Monei/model/unprocessable_entity_error_all_of.py index a3d1e62..acb35f5 100644 --- a/Monei/model/unprocessable_entity_error_all_of.py +++ b/Monei/model/unprocessable_entity_error_all_of.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: - [PHP SDK](https://github.com/MONEI/monei-php-sdk) - [Python SDK](https://github.com/MONEI/monei-python-sdk) - [Node.js SDK](https://github.com/MONEI/monei-node-sdk) - [Postman Collection](https://postman.monei.com/) Our SDKs handle authentication, error handling, and request formatting automatically. You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the [OpenAPI Generator](https://openapi-generator.tech/). ### Important Requirements - All API requests must be made over HTTPS - If you are not using our official SDKs, you **must provide a valid `User-Agent` header** with each request - Requests without proper authentication will return a `401 Unauthorized` error ### Error Handling The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a `statusCode` attribute indicating the outcome of your request. ### Rate Limits The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a `429 Too Many Requests` status code. # noqa: E501 -The version of the OpenAPI document: 1.12.3 +The version of the OpenAPI document: 1.13.0 Generated by: https://openapi-generator.tech """ diff --git a/Monei/model/update_apple_pay_certificate_request.py b/Monei/model/update_apple_pay_certificate_request.py index 135a36b..9a2520c 100644 --- a/Monei/model/update_apple_pay_certificate_request.py +++ b/Monei/model/update_apple_pay_certificate_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: - [PHP SDK](https://github.com/MONEI/monei-php-sdk) - [Python SDK](https://github.com/MONEI/monei-python-sdk) - [Node.js SDK](https://github.com/MONEI/monei-node-sdk) - [Postman Collection](https://postman.monei.com/) Our SDKs handle authentication, error handling, and request formatting automatically. You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the [OpenAPI Generator](https://openapi-generator.tech/). ### Important Requirements - All API requests must be made over HTTPS - If you are not using our official SDKs, you **must provide a valid `User-Agent` header** with each request - Requests without proper authentication will return a `401 Unauthorized` error ### Error Handling The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a `statusCode` attribute indicating the outcome of your request. ### Rate Limits The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a `429 Too Many Requests` status code. # noqa: E501 -The version of the OpenAPI document: 1.12.3 +The version of the OpenAPI document: 1.13.0 Generated by: https://openapi-generator.tech """ diff --git a/Monei/model/update_customer_request.py b/Monei/model/update_customer_request.py index 3921183..87a9fe3 100644 --- a/Monei/model/update_customer_request.py +++ b/Monei/model/update_customer_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: - [PHP SDK](https://github.com/MONEI/monei-php-sdk) - [Python SDK](https://github.com/MONEI/monei-python-sdk) - [Node.js SDK](https://github.com/MONEI/monei-node-sdk) - [Postman Collection](https://postman.monei.com/) Our SDKs handle authentication, error handling, and request formatting automatically. You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the [OpenAPI Generator](https://openapi-generator.tech/). ### Important Requirements - All API requests must be made over HTTPS - If you are not using our official SDKs, you **must provide a valid `User-Agent` header** with each request - Requests without proper authentication will return a `401 Unauthorized` error ### Error Handling The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a `statusCode` attribute indicating the outcome of your request. ### Rate Limits The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a `429 Too Many Requests` status code. # noqa: E501 -The version of the OpenAPI document: 1.12.3 +The version of the OpenAPI document: 1.13.0 Generated by: https://openapi-generator.tech """ diff --git a/Monei/model/update_price_request.py b/Monei/model/update_price_request.py new file mode 100644 index 0000000..1473e4e --- /dev/null +++ b/Monei/model/update_price_request.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: - [PHP SDK](https://github.com/MONEI/monei-php-sdk) - [Python SDK](https://github.com/MONEI/monei-python-sdk) - [Node.js SDK](https://github.com/MONEI/monei-node-sdk) - [Postman Collection](https://postman.monei.com/) Our SDKs handle authentication, error handling, and request formatting automatically. You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the [OpenAPI Generator](https://openapi-generator.tech/). ### Important Requirements - All API requests must be made over HTTPS - If you are not using our official SDKs, you **must provide a valid `User-Agent` header** with each request - Requests without proper authentication will return a `401 Unauthorized` error ### Error Handling The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a `statusCode` attribute indicating the outcome of your request. ### Rate Limits The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a `429 Too Many Requests` status code. # noqa: E501 + +The version of the OpenAPI document: 1.13.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.price_nickname import PriceNickname + + globals()["PriceNickname"] = PriceNickname + + +class UpdatePriceRequest(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 { + "active": (bool,), # noqa: E501 + "nickname": (PriceNickname,), # noqa: E501 + "metadata": ( + {str: (bool, date, datetime, dict, float, int, list, str, none_type)}, + ), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + attribute_map = { + "active": "active", # noqa: E501 + "nickname": "nickname", # 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 + """UpdatePriceRequest - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + active (bool): Whether the price is active. An inactive price cannot start a subscription, and a subscription cannot switch to it. Prices are never deleted: set `active` to `false` to archive one. Subscriptions that already use it keep their copy of its values. A new price is active unless created with `active: false`. . [optional] # noqa: E501 + nickname (PriceNickname): [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 + """UpdatePriceRequest - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + active (bool): Whether the price is active. An inactive price cannot start a subscription, and a subscription cannot switch to it. Prices are never deleted: set `active` to `false` to archive one. Subscriptions that already use it keep their copy of its values. A new price is active unless created with `active: false`. . [optional] # noqa: E501 + nickname (PriceNickname): [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/update_product_request.py b/Monei/model/update_product_request.py new file mode 100644 index 0000000..726c6bd --- /dev/null +++ b/Monei/model/update_product_request.py @@ -0,0 +1,351 @@ +""" +MONEI API v1 + +The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly. ### Base URL All API requests should be made to: ``` https://api.monei.com/v1 ``` ### Environment MONEI provides two environments: - **Test Environment**: For development and testing without processing real payments - **Live Environment**: For processing real transactions in production ### Client Libraries We provide official SDKs to simplify integration: - [PHP SDK](https://github.com/MONEI/monei-php-sdk) - [Python SDK](https://github.com/MONEI/monei-python-sdk) - [Node.js SDK](https://github.com/MONEI/monei-node-sdk) - [Postman Collection](https://postman.monei.com/) Our SDKs handle authentication, error handling, and request formatting automatically. You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the [OpenAPI Generator](https://openapi-generator.tech/). ### Important Requirements - All API requests must be made over HTTPS - If you are not using our official SDKs, you **must provide a valid `User-Agent` header** with each request - Requests without proper authentication will return a `401 Unauthorized` error ### Error Handling The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a `statusCode` attribute indicating the outcome of your request. ### Rate Limits The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a `429 Too Many Requests` status code. # noqa: E501 + +The version of the OpenAPI document: 1.13.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.product_description import ProductDescription + from Monei.model.product_descriptor import ProductDescriptor + from Monei.model.product_images import ProductImages + from Monei.model.product_name import ProductName + from Monei.model.product_unit_label import ProductUnitLabel + + globals()["ProductDescription"] = ProductDescription + globals()["ProductDescriptor"] = ProductDescriptor + globals()["ProductImages"] = ProductImages + globals()["ProductName"] = ProductName + globals()["ProductUnitLabel"] = ProductUnitLabel + + +class UpdateProductRequest(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 = { + ("slug",): { + "max_length": 100, + "regex": { + "pattern": r"^[a-z0-9]+(-[a-z0-9]+)*$", # noqa: E501 + }, + }, + } + + @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": (ProductName,), # noqa: E501 + "description": (ProductDescription,), # noqa: E501 + "images": (ProductImages,), # noqa: E501 + "slug": ( + str, + none_type, + ), # noqa: E501 + "shippable": (bool,), # noqa: E501 + "unit_label": (ProductUnitLabel,), # noqa: E501 + "descriptor": (ProductDescriptor,), # noqa: E501 + "default_price_id": ( + str, + none_type, + ), # noqa: E501 + "tax_rate_id": ( + str, + none_type, + ), # noqa: E501 + "active": (bool,), # noqa: E501 + "metadata": ( + {str: (bool, date, datetime, dict, float, int, list, str, none_type)}, + ), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + attribute_map = { + "name": "name", # noqa: E501 + "description": "description", # noqa: E501 + "images": "images", # noqa: E501 + "slug": "slug", # noqa: E501 + "shippable": "shippable", # noqa: E501 + "unit_label": "unitLabel", # noqa: E501 + "descriptor": "descriptor", # noqa: E501 + "default_price_id": "defaultPriceId", # noqa: E501 + "tax_rate_id": "taxRateId", # noqa: E501 + "active": "active", # 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 + """UpdateProductRequest - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make 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 (ProductName): [optional] # noqa: E501 + description (ProductDescription): [optional] # noqa: E501 + images (ProductImages): [optional] # noqa: E501 + slug (str, none_type): A short name of the product, unique in your account. A slug another product already has is rejected with `409`. Send `null` to remove the slug. . [optional] # noqa: E501 + shippable (bool): Whether the product is shipped to the buyer.. [optional] # noqa: E501 + unit_label (ProductUnitLabel): [optional] # noqa: E501 + descriptor (ProductDescriptor): [optional] # noqa: E501 + default_price_id (str, none_type): The ID of an active price of this product. Send `null` to remove the default price. . [optional] # noqa: E501 + tax_rate_id (str, none_type): The ID of an active tax rate of your account. Send `null` to remove the tax rate. A change applies to new subscriptions and price switches only. . [optional] # noqa: E501 + active (bool): Whether the product is active. Products are never deleted: set `active` to `false` to archive one. Archiving a product does not archive its prices, and its prices can still start subscriptions. A new product is active unless created with `active: false`. . [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 + """UpdateProductRequest - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make 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 (ProductName): [optional] # noqa: E501 + description (ProductDescription): [optional] # noqa: E501 + images (ProductImages): [optional] # noqa: E501 + slug (str, none_type): A short name of the product, unique in your account. A slug another product already has is rejected with `409`. Send `null` to remove the slug. . [optional] # noqa: E501 + shippable (bool): Whether the product is shipped to the buyer.. [optional] # noqa: E501 + unit_label (ProductUnitLabel): [optional] # noqa: E501 + descriptor (ProductDescriptor): [optional] # noqa: E501 + default_price_id (str, none_type): The ID of an active price of this product. Send `null` to remove the default price. . [optional] # noqa: E501 + tax_rate_id (str, none_type): The ID of an active tax rate of your account. Send `null` to remove the tax rate. A change applies to new subscriptions and price switches only. . [optional] # noqa: E501 + active (bool): Whether the product is active. Products are never deleted: set `active` to `false` to archive one. Archiving a product does not archive its prices, and its prices can still start subscriptions. A new product is active unless created with `active: false`. . [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/update_subscription_request.py b/Monei/model/update_subscription_request.py index 75a80e9..8b48f27 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: - [PHP SDK](https://github.com/MONEI/monei-php-sdk) - [Python SDK](https://github.com/MONEI/monei-python-sdk) - [Node.js SDK](https://github.com/MONEI/monei-node-sdk) - [Postman Collection](https://postman.monei.com/) Our SDKs handle authentication, error handling, and request formatting automatically. You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the [OpenAPI Generator](https://openapi-generator.tech/). ### Important Requirements - All API requests must be made over HTTPS - If you are not using our official SDKs, you **must provide a valid `User-Agent` header** with each request - Requests without proper authentication will return a `401 Unauthorized` error ### Error Handling The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a `statusCode` attribute indicating the outcome of your request. ### Rate Limits The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a `429 Too Many Requests` status code. # noqa: E501 -The version of the OpenAPI document: 1.12.3 +The version of the OpenAPI document: 1.13.0 Generated by: https://openapi-generator.tech """ @@ -105,6 +105,7 @@ def openapi_types(): """ lazy_import() return { + "price_id": (str,), # noqa: E501 "amount": (int,), # noqa: E501 "interval": (SubscriptionInterval,), # noqa: E501 "interval_count": (int,), # noqa: E501 @@ -134,6 +135,7 @@ def discriminator(): return None attribute_map = { + "price_id": "priceId", # noqa: E501 "amount": "amount", # noqa: E501 "interval": "interval", # noqa: E501 "interval_count": "intervalCount", # noqa: E501 @@ -196,6 +198,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,) + price_id (str): The [price](https://docs.monei.com/apis/rest/prices-create/) the subscription bills. The subscription copies the price's values when it is created or switched to the price. A later change to the price never changes 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 interval (SubscriptionInterval): [optional] # noqa: E501 interval_count (int): Number of intervals between subscription payments.. [optional] # noqa: E501 @@ -306,6 +309,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,) + price_id (str): The [price](https://docs.monei.com/apis/rest/prices-create/) the subscription bills. The subscription copies the price's values when it is created or switched to the price. A later change to the price never changes 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 interval (SubscriptionInterval): [optional] # noqa: E501 interval_count (int): Number of intervals between subscription payments.. [optional] # noqa: E501 diff --git a/Monei/model/update_tax_rate_request.py b/Monei/model/update_tax_rate_request.py new file mode 100644 index 0000000..2cbd8c9 --- /dev/null +++ b/Monei/model/update_tax_rate_request.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: - [PHP SDK](https://github.com/MONEI/monei-php-sdk) - [Python SDK](https://github.com/MONEI/monei-python-sdk) - [Node.js SDK](https://github.com/MONEI/monei-node-sdk) - [Postman Collection](https://postman.monei.com/) Our SDKs handle authentication, error handling, and request formatting automatically. You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the [OpenAPI Generator](https://openapi-generator.tech/). ### Important Requirements - All API requests must be made over HTTPS - If you are not using our official SDKs, you **must provide a valid `User-Agent` header** with each request - Requests without proper authentication will return a `401 Unauthorized` error ### Error Handling The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a `statusCode` attribute indicating the outcome of your request. ### Rate Limits The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a `429 Too Many Requests` status code. # noqa: E501 + +The version of the OpenAPI document: 1.13.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.tax_rate_display_name import TaxRateDisplayName + + globals()["TaxRateDisplayName"] = TaxRateDisplayName + + +class UpdateTaxRateRequest(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 { + "display_name": (TaxRateDisplayName,), # noqa: E501 + "active": (bool,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + attribute_map = { + "display_name": "displayName", # noqa: E501 + "active": "active", # noqa: E501 + } + + read_only_vars = {} + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """UpdateTaxRateRequest - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + display_name (TaxRateDisplayName): [optional] # noqa: E501 + active (bool): Whether the tax rate is active. Tax rates are never deleted: set `active` to `false` to archive one. An archived rate cannot be set on a product. While a product still has it, the product cannot get new prices and its prices cannot start or switch a subscription. Subscriptions that already use it keep their copy. A new tax rate is active unless created with `active: false`. . [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 + """UpdateTaxRateRequest - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + display_name (TaxRateDisplayName): [optional] # noqa: E501 + active (bool): Whether the tax rate is active. Tax rates are never deleted: set `active` to `false` to archive one. An archived rate cannot be set on a product. While a product still has it, the product cannot get new prices and its prices cannot start or switch a subscription. Subscriptions that already use it keep their copy. A new tax rate is active unless created with `active: false`. . [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 index 412ef41..8ab792b 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: - [PHP SDK](https://github.com/MONEI/monei-php-sdk) - [Python SDK](https://github.com/MONEI/monei-python-sdk) - [Node.js SDK](https://github.com/MONEI/monei-node-sdk) - [Postman Collection](https://postman.monei.com/) Our SDKs handle authentication, error handling, and request formatting automatically. You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the [OpenAPI Generator](https://openapi-generator.tech/). ### Important Requirements - All API requests must be made over HTTPS - If you are not using our official SDKs, you **must provide a valid `User-Agent` header** with each request - Requests without proper authentication will return a `401 Unauthorized` error ### Error Handling The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a `statusCode` attribute indicating the outcome of your request. ### Rate Limits The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a `429 Too Many Requests` status code. # noqa: E501 -The version of the OpenAPI document: 1.12.3 +The version of the OpenAPI document: 1.13.0 Generated by: https://openapi-generator.tech """ diff --git a/Monei/model_utils.py b/Monei/model_utils.py index 44116c9..696907e 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: - [PHP SDK](https://github.com/MONEI/monei-php-sdk) - [Python SDK](https://github.com/MONEI/monei-python-sdk) - [Node.js SDK](https://github.com/MONEI/monei-node-sdk) - [Postman Collection](https://postman.monei.com/) Our SDKs handle authentication, error handling, and request formatting automatically. You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the [OpenAPI Generator](https://openapi-generator.tech/). ### Important Requirements - All API requests must be made over HTTPS - If you are not using our official SDKs, you **must provide a valid `User-Agent` header** with each request - Requests without proper authentication will return a `401 Unauthorized` error ### Error Handling The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a `statusCode` attribute indicating the outcome of your request. ### Rate Limits The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a `429 Too Many Requests` status code. # noqa: E501 -The version of the OpenAPI document: 1.12.3 +The version of the OpenAPI document: 1.13.0 Generated by: https://openapi-generator.tech """ diff --git a/Monei/models/__init__.py b/Monei/models/__init__.py index 07adeb0..08ebbcd 100644 --- a/Monei/models/__init__.py +++ b/Monei/models/__init__.py @@ -37,7 +37,10 @@ from Monei.model.create_customer_request import CreateCustomerRequest from Monei.model.create_payment_request import CreatePaymentRequest from Monei.model.create_pos_auth_token_request import CreatePosAuthTokenRequest +from Monei.model.create_price_request import CreatePriceRequest +from Monei.model.create_product_request import CreateProductRequest from Monei.model.create_subscription_request import CreateSubscriptionRequest +from Monei.model.create_tax_rate_request import CreateTaxRateRequest from Monei.model.customer import Customer from Monei.model.customer_payment_method import CustomerPaymentMethod from Monei.model.deleted_resource import DeletedResource @@ -117,6 +120,22 @@ from Monei.model.preview_subscription_update_request import ( PreviewSubscriptionUpdateRequest, ) +from Monei.model.price import Price +from Monei.model.price_interval import PriceInterval +from Monei.model.price_interval_count import PriceIntervalCount +from Monei.model.price_list import PriceList +from Monei.model.price_nickname import PriceNickname +from Monei.model.price_recurring import PriceRecurring +from Monei.model.price_trial_period_days import PriceTrialPeriodDays +from Monei.model.price_unit_amount import PriceUnitAmount +from Monei.model.product import Product +from Monei.model.product_description import ProductDescription +from Monei.model.product_descriptor import ProductDescriptor +from Monei.model.product_images import ProductImages +from Monei.model.product_list import ProductList +from Monei.model.product_name import ProductName +from Monei.model.product_slug import ProductSlug +from Monei.model.product_unit_label import ProductUnitLabel 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 @@ -140,6 +159,11 @@ from Monei.model.subscription_trial_amount import SubscriptionTrialAmount from Monei.model.subscription_trial_interval_count import SubscriptionTrialIntervalCount from Monei.model.subscription_update_preview import SubscriptionUpdatePreview +from Monei.model.tax_details import TaxDetails +from Monei.model.tax_rate import TaxRate +from Monei.model.tax_rate_display_name import TaxRateDisplayName +from Monei.model.tax_rate_list import TaxRateList +from Monei.model.tax_rate_percentage import TaxRatePercentage from Monei.model.unauthorized_error import UnauthorizedError from Monei.model.unauthorized_error_all_of import UnauthorizedErrorAllOf from Monei.model.unprocessable_entity_error import UnprocessableEntityError @@ -148,5 +172,8 @@ UpdateApplePayCertificateRequest, ) from Monei.model.update_customer_request import UpdateCustomerRequest +from Monei.model.update_price_request import UpdatePriceRequest +from Monei.model.update_product_request import UpdateProductRequest from Monei.model.update_subscription_request import UpdateSubscriptionRequest +from Monei.model.update_tax_rate_request import UpdateTaxRateRequest from Monei.model.validate_bizum_phone_request import ValidateBizumPhoneRequest diff --git a/Monei/monei_client.py b/Monei/monei_client.py index 103e0ba..70ad18a 100644 --- a/Monei/monei_client.py +++ b/Monei/monei_client.py @@ -10,6 +10,9 @@ PaymentMethodsApi, SubscriptionsApi, CustomersApi, + ProductsApi, + PricesApi, + TaxRatesApi, ApplePayDomainApi, ApplePayCertificateApi, BizumApi, @@ -88,6 +91,9 @@ def call_api_with_validation(*args, **kwargs): self.PaymentMethods = PaymentMethodsApi(api_client) self.Subscriptions = SubscriptionsApi(api_client) self.Customers = CustomersApi(api_client) + self.Products = ProductsApi(api_client) + self.Prices = PricesApi(api_client) + self.TaxRates = TaxRatesApi(api_client) self.ApplePayDomain = ApplePayDomainApi(api_client) self.Bizum = BizumApi(api_client) self.ApplePayCertificate = ApplePayCertificateApi(api_client) @@ -100,6 +106,9 @@ def call_api_with_validation(*args, **kwargs): self.payment_methods = self.PaymentMethods self.subscriptions = self.Subscriptions self.customers = self.Customers + self.products = self.Products + self.prices = self.Prices + self.tax_rates = self.TaxRates self.apple_pay_domain = self.ApplePayDomain self.apple_pay_certificate = self.ApplePayCertificate self.bizum = self.Bizum diff --git a/Monei/rest.py b/Monei/rest.py index 236cf8a..77b7e53 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: - [PHP SDK](https://github.com/MONEI/monei-php-sdk) - [Python SDK](https://github.com/MONEI/monei-python-sdk) - [Node.js SDK](https://github.com/MONEI/monei-node-sdk) - [Postman Collection](https://postman.monei.com/) Our SDKs handle authentication, error handling, and request formatting automatically. You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the [OpenAPI Generator](https://openapi-generator.tech/). ### Important Requirements - All API requests must be made over HTTPS - If you are not using our official SDKs, you **must provide a valid `User-Agent` header** with each request - Requests without proper authentication will return a `401 Unauthorized` error ### Error Handling The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a `statusCode` attribute indicating the outcome of your request. ### Rate Limits The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a `429 Too Many Requests` status code. # noqa: E501 -The version of the OpenAPI document: 1.12.3 +The version of the OpenAPI document: 1.13.0 Generated by: https://openapi-generator.tech """ diff --git a/README.md b/README.md index 17e910f..3967292 100644 --- a/README.md +++ b/README.md @@ -32,6 +32,10 @@ For collecting customer and payment information in the browser, use [monei.js](h - [Creating a Customer](#creating-a-customer) - [Charging a Saved Payment Method](#charging-a-saved-payment-method) - [Managing Payment Methods](#managing-payment-methods) + - [Product Catalog](#product-catalog) + - [Creating a Product and a Price](#creating-a-product-and-a-price) + - [Subscribing to a Price](#subscribing-to-a-price) + - [Tax Rates](#tax-rates) - [Integration Methods](#integration-methods) - [Using the Prebuilt Payment Page](#using-the-prebuilt-payment-page) - [Features](#features) @@ -280,6 +284,63 @@ monei.customers.update( monei.customers.delete_payment_method(customer.id, payment_methods[0].id) ``` +## Product Catalog + +### Creating a Product and a Price + +Fields with constraints in the API schema take a wrapper type, such as `ProductName` or `PriceInterval`. + +```python +from Monei import ( + CreatePriceRequest, + CreateProductRequest, + PriceInterval, + PriceIntervalCount, + PriceRecurring, + PriceUnitAmount, + ProductName, +) + +product = monei.products.create(CreateProductRequest(name=ProductName('Gold plan'))) + +price = monei.prices.create( + CreatePriceRequest( + product_id=product.id, + unit_amount=PriceUnitAmount(1990), + currency='EUR', + recurring=PriceRecurring( + interval=PriceInterval('month'), + interval_count=PriceIntervalCount(1), + ), + ) +) + +prices = monei.prices.list(product_id=product.id) +``` + +### Subscribing to a Price + +Send `price_id` instead of `amount`, `currency` and `interval`. The subscription copies the price's values. + +```python +from Monei import CreateSubscriptionRequest + +subscription = monei.subscriptions.create(CreateSubscriptionRequest(price_id=price.id)) +``` + +### Tax Rates + +```python +from Monei import CreateTaxRateRequest, TaxRateDisplayName, TaxRatePercentage + +tax_rate = monei.tax_rates.create( + CreateTaxRateRequest( + display_name=TaxRateDisplayName('IVA'), + percentage=TaxRatePercentage(21.0), + ) +) +``` + ## Integration Methods ### Using the Prebuilt Payment Page diff --git a/test/test_create_price_request.py b/test/test_create_price_request.py new file mode 100644 index 0000000..49cc11f --- /dev/null +++ b/test/test_create_price_request.py @@ -0,0 +1,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: - [PHP SDK](https://github.com/MONEI/monei-php-sdk) - [Python SDK](https://github.com/MONEI/monei-python-sdk) - [Node.js SDK](https://github.com/MONEI/monei-node-sdk) - [Postman Collection](https://postman.monei.com/) Our SDKs handle authentication, error handling, and request formatting automatically. You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the [OpenAPI Generator](https://openapi-generator.tech/). ### Important Requirements - All API requests must be made over HTTPS - If you are not using our official SDKs, you **must provide a valid `User-Agent` header** with each request - Requests without proper authentication will return a `401 Unauthorized` error ### Error Handling The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a `statusCode` attribute indicating the outcome of your request. ### Rate Limits The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a `429 Too Many Requests` status code. # noqa: E501 + +The version of the OpenAPI document: 1.13.0 +Generated by: https://openapi-generator.tech +""" + +import sys +import unittest + +import Monei +from Monei.model.price_nickname import PriceNickname +from Monei.model.price_recurring import PriceRecurring +from Monei.model.price_unit_amount import PriceUnitAmount + +globals()["PriceNickname"] = PriceNickname +globals()["PriceRecurring"] = PriceRecurring +globals()["PriceUnitAmount"] = PriceUnitAmount +from Monei.model.create_price_request import CreatePriceRequest + + +class TestCreatePriceRequest(unittest.TestCase): + """CreatePriceRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testCreatePriceRequest(self): + """Test CreatePriceRequest""" + # FIXME: construct object with mandatory attributes with example values + # model = CreatePriceRequest() # noqa: E501 + pass + + +if __name__ == "__main__": + unittest.main() diff --git a/test/test_create_product_request.py b/test/test_create_product_request.py new file mode 100644 index 0000000..c63ef58 --- /dev/null +++ b/test/test_create_product_request.py @@ -0,0 +1,47 @@ +""" +MONEI API v1 + +The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly. ### Base URL All API requests should be made to: ``` https://api.monei.com/v1 ``` ### Environment MONEI provides two environments: - **Test Environment**: For development and testing without processing real payments - **Live Environment**: For processing real transactions in production ### Client Libraries We provide official SDKs to simplify integration: - [PHP SDK](https://github.com/MONEI/monei-php-sdk) - [Python SDK](https://github.com/MONEI/monei-python-sdk) - [Node.js SDK](https://github.com/MONEI/monei-node-sdk) - [Postman Collection](https://postman.monei.com/) Our SDKs handle authentication, error handling, and request formatting automatically. You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the [OpenAPI Generator](https://openapi-generator.tech/). ### Important Requirements - All API requests must be made over HTTPS - If you are not using our official SDKs, you **must provide a valid `User-Agent` header** with each request - Requests without proper authentication will return a `401 Unauthorized` error ### Error Handling The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a `statusCode` attribute indicating the outcome of your request. ### Rate Limits The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a `429 Too Many Requests` status code. # noqa: E501 + +The version of the OpenAPI document: 1.13.0 +Generated by: https://openapi-generator.tech +""" + +import sys +import unittest + +import Monei +from Monei.model.product_description import ProductDescription +from Monei.model.product_descriptor import ProductDescriptor +from Monei.model.product_images import ProductImages +from Monei.model.product_name import ProductName +from Monei.model.product_slug import ProductSlug +from Monei.model.product_unit_label import ProductUnitLabel + +globals()["ProductDescription"] = ProductDescription +globals()["ProductDescriptor"] = ProductDescriptor +globals()["ProductImages"] = ProductImages +globals()["ProductName"] = ProductName +globals()["ProductSlug"] = ProductSlug +globals()["ProductUnitLabel"] = ProductUnitLabel +from Monei.model.create_product_request import CreateProductRequest + + +class TestCreateProductRequest(unittest.TestCase): + """CreateProductRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testCreateProductRequest(self): + """Test CreateProductRequest""" + # FIXME: construct object with mandatory attributes with example values + # model = CreateProductRequest() # noqa: E501 + pass + + +if __name__ == "__main__": + unittest.main() diff --git a/test/test_create_tax_rate_request.py b/test/test_create_tax_rate_request.py new file mode 100644 index 0000000..ec15b02 --- /dev/null +++ b/test/test_create_tax_rate_request.py @@ -0,0 +1,39 @@ +""" +MONEI API v1 + +The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly. ### Base URL All API requests should be made to: ``` https://api.monei.com/v1 ``` ### Environment MONEI provides two environments: - **Test Environment**: For development and testing without processing real payments - **Live Environment**: For processing real transactions in production ### Client Libraries We provide official SDKs to simplify integration: - [PHP SDK](https://github.com/MONEI/monei-php-sdk) - [Python SDK](https://github.com/MONEI/monei-python-sdk) - [Node.js SDK](https://github.com/MONEI/monei-node-sdk) - [Postman Collection](https://postman.monei.com/) Our SDKs handle authentication, error handling, and request formatting automatically. You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the [OpenAPI Generator](https://openapi-generator.tech/). ### Important Requirements - All API requests must be made over HTTPS - If you are not using our official SDKs, you **must provide a valid `User-Agent` header** with each request - Requests without proper authentication will return a `401 Unauthorized` error ### Error Handling The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a `statusCode` attribute indicating the outcome of your request. ### Rate Limits The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a `429 Too Many Requests` status code. # noqa: E501 + +The version of the OpenAPI document: 1.13.0 +Generated by: https://openapi-generator.tech +""" + +import sys +import unittest + +import Monei +from Monei.model.tax_rate_display_name import TaxRateDisplayName +from Monei.model.tax_rate_percentage import TaxRatePercentage + +globals()["TaxRateDisplayName"] = TaxRateDisplayName +globals()["TaxRatePercentage"] = TaxRatePercentage +from Monei.model.create_tax_rate_request import CreateTaxRateRequest + + +class TestCreateTaxRateRequest(unittest.TestCase): + """CreateTaxRateRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testCreateTaxRateRequest(self): + """Test CreateTaxRateRequest""" + # FIXME: construct object with mandatory attributes with example values + # model = CreateTaxRateRequest() # noqa: E501 + pass + + +if __name__ == "__main__": + unittest.main() diff --git a/test/test_price.py b/test/test_price.py new file mode 100644 index 0000000..e01fd74 --- /dev/null +++ b/test/test_price.py @@ -0,0 +1,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: - [PHP SDK](https://github.com/MONEI/monei-php-sdk) - [Python SDK](https://github.com/MONEI/monei-python-sdk) - [Node.js SDK](https://github.com/MONEI/monei-node-sdk) - [Postman Collection](https://postman.monei.com/) Our SDKs handle authentication, error handling, and request formatting automatically. You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the [OpenAPI Generator](https://openapi-generator.tech/). ### Important Requirements - All API requests must be made over HTTPS - If you are not using our official SDKs, you **must provide a valid `User-Agent` header** with each request - Requests without proper authentication will return a `401 Unauthorized` error ### Error Handling The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a `statusCode` attribute indicating the outcome of your request. ### Rate Limits The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a `429 Too Many Requests` status code. # noqa: E501 + +The version of the OpenAPI document: 1.13.0 +Generated by: https://openapi-generator.tech +""" + +import sys +import unittest + +import Monei +from Monei.model.price_nickname import PriceNickname +from Monei.model.price_recurring import PriceRecurring +from Monei.model.price_unit_amount import PriceUnitAmount + +globals()["PriceNickname"] = PriceNickname +globals()["PriceRecurring"] = PriceRecurring +globals()["PriceUnitAmount"] = PriceUnitAmount +from Monei.model.price import Price + + +class TestPrice(unittest.TestCase): + """Price unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testPrice(self): + """Test Price""" + # FIXME: construct object with mandatory attributes with example values + # model = Price() # noqa: E501 + pass + + +if __name__ == "__main__": + unittest.main() diff --git a/test/test_price_interval.py b/test/test_price_interval.py new file mode 100644 index 0000000..8499c67 --- /dev/null +++ b/test/test_price_interval.py @@ -0,0 +1,34 @@ +""" +MONEI API v1 + +The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly. ### Base URL All API requests should be made to: ``` https://api.monei.com/v1 ``` ### Environment MONEI provides two environments: - **Test Environment**: For development and testing without processing real payments - **Live Environment**: For processing real transactions in production ### Client Libraries We provide official SDKs to simplify integration: - [PHP SDK](https://github.com/MONEI/monei-php-sdk) - [Python SDK](https://github.com/MONEI/monei-python-sdk) - [Node.js SDK](https://github.com/MONEI/monei-node-sdk) - [Postman Collection](https://postman.monei.com/) Our SDKs handle authentication, error handling, and request formatting automatically. You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the [OpenAPI Generator](https://openapi-generator.tech/). ### Important Requirements - All API requests must be made over HTTPS - If you are not using our official SDKs, you **must provide a valid `User-Agent` header** with each request - Requests without proper authentication will return a `401 Unauthorized` error ### Error Handling The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a `statusCode` attribute indicating the outcome of your request. ### Rate Limits The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a `429 Too Many Requests` status code. # noqa: E501 + +The version of the OpenAPI document: 1.13.0 +Generated by: https://openapi-generator.tech +""" + +import sys +import unittest + +import Monei +from Monei.model.price_interval import PriceInterval + + +class TestPriceInterval(unittest.TestCase): + """PriceInterval unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testPriceInterval(self): + """Test PriceInterval""" + # FIXME: construct object with mandatory attributes with example values + # model = PriceInterval() # noqa: E501 + pass + + +if __name__ == "__main__": + unittest.main() diff --git a/test/test_price_interval_count.py b/test/test_price_interval_count.py new file mode 100644 index 0000000..1dd7915 --- /dev/null +++ b/test/test_price_interval_count.py @@ -0,0 +1,34 @@ +""" +MONEI API v1 + +The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly. ### Base URL All API requests should be made to: ``` https://api.monei.com/v1 ``` ### Environment MONEI provides two environments: - **Test Environment**: For development and testing without processing real payments - **Live Environment**: For processing real transactions in production ### Client Libraries We provide official SDKs to simplify integration: - [PHP SDK](https://github.com/MONEI/monei-php-sdk) - [Python SDK](https://github.com/MONEI/monei-python-sdk) - [Node.js SDK](https://github.com/MONEI/monei-node-sdk) - [Postman Collection](https://postman.monei.com/) Our SDKs handle authentication, error handling, and request formatting automatically. You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the [OpenAPI Generator](https://openapi-generator.tech/). ### Important Requirements - All API requests must be made over HTTPS - If you are not using our official SDKs, you **must provide a valid `User-Agent` header** with each request - Requests without proper authentication will return a `401 Unauthorized` error ### Error Handling The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a `statusCode` attribute indicating the outcome of your request. ### Rate Limits The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a `429 Too Many Requests` status code. # noqa: E501 + +The version of the OpenAPI document: 1.13.0 +Generated by: https://openapi-generator.tech +""" + +import sys +import unittest + +import Monei +from Monei.model.price_interval_count import PriceIntervalCount + + +class TestPriceIntervalCount(unittest.TestCase): + """PriceIntervalCount unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testPriceIntervalCount(self): + """Test PriceIntervalCount""" + # FIXME: construct object with mandatory attributes with example values + # model = PriceIntervalCount() # noqa: E501 + pass + + +if __name__ == "__main__": + unittest.main() diff --git a/test/test_price_list.py b/test/test_price_list.py new file mode 100644 index 0000000..9c662a1 --- /dev/null +++ b/test/test_price_list.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: - [PHP SDK](https://github.com/MONEI/monei-php-sdk) - [Python SDK](https://github.com/MONEI/monei-python-sdk) - [Node.js SDK](https://github.com/MONEI/monei-node-sdk) - [Postman Collection](https://postman.monei.com/) Our SDKs handle authentication, error handling, and request formatting automatically. You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the [OpenAPI Generator](https://openapi-generator.tech/). ### Important Requirements - All API requests must be made over HTTPS - If you are not using our official SDKs, you **must provide a valid `User-Agent` header** with each request - Requests without proper authentication will return a `401 Unauthorized` error ### Error Handling The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a `statusCode` attribute indicating the outcome of your request. ### Rate Limits The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a `429 Too Many Requests` status code. # noqa: E501 + +The version of the OpenAPI document: 1.13.0 +Generated by: https://openapi-generator.tech +""" + +import sys +import unittest + +import Monei +from Monei.model.price import Price + +globals()["Price"] = Price +from Monei.model.price_list import PriceList + + +class TestPriceList(unittest.TestCase): + """PriceList unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testPriceList(self): + """Test PriceList""" + # FIXME: construct object with mandatory attributes with example values + # model = PriceList() # noqa: E501 + pass + + +if __name__ == "__main__": + unittest.main() diff --git a/test/test_price_nickname.py b/test/test_price_nickname.py new file mode 100644 index 0000000..3a254a5 --- /dev/null +++ b/test/test_price_nickname.py @@ -0,0 +1,34 @@ +""" +MONEI API v1 + +The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly. ### Base URL All API requests should be made to: ``` https://api.monei.com/v1 ``` ### Environment MONEI provides two environments: - **Test Environment**: For development and testing without processing real payments - **Live Environment**: For processing real transactions in production ### Client Libraries We provide official SDKs to simplify integration: - [PHP SDK](https://github.com/MONEI/monei-php-sdk) - [Python SDK](https://github.com/MONEI/monei-python-sdk) - [Node.js SDK](https://github.com/MONEI/monei-node-sdk) - [Postman Collection](https://postman.monei.com/) Our SDKs handle authentication, error handling, and request formatting automatically. You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the [OpenAPI Generator](https://openapi-generator.tech/). ### Important Requirements - All API requests must be made over HTTPS - If you are not using our official SDKs, you **must provide a valid `User-Agent` header** with each request - Requests without proper authentication will return a `401 Unauthorized` error ### Error Handling The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a `statusCode` attribute indicating the outcome of your request. ### Rate Limits The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a `429 Too Many Requests` status code. # noqa: E501 + +The version of the OpenAPI document: 1.13.0 +Generated by: https://openapi-generator.tech +""" + +import sys +import unittest + +import Monei +from Monei.model.price_nickname import PriceNickname + + +class TestPriceNickname(unittest.TestCase): + """PriceNickname unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testPriceNickname(self): + """Test PriceNickname""" + # FIXME: construct object with mandatory attributes with example values + # model = PriceNickname() # noqa: E501 + pass + + +if __name__ == "__main__": + unittest.main() diff --git a/test/test_price_recurring.py b/test/test_price_recurring.py new file mode 100644 index 0000000..dd9cc24 --- /dev/null +++ b/test/test_price_recurring.py @@ -0,0 +1,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: - [PHP SDK](https://github.com/MONEI/monei-php-sdk) - [Python SDK](https://github.com/MONEI/monei-python-sdk) - [Node.js SDK](https://github.com/MONEI/monei-node-sdk) - [Postman Collection](https://postman.monei.com/) Our SDKs handle authentication, error handling, and request formatting automatically. You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the [OpenAPI Generator](https://openapi-generator.tech/). ### Important Requirements - All API requests must be made over HTTPS - If you are not using our official SDKs, you **must provide a valid `User-Agent` header** with each request - Requests without proper authentication will return a `401 Unauthorized` error ### Error Handling The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a `statusCode` attribute indicating the outcome of your request. ### Rate Limits The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a `429 Too Many Requests` status code. # noqa: E501 + +The version of the OpenAPI document: 1.13.0 +Generated by: https://openapi-generator.tech +""" + +import sys +import unittest + +import Monei +from Monei.model.price_interval import PriceInterval +from Monei.model.price_interval_count import PriceIntervalCount +from Monei.model.price_trial_period_days import PriceTrialPeriodDays + +globals()["PriceInterval"] = PriceInterval +globals()["PriceIntervalCount"] = PriceIntervalCount +globals()["PriceTrialPeriodDays"] = PriceTrialPeriodDays +from Monei.model.price_recurring import PriceRecurring + + +class TestPriceRecurring(unittest.TestCase): + """PriceRecurring unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testPriceRecurring(self): + """Test PriceRecurring""" + # FIXME: construct object with mandatory attributes with example values + # model = PriceRecurring() # noqa: E501 + pass + + +if __name__ == "__main__": + unittest.main() diff --git a/test/test_price_trial_period_days.py b/test/test_price_trial_period_days.py new file mode 100644 index 0000000..1109452 --- /dev/null +++ b/test/test_price_trial_period_days.py @@ -0,0 +1,34 @@ +""" +MONEI API v1 + +The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly. ### Base URL All API requests should be made to: ``` https://api.monei.com/v1 ``` ### Environment MONEI provides two environments: - **Test Environment**: For development and testing without processing real payments - **Live Environment**: For processing real transactions in production ### Client Libraries We provide official SDKs to simplify integration: - [PHP SDK](https://github.com/MONEI/monei-php-sdk) - [Python SDK](https://github.com/MONEI/monei-python-sdk) - [Node.js SDK](https://github.com/MONEI/monei-node-sdk) - [Postman Collection](https://postman.monei.com/) Our SDKs handle authentication, error handling, and request formatting automatically. You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the [OpenAPI Generator](https://openapi-generator.tech/). ### Important Requirements - All API requests must be made over HTTPS - If you are not using our official SDKs, you **must provide a valid `User-Agent` header** with each request - Requests without proper authentication will return a `401 Unauthorized` error ### Error Handling The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a `statusCode` attribute indicating the outcome of your request. ### Rate Limits The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a `429 Too Many Requests` status code. # noqa: E501 + +The version of the OpenAPI document: 1.13.0 +Generated by: https://openapi-generator.tech +""" + +import sys +import unittest + +import Monei +from Monei.model.price_trial_period_days import PriceTrialPeriodDays + + +class TestPriceTrialPeriodDays(unittest.TestCase): + """PriceTrialPeriodDays unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testPriceTrialPeriodDays(self): + """Test PriceTrialPeriodDays""" + # FIXME: construct object with mandatory attributes with example values + # model = PriceTrialPeriodDays() # noqa: E501 + pass + + +if __name__ == "__main__": + unittest.main() diff --git a/test/test_price_unit_amount.py b/test/test_price_unit_amount.py new file mode 100644 index 0000000..303866c --- /dev/null +++ b/test/test_price_unit_amount.py @@ -0,0 +1,34 @@ +""" +MONEI API v1 + +The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly. ### Base URL All API requests should be made to: ``` https://api.monei.com/v1 ``` ### Environment MONEI provides two environments: - **Test Environment**: For development and testing without processing real payments - **Live Environment**: For processing real transactions in production ### Client Libraries We provide official SDKs to simplify integration: - [PHP SDK](https://github.com/MONEI/monei-php-sdk) - [Python SDK](https://github.com/MONEI/monei-python-sdk) - [Node.js SDK](https://github.com/MONEI/monei-node-sdk) - [Postman Collection](https://postman.monei.com/) Our SDKs handle authentication, error handling, and request formatting automatically. You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the [OpenAPI Generator](https://openapi-generator.tech/). ### Important Requirements - All API requests must be made over HTTPS - If you are not using our official SDKs, you **must provide a valid `User-Agent` header** with each request - Requests without proper authentication will return a `401 Unauthorized` error ### Error Handling The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a `statusCode` attribute indicating the outcome of your request. ### Rate Limits The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a `429 Too Many Requests` status code. # noqa: E501 + +The version of the OpenAPI document: 1.13.0 +Generated by: https://openapi-generator.tech +""" + +import sys +import unittest + +import Monei +from Monei.model.price_unit_amount import PriceUnitAmount + + +class TestPriceUnitAmount(unittest.TestCase): + """PriceUnitAmount unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testPriceUnitAmount(self): + """Test PriceUnitAmount""" + # FIXME: construct object with mandatory attributes with example values + # model = PriceUnitAmount() # noqa: E501 + pass + + +if __name__ == "__main__": + unittest.main() diff --git a/test/test_prices_api.py b/test/test_prices_api.py new file mode 100644 index 0000000..7dd46d1 --- /dev/null +++ b/test/test_prices_api.py @@ -0,0 +1,55 @@ +""" +MONEI API v1 + +The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly. ### Base URL All API requests should be made to: ``` https://api.monei.com/v1 ``` ### Environment MONEI provides two environments: - **Test Environment**: For development and testing without processing real payments - **Live Environment**: For processing real transactions in production ### Client Libraries We provide official SDKs to simplify integration: - [PHP SDK](https://github.com/MONEI/monei-php-sdk) - [Python SDK](https://github.com/MONEI/monei-python-sdk) - [Node.js SDK](https://github.com/MONEI/monei-node-sdk) - [Postman Collection](https://postman.monei.com/) Our SDKs handle authentication, error handling, and request formatting automatically. You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the [OpenAPI Generator](https://openapi-generator.tech/). ### Important Requirements - All API requests must be made over HTTPS - If you are not using our official SDKs, you **must provide a valid `User-Agent` header** with each request - Requests without proper authentication will return a `401 Unauthorized` error ### Error Handling The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a `statusCode` attribute indicating the outcome of your request. ### Rate Limits The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a `429 Too Many Requests` status code. # noqa: E501 + +The version of the OpenAPI document: 1.13.0 +Generated by: https://openapi-generator.tech +""" + +import unittest + +import Monei +from Monei.api.prices_api import PricesApi # noqa: E501 + + +class TestPricesApi(unittest.TestCase): + """PricesApi unit test stubs""" + + def setUp(self): + self.api = PricesApi() # noqa: E501 + + def tearDown(self): + pass + + def test_create(self): + """Test case for create + + Create Price # noqa: E501 + """ + pass + + def test_get(self): + """Test case for get + + Get Price # noqa: E501 + """ + pass + + def test_list(self): + """Test case for list + + List Prices # noqa: E501 + """ + pass + + def test_update(self): + """Test case for update + + Update Price # noqa: E501 + """ + pass + + +if __name__ == "__main__": + unittest.main() diff --git a/test/test_product.py b/test/test_product.py new file mode 100644 index 0000000..72c6562 --- /dev/null +++ b/test/test_product.py @@ -0,0 +1,47 @@ +""" +MONEI API v1 + +The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly. ### Base URL All API requests should be made to: ``` https://api.monei.com/v1 ``` ### Environment MONEI provides two environments: - **Test Environment**: For development and testing without processing real payments - **Live Environment**: For processing real transactions in production ### Client Libraries We provide official SDKs to simplify integration: - [PHP SDK](https://github.com/MONEI/monei-php-sdk) - [Python SDK](https://github.com/MONEI/monei-python-sdk) - [Node.js SDK](https://github.com/MONEI/monei-node-sdk) - [Postman Collection](https://postman.monei.com/) Our SDKs handle authentication, error handling, and request formatting automatically. You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the [OpenAPI Generator](https://openapi-generator.tech/). ### Important Requirements - All API requests must be made over HTTPS - If you are not using our official SDKs, you **must provide a valid `User-Agent` header** with each request - Requests without proper authentication will return a `401 Unauthorized` error ### Error Handling The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a `statusCode` attribute indicating the outcome of your request. ### Rate Limits The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a `429 Too Many Requests` status code. # noqa: E501 + +The version of the OpenAPI document: 1.13.0 +Generated by: https://openapi-generator.tech +""" + +import sys +import unittest + +import Monei +from Monei.model.product_description import ProductDescription +from Monei.model.product_descriptor import ProductDescriptor +from Monei.model.product_images import ProductImages +from Monei.model.product_name import ProductName +from Monei.model.product_slug import ProductSlug +from Monei.model.product_unit_label import ProductUnitLabel + +globals()["ProductDescription"] = ProductDescription +globals()["ProductDescriptor"] = ProductDescriptor +globals()["ProductImages"] = ProductImages +globals()["ProductName"] = ProductName +globals()["ProductSlug"] = ProductSlug +globals()["ProductUnitLabel"] = ProductUnitLabel +from Monei.model.product import Product + + +class TestProduct(unittest.TestCase): + """Product unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testProduct(self): + """Test Product""" + # FIXME: construct object with mandatory attributes with example values + # model = Product() # noqa: E501 + pass + + +if __name__ == "__main__": + unittest.main() diff --git a/test/test_product_description.py b/test/test_product_description.py new file mode 100644 index 0000000..d082233 --- /dev/null +++ b/test/test_product_description.py @@ -0,0 +1,34 @@ +""" +MONEI API v1 + +The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly. ### Base URL All API requests should be made to: ``` https://api.monei.com/v1 ``` ### Environment MONEI provides two environments: - **Test Environment**: For development and testing without processing real payments - **Live Environment**: For processing real transactions in production ### Client Libraries We provide official SDKs to simplify integration: - [PHP SDK](https://github.com/MONEI/monei-php-sdk) - [Python SDK](https://github.com/MONEI/monei-python-sdk) - [Node.js SDK](https://github.com/MONEI/monei-node-sdk) - [Postman Collection](https://postman.monei.com/) Our SDKs handle authentication, error handling, and request formatting automatically. You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the [OpenAPI Generator](https://openapi-generator.tech/). ### Important Requirements - All API requests must be made over HTTPS - If you are not using our official SDKs, you **must provide a valid `User-Agent` header** with each request - Requests without proper authentication will return a `401 Unauthorized` error ### Error Handling The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a `statusCode` attribute indicating the outcome of your request. ### Rate Limits The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a `429 Too Many Requests` status code. # noqa: E501 + +The version of the OpenAPI document: 1.13.0 +Generated by: https://openapi-generator.tech +""" + +import sys +import unittest + +import Monei +from Monei.model.product_description import ProductDescription + + +class TestProductDescription(unittest.TestCase): + """ProductDescription unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testProductDescription(self): + """Test ProductDescription""" + # FIXME: construct object with mandatory attributes with example values + # model = ProductDescription() # noqa: E501 + pass + + +if __name__ == "__main__": + unittest.main() diff --git a/test/test_product_descriptor.py b/test/test_product_descriptor.py new file mode 100644 index 0000000..a59e95f --- /dev/null +++ b/test/test_product_descriptor.py @@ -0,0 +1,34 @@ +""" +MONEI API v1 + +The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly. ### Base URL All API requests should be made to: ``` https://api.monei.com/v1 ``` ### Environment MONEI provides two environments: - **Test Environment**: For development and testing without processing real payments - **Live Environment**: For processing real transactions in production ### Client Libraries We provide official SDKs to simplify integration: - [PHP SDK](https://github.com/MONEI/monei-php-sdk) - [Python SDK](https://github.com/MONEI/monei-python-sdk) - [Node.js SDK](https://github.com/MONEI/monei-node-sdk) - [Postman Collection](https://postman.monei.com/) Our SDKs handle authentication, error handling, and request formatting automatically. You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the [OpenAPI Generator](https://openapi-generator.tech/). ### Important Requirements - All API requests must be made over HTTPS - If you are not using our official SDKs, you **must provide a valid `User-Agent` header** with each request - Requests without proper authentication will return a `401 Unauthorized` error ### Error Handling The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a `statusCode` attribute indicating the outcome of your request. ### Rate Limits The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a `429 Too Many Requests` status code. # noqa: E501 + +The version of the OpenAPI document: 1.13.0 +Generated by: https://openapi-generator.tech +""" + +import sys +import unittest + +import Monei +from Monei.model.product_descriptor import ProductDescriptor + + +class TestProductDescriptor(unittest.TestCase): + """ProductDescriptor unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testProductDescriptor(self): + """Test ProductDescriptor""" + # FIXME: construct object with mandatory attributes with example values + # model = ProductDescriptor() # noqa: E501 + pass + + +if __name__ == "__main__": + unittest.main() diff --git a/test/test_product_images.py b/test/test_product_images.py new file mode 100644 index 0000000..720c70e --- /dev/null +++ b/test/test_product_images.py @@ -0,0 +1,34 @@ +""" +MONEI API v1 + +The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly. ### Base URL All API requests should be made to: ``` https://api.monei.com/v1 ``` ### Environment MONEI provides two environments: - **Test Environment**: For development and testing without processing real payments - **Live Environment**: For processing real transactions in production ### Client Libraries We provide official SDKs to simplify integration: - [PHP SDK](https://github.com/MONEI/monei-php-sdk) - [Python SDK](https://github.com/MONEI/monei-python-sdk) - [Node.js SDK](https://github.com/MONEI/monei-node-sdk) - [Postman Collection](https://postman.monei.com/) Our SDKs handle authentication, error handling, and request formatting automatically. You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the [OpenAPI Generator](https://openapi-generator.tech/). ### Important Requirements - All API requests must be made over HTTPS - If you are not using our official SDKs, you **must provide a valid `User-Agent` header** with each request - Requests without proper authentication will return a `401 Unauthorized` error ### Error Handling The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a `statusCode` attribute indicating the outcome of your request. ### Rate Limits The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a `429 Too Many Requests` status code. # noqa: E501 + +The version of the OpenAPI document: 1.13.0 +Generated by: https://openapi-generator.tech +""" + +import sys +import unittest + +import Monei +from Monei.model.product_images import ProductImages + + +class TestProductImages(unittest.TestCase): + """ProductImages unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testProductImages(self): + """Test ProductImages""" + # FIXME: construct object with mandatory attributes with example values + # model = ProductImages() # noqa: E501 + pass + + +if __name__ == "__main__": + unittest.main() diff --git a/test/test_product_list.py b/test/test_product_list.py new file mode 100644 index 0000000..c758d78 --- /dev/null +++ b/test/test_product_list.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: - [PHP SDK](https://github.com/MONEI/monei-php-sdk) - [Python SDK](https://github.com/MONEI/monei-python-sdk) - [Node.js SDK](https://github.com/MONEI/monei-node-sdk) - [Postman Collection](https://postman.monei.com/) Our SDKs handle authentication, error handling, and request formatting automatically. You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the [OpenAPI Generator](https://openapi-generator.tech/). ### Important Requirements - All API requests must be made over HTTPS - If you are not using our official SDKs, you **must provide a valid `User-Agent` header** with each request - Requests without proper authentication will return a `401 Unauthorized` error ### Error Handling The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a `statusCode` attribute indicating the outcome of your request. ### Rate Limits The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a `429 Too Many Requests` status code. # noqa: E501 + +The version of the OpenAPI document: 1.13.0 +Generated by: https://openapi-generator.tech +""" + +import sys +import unittest + +import Monei +from Monei.model.product import Product + +globals()["Product"] = Product +from Monei.model.product_list import ProductList + + +class TestProductList(unittest.TestCase): + """ProductList unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testProductList(self): + """Test ProductList""" + # FIXME: construct object with mandatory attributes with example values + # model = ProductList() # noqa: E501 + pass + + +if __name__ == "__main__": + unittest.main() diff --git a/test/test_product_name.py b/test/test_product_name.py new file mode 100644 index 0000000..b5cba32 --- /dev/null +++ b/test/test_product_name.py @@ -0,0 +1,34 @@ +""" +MONEI API v1 + +The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly. ### Base URL All API requests should be made to: ``` https://api.monei.com/v1 ``` ### Environment MONEI provides two environments: - **Test Environment**: For development and testing without processing real payments - **Live Environment**: For processing real transactions in production ### Client Libraries We provide official SDKs to simplify integration: - [PHP SDK](https://github.com/MONEI/monei-php-sdk) - [Python SDK](https://github.com/MONEI/monei-python-sdk) - [Node.js SDK](https://github.com/MONEI/monei-node-sdk) - [Postman Collection](https://postman.monei.com/) Our SDKs handle authentication, error handling, and request formatting automatically. You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the [OpenAPI Generator](https://openapi-generator.tech/). ### Important Requirements - All API requests must be made over HTTPS - If you are not using our official SDKs, you **must provide a valid `User-Agent` header** with each request - Requests without proper authentication will return a `401 Unauthorized` error ### Error Handling The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a `statusCode` attribute indicating the outcome of your request. ### Rate Limits The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a `429 Too Many Requests` status code. # noqa: E501 + +The version of the OpenAPI document: 1.13.0 +Generated by: https://openapi-generator.tech +""" + +import sys +import unittest + +import Monei +from Monei.model.product_name import ProductName + + +class TestProductName(unittest.TestCase): + """ProductName unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testProductName(self): + """Test ProductName""" + # FIXME: construct object with mandatory attributes with example values + # model = ProductName() # noqa: E501 + pass + + +if __name__ == "__main__": + unittest.main() diff --git a/test/test_product_slug.py b/test/test_product_slug.py new file mode 100644 index 0000000..134935f --- /dev/null +++ b/test/test_product_slug.py @@ -0,0 +1,34 @@ +""" +MONEI API v1 + +The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly. ### Base URL All API requests should be made to: ``` https://api.monei.com/v1 ``` ### Environment MONEI provides two environments: - **Test Environment**: For development and testing without processing real payments - **Live Environment**: For processing real transactions in production ### Client Libraries We provide official SDKs to simplify integration: - [PHP SDK](https://github.com/MONEI/monei-php-sdk) - [Python SDK](https://github.com/MONEI/monei-python-sdk) - [Node.js SDK](https://github.com/MONEI/monei-node-sdk) - [Postman Collection](https://postman.monei.com/) Our SDKs handle authentication, error handling, and request formatting automatically. You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the [OpenAPI Generator](https://openapi-generator.tech/). ### Important Requirements - All API requests must be made over HTTPS - If you are not using our official SDKs, you **must provide a valid `User-Agent` header** with each request - Requests without proper authentication will return a `401 Unauthorized` error ### Error Handling The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a `statusCode` attribute indicating the outcome of your request. ### Rate Limits The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a `429 Too Many Requests` status code. # noqa: E501 + +The version of the OpenAPI document: 1.13.0 +Generated by: https://openapi-generator.tech +""" + +import sys +import unittest + +import Monei +from Monei.model.product_slug import ProductSlug + + +class TestProductSlug(unittest.TestCase): + """ProductSlug unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testProductSlug(self): + """Test ProductSlug""" + # FIXME: construct object with mandatory attributes with example values + # model = ProductSlug() # noqa: E501 + pass + + +if __name__ == "__main__": + unittest.main() diff --git a/test/test_product_unit_label.py b/test/test_product_unit_label.py new file mode 100644 index 0000000..af71095 --- /dev/null +++ b/test/test_product_unit_label.py @@ -0,0 +1,34 @@ +""" +MONEI API v1 + +The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly. ### Base URL All API requests should be made to: ``` https://api.monei.com/v1 ``` ### Environment MONEI provides two environments: - **Test Environment**: For development and testing without processing real payments - **Live Environment**: For processing real transactions in production ### Client Libraries We provide official SDKs to simplify integration: - [PHP SDK](https://github.com/MONEI/monei-php-sdk) - [Python SDK](https://github.com/MONEI/monei-python-sdk) - [Node.js SDK](https://github.com/MONEI/monei-node-sdk) - [Postman Collection](https://postman.monei.com/) Our SDKs handle authentication, error handling, and request formatting automatically. You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the [OpenAPI Generator](https://openapi-generator.tech/). ### Important Requirements - All API requests must be made over HTTPS - If you are not using our official SDKs, you **must provide a valid `User-Agent` header** with each request - Requests without proper authentication will return a `401 Unauthorized` error ### Error Handling The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a `statusCode` attribute indicating the outcome of your request. ### Rate Limits The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a `429 Too Many Requests` status code. # noqa: E501 + +The version of the OpenAPI document: 1.13.0 +Generated by: https://openapi-generator.tech +""" + +import sys +import unittest + +import Monei +from Monei.model.product_unit_label import ProductUnitLabel + + +class TestProductUnitLabel(unittest.TestCase): + """ProductUnitLabel unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testProductUnitLabel(self): + """Test ProductUnitLabel""" + # FIXME: construct object with mandatory attributes with example values + # model = ProductUnitLabel() # noqa: E501 + pass + + +if __name__ == "__main__": + unittest.main() diff --git a/test/test_products_api.py b/test/test_products_api.py new file mode 100644 index 0000000..a347ed3 --- /dev/null +++ b/test/test_products_api.py @@ -0,0 +1,55 @@ +""" +MONEI API v1 + +The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly. ### Base URL All API requests should be made to: ``` https://api.monei.com/v1 ``` ### Environment MONEI provides two environments: - **Test Environment**: For development and testing without processing real payments - **Live Environment**: For processing real transactions in production ### Client Libraries We provide official SDKs to simplify integration: - [PHP SDK](https://github.com/MONEI/monei-php-sdk) - [Python SDK](https://github.com/MONEI/monei-python-sdk) - [Node.js SDK](https://github.com/MONEI/monei-node-sdk) - [Postman Collection](https://postman.monei.com/) Our SDKs handle authentication, error handling, and request formatting automatically. You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the [OpenAPI Generator](https://openapi-generator.tech/). ### Important Requirements - All API requests must be made over HTTPS - If you are not using our official SDKs, you **must provide a valid `User-Agent` header** with each request - Requests without proper authentication will return a `401 Unauthorized` error ### Error Handling The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a `statusCode` attribute indicating the outcome of your request. ### Rate Limits The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a `429 Too Many Requests` status code. # noqa: E501 + +The version of the OpenAPI document: 1.13.0 +Generated by: https://openapi-generator.tech +""" + +import unittest + +import Monei +from Monei.api.products_api import ProductsApi # noqa: E501 + + +class TestProductsApi(unittest.TestCase): + """ProductsApi unit test stubs""" + + def setUp(self): + self.api = ProductsApi() # noqa: E501 + + def tearDown(self): + pass + + def test_create(self): + """Test case for create + + Create Product # noqa: E501 + """ + pass + + def test_get(self): + """Test case for get + + Get Product # noqa: E501 + """ + pass + + def test_list(self): + """Test case for list + + List Products # noqa: E501 + """ + pass + + def test_update(self): + """Test case for update + + Update Product # noqa: E501 + """ + pass + + +if __name__ == "__main__": + unittest.main() diff --git a/test/test_products_prices_tax_rates.py b/test/test_products_prices_tax_rates.py new file mode 100644 index 0000000..d003807 --- /dev/null +++ b/test/test_products_prices_tax_rates.py @@ -0,0 +1,113 @@ +import unittest +from unittest.mock import patch + +from Monei import ( + CreateSubscriptionRequest, + CreateTaxRateRequest, + MoneiClient, + TaxRateDisplayName, + TaxRatePercentage, + UpdateProductRequest, +) +from Monei.api_client import ApiClient +from test.test_subscriptions_preview import _response + + +class TestProductsPricesTaxRates(unittest.TestCase): + """The generated tests patch nothing below the API method, so they would not + catch a missing client attribute, a wrong path or a wrong body key.""" + + @patch.object(ApiClient, "request") + def test_update_product_puts_the_default_price(self, request): + request.return_value = _response( + { + "id": "prod_1", + "name": "Gold plan", + "active": True, + "createdAt": 1, + "defaultPriceId": "price_1", + } + ) + monei = MoneiClient(api_key="test_api_key") + + product = monei.products.update( + "prod_1", UpdateProductRequest(default_price_id="price_1") + ) + + method, url = request.call_args.args[:2] + self.assertEqual(method, "PUT") + self.assertTrue(url.endswith("/products/prod_1")) + self.assertEqual( + request.call_args.kwargs["body"], {"defaultPriceId": "price_1"} + ) + self.assertEqual(product.default_price_id, "price_1") + + @patch.object(ApiClient, "request") + def test_list_prices_filters_by_product(self, request): + request.return_value = _response({"items": []}) + monei = MoneiClient(api_key="test_api_key") + + monei.prices.list(product_id="prod_1") + + method, url = request.call_args.args[:2] + self.assertEqual(method, "GET") + self.assertTrue(url.endswith("/prices")) + self.assertEqual( + request.call_args.kwargs["query_params"], [("productId", "prod_1")] + ) + + @patch.object(ApiClient, "request") + def test_create_tax_rate_posts_to_the_hyphenated_path(self, request): + request.return_value = _response( + { + "id": "txr_1", + "displayName": "IVA", + "percentage": 21, + "active": True, + "createdAt": 1, + } + ) + monei = MoneiClient(api_key="test_api_key") + + monei.tax_rates.create( + CreateTaxRateRequest( + display_name=TaxRateDisplayName("IVA"), + percentage=TaxRatePercentage(21.0), + ) + ) + + method, url = request.call_args.args[:2] + self.assertEqual(method, "POST") + self.assertTrue(url.endswith("/tax-rates")) + self.assertEqual( + request.call_args.kwargs["body"], {"displayName": "IVA", "percentage": 21.0} + ) + + @patch.object(ApiClient, "request") + def test_subscription_can_be_created_from_a_price_alone(self, request): + request.return_value = _response( + { + "id": "sub_1", + "accountId": "acc_1", + "livemode": False, + "status": "PENDING", + "amount": 1990, + "currency": "EUR", + "interval": "month", + "intervalCount": 1, + "priceId": "price_1", + "productId": "prod_1", + } + ) + monei = MoneiClient(api_key="test_api_key") + + subscription = monei.subscriptions.create( + CreateSubscriptionRequest(price_id="price_1") + ) + + self.assertEqual(request.call_args.kwargs["body"], {"priceId": "price_1"}) + self.assertEqual(subscription.product_id, "prod_1") + + +if __name__ == "__main__": + unittest.main() diff --git a/test/test_tax_details.py b/test/test_tax_details.py new file mode 100644 index 0000000..4c6b506 --- /dev/null +++ b/test/test_tax_details.py @@ -0,0 +1,39 @@ +""" +MONEI API v1 + +The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly. ### Base URL All API requests should be made to: ``` https://api.monei.com/v1 ``` ### Environment MONEI provides two environments: - **Test Environment**: For development and testing without processing real payments - **Live Environment**: For processing real transactions in production ### Client Libraries We provide official SDKs to simplify integration: - [PHP SDK](https://github.com/MONEI/monei-php-sdk) - [Python SDK](https://github.com/MONEI/monei-python-sdk) - [Node.js SDK](https://github.com/MONEI/monei-node-sdk) - [Postman Collection](https://postman.monei.com/) Our SDKs handle authentication, error handling, and request formatting automatically. You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the [OpenAPI Generator](https://openapi-generator.tech/). ### Important Requirements - All API requests must be made over HTTPS - If you are not using our official SDKs, you **must provide a valid `User-Agent` header** with each request - Requests without proper authentication will return a `401 Unauthorized` error ### Error Handling The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a `statusCode` attribute indicating the outcome of your request. ### Rate Limits The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a `429 Too Many Requests` status code. # noqa: E501 + +The version of the OpenAPI document: 1.13.0 +Generated by: https://openapi-generator.tech +""" + +import sys +import unittest + +import Monei +from Monei.model.tax_rate_display_name import TaxRateDisplayName +from Monei.model.tax_rate_percentage import TaxRatePercentage + +globals()["TaxRateDisplayName"] = TaxRateDisplayName +globals()["TaxRatePercentage"] = TaxRatePercentage +from Monei.model.tax_details import TaxDetails + + +class TestTaxDetails(unittest.TestCase): + """TaxDetails unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testTaxDetails(self): + """Test TaxDetails""" + # FIXME: construct object with mandatory attributes with example values + # model = TaxDetails() # noqa: E501 + pass + + +if __name__ == "__main__": + unittest.main() diff --git a/test/test_tax_rate.py b/test/test_tax_rate.py new file mode 100644 index 0000000..050cc70 --- /dev/null +++ b/test/test_tax_rate.py @@ -0,0 +1,39 @@ +""" +MONEI API v1 + +The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly. ### Base URL All API requests should be made to: ``` https://api.monei.com/v1 ``` ### Environment MONEI provides two environments: - **Test Environment**: For development and testing without processing real payments - **Live Environment**: For processing real transactions in production ### Client Libraries We provide official SDKs to simplify integration: - [PHP SDK](https://github.com/MONEI/monei-php-sdk) - [Python SDK](https://github.com/MONEI/monei-python-sdk) - [Node.js SDK](https://github.com/MONEI/monei-node-sdk) - [Postman Collection](https://postman.monei.com/) Our SDKs handle authentication, error handling, and request formatting automatically. You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the [OpenAPI Generator](https://openapi-generator.tech/). ### Important Requirements - All API requests must be made over HTTPS - If you are not using our official SDKs, you **must provide a valid `User-Agent` header** with each request - Requests without proper authentication will return a `401 Unauthorized` error ### Error Handling The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a `statusCode` attribute indicating the outcome of your request. ### Rate Limits The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a `429 Too Many Requests` status code. # noqa: E501 + +The version of the OpenAPI document: 1.13.0 +Generated by: https://openapi-generator.tech +""" + +import sys +import unittest + +import Monei +from Monei.model.tax_rate_display_name import TaxRateDisplayName +from Monei.model.tax_rate_percentage import TaxRatePercentage + +globals()["TaxRateDisplayName"] = TaxRateDisplayName +globals()["TaxRatePercentage"] = TaxRatePercentage +from Monei.model.tax_rate import TaxRate + + +class TestTaxRate(unittest.TestCase): + """TaxRate unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testTaxRate(self): + """Test TaxRate""" + # FIXME: construct object with mandatory attributes with example values + # model = TaxRate() # noqa: E501 + pass + + +if __name__ == "__main__": + unittest.main() diff --git a/test/test_tax_rate_display_name.py b/test/test_tax_rate_display_name.py new file mode 100644 index 0000000..9d30487 --- /dev/null +++ b/test/test_tax_rate_display_name.py @@ -0,0 +1,34 @@ +""" +MONEI API v1 + +The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly. ### Base URL All API requests should be made to: ``` https://api.monei.com/v1 ``` ### Environment MONEI provides two environments: - **Test Environment**: For development and testing without processing real payments - **Live Environment**: For processing real transactions in production ### Client Libraries We provide official SDKs to simplify integration: - [PHP SDK](https://github.com/MONEI/monei-php-sdk) - [Python SDK](https://github.com/MONEI/monei-python-sdk) - [Node.js SDK](https://github.com/MONEI/monei-node-sdk) - [Postman Collection](https://postman.monei.com/) Our SDKs handle authentication, error handling, and request formatting automatically. You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the [OpenAPI Generator](https://openapi-generator.tech/). ### Important Requirements - All API requests must be made over HTTPS - If you are not using our official SDKs, you **must provide a valid `User-Agent` header** with each request - Requests without proper authentication will return a `401 Unauthorized` error ### Error Handling The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a `statusCode` attribute indicating the outcome of your request. ### Rate Limits The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a `429 Too Many Requests` status code. # noqa: E501 + +The version of the OpenAPI document: 1.13.0 +Generated by: https://openapi-generator.tech +""" + +import sys +import unittest + +import Monei +from Monei.model.tax_rate_display_name import TaxRateDisplayName + + +class TestTaxRateDisplayName(unittest.TestCase): + """TaxRateDisplayName unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testTaxRateDisplayName(self): + """Test TaxRateDisplayName""" + # FIXME: construct object with mandatory attributes with example values + # model = TaxRateDisplayName() # noqa: E501 + pass + + +if __name__ == "__main__": + unittest.main() diff --git a/test/test_tax_rate_list.py b/test/test_tax_rate_list.py new file mode 100644 index 0000000..0cb5241 --- /dev/null +++ b/test/test_tax_rate_list.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: - [PHP SDK](https://github.com/MONEI/monei-php-sdk) - [Python SDK](https://github.com/MONEI/monei-python-sdk) - [Node.js SDK](https://github.com/MONEI/monei-node-sdk) - [Postman Collection](https://postman.monei.com/) Our SDKs handle authentication, error handling, and request formatting automatically. You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the [OpenAPI Generator](https://openapi-generator.tech/). ### Important Requirements - All API requests must be made over HTTPS - If you are not using our official SDKs, you **must provide a valid `User-Agent` header** with each request - Requests without proper authentication will return a `401 Unauthorized` error ### Error Handling The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a `statusCode` attribute indicating the outcome of your request. ### Rate Limits The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a `429 Too Many Requests` status code. # noqa: E501 + +The version of the OpenAPI document: 1.13.0 +Generated by: https://openapi-generator.tech +""" + +import sys +import unittest + +import Monei +from Monei.model.tax_rate import TaxRate + +globals()["TaxRate"] = TaxRate +from Monei.model.tax_rate_list import TaxRateList + + +class TestTaxRateList(unittest.TestCase): + """TaxRateList unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testTaxRateList(self): + """Test TaxRateList""" + # FIXME: construct object with mandatory attributes with example values + # model = TaxRateList() # noqa: E501 + pass + + +if __name__ == "__main__": + unittest.main() diff --git a/test/test_tax_rate_percentage.py b/test/test_tax_rate_percentage.py new file mode 100644 index 0000000..56477fd --- /dev/null +++ b/test/test_tax_rate_percentage.py @@ -0,0 +1,34 @@ +""" +MONEI API v1 + +The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly. ### Base URL All API requests should be made to: ``` https://api.monei.com/v1 ``` ### Environment MONEI provides two environments: - **Test Environment**: For development and testing without processing real payments - **Live Environment**: For processing real transactions in production ### Client Libraries We provide official SDKs to simplify integration: - [PHP SDK](https://github.com/MONEI/monei-php-sdk) - [Python SDK](https://github.com/MONEI/monei-python-sdk) - [Node.js SDK](https://github.com/MONEI/monei-node-sdk) - [Postman Collection](https://postman.monei.com/) Our SDKs handle authentication, error handling, and request formatting automatically. You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the [OpenAPI Generator](https://openapi-generator.tech/). ### Important Requirements - All API requests must be made over HTTPS - If you are not using our official SDKs, you **must provide a valid `User-Agent` header** with each request - Requests without proper authentication will return a `401 Unauthorized` error ### Error Handling The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a `statusCode` attribute indicating the outcome of your request. ### Rate Limits The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a `429 Too Many Requests` status code. # noqa: E501 + +The version of the OpenAPI document: 1.13.0 +Generated by: https://openapi-generator.tech +""" + +import sys +import unittest + +import Monei +from Monei.model.tax_rate_percentage import TaxRatePercentage + + +class TestTaxRatePercentage(unittest.TestCase): + """TaxRatePercentage unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testTaxRatePercentage(self): + """Test TaxRatePercentage""" + # FIXME: construct object with mandatory attributes with example values + # model = TaxRatePercentage() # noqa: E501 + pass + + +if __name__ == "__main__": + unittest.main() diff --git a/test/test_tax_rates_api.py b/test/test_tax_rates_api.py new file mode 100644 index 0000000..12ce614 --- /dev/null +++ b/test/test_tax_rates_api.py @@ -0,0 +1,55 @@ +""" +MONEI API v1 + +The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly. ### Base URL All API requests should be made to: ``` https://api.monei.com/v1 ``` ### Environment MONEI provides two environments: - **Test Environment**: For development and testing without processing real payments - **Live Environment**: For processing real transactions in production ### Client Libraries We provide official SDKs to simplify integration: - [PHP SDK](https://github.com/MONEI/monei-php-sdk) - [Python SDK](https://github.com/MONEI/monei-python-sdk) - [Node.js SDK](https://github.com/MONEI/monei-node-sdk) - [Postman Collection](https://postman.monei.com/) Our SDKs handle authentication, error handling, and request formatting automatically. You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the [OpenAPI Generator](https://openapi-generator.tech/). ### Important Requirements - All API requests must be made over HTTPS - If you are not using our official SDKs, you **must provide a valid `User-Agent` header** with each request - Requests without proper authentication will return a `401 Unauthorized` error ### Error Handling The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a `statusCode` attribute indicating the outcome of your request. ### Rate Limits The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a `429 Too Many Requests` status code. # noqa: E501 + +The version of the OpenAPI document: 1.13.0 +Generated by: https://openapi-generator.tech +""" + +import unittest + +import Monei +from Monei.api.tax_rates_api import TaxRatesApi # noqa: E501 + + +class TestTaxRatesApi(unittest.TestCase): + """TaxRatesApi unit test stubs""" + + def setUp(self): + self.api = TaxRatesApi() # noqa: E501 + + def tearDown(self): + pass + + def test_create(self): + """Test case for create + + Create Tax Rate # noqa: E501 + """ + pass + + def test_get(self): + """Test case for get + + Get Tax Rate # noqa: E501 + """ + pass + + def test_list(self): + """Test case for list + + List Tax Rates # noqa: E501 + """ + pass + + def test_update(self): + """Test case for update + + Update Tax Rate # noqa: E501 + """ + pass + + +if __name__ == "__main__": + unittest.main() diff --git a/test/test_update_price_request.py b/test/test_update_price_request.py new file mode 100644 index 0000000..72610a8 --- /dev/null +++ b/test/test_update_price_request.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: - [PHP SDK](https://github.com/MONEI/monei-php-sdk) - [Python SDK](https://github.com/MONEI/monei-python-sdk) - [Node.js SDK](https://github.com/MONEI/monei-node-sdk) - [Postman Collection](https://postman.monei.com/) Our SDKs handle authentication, error handling, and request formatting automatically. You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the [OpenAPI Generator](https://openapi-generator.tech/). ### Important Requirements - All API requests must be made over HTTPS - If you are not using our official SDKs, you **must provide a valid `User-Agent` header** with each request - Requests without proper authentication will return a `401 Unauthorized` error ### Error Handling The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a `statusCode` attribute indicating the outcome of your request. ### Rate Limits The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a `429 Too Many Requests` status code. # noqa: E501 + +The version of the OpenAPI document: 1.13.0 +Generated by: https://openapi-generator.tech +""" + +import sys +import unittest + +import Monei +from Monei.model.price_nickname import PriceNickname + +globals()["PriceNickname"] = PriceNickname +from Monei.model.update_price_request import UpdatePriceRequest + + +class TestUpdatePriceRequest(unittest.TestCase): + """UpdatePriceRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testUpdatePriceRequest(self): + """Test UpdatePriceRequest""" + # FIXME: construct object with mandatory attributes with example values + # model = UpdatePriceRequest() # noqa: E501 + pass + + +if __name__ == "__main__": + unittest.main() diff --git a/test/test_update_product_request.py b/test/test_update_product_request.py new file mode 100644 index 0000000..d4d34ae --- /dev/null +++ b/test/test_update_product_request.py @@ -0,0 +1,45 @@ +""" +MONEI API v1 + +The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly. ### Base URL All API requests should be made to: ``` https://api.monei.com/v1 ``` ### Environment MONEI provides two environments: - **Test Environment**: For development and testing without processing real payments - **Live Environment**: For processing real transactions in production ### Client Libraries We provide official SDKs to simplify integration: - [PHP SDK](https://github.com/MONEI/monei-php-sdk) - [Python SDK](https://github.com/MONEI/monei-python-sdk) - [Node.js SDK](https://github.com/MONEI/monei-node-sdk) - [Postman Collection](https://postman.monei.com/) Our SDKs handle authentication, error handling, and request formatting automatically. You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the [OpenAPI Generator](https://openapi-generator.tech/). ### Important Requirements - All API requests must be made over HTTPS - If you are not using our official SDKs, you **must provide a valid `User-Agent` header** with each request - Requests without proper authentication will return a `401 Unauthorized` error ### Error Handling The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a `statusCode` attribute indicating the outcome of your request. ### Rate Limits The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a `429 Too Many Requests` status code. # noqa: E501 + +The version of the OpenAPI document: 1.13.0 +Generated by: https://openapi-generator.tech +""" + +import sys +import unittest + +import Monei +from Monei.model.product_description import ProductDescription +from Monei.model.product_descriptor import ProductDescriptor +from Monei.model.product_images import ProductImages +from Monei.model.product_name import ProductName +from Monei.model.product_unit_label import ProductUnitLabel + +globals()["ProductDescription"] = ProductDescription +globals()["ProductDescriptor"] = ProductDescriptor +globals()["ProductImages"] = ProductImages +globals()["ProductName"] = ProductName +globals()["ProductUnitLabel"] = ProductUnitLabel +from Monei.model.update_product_request import UpdateProductRequest + + +class TestUpdateProductRequest(unittest.TestCase): + """UpdateProductRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testUpdateProductRequest(self): + """Test UpdateProductRequest""" + # FIXME: construct object with mandatory attributes with example values + # model = UpdateProductRequest() # noqa: E501 + pass + + +if __name__ == "__main__": + unittest.main() diff --git a/test/test_update_tax_rate_request.py b/test/test_update_tax_rate_request.py new file mode 100644 index 0000000..b4b3162 --- /dev/null +++ b/test/test_update_tax_rate_request.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: - [PHP SDK](https://github.com/MONEI/monei-php-sdk) - [Python SDK](https://github.com/MONEI/monei-python-sdk) - [Node.js SDK](https://github.com/MONEI/monei-node-sdk) - [Postman Collection](https://postman.monei.com/) Our SDKs handle authentication, error handling, and request formatting automatically. You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the [OpenAPI Generator](https://openapi-generator.tech/). ### Important Requirements - All API requests must be made over HTTPS - If you are not using our official SDKs, you **must provide a valid `User-Agent` header** with each request - Requests without proper authentication will return a `401 Unauthorized` error ### Error Handling The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a `statusCode` attribute indicating the outcome of your request. ### Rate Limits The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a `429 Too Many Requests` status code. # noqa: E501 + +The version of the OpenAPI document: 1.13.0 +Generated by: https://openapi-generator.tech +""" + +import sys +import unittest + +import Monei +from Monei.model.tax_rate_display_name import TaxRateDisplayName + +globals()["TaxRateDisplayName"] = TaxRateDisplayName +from Monei.model.update_tax_rate_request import UpdateTaxRateRequest + + +class TestUpdateTaxRateRequest(unittest.TestCase): + """UpdateTaxRateRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testUpdateTaxRateRequest(self): + """Test UpdateTaxRateRequest""" + # FIXME: construct object with mandatory attributes with example values + # model = UpdateTaxRateRequest() # noqa: E501 + pass + + +if __name__ == "__main__": + unittest.main()