univapay-apimatic-sdk 0.0.4 → 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 +44 -51
- data/lib/univapay_client_sdk/apis/base_api.rb +1 -1
- data/lib/univapay_client_sdk/apis/charges_api.rb +17 -8
- data/lib/univapay_client_sdk/apis/checkout_api.rb +58 -0
- data/lib/univapay_client_sdk/apis/direct_debit_api.rb +954 -0
- data/lib/univapay_client_sdk/apis/stores_api.rb +63 -0
- data/lib/univapay_client_sdk/apis/subscriptions_api.rb +139 -1
- data/lib/univapay_client_sdk/apis/transaction_history_api.rb +349 -0
- data/lib/univapay_client_sdk/apis/transaction_tokens_api.rb +205 -8
- data/lib/univapay_client_sdk/apis/webhooks_api.rb +0 -68
- data/lib/univapay_client_sdk/client.rb +22 -2
- data/lib/univapay_client_sdk/configuration.rb +31 -9
- data/lib/univapay_client_sdk/events/webhooks/{token_created_handler.rb → charge_handler.rb} +9 -9
- data/lib/univapay_client_sdk/events/webhooks/{token_updated_handler.rb → subscription_handler.rb} +9 -9
- data/lib/univapay_client_sdk/events/webhooks/{charge_updated_handler.rb → token_handler.rb} +9 -9
- data/lib/univapay_client_sdk/models/bank_transfer_transaction_token.rb +256 -0
- data/lib/univapay_client_sdk/models/base_online_data.rb +5 -1
- data/lib/univapay_client_sdk/models/base_online_data_brand.rb +78 -2
- data/lib/univapay_client_sdk/models/card_limit.rb +108 -0
- data/lib/univapay_client_sdk/models/card_transaction_token.rb +256 -0
- data/lib/univapay_client_sdk/models/charge_capture_request.rb +14 -9
- data/lib/univapay_client_sdk/models/charge_create_request.rb +6 -1
- data/lib/univapay_client_sdk/models/charge_create_request_three_ds.rb +94 -6
- data/lib/univapay_client_sdk/models/charge_create_request_three_ds_mode.rb +15 -1
- data/lib/univapay_client_sdk/models/charge_event.rb +36 -0
- data/lib/univapay_client_sdk/models/{charge_finished_webhook_callback.rb → charge_webhook_event.rb} +21 -14
- data/lib/univapay_client_sdk/models/checkout_bank_transfer_configuration.rb +342 -0
- data/lib/univapay_client_sdk/models/checkout_bank_transfer_match_amount.rb +44 -0
- data/lib/univapay_client_sdk/models/checkout_card_configuration.rb +296 -0
- data/lib/univapay_client_sdk/models/checkout_convenience_configuration.rb +98 -0
- data/lib/univapay_client_sdk/models/checkout_ec_configuration.rb +88 -0
- data/lib/univapay_client_sdk/models/checkout_ec_email_configuration.rb +75 -0
- data/lib/univapay_client_sdk/models/checkout_ec_products_configuration.rb +75 -0
- data/lib/univapay_client_sdk/models/checkout_info.rb +333 -0
- data/lib/univapay_client_sdk/models/checkout_installment_card_processor.rb +86 -0
- data/lib/univapay_client_sdk/models/checkout_installments_configuration.rb +140 -0
- data/lib/univapay_client_sdk/models/checkout_mode.rb +42 -0
- data/lib/univapay_client_sdk/models/checkout_money_amount.rb +96 -0
- data/lib/univapay_client_sdk/models/checkout_online_configuration.rb +75 -0
- data/lib/univapay_client_sdk/models/checkout_paidy_configuration.rb +75 -0
- data/lib/univapay_client_sdk/models/checkout_payment_type.rb +60 -0
- data/lib/univapay_client_sdk/models/checkout_qr_scan_configuration.rb +94 -0
- data/lib/univapay_client_sdk/models/checkout_recurring_token_privilege.rb +43 -0
- data/lib/univapay_client_sdk/models/checkout_subscription_configuration.rb +75 -0
- data/lib/univapay_client_sdk/models/checkout_subscription_plan_configuration.rb +137 -0
- data/lib/univapay_client_sdk/models/checkout_supported_brand.rb +244 -0
- data/lib/univapay_client_sdk/models/checkout_theme.rb +76 -0
- data/lib/univapay_client_sdk/models/checkout_theme_colors.rb +153 -0
- data/lib/univapay_client_sdk/models/combined_installment_fixed_cycles.rb +70 -0
- data/lib/univapay_client_sdk/models/combined_plan_type.rb +40 -0
- data/lib/univapay_client_sdk/models/create_customer_id_request.rb +75 -0
- data/lib/univapay_client_sdk/models/create_customer_id_response.rb +77 -0
- data/lib/univapay_client_sdk/models/direct_debit_bank_account.rb +237 -0
- data/lib/univapay_client_sdk/models/direct_debit_bank_account_create_request.rb +135 -0
- data/lib/univapay_client_sdk/models/direct_debit_bank_account_list.rb +94 -0
- data/lib/univapay_client_sdk/models/direct_debit_bank_account_status.rb +42 -0
- data/lib/univapay_client_sdk/models/direct_debit_bank_account_type.rb +45 -0
- data/lib/univapay_client_sdk/models/direct_debit_bank_account_update_request.rb +145 -0
- data/lib/univapay_client_sdk/models/direct_debit_bank_transfer.rb +294 -0
- data/lib/univapay_client_sdk/models/direct_debit_bank_transfer_create_request.rb +73 -0
- data/lib/univapay_client_sdk/models/direct_debit_bank_transfer_error.rb +64 -0
- data/lib/univapay_client_sdk/models/direct_debit_bank_transfer_list.rb +94 -0
- data/lib/univapay_client_sdk/models/direct_debit_bank_transfer_lock.rb +38 -0
- data/lib/univapay_client_sdk/models/direct_debit_bank_transfer_patch_request.rb +74 -0
- data/lib/univapay_client_sdk/models/direct_debit_bank_transfer_status.rb +41 -0
- data/lib/univapay_client_sdk/models/direct_debit_debit_date.rb +36 -0
- data/lib/univapay_client_sdk/models/direct_debit_merchant_configuration.rb +128 -0
- data/lib/univapay_client_sdk/models/direct_debit_notification_configuration.rb +101 -0
- data/lib/univapay_client_sdk/models/direct_debit_registration_origin.rb +37 -0
- data/lib/univapay_client_sdk/models/direct_debit_schedule.rb +153 -0
- data/lib/univapay_client_sdk/models/enable_token_three_ds_request.rb +78 -0
- data/lib/univapay_client_sdk/models/expiration_time_shift.rb +87 -0
- data/lib/univapay_client_sdk/models/konbini_transaction_token.rb +256 -0
- data/lib/univapay_client_sdk/models/merchant.rb +1 -1
- data/lib/univapay_client_sdk/models/merchant_webhook_configuration.rb +1 -1
- data/lib/univapay_client_sdk/models/online_transaction_token.rb +256 -0
- data/lib/univapay_client_sdk/models/paidy_transaction_token.rb +256 -0
- data/lib/univapay_client_sdk/models/qr_merchant_transaction_token.rb +257 -0
- data/lib/univapay_client_sdk/models/qr_scan_transaction_token.rb +257 -0
- data/lib/univapay_client_sdk/models/recurring_cvv_confirmation.rb +99 -0
- data/lib/univapay_client_sdk/models/simulation_plan_settings_type.rb +40 -0
- data/lib/univapay_client_sdk/models/store.rb +2 -2
- data/lib/univapay_client_sdk/models/subscription.rb +109 -7
- data/lib/univapay_client_sdk/models/subscription_create_request.rb +6 -1
- data/lib/univapay_client_sdk/models/subscription_event.rb +54 -0
- data/lib/univapay_client_sdk/models/subscription_installment_plan_response.rb +116 -0
- data/lib/univapay_client_sdk/models/subscription_list_item.rb +116 -12
- data/lib/univapay_client_sdk/models/subscription_plan_settings.rb +10 -0
- data/lib/univapay_client_sdk/models/subscription_simulation_payment.rb +169 -0
- data/lib/univapay_client_sdk/models/subscription_simulation_period.rb +61 -0
- data/lib/univapay_client_sdk/models/subscription_simulation_plan_settings.rb +100 -0
- data/lib/univapay_client_sdk/models/subscription_simulation_request.rb +177 -0
- data/lib/univapay_client_sdk/models/subscription_three_ds.rb +114 -0
- data/lib/univapay_client_sdk/models/subscription_three_ds_mode.rb +55 -0
- data/lib/univapay_client_sdk/models/subscription_update_request.rb +65 -5
- data/lib/univapay_client_sdk/models/subscription_update_schedule_settings.rb +23 -17
- data/lib/univapay_client_sdk/models/{subscription_completed_webhook_callback.rb → subscription_webhook_event.rb} +26 -15
- data/lib/univapay_client_sdk/models/terminate_with_status.rb +37 -0
- data/lib/univapay_client_sdk/models/token_create_online_data.rb +5 -1
- data/lib/univapay_client_sdk/models/token_create_paidy_data.rb +121 -0
- data/lib/univapay_client_sdk/models/token_create_paidy_data_shipping_address.rb +129 -0
- data/lib/univapay_client_sdk/models/token_create_qr_merchant_data.rb +91 -0
- data/lib/univapay_client_sdk/models/token_create_qr_scan_data.rb +91 -0
- data/lib/univapay_client_sdk/models/token_event.rb +59 -0
- data/lib/univapay_client_sdk/models/token_response_online_data.rb +5 -1
- data/lib/univapay_client_sdk/models/token_response_paidy_data.rb +113 -0
- data/lib/univapay_client_sdk/models/token_response_paidy_data_shipping_address.rb +130 -0
- data/lib/univapay_client_sdk/models/token_response_qr_merchant_data.rb +105 -0
- data/lib/univapay_client_sdk/models/token_response_qr_scan_data.rb +92 -0
- data/lib/univapay_client_sdk/models/{charge_updated_webhook_callback.rb → token_webhook_event.rb} +35 -18
- data/lib/univapay_client_sdk/models/transaction_history_charge_type.rb +36 -0
- data/lib/univapay_client_sdk/models/transaction_history_item.rb +302 -0
- data/lib/univapay_client_sdk/models/transaction_history_list.rb +120 -0
- data/lib/univapay_client_sdk/models/transaction_history_mode.rb +42 -0
- data/lib/univapay_client_sdk/models/transaction_history_payment_type.rb +60 -0
- data/lib/univapay_client_sdk/models/transaction_history_refund.rb +127 -0
- data/lib/univapay_client_sdk/models/transaction_history_refund_reason.rb +56 -0
- data/lib/univapay_client_sdk/models/transaction_history_refund_status.rb +44 -0
- data/lib/univapay_client_sdk/models/transaction_history_service_provider.rb +96 -0
- data/lib/univapay_client_sdk/models/transaction_history_status.rb +57 -0
- data/lib/univapay_client_sdk/models/transaction_history_type.rb +36 -0
- data/lib/univapay_client_sdk/models/transaction_history_user_data.rb +214 -0
- data/lib/univapay_client_sdk/models/transaction_token_active_filter.rb +40 -0
- data/lib/univapay_client_sdk/models/{transaction_token.rb → transaction_token_base.rb} +31 -52
- data/lib/univapay_client_sdk/models/transaction_token_create_request.rb +2 -1
- data/lib/univapay_client_sdk/models/transaction_token_create_request_payment_type.rb +13 -1
- data/lib/univapay_client_sdk/models/transaction_token_list_type.rb +37 -0
- data/lib/univapay_client_sdk/models/transaction_token_payment_type.rb +9 -1
- data/lib/univapay_client_sdk/utilities/union_type_lookup.rb +163 -101
- data/lib/univapay_client_sdk.rb +111 -46
- data/test/apis/test_charges_api.rb +7 -5
- data/test/apis/test_checkout_api.rb +82 -0
- data/test/apis/test_direct_debit_api.rb +514 -0
- data/test/apis/test_merchants_api.rb +15 -1
- data/test/apis/test_stores_api.rb +42 -1
- data/test/apis/test_subscriptions_api.rb +172 -54
- data/test/apis/test_transaction_history_api.rb +180 -0
- data/test/apis/test_transaction_tokens_api.rb +152 -39
- data/test/apis/test_webhooks_api.rb +0 -30
- data/test/events/webhooks/{test_charge_updated_handler.rb → test_charge_handler.rb} +48 -5
- data/test/events/webhooks/test_subscription_handler.rb +346 -0
- data/test/events/webhooks/test_token_handler.rb +556 -0
- data/test/framework_integrations/webhooks/apps/{hanami_charge_updated_app.rb → hanami_charge_app.rb} +8 -8
- data/test/framework_integrations/webhooks/apps/{rails_charge_updated_app.rb → rails_charge_app.rb} +4 -4
- data/test/framework_integrations/webhooks/apps/{sinatra_charge_updated_app.rb → sinatra_charge_app.rb} +4 -4
- data/test/framework_integrations/webhooks/test/{test_hanami_charge_updated_app.rb → test_hanami_charge_app.rb} +6 -6
- data/test/framework_integrations/webhooks/test/{test_rails_charge_updated_app.rb → test_rails_charge_app.rb} +5 -5
- data/test/framework_integrations/webhooks/test/{test_sinatra_charge_updated_app.rb → test_sinatra_charge_app.rb} +6 -6
- metadata +113 -54
- data/lib/univapay_client_sdk/events/webhooks/charge_finished_handler.rb +0 -37
- data/lib/univapay_client_sdk/events/webhooks/recurring_token_deleted_handler.rb +0 -37
- data/lib/univapay_client_sdk/events/webhooks/subscription_canceled_handler.rb +0 -37
- data/lib/univapay_client_sdk/events/webhooks/subscription_completed_handler.rb +0 -37
- data/lib/univapay_client_sdk/events/webhooks/subscription_created_handler.rb +0 -37
- data/lib/univapay_client_sdk/events/webhooks/subscription_failure_handler.rb +0 -37
- data/lib/univapay_client_sdk/events/webhooks/subscription_payment_handler.rb +0 -37
- data/lib/univapay_client_sdk/events/webhooks/subscription_suspended_handler.rb +0 -37
- data/lib/univapay_client_sdk/events/webhooks/token_cvv_auth_check_updated_handler.rb +0 -37
- data/lib/univapay_client_sdk/events/webhooks/token_cvv_auth_updated_handler.rb +0 -37
- data/lib/univapay_client_sdk/events/webhooks/token_replaced_handler.rb +0 -37
- data/lib/univapay_client_sdk/events/webhooks/token_three_ds_updated_handler.rb +0 -37
- data/lib/univapay_client_sdk/models/recurring_token_deleted_webhook_callback.rb +0 -132
- data/lib/univapay_client_sdk/models/subscription_canceled_webhook_callback.rb +0 -132
- data/lib/univapay_client_sdk/models/subscription_created_webhook_callback.rb +0 -132
- data/lib/univapay_client_sdk/models/subscription_failure_webhook_callback.rb +0 -132
- data/lib/univapay_client_sdk/models/subscription_payment_webhook_callback.rb +0 -132
- data/lib/univapay_client_sdk/models/subscription_suspended_webhook_callback.rb +0 -132
- data/lib/univapay_client_sdk/models/token_created_webhook_callback.rb +0 -131
- data/lib/univapay_client_sdk/models/token_cvv_auth_check_updated_webhook_callback.rb +0 -132
- data/lib/univapay_client_sdk/models/token_cvv_auth_updated_webhook_callback.rb +0 -132
- data/lib/univapay_client_sdk/models/token_replaced_webhook_callback.rb +0 -131
- data/lib/univapay_client_sdk/models/token_three_ds_updated_webhook_callback.rb +0 -132
- data/lib/univapay_client_sdk/models/token_updated_webhook_callback.rb +0 -131
- data/test/events/webhooks/test_charge_finished_handler.rb +0 -95
- data/test/events/webhooks/test_recurring_token_deleted_handler.rb +0 -92
- data/test/events/webhooks/test_subscription_canceled_handler.rb +0 -101
- data/test/events/webhooks/test_subscription_completed_handler.rb +0 -101
- data/test/events/webhooks/test_subscription_created_handler.rb +0 -101
- data/test/events/webhooks/test_subscription_failure_handler.rb +0 -101
- data/test/events/webhooks/test_subscription_payment_handler.rb +0 -101
- data/test/events/webhooks/test_subscription_suspended_handler.rb +0 -101
- data/test/events/webhooks/test_token_created_handler.rb +0 -92
- data/test/events/webhooks/test_token_cvv_auth_check_updated_handler.rb +0 -92
- data/test/events/webhooks/test_token_cvv_auth_updated_handler.rb +0 -92
- data/test/events/webhooks/test_token_replaced_handler.rb +0 -92
- data/test/events/webhooks/test_token_three_ds_updated_handler.rb +0 -92
- data/test/events/webhooks/test_token_updated_handler.rb +0 -92
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 97529d8f8516665fb6a61e57c9a4c111f9a747f4749eb8cdeb44f0fce9e9deaa
|
|
4
|
+
data.tar.gz: 496c8f3fcd998dc8f85a3634e236dda0209df90f305c1d015e8f5ccba07d7fd8
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: ef62984e293d47c5a96901ce6b4e76d841d1af9d0a027c726e7b3ab350e3ec3ee1187ba28bf877d6ad91b827b52b24180b1ccf5b57d664972f9d5ecf65d6b52e
|
|
7
|
+
data.tar.gz: 865118534879f0cf56e4c5ff22384d36668fedbb764b76e8eabf29ddc8c9232bc179a189863049ac9a96f31fba7a0269a487bc1310a7185514ef8654825d12ab
|
data/README.md
CHANGED
|
@@ -36,16 +36,16 @@ We will assume that all requests are going to originate from a backend server th
|
|
|
36
36
|
Install the gem from the command line:
|
|
37
37
|
|
|
38
38
|
```bash
|
|
39
|
-
gem install univapay-apimatic-sdk -v
|
|
39
|
+
gem install univapay-apimatic-sdk -v 1.0.2
|
|
40
40
|
```
|
|
41
41
|
|
|
42
42
|
Or add the gem to your Gemfile and run `bundle`:
|
|
43
43
|
|
|
44
44
|
```ruby
|
|
45
|
-
gem 'univapay-apimatic-sdk', '
|
|
45
|
+
gem 'univapay-apimatic-sdk', '1.0.2'
|
|
46
46
|
```
|
|
47
47
|
|
|
48
|
-
For additional gem details, see the [RubyGems page for the univapay-apimatic-sdk gem](https://rubygems.org/gems/univapay-apimatic-sdk/versions/
|
|
48
|
+
For additional gem details, see the [RubyGems page for the univapay-apimatic-sdk gem](https://rubygems.org/gems/univapay-apimatic-sdk/versions/1.0.2).
|
|
49
49
|
|
|
50
50
|
## IRB Console Usage
|
|
51
51
|
|
|
@@ -92,14 +92,15 @@ rake
|
|
|
92
92
|
|
|
93
93
|
## Initialize the API Client
|
|
94
94
|
|
|
95
|
-
**_Note:_** Documentation for the client can be found [here.](https://www.github.com/sdks-io/univapay-apimatic-ruby-sdk/tree/
|
|
95
|
+
**_Note:_** Documentation for the client can be found [here.](https://www.github.com/sdks-io/univapay-apimatic-ruby-sdk/tree/1.0.2/doc/client.md)
|
|
96
96
|
|
|
97
97
|
The following parameters are configurable for the API Client:
|
|
98
98
|
|
|
99
99
|
| Parameter | Type | Description |
|
|
100
100
|
| --- | --- | --- |
|
|
101
|
-
| base_url | `String` | Base URL for the API<br>*Default*: `'https://api.
|
|
102
|
-
|
|
|
101
|
+
| base_url | `String` | Base URL for the API<br>*Default*: `'https://api.gyro-n.money'` |
|
|
102
|
+
| direct_debit_base_url | `String` | Base URL for the Direct Debit API<br>*Default*: `'https://staging-direct-debit.gopay-services.com'` |
|
|
103
|
+
| environment | [`Environment`](https://www.github.com/sdks-io/univapay-apimatic-ruby-sdk/tree/1.0.2/README.md#environments) | The API environment. <br> **Default: `Environment.PRODUCTION`** |
|
|
103
104
|
| connection | `Faraday::Connection` | The Faraday connection object passed by the SDK user for making requests |
|
|
104
105
|
| adapter | `Faraday::Adapter` | The Faraday adapter object passed by the SDK user for performing http requests |
|
|
105
106
|
| timeout | `Float` | The value to use for connection timeout. <br> **Default: 30** |
|
|
@@ -109,9 +110,9 @@ The following parameters are configurable for the API Client:
|
|
|
109
110
|
| retry_statuses | `Array` | A list of HTTP statuses to retry. <br> **Default: [408, 413, 429, 500, 502, 503, 504, 521, 522, 524]** |
|
|
110
111
|
| retry_methods | `Array` | A list of HTTP methods to retry. <br> **Default: %i[get put]** |
|
|
111
112
|
| http_callback | `HttpCallBack` | The Http CallBack allows defining callables for pre and post API calls. |
|
|
112
|
-
| proxy_settings | [`ProxySettings`](https://www.github.com/sdks-io/univapay-apimatic-ruby-sdk/tree/
|
|
113
|
-
| logging_configuration | [`LoggingConfiguration`](https://www.github.com/sdks-io/univapay-apimatic-ruby-sdk/tree/
|
|
114
|
-
| bearer_auth_credentials | [`BearerAuthCredentials`](https://www.github.com/sdks-io/univapay-apimatic-ruby-sdk/tree/
|
|
113
|
+
| proxy_settings | [`ProxySettings`](https://www.github.com/sdks-io/univapay-apimatic-ruby-sdk/tree/1.0.2/doc/proxy-settings.md) | Optional proxy configuration to route HTTP requests through a proxy server. |
|
|
114
|
+
| logging_configuration | [`LoggingConfiguration`](https://www.github.com/sdks-io/univapay-apimatic-ruby-sdk/tree/1.0.2/doc/logging-configuration.md) | The SDK logging configuration for API calls |
|
|
115
|
+
| bearer_auth_credentials | [`BearerAuthCredentials`](https://www.github.com/sdks-io/univapay-apimatic-ruby-sdk/tree/1.0.2/doc/auth/oauth-2-bearer-token.md) | The credential object for OAuth 2 Bearer token |
|
|
115
116
|
|
|
116
117
|
The API client can be initialized as follows:
|
|
117
118
|
|
|
@@ -126,7 +127,8 @@ client = Client.new(
|
|
|
126
127
|
access_token: 'AccessToken'
|
|
127
128
|
),
|
|
128
129
|
environment: Environment::PRODUCTION,
|
|
129
|
-
base_url: 'https://api.
|
|
130
|
+
base_url: 'https://api.gyro-n.money',
|
|
131
|
+
direct_debit_base_url: 'https://staging-direct-debit.gopay-services.com',
|
|
130
132
|
logging_configuration: LoggingConfiguration.new(
|
|
131
133
|
log_level: Logger::INFO,
|
|
132
134
|
request_logging_config: RequestLoggingConfiguration.new(
|
|
@@ -149,7 +151,7 @@ include UnivapayClientSdk
|
|
|
149
151
|
client = Client.from_env
|
|
150
152
|
```
|
|
151
153
|
|
|
152
|
-
See the [`Environment-Based Client Initialization`](https://www.github.com/sdks-io/univapay-apimatic-ruby-sdk/tree/
|
|
154
|
+
See the [`Environment-Based Client Initialization`](https://www.github.com/sdks-io/univapay-apimatic-ruby-sdk/tree/1.0.2/doc/environment-based-client-initialization.md) section for details.
|
|
153
155
|
|
|
154
156
|
## Environments
|
|
155
157
|
|
|
@@ -159,66 +161,57 @@ The SDK can be configured to use a different environment for making API calls. A
|
|
|
159
161
|
|
|
160
162
|
| Name | Description |
|
|
161
163
|
| --- | --- |
|
|
162
|
-
| PRODUCTION | **Default**
|
|
164
|
+
| PRODUCTION | **Default** Staging Server |
|
|
163
165
|
|
|
164
166
|
## Authorization
|
|
165
167
|
|
|
166
168
|
This API uses the following authentication schemes.
|
|
167
169
|
|
|
168
|
-
* [`JWT_TOKEN (OAuth 2 Bearer token)`](https://www.github.com/sdks-io/univapay-apimatic-ruby-sdk/tree/
|
|
170
|
+
* [`JWT_TOKEN (OAuth 2 Bearer token)`](https://www.github.com/sdks-io/univapay-apimatic-ruby-sdk/tree/1.0.2/doc/auth/oauth-2-bearer-token.md)
|
|
169
171
|
|
|
170
172
|
## List of APIs
|
|
171
173
|
|
|
172
|
-
* [Transaction Tokens](https://www.github.com/sdks-io/univapay-apimatic-ruby-sdk/tree/
|
|
173
|
-
* [
|
|
174
|
-
* [
|
|
175
|
-
* [
|
|
176
|
-
* [
|
|
177
|
-
* [
|
|
178
|
-
* [
|
|
179
|
-
* [
|
|
174
|
+
* [Transaction Tokens](https://www.github.com/sdks-io/univapay-apimatic-ruby-sdk/tree/1.0.2/doc/controllers/transaction-tokens.md)
|
|
175
|
+
* [Direct Debit](https://www.github.com/sdks-io/univapay-apimatic-ruby-sdk/tree/1.0.2/doc/controllers/direct-debit.md)
|
|
176
|
+
* [Transaction History](https://www.github.com/sdks-io/univapay-apimatic-ruby-sdk/tree/1.0.2/doc/controllers/transaction-history.md)
|
|
177
|
+
* [Charges](https://www.github.com/sdks-io/univapay-apimatic-ruby-sdk/tree/1.0.2/doc/controllers/charges.md)
|
|
178
|
+
* [Refunds](https://www.github.com/sdks-io/univapay-apimatic-ruby-sdk/tree/1.0.2/doc/controllers/refunds.md)
|
|
179
|
+
* [Subscriptions](https://www.github.com/sdks-io/univapay-apimatic-ruby-sdk/tree/1.0.2/doc/controllers/subscriptions.md)
|
|
180
|
+
* [Cancels](https://www.github.com/sdks-io/univapay-apimatic-ruby-sdk/tree/1.0.2/doc/controllers/cancels.md)
|
|
181
|
+
* [Merchants](https://www.github.com/sdks-io/univapay-apimatic-ruby-sdk/tree/1.0.2/doc/controllers/merchants.md)
|
|
182
|
+
* [Stores](https://www.github.com/sdks-io/univapay-apimatic-ruby-sdk/tree/1.0.2/doc/controllers/stores.md)
|
|
183
|
+
* [Webhooks](https://www.github.com/sdks-io/univapay-apimatic-ruby-sdk/tree/1.0.2/doc/controllers/webhooks.md)
|
|
184
|
+
* [Checkout](https://www.github.com/sdks-io/univapay-apimatic-ruby-sdk/tree/1.0.2/doc/controllers/checkout.md)
|
|
180
185
|
|
|
181
186
|
## Webhooks
|
|
182
187
|
|
|
183
|
-
* [Charge
|
|
184
|
-
* [
|
|
185
|
-
* [
|
|
186
|
-
* [
|
|
187
|
-
* [
|
|
188
|
-
* [
|
|
189
|
-
* [
|
|
190
|
-
* [Token Replaced](https://www.github.com/sdks-io/univapay-apimatic-ruby-sdk/tree/0.0.4/doc/events/webhooks/token-replaced-handler.md)
|
|
191
|
-
* [Recurring Token Deleted](https://www.github.com/sdks-io/univapay-apimatic-ruby-sdk/tree/0.0.4/doc/events/webhooks/recurring-token-deleted-handler.md)
|
|
192
|
-
* [Refund](https://www.github.com/sdks-io/univapay-apimatic-ruby-sdk/tree/0.0.4/doc/events/webhooks/refund-handler.md)
|
|
193
|
-
* [Cancel](https://www.github.com/sdks-io/univapay-apimatic-ruby-sdk/tree/0.0.4/doc/events/webhooks/cancel-handler.md)
|
|
194
|
-
* [Subscription Created](https://www.github.com/sdks-io/univapay-apimatic-ruby-sdk/tree/0.0.4/doc/events/webhooks/subscription-created-handler.md)
|
|
195
|
-
* [Subscription Payment](https://www.github.com/sdks-io/univapay-apimatic-ruby-sdk/tree/0.0.4/doc/events/webhooks/subscription-payment-handler.md)
|
|
196
|
-
* [Subscription Completed](https://www.github.com/sdks-io/univapay-apimatic-ruby-sdk/tree/0.0.4/doc/events/webhooks/subscription-completed-handler.md)
|
|
197
|
-
* [Subscription Failure](https://www.github.com/sdks-io/univapay-apimatic-ruby-sdk/tree/0.0.4/doc/events/webhooks/subscription-failure-handler.md)
|
|
198
|
-
* [Subscription Canceled](https://www.github.com/sdks-io/univapay-apimatic-ruby-sdk/tree/0.0.4/doc/events/webhooks/subscription-canceled-handler.md)
|
|
199
|
-
* [Subscription Suspended](https://www.github.com/sdks-io/univapay-apimatic-ruby-sdk/tree/0.0.4/doc/events/webhooks/subscription-suspended-handler.md)
|
|
200
|
-
* [Bank-Transfer](https://www.github.com/sdks-io/univapay-apimatic-ruby-sdk/tree/0.0.4/doc/events/webhooks/bank-transfer-handler.md)
|
|
201
|
-
* [Customs](https://www.github.com/sdks-io/univapay-apimatic-ruby-sdk/tree/0.0.4/doc/events/webhooks/customs-handler.md)
|
|
188
|
+
* [Charge](https://www.github.com/sdks-io/univapay-apimatic-ruby-sdk/tree/1.0.2/doc/events/webhooks/charge-handler.md)
|
|
189
|
+
* [Token](https://www.github.com/sdks-io/univapay-apimatic-ruby-sdk/tree/1.0.2/doc/events/webhooks/token-handler.md)
|
|
190
|
+
* [Refund](https://www.github.com/sdks-io/univapay-apimatic-ruby-sdk/tree/1.0.2/doc/events/webhooks/refund-handler.md)
|
|
191
|
+
* [Cancel](https://www.github.com/sdks-io/univapay-apimatic-ruby-sdk/tree/1.0.2/doc/events/webhooks/cancel-handler.md)
|
|
192
|
+
* [Subscription](https://www.github.com/sdks-io/univapay-apimatic-ruby-sdk/tree/1.0.2/doc/events/webhooks/subscription-handler.md)
|
|
193
|
+
* [Bank-Transfer](https://www.github.com/sdks-io/univapay-apimatic-ruby-sdk/tree/1.0.2/doc/events/webhooks/bank-transfer-handler.md)
|
|
194
|
+
* [Customs](https://www.github.com/sdks-io/univapay-apimatic-ruby-sdk/tree/1.0.2/doc/events/webhooks/customs-handler.md)
|
|
202
195
|
|
|
203
196
|
## SDK Infrastructure
|
|
204
197
|
|
|
205
198
|
### Configuration
|
|
206
199
|
|
|
207
|
-
* [ProxySettings](https://www.github.com/sdks-io/univapay-apimatic-ruby-sdk/tree/
|
|
208
|
-
* [Environment-Based Client Initialization](https://www.github.com/sdks-io/univapay-apimatic-ruby-sdk/tree/
|
|
209
|
-
* [AbstractLogger](https://www.github.com/sdks-io/univapay-apimatic-ruby-sdk/tree/
|
|
210
|
-
* [LoggingConfiguration](https://www.github.com/sdks-io/univapay-apimatic-ruby-sdk/tree/
|
|
211
|
-
* [RequestLoggingConfiguration](https://www.github.com/sdks-io/univapay-apimatic-ruby-sdk/tree/
|
|
212
|
-
* [ResponseLoggingConfiguration](https://www.github.com/sdks-io/univapay-apimatic-ruby-sdk/tree/
|
|
200
|
+
* [ProxySettings](https://www.github.com/sdks-io/univapay-apimatic-ruby-sdk/tree/1.0.2/doc/proxy-settings.md)
|
|
201
|
+
* [Environment-Based Client Initialization](https://www.github.com/sdks-io/univapay-apimatic-ruby-sdk/tree/1.0.2/doc/environment-based-client-initialization.md)
|
|
202
|
+
* [AbstractLogger](https://www.github.com/sdks-io/univapay-apimatic-ruby-sdk/tree/1.0.2/doc/abstract-logger.md)
|
|
203
|
+
* [LoggingConfiguration](https://www.github.com/sdks-io/univapay-apimatic-ruby-sdk/tree/1.0.2/doc/logging-configuration.md)
|
|
204
|
+
* [RequestLoggingConfiguration](https://www.github.com/sdks-io/univapay-apimatic-ruby-sdk/tree/1.0.2/doc/request-logging-configuration.md)
|
|
205
|
+
* [ResponseLoggingConfiguration](https://www.github.com/sdks-io/univapay-apimatic-ruby-sdk/tree/1.0.2/doc/response-logging-configuration.md)
|
|
213
206
|
|
|
214
207
|
### HTTP
|
|
215
208
|
|
|
216
|
-
* [HttpResponse](https://www.github.com/sdks-io/univapay-apimatic-ruby-sdk/tree/
|
|
217
|
-
* [HttpRequest](https://www.github.com/sdks-io/univapay-apimatic-ruby-sdk/tree/
|
|
209
|
+
* [HttpResponse](https://www.github.com/sdks-io/univapay-apimatic-ruby-sdk/tree/1.0.2/doc/http-response.md)
|
|
210
|
+
* [HttpRequest](https://www.github.com/sdks-io/univapay-apimatic-ruby-sdk/tree/1.0.2/doc/http-request.md)
|
|
218
211
|
|
|
219
212
|
### Utilities
|
|
220
213
|
|
|
221
|
-
* [ApiResponse](https://www.github.com/sdks-io/univapay-apimatic-ruby-sdk/tree/
|
|
222
|
-
* [ApiHelper](https://www.github.com/sdks-io/univapay-apimatic-ruby-sdk/tree/
|
|
223
|
-
* [DateTimeHelper](https://www.github.com/sdks-io/univapay-apimatic-ruby-sdk/tree/
|
|
214
|
+
* [ApiResponse](https://www.github.com/sdks-io/univapay-apimatic-ruby-sdk/tree/1.0.2/doc/api-response.md)
|
|
215
|
+
* [ApiHelper](https://www.github.com/sdks-io/univapay-apimatic-ruby-sdk/tree/1.0.2/doc/api-helper.md)
|
|
216
|
+
* [DateTimeHelper](https://www.github.com/sdks-io/univapay-apimatic-ruby-sdk/tree/1.0.2/doc/date-time-helper.md)
|
|
224
217
|
|
|
@@ -10,7 +10,7 @@ module UnivapayClientSdk
|
|
|
10
10
|
attr_accessor :config, :http_call_back
|
|
11
11
|
|
|
12
12
|
def self.user_agent
|
|
13
|
-
'Ruby-SDK/
|
|
13
|
+
'Ruby-SDK/1.0.2 (OS: {os-info}, Engine: {engine}/{engine-version})'
|
|
14
14
|
end
|
|
15
15
|
|
|
16
16
|
def self.user_agent_parameters
|
|
@@ -427,21 +427,25 @@ module UnivapayClientSdk
|
|
|
427
427
|
|
|
428
428
|
# Captures a previously authorized charge (where `capture` was set to false
|
|
429
429
|
# during creation). The capture amount must be less than or equal to the
|
|
430
|
-
# authorized amount, and the currency must match.
|
|
430
|
+
# authorized amount, and the currency must match. The request body — and
|
|
431
|
+
# both of its fields — is optional: if omitted entirely, the full
|
|
432
|
+
# outstanding authorized amount (in the originally requested currency) is
|
|
433
|
+
# captured.
|
|
431
434
|
# @param [UUID | String] store_id Required parameter: The unique identifier
|
|
432
435
|
# of the store.
|
|
433
436
|
# @param [UUID | String] id Required parameter: The unique identifier of the
|
|
434
437
|
# resource.
|
|
435
|
-
# @param [ChargeCaptureRequest] body Required parameter: Request payload for
|
|
436
|
-
# capturing an authorized charge.
|
|
437
438
|
# @param [String] idempotency_key Optional parameter: An optional
|
|
438
439
|
# idempotency key to prevent double charges and duplicate operations. We
|
|
439
440
|
# recommend a randomly generated UUID (v4).
|
|
441
|
+
# @param [ChargeCaptureRequest] body Optional parameter: Optional request
|
|
442
|
+
# payload for capturing an authorized charge. Omit entirely to capture the
|
|
443
|
+
# full outstanding authorized amount.
|
|
440
444
|
# @return [ApiResponse] Complete http response with raw body and status code.
|
|
441
445
|
def capture_charge(store_id,
|
|
442
446
|
id,
|
|
443
|
-
|
|
444
|
-
|
|
447
|
+
idempotency_key: nil,
|
|
448
|
+
body: nil)
|
|
445
449
|
@api_call
|
|
446
450
|
.request(new_request_builder(HttpMethodEnum::POST,
|
|
447
451
|
'/stores/{storeId}/charges/{id}/capture',
|
|
@@ -453,9 +457,8 @@ module UnivapayClientSdk
|
|
|
453
457
|
.is_required(true)
|
|
454
458
|
.should_encode(true))
|
|
455
459
|
.header_param(new_parameter('application/json', key: 'Content-Type'))
|
|
456
|
-
.body_param(new_parameter(body)
|
|
457
|
-
.is_required(true))
|
|
458
460
|
.header_param(new_parameter(idempotency_key, key: 'Idempotency-Key'))
|
|
461
|
+
.body_param(new_parameter(body))
|
|
459
462
|
.header_param(new_parameter('application/json', key: 'accept'))
|
|
460
463
|
.body_serializer(proc do |param| param.to_json unless param.nil? end)
|
|
461
464
|
.auth(Single.new('JWT_TOKEN')))
|
|
@@ -623,7 +626,13 @@ module UnivapayClientSdk
|
|
|
623
626
|
.execute
|
|
624
627
|
end
|
|
625
628
|
|
|
626
|
-
# Retrieves bank transfer ledger entries associated with a charge.
|
|
629
|
+
# Retrieves bank transfer ledger entries associated with a charge. This is
|
|
630
|
+
# an optional reconciliation endpoint — not part of the required
|
|
631
|
+
# create-charge-and-poll flow.
|
|
632
|
+
# **⚠️ Requires a merchant-level application token**, unlike the rest of the
|
|
633
|
+
# bank transfer flow. A store application token (`Bearer {secret}.{jwt}`
|
|
634
|
+
# scoped to a `store_id`) is not sufficient here, even though the path is
|
|
635
|
+
# store-scoped.
|
|
627
636
|
# @param [UUID | String] store_id Required parameter: The unique identifier
|
|
628
637
|
# of the store.
|
|
629
638
|
# @param [UUID | String] id Required parameter: The unique identifier of the
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
# univapay_client_sdk
|
|
2
|
+
#
|
|
3
|
+
# This file was automatically generated for Univapay
|
|
4
|
+
# by APIMATIC v3.0 ( https://www.apimatic.io ).
|
|
5
|
+
|
|
6
|
+
module UnivapayClientSdk
|
|
7
|
+
# CheckoutApi
|
|
8
|
+
class CheckoutApi < BaseApi
|
|
9
|
+
# Returns the merchant's checkout configuration: enabled payment methods and
|
|
10
|
+
# their limits, installment/subscription plan settings, convenience-store
|
|
11
|
+
# and bank-transfer settings, widget theme, and per-brand feature support.
|
|
12
|
+
# Resolved entirely from the bearer credential — takes no parameters.
|
|
13
|
+
# @return [ApiResponse] Complete http response with raw body and status code.
|
|
14
|
+
def get_checkout_info
|
|
15
|
+
@api_call
|
|
16
|
+
.request(new_request_builder(HttpMethodEnum::GET,
|
|
17
|
+
'/checkout_info',
|
|
18
|
+
Server::DEFAULT)
|
|
19
|
+
.header_param(new_parameter('application/json', key: 'accept'))
|
|
20
|
+
.auth(Single.new('JWT_TOKEN')))
|
|
21
|
+
.response(new_response_handler
|
|
22
|
+
.deserializer(APIHelper.method(:custom_type_deserializer))
|
|
23
|
+
.deserialize_into(CheckoutInfo.method(:from_hash))
|
|
24
|
+
.is_api_response(true)
|
|
25
|
+
.local_error_template('401',
|
|
26
|
+
'HTTP 401 Unauthorized: {$response.body#/code}',
|
|
27
|
+
ApiErrorException)
|
|
28
|
+
.local_error_template('403',
|
|
29
|
+
'HTTP 403 Forbidden: {$response.body#/code}',
|
|
30
|
+
ApiErrorException)
|
|
31
|
+
.local_error_template('429',
|
|
32
|
+
'HTTP 429 Rate Limited: {$response.body#/code}',
|
|
33
|
+
APIException)
|
|
34
|
+
.local_error_template('400',
|
|
35
|
+
'HTTP 400 Bad Request: {$response.body#/code}',
|
|
36
|
+
APIException)
|
|
37
|
+
.local_error_template('404',
|
|
38
|
+
'HTTP 404 Not Found: {$response.body#/code}',
|
|
39
|
+
APIException)
|
|
40
|
+
.local_error_template('409',
|
|
41
|
+
'HTTP 409 Conflict: {$response.body#/code}',
|
|
42
|
+
APIException)
|
|
43
|
+
.local_error_template('500',
|
|
44
|
+
'HTTP 500 Server Error: {$response.body#/code}',
|
|
45
|
+
APIException)
|
|
46
|
+
.local_error_template('503',
|
|
47
|
+
'HTTP 503 Unavailable: {$response.body#/code}',
|
|
48
|
+
APIException)
|
|
49
|
+
.local_error_template('504',
|
|
50
|
+
'HTTP 504 Timeout: {$response.body#/code}',
|
|
51
|
+
APIException)
|
|
52
|
+
.local_error_template('default',
|
|
53
|
+
'HTTP {$statusCode}: {$response.body#/code}',
|
|
54
|
+
APIException))
|
|
55
|
+
.execute
|
|
56
|
+
end
|
|
57
|
+
end
|
|
58
|
+
end
|