pq-api-matic-sdk 1.0.0 → 1.0.2
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 +4 -4
- data/README.md +42 -50
- metadata +1 -51
- data/test/controllers/controller_test_base.rb +0 -24
- data/test/controllers/test_agreements_controller.rb +0 -108
- data/test/controllers/test_balances_controller.rb +0 -132
- data/test/controllers/test_bank_accounts_controller.rb +0 -645
- data/test/controllers/test_client_side_controller.rb +0 -295
- data/test/controllers/test_compliance_controller.rb +0 -86
- data/test/controllers/test_documents_controller.rb +0 -212
- data/test/controllers/test_electronic_wallets_controller.rb +0 -292
- data/test/controllers/test_events_controller.rb +0 -138
- data/test/controllers/test_invitations_controller.rb +0 -162
- data/test/controllers/test_jobs_controller.rb +0 -114
- data/test/controllers/test_payments_controller.rb +0 -323
- data/test/controllers/test_prepaid_cards_controller.rb +0 -351
- data/test/controllers/test_program_controller.rb +0 -134
- data/test/controllers/test_receipts_controller.rb +0 -813
- data/test/controllers/test_spendback_controller.rb +0 -302
- data/test/controllers/test_spendback_refunds_controller.rb +0 -128
- data/test/controllers/test_statements_controller.rb +0 -192
- data/test/controllers/test_transfers_controller.rb +0 -613
- data/test/controllers/test_users_controller.rb +0 -483
- data/test/controllers/test_webhooks_controller.rb +0 -402
- data/test/http_response_catcher.rb +0 -19
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: a4d480f335b26a5b8dbcdb48fa7f770cec6afe26dac8376c2e744d4f8725156f
|
|
4
|
+
data.tar.gz: 53fff7a74f106ff0caf5d2b18435284acdd6b6458da44bad05453f9b6fa29220
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: a02eac504fa23fc807a0c43a51e5072a14a2e581533823cfd0cb81a87f13c1cd072215d31e1d5bba62b477342266ec7c848fc1512730cd18c4904e4bb7652c73
|
|
7
|
+
data.tar.gz: 103a04c8c2a7c05a03a5563c378068e7a9e83bdd304068039cd26b6f9e46628565227c3c0fac5d87515939e8835056319d9790e26f0ccb80fd249ee12b840639
|
data/README.md
CHANGED
|
@@ -14,16 +14,16 @@ PayQuicker provides a RESTful API that allows authorized clients to send and rec
|
|
|
14
14
|
Install the gem from the command line:
|
|
15
15
|
|
|
16
16
|
```bash
|
|
17
|
-
gem install pq-api-matic-sdk -v 1.0.
|
|
17
|
+
gem install pq-api-matic-sdk -v 1.0.2
|
|
18
18
|
```
|
|
19
19
|
|
|
20
20
|
Or add the gem to your Gemfile and run `bundle`:
|
|
21
21
|
|
|
22
22
|
```ruby
|
|
23
|
-
gem 'pq-api-matic-sdk', '1.0.
|
|
23
|
+
gem 'pq-api-matic-sdk', '1.0.2'
|
|
24
24
|
```
|
|
25
25
|
|
|
26
|
-
For additional gem details, see the [RubyGems page for the pq-api-matic-sdk gem](https://rubygems.org/gems/pq-api-matic-sdk/versions/1.0.
|
|
26
|
+
For additional gem details, see the [RubyGems page for the pq-api-matic-sdk gem](https://rubygems.org/gems/pq-api-matic-sdk/versions/1.0.2).
|
|
27
27
|
|
|
28
28
|
## IRB Console Usage
|
|
29
29
|
|
|
@@ -60,17 +60,9 @@ ruby bin/console
|
|
|
60
60
|
|
|
61
61
|
**_Note:_** This automatically loads the SDK from lib/
|
|
62
62
|
|
|
63
|
-
## Test the SDK
|
|
64
|
-
|
|
65
|
-
To run the tests, navigate to the root directory of the SDK in your terminal and execute the following command:
|
|
66
|
-
|
|
67
|
-
```
|
|
68
|
-
rake
|
|
69
|
-
```
|
|
70
|
-
|
|
71
63
|
## Initialize the API Client
|
|
72
64
|
|
|
73
|
-
**_Note:_** Documentation for the client can be found [here.](https://www.github.com/sdks-io/pq-api-matic-ruby-sdk/tree/1.0.
|
|
65
|
+
**_Note:_** Documentation for the client can be found [here.](https://www.github.com/sdks-io/pq-api-matic-ruby-sdk/tree/1.0.2/doc/client.md)
|
|
74
66
|
|
|
75
67
|
The following parameters are configurable for the API Client:
|
|
76
68
|
|
|
@@ -79,7 +71,7 @@ The following parameters are configurable for the API Client:
|
|
|
79
71
|
| x_my_pay_quicker_version | `String` | Date-based API Version specified in the header *required* on all calls.<br>*Default*: `'2026.02.01'` |
|
|
80
72
|
| sandbox_instance | `SandboxInstance` | Sandbox Environments<br>*Default*: `SandboxInstance::SANDBOX` |
|
|
81
73
|
| uat_instance | `UatInstance` | UAT Environments<br>*Default*: `UatInstance::UAT1` |
|
|
82
|
-
| environment | [`Environment`](https://www.github.com/sdks-io/pq-api-matic-ruby-sdk/tree/1.0.
|
|
74
|
+
| environment | [`Environment`](https://www.github.com/sdks-io/pq-api-matic-ruby-sdk/tree/1.0.2/README.md#environments) | The API environment. <br> **Default: `Environment.SANDBOX`** |
|
|
83
75
|
| connection | `Faraday::Connection` | The Faraday connection object passed by the SDK user for making requests |
|
|
84
76
|
| adapter | `Faraday::Adapter` | The Faraday adapter object passed by the SDK user for performing http requests |
|
|
85
77
|
| timeout | `Float` | The value to use for connection timeout. <br> **Default: 60** |
|
|
@@ -89,10 +81,10 @@ The following parameters are configurable for the API Client:
|
|
|
89
81
|
| retry_statuses | `Array` | A list of HTTP statuses to retry. <br> **Default: [408, 413, 429, 500, 502, 503, 504, 521, 522, 524]** |
|
|
90
82
|
| retry_methods | `Array` | A list of HTTP methods to retry. <br> **Default: %i[get put]** |
|
|
91
83
|
| http_callback | `HttpCallBack` | The Http CallBack allows defining callables for pre and post API calls. |
|
|
92
|
-
| proxy_settings | [`ProxySettings`](https://www.github.com/sdks-io/pq-api-matic-ruby-sdk/tree/1.0.
|
|
93
|
-
| logging_configuration | [`LoggingConfiguration`](https://www.github.com/sdks-io/pq-api-matic-ruby-sdk/tree/1.0.
|
|
94
|
-
| server_credentials | [`ServerCredentials`](https://www.github.com/sdks-io/pq-api-matic-ruby-sdk/tree/1.0.
|
|
95
|
-
| clientside_credentials | [`ClientsideCredentials`](https://www.github.com/sdks-io/pq-api-matic-ruby-sdk/tree/1.0.
|
|
84
|
+
| proxy_settings | [`ProxySettings`](https://www.github.com/sdks-io/pq-api-matic-ruby-sdk/tree/1.0.2/doc/proxy-settings.md) | Optional proxy configuration to route HTTP requests through a proxy server. |
|
|
85
|
+
| logging_configuration | [`LoggingConfiguration`](https://www.github.com/sdks-io/pq-api-matic-ruby-sdk/tree/1.0.2/doc/logging-configuration.md) | The SDK logging configuration for API calls |
|
|
86
|
+
| server_credentials | [`ServerCredentials`](https://www.github.com/sdks-io/pq-api-matic-ruby-sdk/tree/1.0.2/doc/auth/oauth-2-client-credentials-grant.md) | The credential object for OAuth 2 Client Credentials Grant |
|
|
87
|
+
| clientside_credentials | [`ClientsideCredentials`](https://www.github.com/sdks-io/pq-api-matic-ruby-sdk/tree/1.0.2/doc/auth/oauth-2-bearer-token.md) | The credential object for OAuth 2 Bearer token |
|
|
96
88
|
|
|
97
89
|
The API client can be initialized as follows:
|
|
98
90
|
|
|
@@ -140,7 +132,7 @@ include PayQuickerSdk
|
|
|
140
132
|
client = Client.from_env
|
|
141
133
|
```
|
|
142
134
|
|
|
143
|
-
See the [`Environment-Based Client Initialization`](https://www.github.com/sdks-io/pq-api-matic-ruby-sdk/tree/1.0.
|
|
135
|
+
See the [`Environment-Based Client Initialization`](https://www.github.com/sdks-io/pq-api-matic-ruby-sdk/tree/1.0.2/doc/environment-based-client-initialization.md) section for details.
|
|
144
136
|
|
|
145
137
|
## Environments
|
|
146
138
|
|
|
@@ -159,50 +151,50 @@ The SDK can be configured to use a different environment for making API calls. A
|
|
|
159
151
|
|
|
160
152
|
This API uses the following authentication schemes.
|
|
161
153
|
|
|
162
|
-
* [`server (OAuth 2 Client Credentials Grant)`](https://www.github.com/sdks-io/pq-api-matic-ruby-sdk/tree/1.0.
|
|
163
|
-
* [`clientside (OAuth 2 Bearer token)`](https://www.github.com/sdks-io/pq-api-matic-ruby-sdk/tree/1.0.
|
|
154
|
+
* [`server (OAuth 2 Client Credentials Grant)`](https://www.github.com/sdks-io/pq-api-matic-ruby-sdk/tree/1.0.2/doc/auth/oauth-2-client-credentials-grant.md)
|
|
155
|
+
* [`clientside (OAuth 2 Bearer token)`](https://www.github.com/sdks-io/pq-api-matic-ruby-sdk/tree/1.0.2/doc/auth/oauth-2-bearer-token.md)
|
|
164
156
|
|
|
165
157
|
## List of APIs
|
|
166
158
|
|
|
167
|
-
* [Agreements](https://www.github.com/sdks-io/pq-api-matic-ruby-sdk/tree/1.0.
|
|
168
|
-
* [Balances](https://www.github.com/sdks-io/pq-api-matic-ruby-sdk/tree/1.0.
|
|
169
|
-
* [Bank Accounts](https://www.github.com/sdks-io/pq-api-matic-ruby-sdk/tree/1.0.
|
|
170
|
-
* [Client Side](https://www.github.com/sdks-io/pq-api-matic-ruby-sdk/tree/1.0.
|
|
171
|
-
* [Compliance](https://www.github.com/sdks-io/pq-api-matic-ruby-sdk/tree/1.0.
|
|
172
|
-
* [Documents](https://www.github.com/sdks-io/pq-api-matic-ruby-sdk/tree/1.0.
|
|
173
|
-
* [Electronic Wallets](https://www.github.com/sdks-io/pq-api-matic-ruby-sdk/tree/1.0.
|
|
174
|
-
* [Events](https://www.github.com/sdks-io/pq-api-matic-ruby-sdk/tree/1.0.
|
|
175
|
-
* [Invitations](https://www.github.com/sdks-io/pq-api-matic-ruby-sdk/tree/1.0.
|
|
176
|
-
* [Jobs](https://www.github.com/sdks-io/pq-api-matic-ruby-sdk/tree/1.0.
|
|
177
|
-
* [Payments](https://www.github.com/sdks-io/pq-api-matic-ruby-sdk/tree/1.0.
|
|
178
|
-
* [Prepaid Cards](https://www.github.com/sdks-io/pq-api-matic-ruby-sdk/tree/1.0.
|
|
179
|
-
* [Program](https://www.github.com/sdks-io/pq-api-matic-ruby-sdk/tree/1.0.
|
|
180
|
-
* [Receipts](https://www.github.com/sdks-io/pq-api-matic-ruby-sdk/tree/1.0.
|
|
181
|
-
* [Spendback](https://www.github.com/sdks-io/pq-api-matic-ruby-sdk/tree/1.0.
|
|
182
|
-
* [Spendback Refunds](https://www.github.com/sdks-io/pq-api-matic-ruby-sdk/tree/1.0.
|
|
183
|
-
* [Statements](https://www.github.com/sdks-io/pq-api-matic-ruby-sdk/tree/1.0.
|
|
184
|
-
* [Transfers](https://www.github.com/sdks-io/pq-api-matic-ruby-sdk/tree/1.0.
|
|
185
|
-
* [Users](https://www.github.com/sdks-io/pq-api-matic-ruby-sdk/tree/1.0.
|
|
186
|
-
* [Webhooks](https://www.github.com/sdks-io/pq-api-matic-ruby-sdk/tree/1.0.
|
|
159
|
+
* [Agreements](https://www.github.com/sdks-io/pq-api-matic-ruby-sdk/tree/1.0.2/doc/controllers/agreements.md)
|
|
160
|
+
* [Balances](https://www.github.com/sdks-io/pq-api-matic-ruby-sdk/tree/1.0.2/doc/controllers/balances.md)
|
|
161
|
+
* [Bank Accounts](https://www.github.com/sdks-io/pq-api-matic-ruby-sdk/tree/1.0.2/doc/controllers/bank-accounts.md)
|
|
162
|
+
* [Client Side](https://www.github.com/sdks-io/pq-api-matic-ruby-sdk/tree/1.0.2/doc/controllers/client-side.md)
|
|
163
|
+
* [Compliance](https://www.github.com/sdks-io/pq-api-matic-ruby-sdk/tree/1.0.2/doc/controllers/compliance.md)
|
|
164
|
+
* [Documents](https://www.github.com/sdks-io/pq-api-matic-ruby-sdk/tree/1.0.2/doc/controllers/documents.md)
|
|
165
|
+
* [Electronic Wallets](https://www.github.com/sdks-io/pq-api-matic-ruby-sdk/tree/1.0.2/doc/controllers/electronic-wallets.md)
|
|
166
|
+
* [Events](https://www.github.com/sdks-io/pq-api-matic-ruby-sdk/tree/1.0.2/doc/controllers/events.md)
|
|
167
|
+
* [Invitations](https://www.github.com/sdks-io/pq-api-matic-ruby-sdk/tree/1.0.2/doc/controllers/invitations.md)
|
|
168
|
+
* [Jobs](https://www.github.com/sdks-io/pq-api-matic-ruby-sdk/tree/1.0.2/doc/controllers/jobs.md)
|
|
169
|
+
* [Payments](https://www.github.com/sdks-io/pq-api-matic-ruby-sdk/tree/1.0.2/doc/controllers/payments.md)
|
|
170
|
+
* [Prepaid Cards](https://www.github.com/sdks-io/pq-api-matic-ruby-sdk/tree/1.0.2/doc/controllers/prepaid-cards.md)
|
|
171
|
+
* [Program](https://www.github.com/sdks-io/pq-api-matic-ruby-sdk/tree/1.0.2/doc/controllers/program.md)
|
|
172
|
+
* [Receipts](https://www.github.com/sdks-io/pq-api-matic-ruby-sdk/tree/1.0.2/doc/controllers/receipts.md)
|
|
173
|
+
* [Spendback](https://www.github.com/sdks-io/pq-api-matic-ruby-sdk/tree/1.0.2/doc/controllers/spendback.md)
|
|
174
|
+
* [Spendback Refunds](https://www.github.com/sdks-io/pq-api-matic-ruby-sdk/tree/1.0.2/doc/controllers/spendback-refunds.md)
|
|
175
|
+
* [Statements](https://www.github.com/sdks-io/pq-api-matic-ruby-sdk/tree/1.0.2/doc/controllers/statements.md)
|
|
176
|
+
* [Transfers](https://www.github.com/sdks-io/pq-api-matic-ruby-sdk/tree/1.0.2/doc/controllers/transfers.md)
|
|
177
|
+
* [Users](https://www.github.com/sdks-io/pq-api-matic-ruby-sdk/tree/1.0.2/doc/controllers/users.md)
|
|
178
|
+
* [Webhooks](https://www.github.com/sdks-io/pq-api-matic-ruby-sdk/tree/1.0.2/doc/controllers/webhooks.md)
|
|
187
179
|
|
|
188
180
|
## SDK Infrastructure
|
|
189
181
|
|
|
190
182
|
### Configuration
|
|
191
183
|
|
|
192
|
-
* [ProxySettings](https://www.github.com/sdks-io/pq-api-matic-ruby-sdk/tree/1.0.
|
|
193
|
-
* [Environment-Based Client Initialization](https://www.github.com/sdks-io/pq-api-matic-ruby-sdk/tree/1.0.
|
|
194
|
-
* [AbstractLogger](https://www.github.com/sdks-io/pq-api-matic-ruby-sdk/tree/1.0.
|
|
195
|
-
* [LoggingConfiguration](https://www.github.com/sdks-io/pq-api-matic-ruby-sdk/tree/1.0.
|
|
196
|
-
* [RequestLoggingConfiguration](https://www.github.com/sdks-io/pq-api-matic-ruby-sdk/tree/1.0.
|
|
197
|
-
* [ResponseLoggingConfiguration](https://www.github.com/sdks-io/pq-api-matic-ruby-sdk/tree/1.0.
|
|
184
|
+
* [ProxySettings](https://www.github.com/sdks-io/pq-api-matic-ruby-sdk/tree/1.0.2/doc/proxy-settings.md)
|
|
185
|
+
* [Environment-Based Client Initialization](https://www.github.com/sdks-io/pq-api-matic-ruby-sdk/tree/1.0.2/doc/environment-based-client-initialization.md)
|
|
186
|
+
* [AbstractLogger](https://www.github.com/sdks-io/pq-api-matic-ruby-sdk/tree/1.0.2/doc/abstract-logger.md)
|
|
187
|
+
* [LoggingConfiguration](https://www.github.com/sdks-io/pq-api-matic-ruby-sdk/tree/1.0.2/doc/logging-configuration.md)
|
|
188
|
+
* [RequestLoggingConfiguration](https://www.github.com/sdks-io/pq-api-matic-ruby-sdk/tree/1.0.2/doc/request-logging-configuration.md)
|
|
189
|
+
* [ResponseLoggingConfiguration](https://www.github.com/sdks-io/pq-api-matic-ruby-sdk/tree/1.0.2/doc/response-logging-configuration.md)
|
|
198
190
|
|
|
199
191
|
### HTTP
|
|
200
192
|
|
|
201
|
-
* [HttpResponse](https://www.github.com/sdks-io/pq-api-matic-ruby-sdk/tree/1.0.
|
|
202
|
-
* [HttpRequest](https://www.github.com/sdks-io/pq-api-matic-ruby-sdk/tree/1.0.
|
|
193
|
+
* [HttpResponse](https://www.github.com/sdks-io/pq-api-matic-ruby-sdk/tree/1.0.2/doc/http-response.md)
|
|
194
|
+
* [HttpRequest](https://www.github.com/sdks-io/pq-api-matic-ruby-sdk/tree/1.0.2/doc/http-request.md)
|
|
203
195
|
|
|
204
196
|
### Utilities
|
|
205
197
|
|
|
206
|
-
* [ApiHelper](https://www.github.com/sdks-io/pq-api-matic-ruby-sdk/tree/1.0.
|
|
207
|
-
* [DateTimeHelper](https://www.github.com/sdks-io/pq-api-matic-ruby-sdk/tree/1.0.
|
|
198
|
+
* [ApiHelper](https://www.github.com/sdks-io/pq-api-matic-ruby-sdk/tree/1.0.2/doc/api-helper.md)
|
|
199
|
+
* [DateTimeHelper](https://www.github.com/sdks-io/pq-api-matic-ruby-sdk/tree/1.0.2/doc/date-time-helper.md)
|
|
208
200
|
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: pq-api-matic-sdk
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.0.
|
|
4
|
+
version: 1.0.2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Muhammad Rafay
|
|
@@ -52,34 +52,6 @@ dependencies:
|
|
|
52
52
|
- - "~>"
|
|
53
53
|
- !ruby/object:Gem::Version
|
|
54
54
|
version: 0.1.6
|
|
55
|
-
- !ruby/object:Gem::Dependency
|
|
56
|
-
name: minitest
|
|
57
|
-
requirement: !ruby/object:Gem::Requirement
|
|
58
|
-
requirements:
|
|
59
|
-
- - "~>"
|
|
60
|
-
- !ruby/object:Gem::Version
|
|
61
|
-
version: 5.24.0
|
|
62
|
-
type: :development
|
|
63
|
-
prerelease: false
|
|
64
|
-
version_requirements: !ruby/object:Gem::Requirement
|
|
65
|
-
requirements:
|
|
66
|
-
- - "~>"
|
|
67
|
-
- !ruby/object:Gem::Version
|
|
68
|
-
version: 5.24.0
|
|
69
|
-
- !ruby/object:Gem::Dependency
|
|
70
|
-
name: minitest-proveit
|
|
71
|
-
requirement: !ruby/object:Gem::Requirement
|
|
72
|
-
requirements:
|
|
73
|
-
- - "~>"
|
|
74
|
-
- !ruby/object:Gem::Version
|
|
75
|
-
version: '1.0'
|
|
76
|
-
type: :development
|
|
77
|
-
prerelease: false
|
|
78
|
-
version_requirements: !ruby/object:Gem::Requirement
|
|
79
|
-
requirements:
|
|
80
|
-
- - "~>"
|
|
81
|
-
- !ruby/object:Gem::Version
|
|
82
|
-
version: '1.0'
|
|
83
55
|
description: SDKs for PQ Apis
|
|
84
56
|
email:
|
|
85
57
|
- muhammad.rafay@apimatic.io
|
|
@@ -331,28 +303,6 @@ files:
|
|
|
331
303
|
- lib/pay_quicker_sdk/utilities/date_time_helper.rb
|
|
332
304
|
- lib/pay_quicker_sdk/utilities/file_wrapper.rb
|
|
333
305
|
- lib/pay_quicker_sdk/utilities/union_type_lookup.rb
|
|
334
|
-
- test/controllers/controller_test_base.rb
|
|
335
|
-
- test/controllers/test_agreements_controller.rb
|
|
336
|
-
- test/controllers/test_balances_controller.rb
|
|
337
|
-
- test/controllers/test_bank_accounts_controller.rb
|
|
338
|
-
- test/controllers/test_client_side_controller.rb
|
|
339
|
-
- test/controllers/test_compliance_controller.rb
|
|
340
|
-
- test/controllers/test_documents_controller.rb
|
|
341
|
-
- test/controllers/test_electronic_wallets_controller.rb
|
|
342
|
-
- test/controllers/test_events_controller.rb
|
|
343
|
-
- test/controllers/test_invitations_controller.rb
|
|
344
|
-
- test/controllers/test_jobs_controller.rb
|
|
345
|
-
- test/controllers/test_payments_controller.rb
|
|
346
|
-
- test/controllers/test_prepaid_cards_controller.rb
|
|
347
|
-
- test/controllers/test_program_controller.rb
|
|
348
|
-
- test/controllers/test_receipts_controller.rb
|
|
349
|
-
- test/controllers/test_spendback_controller.rb
|
|
350
|
-
- test/controllers/test_spendback_refunds_controller.rb
|
|
351
|
-
- test/controllers/test_statements_controller.rb
|
|
352
|
-
- test/controllers/test_transfers_controller.rb
|
|
353
|
-
- test/controllers/test_users_controller.rb
|
|
354
|
-
- test/controllers/test_webhooks_controller.rb
|
|
355
|
-
- test/http_response_catcher.rb
|
|
356
306
|
homepage: https://payquicker.com/
|
|
357
307
|
licenses:
|
|
358
308
|
- MIT
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
# pay_quicker_sdk
|
|
2
|
-
#
|
|
3
|
-
# This file was automatically generated for PayQuicker by
|
|
4
|
-
# APIMATIC v3.0 ( https://www.apimatic.io ).
|
|
5
|
-
|
|
6
|
-
require 'json'
|
|
7
|
-
require 'minitest/autorun'
|
|
8
|
-
require 'minitest/hell'
|
|
9
|
-
require 'minitest/pride'
|
|
10
|
-
require 'minitest/proveit'
|
|
11
|
-
require 'pay_quicker_sdk'
|
|
12
|
-
require_relative '../http_response_catcher'
|
|
13
|
-
|
|
14
|
-
class ControllerTestBase < Minitest::Test
|
|
15
|
-
parallelize_me!
|
|
16
|
-
include PayQuickerSdk
|
|
17
|
-
include CoreLibrary
|
|
18
|
-
|
|
19
|
-
# Initializes the base test controller
|
|
20
|
-
def setup_class
|
|
21
|
-
@client = Client.from_env(http_callback: HttpResponseCatcher.new)
|
|
22
|
-
|
|
23
|
-
_config = @client.config end
|
|
24
|
-
end
|
|
@@ -1,108 +0,0 @@
|
|
|
1
|
-
# pay_quicker_sdk
|
|
2
|
-
#
|
|
3
|
-
# This file was automatically generated for PayQuicker by
|
|
4
|
-
# APIMATIC v3.0 ( https://www.apimatic.io ).
|
|
5
|
-
|
|
6
|
-
require_relative 'controller_test_base'
|
|
7
|
-
|
|
8
|
-
class AgreementsControllerTest < ControllerTestBase
|
|
9
|
-
# Called only once for the class before any test has executed
|
|
10
|
-
def setup
|
|
11
|
-
setup_class
|
|
12
|
-
@controller = @client.agreements
|
|
13
|
-
@response_catcher = @controller.http_call_back
|
|
14
|
-
end
|
|
15
|
-
|
|
16
|
-
# Retrieve a list of program [agreements](page:resources/agreements) that supports filtering, sorting, and pagination through existing mechanisms.
|
|
17
|
-
#
|
|
18
|
-
def test_list_agreements
|
|
19
|
-
# Parameters for the API call
|
|
20
|
-
program_token = 'prog-6a272eca-9487-d83a-c9e4-8df8c9a7f6eb'
|
|
21
|
-
page = 1
|
|
22
|
-
page_size = 20
|
|
23
|
-
filter = 'string'
|
|
24
|
-
sort = 'string'
|
|
25
|
-
language = 'en-US'
|
|
26
|
-
|
|
27
|
-
# Perform the API call through the SDK function
|
|
28
|
-
result = @controller.list_agreements(program_token, page, page_size,
|
|
29
|
-
filter: filter, sort: sort,
|
|
30
|
-
language: language)
|
|
31
|
-
|
|
32
|
-
# Test response code
|
|
33
|
-
assert_equal(200, @response_catcher.response.status_code)
|
|
34
|
-
# Test headers
|
|
35
|
-
expected_headers = {}
|
|
36
|
-
expected_headers['content-type'] = 'application/json; charset=utf-8'
|
|
37
|
-
|
|
38
|
-
assert(ComparisonHelper.match_headers(expected_headers, @response_catcher.response.headers))
|
|
39
|
-
|
|
40
|
-
# Test whether the captured response is as we expected
|
|
41
|
-
refute_nil(result)
|
|
42
|
-
expected_body = JSON.parse(
|
|
43
|
-
'{"payload":[{"token":"agmt-b33d420f-6c1b-4a93-9455-d6585552b97d","conte'\
|
|
44
|
-
'ntBase64":"DQogIGZvciB5b3VyIHBsYXN0aW...KPC9ib2R5Pg0KDQo8L2h0bWw+DQo=",'\
|
|
45
|
-
'"url":"https://cdn.payquicker.io/content/Agreements/Cardholder/v1/Langu'\
|
|
46
|
-
'ages_EN_US/CardholderAgreement-Consumer-ACH-20k-MCB-USD.pdf","type":"CA'\
|
|
47
|
-
'RD_HOLDER_AGREEMENT","links":[{"href":"https://api.sandbox.payquicker.i'\
|
|
48
|
-
'o/api/v2/programs/prog-6a272eca-9487-d83a-c9e4-8df8c9a7f6eb/agreements/'\
|
|
49
|
-
'agmt-b33d420f-6c1b-4a93-9455-d6585552b97d","params":{"rel":"self"}}]}],'\
|
|
50
|
-
'"meta":{"pageNo":"1","pageSize":"100","pageCount":"0","recordCount":"0"'\
|
|
51
|
-
',"timezone":"GMT","requestRef":"request-reference-value"},"links":[{"hr'\
|
|
52
|
-
'ef":"https://api.sandbox.payquicker.io/api/v2/programs/prog-6a272eca-94'\
|
|
53
|
-
'87-d83a-c9e4-8df8c9a7f6eb/agreements","params":{"rel":"self"}}]}'
|
|
54
|
-
)
|
|
55
|
-
received_body = JSON.parse(@response_catcher.response.raw_body)
|
|
56
|
-
assert(ComparisonHelper.match_body(expected_body, received_body))
|
|
57
|
-
end
|
|
58
|
-
|
|
59
|
-
# Retrieve a single program [agreement](page:resources/agreements).
|
|
60
|
-
#
|
|
61
|
-
def test_retrieve_program_agreement
|
|
62
|
-
# Parameters for the API call
|
|
63
|
-
program_token = 'prog-6a272eca-9487-d83a-c9e4-8df8c9a7f6eb'
|
|
64
|
-
agreement_token = 'agmt-b33d420f-6c1b-4a93-9455-d6585552b97d'
|
|
65
|
-
|
|
66
|
-
# Perform the API call through the SDK function
|
|
67
|
-
result = @controller.retrieve_program_agreement(program_token,
|
|
68
|
-
agreement_token)
|
|
69
|
-
|
|
70
|
-
# Test response code
|
|
71
|
-
assert_equal(200, @response_catcher.response.status_code)
|
|
72
|
-
# Test headers
|
|
73
|
-
expected_headers = {}
|
|
74
|
-
expected_headers['content-type'] = 'application/json; charset=utf-8'
|
|
75
|
-
|
|
76
|
-
assert(ComparisonHelper.match_headers(expected_headers, @response_catcher.response.headers))
|
|
77
|
-
|
|
78
|
-
# Test whether the captured response is as we expected
|
|
79
|
-
refute_nil(result)
|
|
80
|
-
expected_body = JSON.parse(
|
|
81
|
-
'{"token":"agmt-b33d420f-6c1b-4a93-9455-d6585552b97d","contentBase64":"D'\
|
|
82
|
-
'QogIGZvciB5b3VyIHBsYXN0aW...KPC9ib2R5Pg0KDQo8L2h0bWw+DQo=","url":"https'\
|
|
83
|
-
'://cdn.payquicker.io/content/Agreements/Cardholder/v1/Languages_EN_US/C'\
|
|
84
|
-
'ardholderAgreement-Consumer-ACH-20k-MCB-USD.pdf","type":"CARD_HOLDER_AG'\
|
|
85
|
-
'REEMENT","links":[{"href":"https://api.sandbox.payquicker.io/api/v2/pro'\
|
|
86
|
-
'grams/prog-6a272eca-9487-d83a-c9e4-8df8c9a7f6eb/agreements/agmt-b33d420'\
|
|
87
|
-
'f-6c1b-4a93-9455-d6585552b97d","params":{"rel":"self"}}],"meta":{"timez'\
|
|
88
|
-
'one":"GMT","requestRef":"request-reference-value"}}'
|
|
89
|
-
)
|
|
90
|
-
received_body = JSON.parse(@response_catcher.response.raw_body)
|
|
91
|
-
assert(ComparisonHelper.match_body(expected_body, received_body))
|
|
92
|
-
end
|
|
93
|
-
|
|
94
|
-
# Accept a single program [agreement](page:resources/agreements).
|
|
95
|
-
#
|
|
96
|
-
def test_accept_agreement
|
|
97
|
-
# Parameters for the API call
|
|
98
|
-
user_token = 'user-2bbfc967-d12e-4647-a887-d905172fb4bc'
|
|
99
|
-
agreement_token = 'agmt-b33d420f-6c1b-4a93-9455-d6585552b97d'
|
|
100
|
-
|
|
101
|
-
# Perform the API call through the SDK function
|
|
102
|
-
@controller.accept_agreement(user_token, agreement_token)
|
|
103
|
-
|
|
104
|
-
# Test response code
|
|
105
|
-
assert_equal(200, @response_catcher.response.status_code)
|
|
106
|
-
end
|
|
107
|
-
|
|
108
|
-
end
|
|
@@ -1,132 +0,0 @@
|
|
|
1
|
-
# pay_quicker_sdk
|
|
2
|
-
#
|
|
3
|
-
# This file was automatically generated for PayQuicker by
|
|
4
|
-
# APIMATIC v3.0 ( https://www.apimatic.io ).
|
|
5
|
-
|
|
6
|
-
require_relative 'controller_test_base'
|
|
7
|
-
|
|
8
|
-
class BalancesControllerTest < ControllerTestBase
|
|
9
|
-
# Called only once for the class before any test has executed
|
|
10
|
-
def setup
|
|
11
|
-
setup_class
|
|
12
|
-
@controller = @client.balances
|
|
13
|
-
@response_catcher = @controller.http_call_back
|
|
14
|
-
end
|
|
15
|
-
|
|
16
|
-
# Retrieve a list of bank account [balances](page:resources/balances) that supports filtering, sorting, and pagination through existing mechanisms.
|
|
17
|
-
#
|
|
18
|
-
def test_list_account_balances
|
|
19
|
-
# Parameters for the API call
|
|
20
|
-
account_token = 'acct-3908ab5a-6ce1-474d-8b80-a63a7b147860'
|
|
21
|
-
page = 1
|
|
22
|
-
page_size = 20
|
|
23
|
-
filter = 'string'
|
|
24
|
-
sort = 'string'
|
|
25
|
-
language = 'en-US'
|
|
26
|
-
|
|
27
|
-
# Perform the API call through the SDK function
|
|
28
|
-
result = @controller.list_account_balances(account_token, page, page_size,
|
|
29
|
-
filter: filter, sort: sort,
|
|
30
|
-
language: language)
|
|
31
|
-
|
|
32
|
-
# Test response code
|
|
33
|
-
assert_equal(200, @response_catcher.response.status_code)
|
|
34
|
-
# Test headers
|
|
35
|
-
expected_headers = {}
|
|
36
|
-
expected_headers['content-type'] = 'application/json; charset=utf-8'
|
|
37
|
-
|
|
38
|
-
assert(ComparisonHelper.match_headers(expected_headers, @response_catcher.response.headers))
|
|
39
|
-
|
|
40
|
-
# Test whether the captured response is as we expected
|
|
41
|
-
refute_nil(result)
|
|
42
|
-
expected_body = JSON.parse(
|
|
43
|
-
'{"payload":[{"amount":0,"currency":"USD","formattedAmount":"$0.00 USD",'\
|
|
44
|
-
'"token":"acct-3908ab5a-6ce1-474d-8b80-a63a7b147860","links":[{"href":"h'\
|
|
45
|
-
'ttps://api.sandbox.payquicker.io/api/v2/accounts/acct-3908ab5a-6ce1-474'\
|
|
46
|
-
'd-8b80-a63a7b147860/balances","params":{"rel":"self"}}]}],"meta":{"page'\
|
|
47
|
-
'No":"1","pageSize":"20","pageCount":"0","recordCount":"0","timezone":"G'\
|
|
48
|
-
'MT","requestRef":"request-reference-value"},"links":[{"href":"https://a'\
|
|
49
|
-
'pi.sandbox.payquicker.io/api/v2/accounts/acct-3908ab5a-6ce1-474d-8b80-a'\
|
|
50
|
-
'63a7b147860/balances?page=1&pageSize=20&language=en-US","params":{"rel"'\
|
|
51
|
-
':"self"}}]}'
|
|
52
|
-
)
|
|
53
|
-
received_body = JSON.parse(@response_catcher.response.raw_body)
|
|
54
|
-
assert(ComparisonHelper.match_body(expected_body, received_body))
|
|
55
|
-
end
|
|
56
|
-
|
|
57
|
-
# Retrieve a list of user [balances](page:resources/balances) that supports filtering, sorting, and pagination through existing mechanisms.
|
|
58
|
-
#
|
|
59
|
-
def test_list_user_balances
|
|
60
|
-
# Parameters for the API call
|
|
61
|
-
user_token = 'user-2bbfc967-d12e-4647-a887-d905172fb4bc'
|
|
62
|
-
page = 1
|
|
63
|
-
page_size = 20
|
|
64
|
-
filter = 'string'
|
|
65
|
-
sort = 'string'
|
|
66
|
-
language = 'en-US'
|
|
67
|
-
|
|
68
|
-
# Perform the API call through the SDK function
|
|
69
|
-
result = @controller.list_user_balances(user_token, page, page_size,
|
|
70
|
-
filter: filter, sort: sort,
|
|
71
|
-
language: language)
|
|
72
|
-
|
|
73
|
-
# Test response code
|
|
74
|
-
assert_equal(200, @response_catcher.response.status_code)
|
|
75
|
-
# Test headers
|
|
76
|
-
expected_headers = {}
|
|
77
|
-
expected_headers['content-type'] = 'application/json; charset=utf-8'
|
|
78
|
-
|
|
79
|
-
assert(ComparisonHelper.match_headers(expected_headers, @response_catcher.response.headers))
|
|
80
|
-
|
|
81
|
-
# Test whether the captured response is as we expected
|
|
82
|
-
refute_nil(result)
|
|
83
|
-
expected_body = JSON.parse(
|
|
84
|
-
'{"payload":[{"amount":0,"currency":"USD","formattedAmount":"$0.00 USD",'\
|
|
85
|
-
'"token":"acct-3908ab5a-6ce1-474d-8b80-a63a7b147860","links":[{"href":"h'\
|
|
86
|
-
'ttps://api.sandbox.payquicker.io/api/v2/accounts/acct-3908ab5a-6ce1-474'\
|
|
87
|
-
'd-8b80-a63a7b147860/balances","params":{"rel":"self"}}]}],"meta":{"page'\
|
|
88
|
-
'No":"1","pageSize":"20","pageCount":"0","recordCount":"0","timezone":"G'\
|
|
89
|
-
'MT","requestRef":"request-reference-value"},"links":[{"href":"https://a'\
|
|
90
|
-
'pi.sandbox.payquicker.io/api/v2/accounts/acct-3908ab5a-6ce1-474d-8b80-a'\
|
|
91
|
-
'63a7b147860/balances?page=1&pageSize=20&language=en-US","params":{"rel"'\
|
|
92
|
-
':"self"}}]}'
|
|
93
|
-
)
|
|
94
|
-
received_body = JSON.parse(@response_catcher.response.raw_body)
|
|
95
|
-
assert(ComparisonHelper.match_body(expected_body, received_body))
|
|
96
|
-
end
|
|
97
|
-
|
|
98
|
-
# Retrieve a [prepaid card](page:resources/prepaid-cards) [balances](page:resources/balances) by destination token that supports filtering, sorting, and pagination through existing mechanisms.
|
|
99
|
-
#
|
|
100
|
-
def test_retrieve_card_balance
|
|
101
|
-
# Parameters for the API call
|
|
102
|
-
user_token = 'user-2bbfc967-d12e-4647-a887-d905172fb4bc'
|
|
103
|
-
destination_token = 'dest-4aed86e2-4929-45bf-814d-9030aef21e79'
|
|
104
|
-
language = 'en-US'
|
|
105
|
-
|
|
106
|
-
# Perform the API call through the SDK function
|
|
107
|
-
result = @controller.retrieve_card_balance(user_token, destination_token,
|
|
108
|
-
language: language)
|
|
109
|
-
|
|
110
|
-
# Test response code
|
|
111
|
-
assert_equal(200, @response_catcher.response.status_code)
|
|
112
|
-
# Test headers
|
|
113
|
-
expected_headers = {}
|
|
114
|
-
expected_headers['content-type'] = 'application/json; charset=utf-8'
|
|
115
|
-
|
|
116
|
-
assert(ComparisonHelper.match_headers(expected_headers, @response_catcher.response.headers))
|
|
117
|
-
|
|
118
|
-
# Test whether the captured response is as we expected
|
|
119
|
-
refute_nil(result)
|
|
120
|
-
expected_body = JSON.parse(
|
|
121
|
-
'{"amount":0,"currency":"USD","formattedAmount":"$0.00 USD","token":"des'\
|
|
122
|
-
't-2de9ddbf-2631-4c94-a699-90917f113b24","links":[{"href":"https://api.s'\
|
|
123
|
-
'andbox.payquicker.io/api/v2/users/user-ae92315b-6190-4e56-bdf5-c0189ac4'\
|
|
124
|
-
'20a1/prepaid-cards/dest-2de9ddbf-2631-4c94-a699-90917f113b24/balances",'\
|
|
125
|
-
'"params":{"rel":"self"}}],"meta":{"timezone":"GMT","requestRef":"reques'\
|
|
126
|
-
't-reference-value"}}'
|
|
127
|
-
)
|
|
128
|
-
received_body = JSON.parse(@response_catcher.response.raw_body)
|
|
129
|
-
assert(ComparisonHelper.match_body(expected_body, received_body))
|
|
130
|
-
end
|
|
131
|
-
|
|
132
|
-
end
|