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
6927gem 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
11465require ' json'
11566require ' 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
14384begin
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
14688rescue OpenapiClient ::ApiError => e
147- puts " Exception when calling SecurePaymentIntentApi: #{ e } "
89+ puts " Exception when calling SecurePaymentIntentApi->secure_paymentintents_post : #{ e } "
14890end
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.
0 commit comments