Skip to content

Commit c66cfd1

Browse files
committed
README.md update
1 parent 62f657b commit c66cfd1

45 files changed

Lines changed: 528 additions & 313 deletions

File tree

Some content is hidden

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

.gitignore

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
/.config
77
/coverage/
88
/InstalledFiles
9-
log/
109
/pkg/
1110
/spec/reports/
1211
/spec/examples.txt
@@ -38,5 +37,3 @@ build/
3837

3938
# unless supporting rvm < 1.11.0 or doing something fancy, ignore this:
4039
.rvmrc
41-
config.json
42-
.env

.openapi-generator/FILES

Lines changed: 6 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -182,10 +182,12 @@ docs/TransactionDetailResponseSplitsInner.md
182182
docs/TransactionDetailResponseTenderInfo.md
183183
docs/TransactionPaymentResponse.md
184184
docs/TransactionPaymentResponseAchTenderInfo.md
185+
docs/TransactionPaymentResponseAchTenderInfoCommissionType.md
185186
docs/TransactionPaymentResponseBillingContact.md
186187
docs/TransactionPaymentResponseBillingContactAddress.md
187188
docs/TransactionPaymentResponseBillingContactName.md
188189
docs/TransactionPaymentResponseCcTenderInfo.md
190+
docs/TransactionPaymentResponseRefundOrigin.md
189191
docs/TransactionPaymentResponseRefundTransactions.md
190192
docs/TransactionPaymentResponseRefundTransactionsDataInner.md
191193
docs/TransactionPaymentResponseTransactionEntitySplitResponsesInner.md
@@ -386,10 +388,12 @@ lib/openapi_client/models/transaction_detail_response_splits_inner.rb
386388
lib/openapi_client/models/transaction_detail_response_tender_info.rb
387389
lib/openapi_client/models/transaction_payment_response.rb
388390
lib/openapi_client/models/transaction_payment_response_ach_tender_info.rb
391+
lib/openapi_client/models/transaction_payment_response_ach_tender_info_commission_type.rb
389392
lib/openapi_client/models/transaction_payment_response_billing_contact.rb
390393
lib/openapi_client/models/transaction_payment_response_billing_contact_address.rb
391394
lib/openapi_client/models/transaction_payment_response_billing_contact_name.rb
392395
lib/openapi_client/models/transaction_payment_response_cc_tender_info.rb
396+
lib/openapi_client/models/transaction_payment_response_refund_origin.rb
393397
lib/openapi_client/models/transaction_payment_response_refund_transactions.rb
394398
lib/openapi_client/models/transaction_payment_response_refund_transactions_data_inner.rb
395399
lib/openapi_client/models/transaction_payment_response_transaction_entity_split_responses_inner.rb
@@ -411,31 +415,6 @@ lib/openapi_client/models/verify_bank_account_response.rb
411415
lib/openapi_client/models/verify_bank_account_response_http_response.rb
412416
lib/openapi_client/version.rb
413417
openapi_client.gemspec
414-
spec/models/payment_intent_request_intent_spec.rb
415-
spec/models/payment_intent_request_pfr_spec.rb
416-
spec/models/payment_intent_request_splits_inner_spec.rb
417-
spec/models/payment_link_response_customers_inner_accounts_inner_spec.rb
418-
spec/models/payment_link_response_display_settings_intent_spec.rb
419-
spec/models/payment_link_response_display_settings_spec.rb
420-
spec/models/payment_link_response_payments_inner_spec.rb
421-
spec/models/payment_link_response_reference_data_list_inner_spec.rb
422-
spec/models/pf_endorsement_response_item_payment_intent_intent_spec.rb
423-
spec/models/pf_endorsement_response_item_payment_intent_spec.rb
424-
spec/models/pf_lite_generate_quote_response_item_e_sign_result_spec.rb
425-
spec/models/pf_lite_generate_quote_response_item_spec.rb
426-
spec/models/pf_lite_generate_quote_response_spec.rb
427-
spec/models/pf_lite_payment_link_request_customers_inner_address_spec.rb
428-
spec/models/pf_lite_payment_link_request_customers_inner_spec.rb
429-
spec/models/pf_lite_payment_link_request_reference_data_list_inner_spec.rb
430-
spec/models/pf_lite_quote_by_payment_link_response_policies_inner_carrier_spec.rb
431-
spec/models/pf_lite_quote_by_payment_link_response_policies_inner_spec.rb
432-
spec/models/quote_request_agent_address_spec.rb
433-
spec/models/quote_request_policies_inner_ga_address_spec.rb
434-
spec/models/secure_update_payment_link_request_settings_intent_spec.rb
435-
spec/models/token_link_response_data_inner_spec.rb
436-
spec/models/token_link_response_spec.rb
437-
spec/models/token_link_secure_request_intent_spec.rb
438-
spec/models/transaction_payment_response_refund_transactions_data_inner_spec.rb
439-
spec/models/transaction_payment_response_refund_transactions_spec.rb
440-
spec/models/vendor_request_dto_physical_address_spec.rb
418+
spec/models/transaction_payment_response_ach_tender_info_commission_type_spec.rb
419+
spec/models/transaction_payment_response_refund_origin_spec.rb
441420
spec/spec_helper.rb

README.md

Lines changed: 91 additions & 146 deletions
Original file line numberDiff line numberDiff line change
@@ -1,166 +1,103 @@
1-
# AndDone Client Library - Ruby
1+
# openapi_client
22

3-
This client library integrates with AndDone's secure APIs.
3+
OpenapiClient - the Ruby gem for the Secure API
44

5-
Please see our developer documentation & API Explorer, linked below, for detailed instructions on how to integrate this into your systems.
5+
Secure API
66

7-
**Secure API Ruby Client**
7+
This SDK is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:
88

9-
This Ruby SDK is an auto-generated client for the AndDone Secure API, built using the [OpenAPI Generator](https://openapi-generator.tech).
10-
11-
* **API version**: 2.3
12-
* **Package version**: 1.0.0
13-
* **Generator version**: 7.9.0
14-
* **Build package**: `org.openapitools.codegen.languages.RubyClientCodegen`
15-
* **Developer Documentation**: [DevDocs](https://docs.anddone.com/)
16-
* **API Explorer**: [AndDone API Explorer](https://docs.anddone.com/explorer/)
17-
18-
---
19-
20-
## Table of Contents
21-
22-
* [Requirements](#requirements)
23-
* [Installation](#installation)
24-
* [Configuration](#configuration)
25-
* [Quickstart](#quickstart)
26-
* [API Endpoints](#api-endpoints)
27-
* [Models](#models)
28-
* [Authorization](#authorization)
29-
* [Support & Versioning](#support--versioning)
30-
31-
---
32-
33-
## Requirements
34-
35-
* **Ruby 2.7+**
36-
* Bundler / RubyGems
37-
* Access to **AndDone Merchant Portal** for API keys
38-
39-
---
9+
- API version: 2.3
10+
- Package version: 1.0.0
11+
- Generator version: 7.9.0
12+
- Build package: org.openapitools.codegen.languages.RubyClientCodegen
4013

4114
## Installation
4215

43-
### Install from RubyGems
16+
### Build a gem
4417

45-
If published, install via Bundler:
18+
To build the Ruby code into a gem:
4619

47-
```ruby
48-
gem 'openapi_client', '~> 1.0.0'
49-
```
50-
51-
Then run:
52-
53-
```bash
54-
bundle install
55-
```
56-
57-
### Install from Git
58-
59-
If hosted on GitHub:
60-
61-
```ruby
62-
gem 'openapi_client', :git => 'https://github.com/anddone-kit/AndDone-SecureAPI-ClientLibrary-Ruby.git'
20+
```shell
21+
gem build openapi_client.gemspec
6322
```
6423

65-
### Build & Install Locally
24+
Then either install the gem locally:
6625

67-
```bash
68-
gem build openapi_client.gemspec
26+
```shell
6927
gem install ./openapi_client-1.0.0.gem
7028
```
7129

72-
---
73-
74-
## Configuration
75-
76-
1. **Retrieve Developer Credentials:**
30+
(for development, run `gem install --dev ./openapi_client-1.0.0.gem` to install the development dependencies)
7731

78-
1. Log in to AndDone Merchant Portal:
32+
or publish the gem to a gem hosting service, e.g. [RubyGems](https://rubygems.org/).
7933

80-
* **UAT**: [https://portal.uat.anddone.com](https://portal.uat.anddone.com)
81-
* **Production**: [https://portal.anddone.com](https://portal.anddone.com)
82-
2. Go to **Developer → API Keys** in the left menu.
83-
3. Copy:
34+
Finally add this to the Gemfile:
8435

85-
* `xApiKey` (API Key)
86-
* `xAppKey` (App Key)
36+
gem 'openapi_client', '~> 1.0.0'
8737

88-
2. **Determine Your Origin:**
89-
The `origin` is your public IP address.
90-
Find it by searching **"what's my IP"** in Google or visiting [https://www.whatsmyip.org](https://www.whatsmyip.org).
38+
### Install from Git
9139

92-
* Contact AndDone support to ensure your origin IP is registered.
93-
* Email: [support@anddone.com](mailto:support@anddone.com)
40+
If the Ruby gem is hosted at a git repository: https://github.com/GIT_USER_ID/GIT_REPO_ID, then add the following in the Gemfile:
9441

95-
3. **Create a Config File (Recommended):**
96-
Rename `config.example.json``config.json` and fill with your keys:
42+
gem 'openapi_client', :git => 'https://github.com/GIT_USER_ID/GIT_REPO_ID.git'
9743

98-
```json
99-
{
100-
"x_api_key": "YOUR_API_KEY",
101-
"x_app_key": "YOUR_APP_KEY",
102-
"x_version": "2.3",
103-
"origin": "YOUR_IP_ADDRESS"
104-
}
105-
```
44+
### Include the Ruby code directly
10645

107-
---
46+
Include the Ruby code directly using `-I` as follows:
10847

109-
## Quickstart
48+
```shell
49+
ruby -Ilib script.rb
50+
```
11051

111-
Here’s a minimal working example to call the **Secure Create Payment Intent API**:
52+
## Getting Started
53+
1. Find and note your company AndDone Developer settings.
54+
1. Login to (UAT) https://portal.uat.anddone.com/ (Production) https://portal.anddone.com/
55+
2. In the left menu, click "Developer" then "API Keys"
56+
3. Your xApiKey will be the API Key
57+
4. Your xAppKey will be the App Key
58+
2. You will need to register your Origin with us to execute API calls against our Secure endpoints.
59+
1. Typically, we use your domain for production or other hosted environments and IP address for local development environments.
60+
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.
61+
3. Please follow the [installation](#installation) procedure and then modify and run the following code:
11262

11363
```ruby
64+
# Load the gem
11465
require 'json'
11566
require 'openapi_client'
11667

117-
# Load API keys from config.json
118-
file = File.read('./config.json')
119-
config = JSON.parse(file)
120-
121-
x_api_key = config['x_api_key']
122-
x_app_key = config['x_app_key']
123-
x_version = config['x_version']
124-
origin = config['origin']
125-
126-
api = OpenapiClient::SecurePaymentIntentApi.new
127-
128-
request = OpenapiClient::PaymentIntentRequest.new(
129-
save_for_future: true,
130-
amount: 10000,
131-
title: "YOUR UNIQUE TITLE",
132-
short_description: "shortDescription",
133-
payment_description: "paymentDescription",
134-
invoice_number: "ruby-sdk",
135-
expires_in: "300000",
136-
intent: {
137-
payment_types: ["CreditCard", "ACH"]
138-
},
139-
enable_premium_finance: true,
140-
additional_details_preference: "NoAdditionalDetails"
141-
)
68+
# Setup authorization
69+
OpenapiClient.configure do |config|
70+
# Configure API key authorization: x-api-key
71+
config.api_key['x-api-key'] = 'YOUR_API_KEY'
72+
# Configure API key authorization: x-app-key
73+
config.api_key['x-app-key'] = 'YOUR_APP_KEY'
74+
end
75+
76+
api_instance = OpenapiClient::SecurePaymentIntentApi.new
77+
x_api_key = 'x_api_key_example' # String | an authorization header
78+
x_app_key = 'x_app_key_example' # String | an authorization header
79+
x_version = 8.14 # Float | x-version
80+
origin = 'origin_example' # String | origin
81+
opts = { :payment_intent_request => JSON.parse('{YOUR_PAYMENT_INTENT_REQUEST}')
82+
}
14283

14384
begin
144-
result = api.secure_paymentintents_post(x_api_key, x_app_key, x_version, origin, request)
145-
puts result
85+
#This API will create a payment intent
86+
result = api_instance.secure_paymentintents_post(x_api_key, x_app_key, x_version, origin, opts)
87+
p result
14688
rescue OpenapiClient::ApiError => e
147-
puts "Exception when calling SecurePaymentIntentApi: #{e}"
89+
puts "Exception when calling SecurePaymentIntentApi->secure_paymentintents_post: #{e}"
14890
end
14991
```
15092

151-
---
152-
153-
## API Endpoints
154-
155-
All URIs are relative to:
156-
157-
* **UAT**: `https://api.uat.anddone.com`
158-
* **Production**: `https://api.anddone.com`
93+
## Documentation for API Endpoints
15994

160-
<details>
161-
<summary>Click to view all endpoints</summary>
95+
All URIs are relative to *https://api.uat.anddone.com*
16296

163-
EmbeddedPremiumFinanceApi.md#secure_epf_quotes_booking_put) | **PUT** /secure/epf/quotes/booking | This API will update PFA to book a quote.
97+
Class | Method | HTTP request | Description
98+
------------ | ------------- | ------------- | -------------
99+
*OpenapiClient::SecureEmbeddedPremiumFinanceApi* | [**secure_epf_merchants_quotes_policy_put**](docs/SecureEmbeddedPremiumFinanceApi.md#secure_epf_merchants_quotes_policy_put) | **PUT** /secure/epf/merchants/quotes/policy | This API is will update the policy number
100+
*OpenapiClient::SecureEmbeddedPremiumFinanceApi* | [**secure_epf_quotes_booking_put**](docs/SecureEmbeddedPremiumFinanceApi.md#secure_epf_quotes_booking_put) | **PUT** /secure/epf/quotes/booking | This API will update PFA to book a quote.
164101
*OpenapiClient::SecureEmbeddedPremiumFinanceApi* | [**secure_epf_quotes_captureesign_put**](docs/SecureEmbeddedPremiumFinanceApi.md#secure_epf_quotes_captureesign_put) | **PUT** /secure/epf/quotes/captureesign | This API will eSign the pfa with insured name.
165102
*OpenapiClient::SecureEmbeddedPremiumFinanceApi* | [**secure_epf_quotes_generate_post**](docs/SecureEmbeddedPremiumFinanceApi.md#secure_epf_quotes_generate_post) | **POST** /secure/epf/quotes/generate | This API is used to Generate Quotes
166103
*OpenapiClient::SecureEmbeddedPremiumFinanceApi* | [**secure_epf_quotes_intent_post**](docs/SecureEmbeddedPremiumFinanceApi.md#secure_epf_quotes_intent_post) | **POST** /secure/epf/quotes/intent | This API will return quotes created againsts a payment intent.
@@ -214,14 +151,8 @@ EmbeddedPremiumFinanceApi.md#secure_epf_quotes_booking_put) | **PUT** /secure/ep
214151
*OpenapiClient::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
215152
*OpenapiClient::SecureVoidsApi* | [**secure_cancellations_post**](docs/SecureVoidsApi.md#secure_cancellations_post) | **POST** /secure/cancellations | This API cancel a transaction.
216153

217-
</details>
218154

219-
---
220-
221-
## Models
222-
223-
<details>
224-
<summary>Click to view all models</summary>
155+
## Documentation for Models
225156

226157
- [OpenapiClient::BankDetailDto](docs/BankDetailDto.md)
227158
- [OpenapiClient::CancelPaymentRequestDTO](docs/CancelPaymentRequestDTO.md)
@@ -346,6 +277,7 @@ EmbeddedPremiumFinanceApi.md#secure_epf_quotes_booking_put) | **PUT** /secure/ep
346277
- [OpenapiClient::RowDto](docs/RowDto.md)
347278
- [OpenapiClient::SecureBatchExecuteRequest](docs/SecureBatchExecuteRequest.md)
348279
- [OpenapiClient::SecureCancelledTransactionResponse](docs/SecureCancelledTransactionResponse.md)
280+
- [OpenapiClient::SecureEpfQuotesPost200Response](docs/SecureEpfQuotesPost200Response.md)
349281
- [OpenapiClient::SecureMerchantTokenShortResponse](docs/SecureMerchantTokenShortResponse.md)
350282
- [OpenapiClient::SecurePaymentBatchDetailsRequest](docs/SecurePaymentBatchDetailsRequest.md)
351283
- [OpenapiClient::SecurePaymentDetailsRequest](docs/SecurePaymentDetailsRequest.md)
@@ -384,10 +316,12 @@ EmbeddedPremiumFinanceApi.md#secure_epf_quotes_booking_put) | **PUT** /secure/ep
384316
- [OpenapiClient::TransactionDetailResponseTenderInfo](docs/TransactionDetailResponseTenderInfo.md)
385317
- [OpenapiClient::TransactionPaymentResponse](docs/TransactionPaymentResponse.md)
386318
- [OpenapiClient::TransactionPaymentResponseAchTenderInfo](docs/TransactionPaymentResponseAchTenderInfo.md)
319+
- [OpenapiClient::TransactionPaymentResponseAchTenderInfoCommissionType](docs/TransactionPaymentResponseAchTenderInfoCommissionType.md)
387320
- [OpenapiClient::TransactionPaymentResponseBillingContact](docs/TransactionPaymentResponseBillingContact.md)
388321
- [OpenapiClient::TransactionPaymentResponseBillingContactAddress](docs/TransactionPaymentResponseBillingContactAddress.md)
389322
- [OpenapiClient::TransactionPaymentResponseBillingContactName](docs/TransactionPaymentResponseBillingContactName.md)
390323
- [OpenapiClient::TransactionPaymentResponseCcTenderInfo](docs/TransactionPaymentResponseCcTenderInfo.md)
324+
- [OpenapiClient::TransactionPaymentResponseRefundOrigin](docs/TransactionPaymentResponseRefundOrigin.md)
391325
- [OpenapiClient::TransactionPaymentResponseRefundTransactions](docs/TransactionPaymentResponseRefundTransactions.md)
392326
- [OpenapiClient::TransactionPaymentResponseRefundTransactionsDataInner](docs/TransactionPaymentResponseRefundTransactionsDataInner.md)
393327
- [OpenapiClient::TransactionPaymentResponseTransactionEntitySplitResponsesInner](docs/TransactionPaymentResponseTransactionEntitySplitResponsesInner.md)
@@ -409,24 +343,35 @@ EmbeddedPremiumFinanceApi.md#secure_epf_quotes_booking_put) | **PUT** /secure/ep
409343
- [OpenapiClient::VerifyBankAccountResponseHttpResponse](docs/VerifyBankAccountResponseHttpResponse.md)
410344

411345

412-
</details>
346+
## Documentation for Authorization
347+
348+
349+
Authentication schemes defined for the API:
350+
### x-api-key
351+
352+
353+
- **Type**: API key
354+
- **API key parameter name**: x-api-key
355+
- **Location**: HTTP header
356+
357+
### x-app-key
358+
359+
360+
- **Type**: API key
361+
- **API key parameter name**: x-app-key
362+
- **Location**: HTTP header
413363

414-
---
364+
### x-version
415365

416-
## Authorization
417366

418-
Authentication is handled via API keys in HTTP headers:
367+
- **Type**: API key
368+
- **API key parameter name**: x-version
369+
- **Location**: HTTP header
419370

420-
| Key | Location | Description |
421-
| ------------- | -------- | ----------------------- |
422-
| **x-api-key** | Header | Your API key |
423-
| **x-app-key** | Header | Your App key |
424-
| **x-version** | Header | API version (e.g., 2.3) |
425-
| **origin** | Header | Your public IP address |
371+
### origin
426372

427-
---
428373

429-
## Support & Versioning
374+
- **Type**: API key
375+
- **API key parameter name**: origin
376+
- **Location**: HTTP header
430377

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

docs/MerchantTransactionEntityResponseDataInner.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@
5757
| **adjustment_display_name** | **String** | | [optional] |
5858
| **adjustment_descriptor_message** | **String** | | [optional] |
5959
| **payment_adjustment_type** | **String** | | [optional] |
60-
| **commission_type** | **String** | | [optional] |
60+
| **commission_type** | [**TransactionPaymentResponseAchTenderInfoCommissionType**](TransactionPaymentResponseAchTenderInfoCommissionType.md) | | [optional] |
6161
| **commission_value** | **Float** | | [optional] |
6262
| **commission_fixed_value** | **Float** | | [optional] |
6363
| **account_token** | **String** | | [optional] |

0 commit comments

Comments
 (0)