Skip to content

Commit f4bc62f

Browse files
committed
Update README.md
1 parent 1a446b5 commit f4bc62f

File tree

1 file changed

+161
-87
lines changed

1 file changed

+161
-87
lines changed

README.md

Lines changed: 161 additions & 87 deletions
Original file line numberDiff line numberDiff line change
@@ -1,90 +1,175 @@
1-
# openapi-client
2-
Secure API
1+
# AndDone Client Library - Python
32

4-
This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:
3+
This client library integrates with AndDone's secure APIs.
54

6-
- API version: 2.3
7-
- Package version: 1.0.0
8-
- Generator version: 7.9.0
9-
- Build package: org.openapitools.codegen.languages.PythonClientCodegen
5+
Please see our developer documentation & API Explorer, linked below, for detailed instructions on how to integrate this into your systems.
106

11-
## Requirements.
7+
**Secure API Python Client**
128

13-
Python 3.7+
9+
This Python package is an auto-generated client for the AndDone Secure API, built using the [OpenAPI Generator](https://openapi-generator.tech).
1410

15-
## Installation & Usage
16-
### pip install
11+
- **API version**: 2.3
12+
- **Package version**: 1.0.0
13+
- **Generator version**: 7.9.0
14+
- **Build package**: `org.openapitools.codegen.languages.PythonClientCodegen`
15+
- **Developer Documentation**: [DevDocs](https://docs.anddone.com/)
16+
- **API Explorer**: [AndDone API Explorer](https://docs.anddone.com/explorer/)
1717

18-
If the python package is hosted on a repository, you can install directly using:
18+
---
1919

20-
```sh
21-
pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git
22-
```
23-
(you may need to run `pip` with root permission: `sudo pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git`)
20+
## Table of Contents
21+
- [Requirements](#requirements)
22+
- [Installation](#installation)
23+
- [Configuration](#configuration)
24+
- [Quickstart](#quickstart)
25+
- [API Endpoints](#api-endpoints)
26+
- [Models](#models)
27+
- [Authorization](#authorization)
28+
- [Support & Versioning](#support--versioning)
2429

25-
Then import the package:
26-
```python
27-
import openapi_client
28-
```
30+
---
31+
32+
## Requirements
33+
- **Python 3.7+**
34+
- Access to **AndDone Merchant Portal** for API keys.
35+
36+
---
2937

30-
### Setuptools
38+
## Installation
3139

32-
Install via [Setuptools](http://pypi.python.org/pypi/setuptools).
40+
The recommended method is via `pip`:
3341

3442
```sh
35-
python setup.py install --user
43+
python -m pip install -r requirements.txt
3644
```
37-
(or `sudo python setup.py install` to install the package for all users)
3845

3946
Then import the package:
47+
4048
```python
4149
import openapi_client
4250
```
4351

44-
### Tests
52+
---
53+
54+
## Configuration
4555

46-
Execute `pytest` to run the tests.
56+
1. **Retrieve Developer Credentials:**
57+
1. Log in to AndDone Merchant Portal Portal:
58+
- **UAT**: [https://portal.uat.anddone.com](https://portal.uat.anddone.com)
59+
- **Production**: [https://portal.anddone.com](https://portal.anddone.com)
60+
2. Go to **Developer → API Keys** in the left menu.
61+
3. Copy:
62+
- `xApiKey` (API Key)
63+
- `xAppKey` (App Key)
4764

48-
## Getting Started
49-
1. Find and note your company AndDone Developer settings.
50-
1. Login to (UAT) https://portal.uat.anddone.com/ (Production) https://portal.anddone.com/
51-
2. In the left menu, click "Developer" then "API Keys"
52-
3. Your xApiKey will be the API Key
53-
4. Your xAppKey will be the App Key
54-
2. You will need to register your Origin with us to execute API calls against our Secure endpoints.
55-
1. Typically, we use your domain for production or other hosted environments and IP address for local development environments.
56-
2. Contact AndDone support (integrations@anddone.com) or your onboarding agent to ensure all your domains or IP addresses you may use are registered for use with our secure APIs.
57-
3. Please follow the [installation procedure](#installation--usage) and then modify and run the following:
65+
2. **Determine Your Origin:**
66+
The `origin` is your public IP address.
67+
Find it by searching **"what's my IP"** in Google or visiting [https://www.whatsmyip.org](https://www.whatsmyip.org).
68+
1. Contact AndDone support to ensure your origin IP is resitered for use with our secure APIs
69+
2. Email: [integrations@anddone.com](mailto:integrations@anddone.com)
70+
71+
3. **Optional: Create a Configuration File:**
72+
Rename `config.example.json` to `config.json` and fill it with your values:
73+
74+
```json
75+
{
76+
"xApiKey": "YOUR_API_KEY",
77+
"xAppKey": "YOUR_APP_KEY",
78+
"xVersion": "2.3",
79+
"origin": "YOUR_IP_ADDRESS"
80+
}
81+
```
82+
83+
---
84+
85+
## Quickstart
86+
87+
Here’s a minimal working example to call the **Secure Create Payment Intent API**:
5888

5989
```python
6090

6191
from openapi_client.api.secure_payment_intent_api import SecurePaymentIntentApi
62-
from openapi_client import ApiClient
63-
import json
64-
65-
x_api_key = 'x_api_key_example' # str | an authorization header
66-
x_app_key = 'x_app_key_example' # str | an authorization header
67-
x_version = '2.3' # str | x-version
68-
origin = 'origin_example' # str | origin
6992

70-
request = {
71-
"YOUR_REQUEST_BODY"
93+
x_api_key = 'YOUR_API_KEY'
94+
x_app_key = 'YOUR_APP_KEY'
95+
x_version = '2.3'
96+
origin = 'YOUR_ORIGIN'
97+
98+
post_body = {
99+
"saveForFuture": True,
100+
"amount": 10000,
101+
"title": "YOUR UNIQUE TITLE",
102+
"shortDescription": "shortDescription",
103+
"paymentDescription": "paymentDescription",
104+
"invoiceNumber": "postman",
105+
"expiresIn": "300000",
106+
"intent": {
107+
"paymentTypes": [
108+
"CreditCard",
109+
"ACH"
110+
]
111+
},
112+
"enablePremiumFinance": True,
113+
"splits": None,
114+
"additionalDetailsPreference": "NoAdditionalDetails"
72115
}
73116

74-
# Create an instance of the API class
75117
api_instance = SecurePaymentIntentApi()
118+
response = api_instance.secure_paymentintents_post(
119+
x_api_key, x_app_key, x_version, origin, post_body
120+
)
121+
print(response)
122+
123+
124+
```
76125

77-
try:
78-
# This API will create a payment intent
79-
api_response = api_instance.secure_paymentintents_post(x_api_key, x_app_key, x_version, origin, request)
80-
print("The response of SecurePaymentIntentApi->secure_paymentintents_post:\n")
81-
print(api_response)
82-
except ApiException as e:
83-
print("Exception when calling SecurePaymentIntentApi->secure_paymentintents_post: %s\n" % e)
126+
## Alternate approach (Using optional config.json)
84127

128+
Here is a more involved installation utilizing the openapi Configuration model.
129+
130+
```python
131+
import json
132+
from openapi_client.rest import ApiException
133+
from openapi_client.api.secure_payment_intent_api import SecurePaymentIntentApi
134+
from pprint import pprint
135+
136+
# Defining the host is optional and defaults to https://api.uat.anddone.com
137+
# See configuration.py for a list of all supported configuration parameters.
138+
configuration = openapi_client.Configuration(
139+
host = "https://api.uat.anddone.com"
140+
)
141+
142+
# Enter a context with an instance of the API client
143+
with openapi_client.ApiClient(configuration) as api_client:
144+
# Create an instance of the API class
145+
api_instance = openapi_client.SecureEmbeddedPremiumFinanceApi(api_client)
146+
# Load credentials from config.json
147+
with open('config.json') as f:
148+
config = json.load(f)
149+
150+
pf_policy_update_request_dto = openapi_client.PFPolicyUpdateRequestDTO() # PFPolicyUpdateRequestDTO | Signature Request details (optional)
151+
152+
try:
153+
# This API is will update the policy number
154+
api_response = api_instance.secure_epf_merchants_quotes_policy_put(config['xApiKey'], config['xAppKey'], config['xVersion'], config['origin'], pf_policy_update_request_dto=pf_policy_update_request_dto)
155+
print("The response of SecureEmbeddedPremiumFinanceApi->secure_epf_merchants_quotes_policy_put:\n")
156+
pprint(api_response)
157+
except ApiException as e:
158+
print("Exception when calling SecureEmbeddedPremiumFinanceApi->secure_epf_merchants_quotes_policy_put: %s\n" % e)
159+
85160
```
86161

87-
## Documentation for API Endpoints
162+
---
163+
164+
## API Endpoints
165+
166+
All URIs are relative to:
167+
168+
- **UAT**: `https://api.uat.anddone.com`
169+
- **Production**: `https://api.anddone.com`
170+
171+
<details>
172+
<summary>Click to view all endpoints</summary>
88173

89174
All URIs are relative to *https://api.uat.anddone.com*
90175

@@ -145,8 +230,14 @@ Class | Method | HTTP request | Description
145230
*SecureVendorManagementApi* | [**vendorapi_secure_merchants_vendors_unsuspend_post**](docs/SecureVendorManagementApi.md#vendorapi_secure_merchants_vendors_unsuspend_post) | **POST** /vendorapi/secure/merchants/vendors/unsuspend | This API unsuspends vendor into system
146231
*SecureVoidsApi* | [**secure_cancellations_post**](docs/SecureVoidsApi.md#secure_cancellations_post) | **POST** /secure/cancellations | This API cancel a transaction.
147232

233+
</details>
234+
235+
---
148236

149-
## Documentation For Models
237+
## Models
238+
239+
<details>
240+
<summary>Click to view all models</summary>
150241

151242
- [BankDetailDto](docs/BankDetailDto.md)
152243
- [CancelPaymentRequestDTO](docs/CancelPaymentRequestDTO.md)
@@ -336,43 +427,26 @@ Class | Method | HTTP request | Description
336427
- [VerifyBankAccountResponse](docs/VerifyBankAccountResponse.md)
337428
- [VerifyBankAccountResponseHttpResponse](docs/VerifyBankAccountResponseHttpResponse.md)
338429

430+
</details>
339431

340-
<a id="documentation-for-authorization"></a>
341-
## Documentation For Authorization
342-
343-
344-
Authentication schemes defined for the API:
345-
<a id="x-api-key"></a>
346-
### x-api-key
347-
348-
- **Type**: API key
349-
- **API key parameter name**: x-api-key
350-
- **Location**: HTTP header
351-
352-
<a id="x-app-key"></a>
353-
### x-app-key
354-
355-
- **Type**: API key
356-
- **API key parameter name**: x-app-key
357-
- **Location**: HTTP header
358-
359-
<a id="x-version"></a>
360-
### x-version
361-
362-
- **Type**: API key
363-
- **API key parameter name**: x-version
364-
- **Location**: HTTP header
365-
366-
<a id="origin"></a>
367-
### origin
432+
---
368433

369-
- **Type**: API key
370-
- **API key parameter name**: origin
371-
- **Location**: HTTP header
434+
## Authorization
372435

436+
Authentication is handled via API keys in HTTP headers:
373437

374-
## Author
438+
| Key | Location | Description |
439+
|--------------|----------|-----------------------|
440+
| **x-api-key** | Header | Your API key |
441+
| **x-app-key** | Header | Your App key |
442+
| **x-version** | Header | API version (e.g., 2.3) |
443+
| **origin** | Header | Your public IP address |
375444

445+
---
376446

447+
## Support & Versioning
377448

449+
- **API Environments:** Use UAT for testing; switch to Production only after validation.
450+
- **Issues:** Report bugs or request features via the [GitHub Issues](https://github.com/anddone-kit/AndDone-SecureAPI-ClientLibrary-DotNet/issues) page.
378451

452+
---

0 commit comments

Comments
 (0)