apimatic-stax-sdk 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/LICENSE +28 -0
- data/README.md +189 -0
- data/bin/console +15 -0
- data/lib/stax_fatt_merchant_api/api_helper.rb +10 -0
- data/lib/stax_fatt_merchant_api/apis/base_api.rb +67 -0
- data/lib/stax_fatt_merchant_api/apis/cache_api.rb +28 -0
- data/lib/stax_fatt_merchant_api/apis/charge_api.rb +29 -0
- data/lib/stax_fatt_merchant_api/apis/credit_api.rb +29 -0
- data/lib/stax_fatt_merchant_api/apis/customer_api.rb +307 -0
- data/lib/stax_fatt_merchant_api/apis/dispute_file_api.rb +46 -0
- data/lib/stax_fatt_merchant_api/apis/file_api.rb +115 -0
- data/lib/stax_fatt_merchant_api/apis/hello_sign_api.rb +103 -0
- data/lib/stax_fatt_merchant_api/apis/integration_api.rb +115 -0
- data/lib/stax_fatt_merchant_api/apis/invoice_api.rb +270 -0
- data/lib/stax_fatt_merchant_api/apis/invoice_schedule_api.rb +105 -0
- data/lib/stax_fatt_merchant_api/apis/item_api.rb +257 -0
- data/lib/stax_fatt_merchant_api/apis/merchant_admin_api.rb +323 -0
- data/lib/stax_fatt_merchant_api/apis/payment_method_api.rb +128 -0
- data/lib/stax_fatt_merchant_api/apis/reporting_api.rb +42 -0
- data/lib/stax_fatt_merchant_api/apis/sandbox_api.rb +45 -0
- data/lib/stax_fatt_merchant_api/apis/self_api.rb +186 -0
- data/lib/stax_fatt_merchant_api/apis/team_api.rb +143 -0
- data/lib/stax_fatt_merchant_api/apis/team_api_keys_api.rb +141 -0
- data/lib/stax_fatt_merchant_api/apis/team_funding_accounts_api.rb +175 -0
- data/lib/stax_fatt_merchant_api/apis/team_options_api.rb +141 -0
- data/lib/stax_fatt_merchant_api/apis/team_registration_api.rb +156 -0
- data/lib/stax_fatt_merchant_api/apis/team_users_api.rb +139 -0
- data/lib/stax_fatt_merchant_api/apis/terminal_api.rb +73 -0
- data/lib/stax_fatt_merchant_api/apis/transaction_api.rb +467 -0
- data/lib/stax_fatt_merchant_api/apis/user_admin_api.rb +161 -0
- data/lib/stax_fatt_merchant_api/apis/verify_api.rb +42 -0
- data/lib/stax_fatt_merchant_api/apis/web_payment_api.rb +28 -0
- data/lib/stax_fatt_merchant_api/apis/webhook_api.rb +98 -0
- data/lib/stax_fatt_merchant_api/client.rb +235 -0
- data/lib/stax_fatt_merchant_api/configuration.rb +179 -0
- data/lib/stax_fatt_merchant_api/exceptions/api_exception.rb +21 -0
- data/lib/stax_fatt_merchant_api/http/api_response.rb +19 -0
- data/lib/stax_fatt_merchant_api/http/auth/oauth_2.rb +53 -0
- data/lib/stax_fatt_merchant_api/http/http_call_back.rb +10 -0
- data/lib/stax_fatt_merchant_api/http/http_method_enum.rb +10 -0
- data/lib/stax_fatt_merchant_api/http/http_request.rb +10 -0
- data/lib/stax_fatt_merchant_api/http/http_response.rb +10 -0
- data/lib/stax_fatt_merchant_api/http/proxy_settings.rb +22 -0
- data/lib/stax_fatt_merchant_api/logging/configuration/api_logging_configuration.rb +186 -0
- data/lib/stax_fatt_merchant_api/logging/sdk_logger.rb +17 -0
- data/lib/stax_fatt_merchant_api/models/base_model.rb +110 -0
- data/lib/stax_fatt_merchant_api/models/delete_customer_bulk_request_body_json.rb +74 -0
- data/lib/stax_fatt_merchant_api/models/delete_item_bulk_request_body_json.rb +74 -0
- data/lib/stax_fatt_merchant_api/models/get_ephemeral_token_response200_json.rb +75 -0
- data/lib/stax_fatt_merchant_api/models/get_ephemeral_token_root_response200_json.rb +75 -0
- data/lib/stax_fatt_merchant_api/models/merge_customer_request_body_json.rb +76 -0
- data/lib/stax_fatt_merchant_api/models/post_cache_test_request_body_json.rb +74 -0
- data/lib/stax_fatt_merchant_api/models/post_capture_request_body_json.rb +75 -0
- data/lib/stax_fatt_merchant_api/models/post_credit_request_body_json.rb +96 -0
- data/lib/stax_fatt_merchant_api/models/post_dispute_file_request_body.rb +74 -0
- data/lib/stax_fatt_merchant_api/models/post_email_receipt_request_body_json.rb +75 -0
- data/lib/stax_fatt_merchant_api/models/post_file_request_body.rb +85 -0
- data/lib/stax_fatt_merchant_api/models/post_invoice_manual_payment_method.rb +52 -0
- data/lib/stax_fatt_merchant_api/models/post_invoice_manual_payment_request_body_json.rb +75 -0
- data/lib/stax_fatt_merchant_api/models/post_invoice_payment_request_body_json.rb +87 -0
- data/lib/stax_fatt_merchant_api/models/post_item_thumbnail_request_body.rb +74 -0
- data/lib/stax_fatt_merchant_api/models/post_payment_method_token_request_body_json.rb +85 -0
- data/lib/stax_fatt_merchant_api/models/post_receipt_method.rb +36 -0
- data/lib/stax_fatt_merchant_api/models/post_refund_request_body_json.rb +75 -0
- data/lib/stax_fatt_merchant_api/models/post_send_later_method.rb +36 -0
- data/lib/stax_fatt_merchant_api/models/post_send_later_request_body_json.rb +84 -0
- data/lib/stax_fatt_merchant_api/models/post_sms_receipt_request_body_json.rb +75 -0
- data/lib/stax_fatt_merchant_api/models/post_team_branding_request_body.rb +74 -0
- data/lib/stax_fatt_merchant_api/models/post_team_funding_account_file_request_body.rb +74 -0
- data/lib/stax_fatt_merchant_api/models/post_team_registration_file_request_body.rb +74 -0
- data/lib/stax_fatt_merchant_api/models/post_terminal_signature_request_body_json.rb +87 -0
- data/lib/stax_fatt_merchant_api/models/post_verification_request_body_json.rb +77 -0
- data/lib/stax_fatt_merchant_api/models/post_void_or_refund_request_body_json.rb +75 -0
- data/lib/stax_fatt_merchant_api/models/put_email_receipt_request_body_json.rb +75 -0
- data/lib/stax_fatt_merchant_api/models/put_notify_email_request_body_json.rb +75 -0
- data/lib/stax_fatt_merchant_api/models/put_publish_bulk_request_body_json.rb +74 -0
- data/lib/stax_fatt_merchant_api/models/put_receipt_bulk_method_method.rb +36 -0
- data/lib/stax_fatt_merchant_api/models/put_receipt_bulk_method_request_body_json.rb +77 -0
- data/lib/stax_fatt_merchant_api/models/put_receipt_bulk_request_body_json.rb +77 -0
- data/lib/stax_fatt_merchant_api/models/put_receipt_method.rb +36 -0
- data/lib/stax_fatt_merchant_api/models/put_receipt_request_body_json.rb +85 -0
- data/lib/stax_fatt_merchant_api/models/put_registration_sign_request_body_json.rb +76 -0
- data/lib/stax_fatt_merchant_api/models/put_restore_customer_bulk_request_body_json.rb +74 -0
- data/lib/stax_fatt_merchant_api/models/put_send_invoice_bulk_method.rb +36 -0
- data/lib/stax_fatt_merchant_api/models/put_send_invoice_bulk_request_body_json.rb +76 -0
- data/lib/stax_fatt_merchant_api/models/put_send_invoice_method.rb +36 -0
- data/lib/stax_fatt_merchant_api/models/put_set_default_merchant_request_body_json.rb +76 -0
- data/lib/stax_fatt_merchant_api/models/put_set_plan_request_body_json.rb +74 -0
- data/lib/stax_fatt_merchant_api/models/put_sms_receipt_request_body_json.rb +75 -0
- data/lib/stax_fatt_merchant_api/models/put_team_registration_file_request_body.rb +74 -0
- data/lib/stax_fatt_merchant_api/models/put_terminal_signature_request_body_json.rb +76 -0
- data/lib/stax_fatt_merchant_api/models/put_transaction_request_body_json.rb +74 -0
- data/lib/stax_fatt_merchant_api/models/put_unpublish_bulk_request_body_json.rb +74 -0
- data/lib/stax_fatt_merchant_api/models/put_verify_integration_token_request_body_json.rb +75 -0
- data/lib/stax_fatt_merchant_api/utilities/date_time_helper.rb +11 -0
- data/lib/stax_fatt_merchant_api/utilities/file_wrapper.rb +28 -0
- data/lib/stax_fatt_merchant_api.rb +154 -0
- metadata +182 -0
checksums.yaml
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
---
|
|
2
|
+
SHA256:
|
|
3
|
+
metadata.gz: 85c9d71e81be1ac3a551ced833897dbf3665c6a700466614415724c76b82e592
|
|
4
|
+
data.tar.gz: bd15d0a7ad167182cc72454187904b37c46244a7d9f753255799a7a45884dd3e
|
|
5
|
+
SHA512:
|
|
6
|
+
metadata.gz: 8e3c7ea4b61b376ec1963b2166ee39f92b49effa70487477b6cd5a4cfa085748d32fc9eb244d02b4bc0d28d6eb0c3d15df8f06d1953084097c3371b7be185c7c
|
|
7
|
+
data.tar.gz: c04ef722c5f188627476ef7e622fdbe5a30d44edf20bb2cc124852588a44138dc6339d4c21d129b0192ef2d994bfc45b9d647d4acc8c955ace1e6fedf8138845
|
data/LICENSE
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
License:
|
|
2
|
+
========
|
|
3
|
+
The MIT License (MIT)
|
|
4
|
+
http://opensource.org/licenses/MIT
|
|
5
|
+
|
|
6
|
+
Copyright (c) 2014 - 2026 APIMATIC Limited
|
|
7
|
+
|
|
8
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
9
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
10
|
+
in the Software without restriction, including without limitation the rights
|
|
11
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
12
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
13
|
+
furnished to do so, subject to the following conditions:
|
|
14
|
+
|
|
15
|
+
The above copyright notice and this permission notice shall be included in
|
|
16
|
+
all copies or substantial portions of the Software.
|
|
17
|
+
|
|
18
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
19
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
20
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
21
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
22
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
23
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
24
|
+
THE SOFTWARE.
|
|
25
|
+
|
|
26
|
+
Trade Mark:
|
|
27
|
+
==========
|
|
28
|
+
APIMATIC is a trade mark for APIMATIC Limited
|
data/README.md
ADDED
|
@@ -0,0 +1,189 @@
|
|
|
1
|
+
|
|
2
|
+
# Getting Started with Stax (FattMerchant) API
|
|
3
|
+
|
|
4
|
+
## Introduction
|
|
5
|
+
|
|
6
|
+
API specification auto-generated from Laravel route definitions.
|
|
7
|
+
Base URL: https://apiprod.fattlabs.com
|
|
8
|
+
All routes require JWT authentication unless otherwise noted.
|
|
9
|
+
|
|
10
|
+
## Install the Package
|
|
11
|
+
|
|
12
|
+
Install the gem from the command line:
|
|
13
|
+
|
|
14
|
+
```bash
|
|
15
|
+
gem install apimatic-stax-sdk -v 0.0.1
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
Or add the gem to your Gemfile and run `bundle`:
|
|
19
|
+
|
|
20
|
+
```ruby
|
|
21
|
+
gem 'apimatic-stax-sdk', '0.0.1'
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
For additional gem details, see the [RubyGems page for the apimatic-stax-sdk gem](https://rubygems.org/gems/apimatic-stax-sdk/versions/0.0.1).
|
|
25
|
+
|
|
26
|
+
## IRB Console Usage
|
|
27
|
+
|
|
28
|
+
You can explore the SDK interactively using IRB in two ways
|
|
29
|
+
|
|
30
|
+
### 1. Use IRB with Installed Gem
|
|
31
|
+
|
|
32
|
+
Open your system terminal (Command Prompt, Git Bash or macOS Terminal) and type the following command to start the irb console.
|
|
33
|
+
|
|
34
|
+
```bash
|
|
35
|
+
irb
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
Now you can load the SDK in the IRB
|
|
39
|
+
|
|
40
|
+
```ruby
|
|
41
|
+
require 'stax_fatt_merchant_api'
|
|
42
|
+
include StaxFattMerchantApi
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
### 2. Use IRB within SDK
|
|
46
|
+
|
|
47
|
+
Open your system terminal (Command Prompt, Git Bash or macOS Terminal) and navigate to the root folder of SDK.
|
|
48
|
+
|
|
49
|
+
```
|
|
50
|
+
cd path/to/stax_fatt_merchant_api
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
Now you can start the preconfigured irb console by running the following command
|
|
54
|
+
|
|
55
|
+
```bash
|
|
56
|
+
ruby bin/console
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
**_Note:_** This automatically loads the SDK from lib/
|
|
60
|
+
|
|
61
|
+
## Initialize the API Client
|
|
62
|
+
|
|
63
|
+
**_Note:_** Documentation for the client can be found [here.](https://www.github.com/sdks-io/apimatic-stax-ruby-sdk/tree/0.0.1/doc/client.md)
|
|
64
|
+
|
|
65
|
+
The following parameters are configurable for the API Client:
|
|
66
|
+
|
|
67
|
+
| Parameter | Type | Description |
|
|
68
|
+
| --- | --- | --- |
|
|
69
|
+
| environment | [`Environment`](https://www.github.com/sdks-io/apimatic-stax-ruby-sdk/tree/0.0.1/README.md#environments) | The API environment. <br> **Default: `Environment.PRODUCTION`** |
|
|
70
|
+
| connection | `Faraday::Connection` | The Faraday connection object passed by the SDK user for making requests |
|
|
71
|
+
| adapter | `Faraday::Adapter` | The Faraday adapter object passed by the SDK user for performing http requests |
|
|
72
|
+
| timeout | `Float` | The value to use for connection timeout. <br> **Default: 30** |
|
|
73
|
+
| max_retries | `Integer` | The number of times to retry an endpoint call if it fails. <br> **Default: 0** |
|
|
74
|
+
| retry_interval | `Float` | Pause in seconds between retries. <br> **Default: 1** |
|
|
75
|
+
| backoff_factor | `Float` | The amount to multiply each successive retry's interval amount by in order to provide backoff. <br> **Default: 2** |
|
|
76
|
+
| retry_statuses | `Array` | A list of HTTP statuses to retry. <br> **Default: [408, 413, 429, 500, 502, 503, 504, 521, 522, 524]** |
|
|
77
|
+
| retry_methods | `Array` | A list of HTTP methods to retry. <br> **Default: %i[get put]** |
|
|
78
|
+
| http_callback | `HttpCallBack` | The Http CallBack allows defining callables for pre and post API calls. |
|
|
79
|
+
| proxy_settings | [`ProxySettings`](https://www.github.com/sdks-io/apimatic-stax-ruby-sdk/tree/0.0.1/doc/proxy-settings.md) | Optional proxy configuration to route HTTP requests through a proxy server. |
|
|
80
|
+
| logging_configuration | [`LoggingConfiguration`](https://www.github.com/sdks-io/apimatic-stax-ruby-sdk/tree/0.0.1/doc/logging-configuration.md) | The SDK logging configuration for API calls |
|
|
81
|
+
| bearer_auth_credentials | [`BearerAuthCredentials`](https://www.github.com/sdks-io/apimatic-stax-ruby-sdk/tree/0.0.1/doc/auth/oauth-2-bearer-token.md) | The credential object for OAuth 2 Bearer token |
|
|
82
|
+
|
|
83
|
+
The API client can be initialized as follows:
|
|
84
|
+
|
|
85
|
+
### Code-Based Client Initialization
|
|
86
|
+
|
|
87
|
+
```ruby
|
|
88
|
+
require 'stax_fatt_merchant_api'
|
|
89
|
+
include StaxFattMerchantApi
|
|
90
|
+
|
|
91
|
+
client = Client.new(
|
|
92
|
+
bearer_auth_credentials: BearerAuthCredentials.new(
|
|
93
|
+
access_token: 'AccessToken'
|
|
94
|
+
),
|
|
95
|
+
environment: Environment::PRODUCTION,
|
|
96
|
+
logging_configuration: LoggingConfiguration.new(
|
|
97
|
+
log_level: Logger::INFO,
|
|
98
|
+
request_logging_config: RequestLoggingConfiguration.new(
|
|
99
|
+
log_body: true
|
|
100
|
+
),
|
|
101
|
+
response_logging_config: ResponseLoggingConfiguration.new(
|
|
102
|
+
log_headers: true
|
|
103
|
+
)
|
|
104
|
+
)
|
|
105
|
+
)
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
### Environment-Based Client Initialization
|
|
109
|
+
|
|
110
|
+
```ruby
|
|
111
|
+
require 'stax_fatt_merchant_api'
|
|
112
|
+
include StaxFattMerchantApi
|
|
113
|
+
|
|
114
|
+
# Create client from environment
|
|
115
|
+
client = Client.from_env
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
See the [`Environment-Based Client Initialization`](https://www.github.com/sdks-io/apimatic-stax-ruby-sdk/tree/0.0.1/doc/environment-based-client-initialization.md) section for details.
|
|
119
|
+
|
|
120
|
+
## Environments
|
|
121
|
+
|
|
122
|
+
The SDK can be configured to use a different environment for making API calls. Available environments are:
|
|
123
|
+
|
|
124
|
+
### Fields
|
|
125
|
+
|
|
126
|
+
| Name | Description |
|
|
127
|
+
| --- | --- |
|
|
128
|
+
| PRODUCTION | **Default** Production |
|
|
129
|
+
| ENVIRONMENT2 | Development |
|
|
130
|
+
|
|
131
|
+
## Authorization
|
|
132
|
+
|
|
133
|
+
This API uses the following authentication schemes.
|
|
134
|
+
|
|
135
|
+
* [`bearerAuth (OAuth 2 Bearer token)`](https://www.github.com/sdks-io/apimatic-stax-ruby-sdk/tree/0.0.1/doc/auth/oauth-2-bearer-token.md)
|
|
136
|
+
|
|
137
|
+
## List of APIs
|
|
138
|
+
|
|
139
|
+
* [Team Users](https://www.github.com/sdks-io/apimatic-stax-ruby-sdk/tree/0.0.1/doc/controllers/team-users.md)
|
|
140
|
+
* [Team API Keys](https://www.github.com/sdks-io/apimatic-stax-ruby-sdk/tree/0.0.1/doc/controllers/team-api-keys.md)
|
|
141
|
+
* [Team Options](https://www.github.com/sdks-io/apimatic-stax-ruby-sdk/tree/0.0.1/doc/controllers/team-options.md)
|
|
142
|
+
* [Team Registration](https://www.github.com/sdks-io/apimatic-stax-ruby-sdk/tree/0.0.1/doc/controllers/team-registration.md)
|
|
143
|
+
* [Team Funding Accounts](https://www.github.com/sdks-io/apimatic-stax-ruby-sdk/tree/0.0.1/doc/controllers/team-funding-accounts.md)
|
|
144
|
+
* [Invoice Schedule](https://www.github.com/sdks-io/apimatic-stax-ruby-sdk/tree/0.0.1/doc/controllers/invoice-schedule.md)
|
|
145
|
+
* [Dispute File](https://www.github.com/sdks-io/apimatic-stax-ruby-sdk/tree/0.0.1/doc/controllers/dispute-file.md)
|
|
146
|
+
* [Payment Method](https://www.github.com/sdks-io/apimatic-stax-ruby-sdk/tree/0.0.1/doc/controllers/payment-method.md)
|
|
147
|
+
* [Merchant Admin](https://www.github.com/sdks-io/apimatic-stax-ruby-sdk/tree/0.0.1/doc/controllers/merchant-admin.md)
|
|
148
|
+
* [User Admin](https://www.github.com/sdks-io/apimatic-stax-ruby-sdk/tree/0.0.1/doc/controllers/user-admin.md)
|
|
149
|
+
* [Web Payment](https://www.github.com/sdks-io/apimatic-stax-ruby-sdk/tree/0.0.1/doc/controllers/web-payment.md)
|
|
150
|
+
* [Self](https://www.github.com/sdks-io/apimatic-stax-ruby-sdk/tree/0.0.1/doc/controllers/self.md)
|
|
151
|
+
* [Team](https://www.github.com/sdks-io/apimatic-stax-ruby-sdk/tree/0.0.1/doc/controllers/team.md)
|
|
152
|
+
* [Webhook](https://www.github.com/sdks-io/apimatic-stax-ruby-sdk/tree/0.0.1/doc/controllers/webhook.md)
|
|
153
|
+
* [Transaction](https://www.github.com/sdks-io/apimatic-stax-ruby-sdk/tree/0.0.1/doc/controllers/transaction.md)
|
|
154
|
+
* [Invoice](https://www.github.com/sdks-io/apimatic-stax-ruby-sdk/tree/0.0.1/doc/controllers/invoice.md)
|
|
155
|
+
* [Customer](https://www.github.com/sdks-io/apimatic-stax-ruby-sdk/tree/0.0.1/doc/controllers/customer.md)
|
|
156
|
+
* [Item](https://www.github.com/sdks-io/apimatic-stax-ruby-sdk/tree/0.0.1/doc/controllers/item.md)
|
|
157
|
+
* [File](https://www.github.com/sdks-io/apimatic-stax-ruby-sdk/tree/0.0.1/doc/controllers/file.md)
|
|
158
|
+
* [Integration](https://www.github.com/sdks-io/apimatic-stax-ruby-sdk/tree/0.0.1/doc/controllers/integration.md)
|
|
159
|
+
* [Hello Sign](https://www.github.com/sdks-io/apimatic-stax-ruby-sdk/tree/0.0.1/doc/controllers/hello-sign.md)
|
|
160
|
+
* [Reporting](https://www.github.com/sdks-io/apimatic-stax-ruby-sdk/tree/0.0.1/doc/controllers/reporting.md)
|
|
161
|
+
* [Charge](https://www.github.com/sdks-io/apimatic-stax-ruby-sdk/tree/0.0.1/doc/controllers/charge.md)
|
|
162
|
+
* [Credit](https://www.github.com/sdks-io/apimatic-stax-ruby-sdk/tree/0.0.1/doc/controllers/credit.md)
|
|
163
|
+
* [Verify](https://www.github.com/sdks-io/apimatic-stax-ruby-sdk/tree/0.0.1/doc/controllers/verify.md)
|
|
164
|
+
* [Terminal](https://www.github.com/sdks-io/apimatic-stax-ruby-sdk/tree/0.0.1/doc/controllers/terminal.md)
|
|
165
|
+
* [Sandbox](https://www.github.com/sdks-io/apimatic-stax-ruby-sdk/tree/0.0.1/doc/controllers/sandbox.md)
|
|
166
|
+
* [Cache](https://www.github.com/sdks-io/apimatic-stax-ruby-sdk/tree/0.0.1/doc/controllers/cache.md)
|
|
167
|
+
|
|
168
|
+
## SDK Infrastructure
|
|
169
|
+
|
|
170
|
+
### Configuration
|
|
171
|
+
|
|
172
|
+
* [ProxySettings](https://www.github.com/sdks-io/apimatic-stax-ruby-sdk/tree/0.0.1/doc/proxy-settings.md)
|
|
173
|
+
* [Environment-Based Client Initialization](https://www.github.com/sdks-io/apimatic-stax-ruby-sdk/tree/0.0.1/doc/environment-based-client-initialization.md)
|
|
174
|
+
* [AbstractLogger](https://www.github.com/sdks-io/apimatic-stax-ruby-sdk/tree/0.0.1/doc/abstract-logger.md)
|
|
175
|
+
* [LoggingConfiguration](https://www.github.com/sdks-io/apimatic-stax-ruby-sdk/tree/0.0.1/doc/logging-configuration.md)
|
|
176
|
+
* [RequestLoggingConfiguration](https://www.github.com/sdks-io/apimatic-stax-ruby-sdk/tree/0.0.1/doc/request-logging-configuration.md)
|
|
177
|
+
* [ResponseLoggingConfiguration](https://www.github.com/sdks-io/apimatic-stax-ruby-sdk/tree/0.0.1/doc/response-logging-configuration.md)
|
|
178
|
+
|
|
179
|
+
### HTTP
|
|
180
|
+
|
|
181
|
+
* [HttpResponse](https://www.github.com/sdks-io/apimatic-stax-ruby-sdk/tree/0.0.1/doc/http-response.md)
|
|
182
|
+
* [HttpRequest](https://www.github.com/sdks-io/apimatic-stax-ruby-sdk/tree/0.0.1/doc/http-request.md)
|
|
183
|
+
|
|
184
|
+
### Utilities
|
|
185
|
+
|
|
186
|
+
* [ApiResponse](https://www.github.com/sdks-io/apimatic-stax-ruby-sdk/tree/0.0.1/doc/api-response.md)
|
|
187
|
+
* [ApiHelper](https://www.github.com/sdks-io/apimatic-stax-ruby-sdk/tree/0.0.1/doc/api-helper.md)
|
|
188
|
+
* [DateTimeHelper](https://www.github.com/sdks-io/apimatic-stax-ruby-sdk/tree/0.0.1/doc/date-time-helper.md)
|
|
189
|
+
|
data/bin/console
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
#!/usr/bin/env ruby
|
|
2
|
+
|
|
3
|
+
# Load the lib folder into Ruby's load path
|
|
4
|
+
$LOAD_PATH.unshift(File.expand_path('../lib', __dir__))
|
|
5
|
+
|
|
6
|
+
# Require the gem
|
|
7
|
+
require 'stax_fatt_merchant_api'
|
|
8
|
+
|
|
9
|
+
puts 'StaxFattMerchantApi SDK loaded!'
|
|
10
|
+
puts 'You can now create a client with: client = StaxFattMerchantApi::Client.new'
|
|
11
|
+
puts 'Or use from_env: client = StaxFattMerchantApi::Client.from_env'
|
|
12
|
+
|
|
13
|
+
# Start an interactive IRB session
|
|
14
|
+
require 'irb'
|
|
15
|
+
IRB.start
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
# stax_fatt_merchant_api
|
|
2
|
+
#
|
|
3
|
+
# This file was automatically generated by APIMATIC
|
|
4
|
+
# v3.0 ( https://www.apimatic.io ).
|
|
5
|
+
|
|
6
|
+
module StaxFattMerchantApi
|
|
7
|
+
# BaseApi.
|
|
8
|
+
class BaseApi
|
|
9
|
+
include CoreLibrary
|
|
10
|
+
attr_accessor :config, :http_call_back
|
|
11
|
+
|
|
12
|
+
def self.user_agent
|
|
13
|
+
'Ruby-SDK/0.0.1 (OS: {os-info}, Engine: {engine}/{engine-version})'
|
|
14
|
+
end
|
|
15
|
+
|
|
16
|
+
def self.user_agent_parameters
|
|
17
|
+
{
|
|
18
|
+
'{engine}' => { 'value' => RUBY_ENGINE, 'encode' => false },
|
|
19
|
+
'{engine-version}' => { 'value' => RUBY_ENGINE_VERSION, 'encode' => false },
|
|
20
|
+
'{os-info}' => { 'value' => RUBY_PLATFORM, 'encode' => false }
|
|
21
|
+
}
|
|
22
|
+
end
|
|
23
|
+
|
|
24
|
+
GLOBAL_ERRORS = {
|
|
25
|
+
'default' => ErrorCase.new
|
|
26
|
+
.error_message('HTTP response not OK.')
|
|
27
|
+
.exception_type(APIException)
|
|
28
|
+
}.freeze
|
|
29
|
+
|
|
30
|
+
# Initialization constructor.
|
|
31
|
+
# @param [GlobalConfiguration] global_configuration The instance of GlobalConfiguration.
|
|
32
|
+
def initialize(global_configuration)
|
|
33
|
+
@global_configuration = global_configuration
|
|
34
|
+
@config = @global_configuration.client_configuration
|
|
35
|
+
@http_call_back = @config.http_callback
|
|
36
|
+
@api_call = ApiCall.new(@global_configuration)
|
|
37
|
+
end
|
|
38
|
+
|
|
39
|
+
# Creates a new instance of the request builder.
|
|
40
|
+
# @param [String] http_method The HTTP method to use in the request.
|
|
41
|
+
# @param [String] path The endpoint path to use in the request.
|
|
42
|
+
# @param [String] server The server to extract the base uri for the request.
|
|
43
|
+
# @return [RequestBuilder] The instance of RequestBuilder.
|
|
44
|
+
def new_request_builder(http_method, path, server)
|
|
45
|
+
RequestBuilder.new
|
|
46
|
+
.http_method(http_method)
|
|
47
|
+
.path(path)
|
|
48
|
+
.server(server)
|
|
49
|
+
end
|
|
50
|
+
|
|
51
|
+
# Creates a new instance of the response handler.
|
|
52
|
+
# @return [ResponseHandler] The instance of ResponseHandler.
|
|
53
|
+
def new_response_handler
|
|
54
|
+
ResponseHandler.new
|
|
55
|
+
end
|
|
56
|
+
|
|
57
|
+
# Creates a new instance of the parameter.
|
|
58
|
+
# @param [String|optional] key The key of the parameter.
|
|
59
|
+
# @param [Object] value The value of the parameter.
|
|
60
|
+
# @return [Parameter] The instance of Parameter.
|
|
61
|
+
def new_parameter(value, key: nil)
|
|
62
|
+
Parameter.new
|
|
63
|
+
.key(key)
|
|
64
|
+
.value(value)
|
|
65
|
+
end
|
|
66
|
+
end
|
|
67
|
+
end
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# stax_fatt_merchant_api
|
|
2
|
+
#
|
|
3
|
+
# This file was automatically generated by APIMATIC
|
|
4
|
+
# v3.0 ( https://www.apimatic.io ).
|
|
5
|
+
|
|
6
|
+
module StaxFattMerchantApi
|
|
7
|
+
# CacheApi
|
|
8
|
+
class CacheApi < BaseApi
|
|
9
|
+
# TODO: type endpoint description here
|
|
10
|
+
# @param [PostCacheTestRequestBodyJson] body Optional parameter: TODO: type
|
|
11
|
+
# description here
|
|
12
|
+
# @return [ApiResponse] Complete http response with raw body and status code.
|
|
13
|
+
def post_cache_test(body: nil)
|
|
14
|
+
@api_call
|
|
15
|
+
.request(new_request_builder(HttpMethodEnum::POST,
|
|
16
|
+
'/ebworker/cachetest',
|
|
17
|
+
Server::DEFAULT)
|
|
18
|
+
.header_param(new_parameter('application/json', key: 'Content-Type'))
|
|
19
|
+
.body_param(new_parameter(body))
|
|
20
|
+
.body_serializer(proc do |param| param.to_json unless param.nil? end)
|
|
21
|
+
.auth(Single.new('bearerAuth')))
|
|
22
|
+
.response(new_response_handler
|
|
23
|
+
.is_response_void(true)
|
|
24
|
+
.is_api_response(true))
|
|
25
|
+
.execute
|
|
26
|
+
end
|
|
27
|
+
end
|
|
28
|
+
end
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
# stax_fatt_merchant_api
|
|
2
|
+
#
|
|
3
|
+
# This file was automatically generated by APIMATIC
|
|
4
|
+
# v3.0 ( https://www.apimatic.io ).
|
|
5
|
+
|
|
6
|
+
module StaxFattMerchantApi
|
|
7
|
+
# ChargeApi
|
|
8
|
+
class ChargeApi < BaseApi
|
|
9
|
+
# TODO: type endpoint description here
|
|
10
|
+
# @param [Object] body Required parameter: TODO: type description here
|
|
11
|
+
# @return [ApiResponse] Complete http response with raw body and status code.
|
|
12
|
+
def post_charge(body)
|
|
13
|
+
@api_call
|
|
14
|
+
.request(new_request_builder(HttpMethodEnum::POST,
|
|
15
|
+
'/charge',
|
|
16
|
+
Server::DEFAULT)
|
|
17
|
+
.header_param(new_parameter('application/json', key: 'Content-Type'))
|
|
18
|
+
.body_param(new_parameter(body)
|
|
19
|
+
.is_required(true))
|
|
20
|
+
.header_param(new_parameter('application/json', key: 'accept'))
|
|
21
|
+
.body_serializer(APIHelper.method(:json_serialize))
|
|
22
|
+
.auth(Single.new('bearerAuth')))
|
|
23
|
+
.response(new_response_handler
|
|
24
|
+
.deserializer(APIHelper.method(:json_deserialize))
|
|
25
|
+
.is_api_response(true))
|
|
26
|
+
.execute
|
|
27
|
+
end
|
|
28
|
+
end
|
|
29
|
+
end
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
# stax_fatt_merchant_api
|
|
2
|
+
#
|
|
3
|
+
# This file was automatically generated by APIMATIC
|
|
4
|
+
# v3.0 ( https://www.apimatic.io ).
|
|
5
|
+
|
|
6
|
+
module StaxFattMerchantApi
|
|
7
|
+
# CreditApi
|
|
8
|
+
class CreditApi < BaseApi
|
|
9
|
+
# TODO: type endpoint description here
|
|
10
|
+
# @param [PostCreditRequestBodyJson] body Required parameter: TODO: type
|
|
11
|
+
# description here
|
|
12
|
+
# @return [ApiResponse] Complete http response with raw body and status code.
|
|
13
|
+
def post_credit(body)
|
|
14
|
+
@api_call
|
|
15
|
+
.request(new_request_builder(HttpMethodEnum::POST,
|
|
16
|
+
'/credit',
|
|
17
|
+
Server::DEFAULT)
|
|
18
|
+
.header_param(new_parameter('application/json', key: 'Content-Type'))
|
|
19
|
+
.body_param(new_parameter(body)
|
|
20
|
+
.is_required(true))
|
|
21
|
+
.body_serializer(proc do |param| param.to_json unless param.nil? end)
|
|
22
|
+
.auth(Single.new('bearerAuth')))
|
|
23
|
+
.response(new_response_handler
|
|
24
|
+
.is_response_void(true)
|
|
25
|
+
.is_api_response(true))
|
|
26
|
+
.execute
|
|
27
|
+
end
|
|
28
|
+
end
|
|
29
|
+
end
|