Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 1 addition & 4 deletions .husky/commit-msg
Original file line number Diff line number Diff line change
@@ -1,4 +1 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

yarn commitlint --edit $1
yarn commitlint --edit $1
4 changes: 4 additions & 0 deletions .husky/pre-commit
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1 +1,5 @@
# Run lint-staged to format Python files with Black
yarn lint-staged

# Run tests to ensure everything works
yarn test
11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,16 @@
# Changelog

## <small>2.3.1 (2025-03-14)</small>

* chore: update SDK to OpenAPI specification version 1.6.0 ([f1214e5](https://github.com/MONEI/monei-python-sdk/commit/f1214e5))
* fix: resolve Black formatter installation issue ([3be582e](https://github.com/MONEI/monei-python-sdk/commit/3be582e))
* test: Add comprehensive model serialization and REST client tests ([7e324a0](https://github.com/MONEI/monei-python-sdk/commit/7e324a0))

## 2.3.0 (2025-03-11)

* feat: Add retry configuration method to MoneiClient ([0440265](https://github.com/MONEI/monei-python-sdk/commit/0440265))
* test: Enhance test coverage for API methods and error handling ([67bbd50](https://github.com/MONEI/monei-python-sdk/commit/67bbd50))

## 2.2.0 (2025-03-11)

* feat: Update SDK to OpenAPI specification version 1.5.8 ([35bd7e1](https://github.com/MONEI/monei-python-sdk/commit/35bd7e1))
Expand Down
9 changes: 5 additions & 4 deletions Monei/__init__.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
# flake8: noqa

"""
MONEI API v1
MONEI API v1

The MONEI API is organized around [REST](https://en.wikipedia.org/wiki/Representational_State_Transfer) principles. Our API is designed to be intuitive and developer-friendly. ### Base URL All API requests should be made to: ``` https://api.monei.com/v1 ``` ### Environment MONEI provides two environments: - **Test Environment**: For 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. # Authentication <!-- Redoc-Inject: <security-definitions> --> # noqa: E501
The MONEI API is organized around [REST](https://en.wikipedia.org/wiki/Representational_State_Transfer) principles. Our API is designed to be intuitive and developer-friendly. ### Base URL All API requests should be made to: ``` https://api.monei.com/v1 ``` ### Environment MONEI provides two environments: - **Test Environment**: For 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. # Authentication <!-- Redoc-Inject: <security-definitions> --> # noqa: E501

The version of the OpenAPI document: 1.5.8
Generated by: https://openapi-generator.tech
The version of the OpenAPI document: 1.6.0
Generated by: https://openapi-generator.tech
"""


Expand All @@ -25,5 +25,6 @@
from Monei.exceptions import ApiValueError
from Monei.exceptions import ApiKeyError
from Monei.exceptions import ApiException

# import custom MoneiClient
from Monei.monei_client import MoneiClient
124 changes: 46 additions & 78 deletions Monei/api/apple_pay_domain_api.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
"""
MONEI API v1
MONEI API v1

The MONEI API is organized around [REST](https://en.wikipedia.org/wiki/Representational_State_Transfer) principles. Our API is designed to be intuitive and developer-friendly. ### Base URL All API requests should be made to: ``` https://api.monei.com/v1 ``` ### Environment MONEI provides two environments: - **Test Environment**: For 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. # Authentication <!-- Redoc-Inject: <security-definitions> --> # noqa: E501
The MONEI API is organized around [REST](https://en.wikipedia.org/wiki/Representational_State_Transfer) principles. Our API is designed to be intuitive and developer-friendly. ### Base URL All API requests should be made to: ``` https://api.monei.com/v1 ``` ### Environment MONEI provides two environments: - **Test Environment**: For 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. # Authentication <!-- Redoc-Inject: <security-definitions> --> # noqa: E501

The version of the OpenAPI document: 1.5.8
Generated by: https://openapi-generator.tech
The version of the OpenAPI document: 1.6.0
Generated by: https://openapi-generator.tech
"""


import re # noqa: F401
import sys # noqa: F401

Expand All @@ -19,9 +18,11 @@
datetime,
file_type,
none_type,
validate_and_convert_types
validate_and_convert_types,
)
from Monei.model.apple_pay_domain_register200_response import (
ApplePayDomainRegister200Response,
)
from Monei.model.apple_pay_domain_register200_response import ApplePayDomainRegister200Response
from Monei.model.bad_request_error import BadRequestError
from Monei.model.internal_server_error import InternalServerError
from Monei.model.not_found_error import NotFoundError
Expand All @@ -44,62 +45,46 @@ def __init__(self, api_client=None):
self.api_client = api_client
self.register_endpoint = _Endpoint(
settings={
'response_type': (ApplePayDomainRegister200Response,),
'auth': [
'APIKey'
],
'endpoint_path': '/apple-pay/domains',
'operation_id': 'register',
'http_method': 'POST',
'servers': None,
"response_type": (ApplePayDomainRegister200Response,),
"auth": ["APIKey"],
"endpoint_path": "/apple-pay/domains",
"operation_id": "register",
"http_method": "POST",
"servers": None,
},
params_map={
'all': [
'register_apple_pay_domain_request',
],
'required': [
'register_apple_pay_domain_request',
],
'nullable': [
"all": [
"register_apple_pay_domain_request",
],
'enum': [
"required": [
"register_apple_pay_domain_request",
],
'validation': [
]
"nullable": [],
"enum": [],
"validation": [],
},
root_map={
'validations': {
"validations": {},
"allowed_values": {},
"openapi_types": {
"register_apple_pay_domain_request": (
RegisterApplePayDomainRequest,
),
},
'allowed_values': {
"attribute_map": {},
"location_map": {
"register_apple_pay_domain_request": "body",
},
'openapi_types': {
'register_apple_pay_domain_request':
(RegisterApplePayDomainRequest,),
},
'attribute_map': {
},
'location_map': {
'register_apple_pay_domain_request': 'body',
},
'collection_format_map': {
}
"collection_format_map": {},
},
headers_map={
'accept': [
'application/json'
],
'content_type': [
'application/json'
]
"accept": ["application/json"],
"content_type": ["application/json"],
},
api_client=api_client
api_client=api_client,
)

def register(
self,
register_apple_pay_domain_request,
**kwargs
):
def register(self, register_apple_pay_domain_request, **kwargs):
"""Register Domain # noqa: E501

Registers a domain with Apple Pay. This endpoint allows you to register your website domain with Apple Pay, which is required before you can accept Apple Pay payments on your website. The domain must be accessible via HTTPS and have a valid SSL certificate. Before registering, you must download this [domain association file](https://assets.monei.com/apple-pay/apple-developer-merchantid-domain-association/) and host it at `/.well-known/apple-developer-merchantid-domain-association` on your site. For example, if you're registering `example.com`, make that file available at `https://example.com/.well-known/apple-developer-merchantid-domain-association`. After registration, Apple will verify your domain. Once verified, you can display Apple Pay buttons and process Apple Pay payments on your website. # noqa: E501
Expand Down Expand Up @@ -149,32 +134,15 @@ def register(
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['register_apple_pay_domain_request'] = \
register_apple_pay_domain_request
kwargs["async_req"] = kwargs.get("async_req", False)
kwargs["_return_http_data_only"] = kwargs.get("_return_http_data_only", True)
kwargs["_preload_content"] = kwargs.get("_preload_content", True)
kwargs["_request_timeout"] = kwargs.get("_request_timeout", None)
kwargs["_check_input_type"] = kwargs.get("_check_input_type", True)
kwargs["_check_return_type"] = kwargs.get("_check_return_type", True)
kwargs["_spec_property_naming"] = kwargs.get("_spec_property_naming", False)
kwargs["_content_type"] = kwargs.get("_content_type")
kwargs["_host_index"] = kwargs.get("_host_index")
kwargs["_request_auths"] = kwargs.get("_request_auths", None)
kwargs["register_apple_pay_domain_request"] = register_apple_pay_domain_request
return self.register_endpoint.call_with_http_info(**kwargs)

Loading
Loading