Skip to content

Commit 1cf7ee3

Browse files
committed
chore: update OpenAPI document version to 1.8.1 and add new test for Apple Pay certificates response
- Bump OpenAPI document version from 1.8.0 to 1.8.1 across multiple files. - Add new test file for Apple Pay certificates response handling.
1 parent b138b1f commit 1cf7ee3

File tree

117 files changed

+808
-181
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

117 files changed

+808
-181
lines changed

.openapi-generator/FILES

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ Monei/model/activate_subscription_request.py
1616
Monei/model/address.py
1717
Monei/model/api_exception.py
1818
Monei/model/apple_pay_certificate.py
19-
Monei/model/apple_pay_certificate_delete200_response.py
19+
Monei/model/apple_pay_certificates_remove200_response.py
2020
Monei/model/bad_request_error.py
2121
Monei/model/bad_request_error_all_of.py
2222
Monei/model/bizum_validate_phone200_response.py
@@ -114,3 +114,4 @@ Monei/model_utils.py
114114
Monei/models/__init__.py
115115
Monei/rest.py
116116
test/__init__.py
117+
test/test_apple_pay_certificates_remove200_response.py

Monei/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
66
The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly. ### Base URL All API requests should be made to: ``` https://api.monei.com/v1 ``` ### Environment MONEI provides two environments: - **Test Environment**: For 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
77
8-
The version of the OpenAPI document: 1.8.0
8+
The version of the OpenAPI document: 1.8.1
99
Generated by: https://openapi-generator.tech
1010
"""
1111

Monei/api/apple_pay_certificate_api.py

Lines changed: 58 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
44
The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly. ### Base URL All API requests should be made to: ``` https://api.monei.com/v1 ``` ### Environment MONEI provides two environments: - **Test Environment**: For 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
55
6-
The version of the OpenAPI document: 1.8.0
6+
The version of the OpenAPI document: 1.8.1
77
Generated by: https://openapi-generator.tech
88
"""
99

@@ -24,8 +24,8 @@
2424
ActivateApplePayCertificateRequest,
2525
)
2626
from Monei.model.apple_pay_certificate import ApplePayCertificate
27-
from Monei.model.apple_pay_certificate_delete200_response import (
28-
ApplePayCertificateDelete200Response,
27+
from Monei.model.apple_pay_certificates_remove200_response import (
28+
ApplePayCertificatesRemove200Response,
2929
)
3030
from Monei.model.bad_request_error import BadRequestError
3131
from Monei.model.internal_server_error import InternalServerError
@@ -125,13 +125,13 @@ def __init__(self, api_client=None):
125125
},
126126
api_client=api_client,
127127
)
128-
self.delete_endpoint = _Endpoint(
128+
self.get_endpoint = _Endpoint(
129129
settings={
130-
"response_type": (ApplePayCertificateDelete200Response,),
130+
"response_type": (ApplePayCertificate,),
131131
"auth": ["APIKey"],
132132
"endpoint_path": "/apple-pay/certificates/{id}",
133-
"operation_id": "delete",
134-
"http_method": "DELETE",
133+
"operation_id": "get",
134+
"http_method": "GET",
135135
"servers": None,
136136
},
137137
params_map={
@@ -165,38 +165,28 @@ def __init__(self, api_client=None):
165165
},
166166
api_client=api_client,
167167
)
168-
self.get_endpoint = _Endpoint(
168+
self.get_all_endpoint = _Endpoint(
169169
settings={
170-
"response_type": (ApplePayCertificate,),
170+
"response_type": ([ApplePayCertificate],),
171171
"auth": ["APIKey"],
172-
"endpoint_path": "/apple-pay/certificates/{id}",
173-
"operation_id": "get",
172+
"endpoint_path": "/apple-pay/certificates",
173+
"operation_id": "get_all",
174174
"http_method": "GET",
175175
"servers": None,
176176
},
177177
params_map={
178-
"all": [
179-
"id",
180-
],
181-
"required": [
182-
"id",
183-
],
178+
"all": [],
179+
"required": [],
184180
"nullable": [],
185181
"enum": [],
186182
"validation": [],
187183
},
188184
root_map={
189185
"validations": {},
190186
"allowed_values": {},
191-
"openapi_types": {
192-
"id": (str,),
193-
},
194-
"attribute_map": {
195-
"id": "id",
196-
},
197-
"location_map": {
198-
"id": "path",
199-
},
187+
"openapi_types": {},
188+
"attribute_map": {},
189+
"location_map": {},
200190
"collection_format_map": {},
201191
},
202192
headers_map={
@@ -205,28 +195,38 @@ def __init__(self, api_client=None):
205195
},
206196
api_client=api_client,
207197
)
208-
self.list_endpoint = _Endpoint(
198+
self.remove_endpoint = _Endpoint(
209199
settings={
210-
"response_type": ([ApplePayCertificate],),
200+
"response_type": (ApplePayCertificatesRemove200Response,),
211201
"auth": ["APIKey"],
212-
"endpoint_path": "/apple-pay/certificates",
213-
"operation_id": "list",
214-
"http_method": "GET",
202+
"endpoint_path": "/apple-pay/certificates/{id}",
203+
"operation_id": "remove",
204+
"http_method": "DELETE",
215205
"servers": None,
216206
},
217207
params_map={
218-
"all": [],
219-
"required": [],
208+
"all": [
209+
"id",
210+
],
211+
"required": [
212+
"id",
213+
],
220214
"nullable": [],
221215
"enum": [],
222216
"validation": [],
223217
},
224218
root_map={
225219
"validations": {},
226220
"allowed_values": {},
227-
"openapi_types": {},
228-
"attribute_map": {},
229-
"location_map": {},
221+
"openapi_types": {
222+
"id": (str,),
223+
},
224+
"attribute_map": {
225+
"id": "id",
226+
},
227+
"location_map": {
228+
"id": "path",
229+
},
230230
"collection_format_map": {},
231231
},
232232
headers_map={
@@ -352,7 +352,7 @@ def activate(self, id, activate_apple_pay_certificate_request, **kwargs):
352352
def create(self, **kwargs):
353353
"""Create Certificate # noqa: E501
354354
355-
Creates a new Apple Pay certificate by generating a Certificate Signing Request (CSR). Use this endpoint to start the certificate creation process for accepting Apple Pay in your iOS app. ## Setup workflow 1. **Call this endpoint** to generate a CSR. The response includes the `csr` field in base64url format. 2. **Decode the CSR** and save it as a `.certSigningRequest` file. Base64url uses `-` and `_` instead of `+` and `/`. Convert and decode: ```bash echo \"CSR_VALUE\" | tr '_-' '/+' | base64 -d > apple_pay.certSigningRequest ``` 3. **Go to [Apple Developer Portal](https://developer.apple.com/account/resources/certificates/list)**: - Navigate to Certificates, Identifiers & Profiles - Select your Merchant ID under Identifiers - In the \"Apple Pay Payment Processing Certificate\" section, click \"Create Certificate\" - Upload the `.certSigningRequest` file from step 2 - Download the signed certificate (`.cer` file) 4. **Convert the certificate to base64**: ```bash base64 -i apple_pay.cer ``` 5. **Activate the certificate** using the [Activate Certificate](https://docs.monei.com/apis/rest/apple-pay-certificate-activate/) endpoint with the base64 value. ## Important notes - **CSRs expire after 24 hours.** Complete the certificate creation in Apple Developer Portal within this window, or generate a new CSR. - Each CSR can only be used once. If you need a new certificate, create a new CSR. - The private key is securely generated and stored by MONEI. You never need to handle private keys directly. - You must be enrolled in the [Apple Developer Program](https://developer.apple.com/programs/) to create certificates. - The CSR is cleared from the response after the certificate is activated. # noqa: E501
355+
Creates a new Apple Pay certificate by generating a Certificate Signing Request (CSR). Use this endpoint to start the certificate creation process for accepting Apple Pay in your iOS app. ## Setup workflow 1. **Call this endpoint** to generate a CSR. The response includes the `csr` field in base64url format. 2. **Decode the CSR** and save it as a `.certSigningRequest` file. Base64url uses `-` and `_` instead of `+` and `/`. Convert and decode: ```bash echo \"CSR_VALUE\" | tr '_-' '/+' | base64 -d > apple_pay.certSigningRequest ``` 3. **Go to [Apple Developer Portal](https://developer.apple.com/account/resources/certificates/list)**: - Navigate to Certificates, Identifiers & Profiles - Select your Merchant ID under Identifiers - In the \"Apple Pay Payment Processing Certificate\" section, click \"Create Certificate\" - Upload the `.certSigningRequest` file from step 2 - Download the signed certificate (`.cer` file) 4. **Convert the certificate to base64**: ```bash base64 -i apple_pay.cer ``` 5. **Activate the certificate** using the [Activate Certificate](https://docs.monei.com/apis/rest/apple-pay-certificates-activate/) endpoint with the base64 value. ## Important notes - **CSRs expire after 24 hours.** Complete the certificate creation in Apple Developer Portal within this window, or generate a new CSR. - Each CSR can only be used once. If you need a new certificate, create a new CSR. - The private key is securely generated and stored by MONEI. You never need to handle private keys directly. - You must be enrolled in the [Apple Developer Program](https://developer.apple.com/programs/) to create certificates. - The CSR is cleared from the response after the certificate is activated. # noqa: E501
356356
This method makes a synchronous HTTP request by default. To make an
357357
asynchronous HTTP request, please pass async_req=True
358358
@@ -409,14 +409,14 @@ def create(self, **kwargs):
409409
kwargs["_request_auths"] = kwargs.get("_request_auths", None)
410410
return self.create_endpoint.call_with_http_info(**kwargs)
411411

412-
def delete(self, id, **kwargs):
413-
"""Delete Certificate # noqa: E501
412+
def get(self, id, **kwargs):
413+
"""Get Certificate # noqa: E501
414414
415-
Deletes an Apple Pay certificate. This permanently removes the certificate and its associated private key. The certificate will no longer be available for payment processing. **Warning**: This action cannot be undone. If you only want to temporarily disable a certificate, use the [Update Certificate](https://docs.monei.com/apis/rest/apple-pay-certificate-update/) endpoint instead. # noqa: E501
415+
Retrieves a specific Apple Pay certificate by its ID. Returns the certificate object with its current status, CSR (if not yet activated), and expiration date (if activated). # noqa: E501
416416
This method makes a synchronous HTTP request by default. To make an
417417
asynchronous HTTP request, please pass async_req=True
418418
419-
>>> thread = api.delete(id, async_req=True)
419+
>>> thread = api.get(id, async_req=True)
420420
>>> result = thread.get()
421421
422422
Args:
@@ -455,7 +455,7 @@ def delete(self, id, **kwargs):
455455
async_req (bool): execute request asynchronously
456456
457457
Returns:
458-
ApplePayCertificateDelete200Response
458+
ApplePayCertificate
459459
If the method is called asynchronously, returns the request
460460
thread.
461461
"""
@@ -470,20 +470,18 @@ def delete(self, id, **kwargs):
470470
kwargs["_host_index"] = kwargs.get("_host_index")
471471
kwargs["_request_auths"] = kwargs.get("_request_auths", None)
472472
kwargs["id"] = id
473-
return self.delete_endpoint.call_with_http_info(**kwargs)
473+
return self.get_endpoint.call_with_http_info(**kwargs)
474474

475-
def get(self, id, **kwargs):
476-
"""Get Certificate # noqa: E501
475+
def get_all(self, **kwargs):
476+
"""List Certificates # noqa: E501
477477
478-
Retrieves a specific Apple Pay certificate by its ID. Returns the certificate object with its current status, CSR (if not yet activated), and expiration date (if activated). # noqa: E501
478+
Retrieves all Apple Pay certificates for your account. Returns an array of certificate objects, including both active and inactive certificates. Use this to view all certificates and their status. # noqa: E501
479479
This method makes a synchronous HTTP request by default. To make an
480480
asynchronous HTTP request, please pass async_req=True
481481
482-
>>> thread = api.get(id, async_req=True)
482+
>>> thread = api.get_all(async_req=True)
483483
>>> result = thread.get()
484484
485-
Args:
486-
id (str): The unique identifier of the certificate.
487485
488486
Keyword Args:
489487
_return_http_data_only (bool): response data without head status
@@ -518,7 +516,7 @@ def get(self, id, **kwargs):
518516
async_req (bool): execute request asynchronously
519517
520518
Returns:
521-
ApplePayCertificate
519+
[ApplePayCertificate]
522520
If the method is called asynchronously, returns the request
523521
thread.
524522
"""
@@ -532,19 +530,20 @@ def get(self, id, **kwargs):
532530
kwargs["_content_type"] = kwargs.get("_content_type")
533531
kwargs["_host_index"] = kwargs.get("_host_index")
534532
kwargs["_request_auths"] = kwargs.get("_request_auths", None)
535-
kwargs["id"] = id
536-
return self.get_endpoint.call_with_http_info(**kwargs)
533+
return self.get_all_endpoint.call_with_http_info(**kwargs)
537534

538-
def list(self, **kwargs):
539-
"""List Certificates # noqa: E501
535+
def remove(self, id, **kwargs):
536+
"""Delete Certificate # noqa: E501
540537
541-
Retrieves all Apple Pay certificates for your account. Returns an array of certificate objects, including both active and inactive certificates. Use this to view all certificates and their status. # noqa: E501
538+
Deletes an Apple Pay certificate. This permanently removes the certificate and its associated private key. The certificate will no longer be available for payment processing. **Warning**: This action cannot be undone. If you only want to temporarily disable a certificate, use the [Update Certificate](https://docs.monei.com/apis/rest/apple-pay-certificates-update/) endpoint instead. # noqa: E501
542539
This method makes a synchronous HTTP request by default. To make an
543540
asynchronous HTTP request, please pass async_req=True
544541
545-
>>> thread = api.list(async_req=True)
542+
>>> thread = api.remove(id, async_req=True)
546543
>>> result = thread.get()
547544
545+
Args:
546+
id (str): The unique identifier of the certificate.
548547
549548
Keyword Args:
550549
_return_http_data_only (bool): response data without head status
@@ -579,7 +578,7 @@ def list(self, **kwargs):
579578
async_req (bool): execute request asynchronously
580579
581580
Returns:
582-
[ApplePayCertificate]
581+
ApplePayCertificatesRemove200Response
583582
If the method is called asynchronously, returns the request
584583
thread.
585584
"""
@@ -593,7 +592,8 @@ def list(self, **kwargs):
593592
kwargs["_content_type"] = kwargs.get("_content_type")
594593
kwargs["_host_index"] = kwargs.get("_host_index")
595594
kwargs["_request_auths"] = kwargs.get("_request_auths", None)
596-
return self.list_endpoint.call_with_http_info(**kwargs)
595+
kwargs["id"] = id
596+
return self.remove_endpoint.call_with_http_info(**kwargs)
597597

598598
def update(self, id, update_apple_pay_certificate_request, **kwargs):
599599
"""Update Certificate # noqa: E501

0 commit comments

Comments
 (0)