pq-api-matic-sdk 1.0.0
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 +208 -0
- data/bin/console +15 -0
- data/lib/pay_quicker_sdk/api_helper.rb +10 -0
- data/lib/pay_quicker_sdk/client.rb +205 -0
- data/lib/pay_quicker_sdk/configuration.rb +229 -0
- data/lib/pay_quicker_sdk/controllers/agreements_controller.rb +129 -0
- data/lib/pay_quicker_sdk/controllers/balances_controller.rb +156 -0
- data/lib/pay_quicker_sdk/controllers/bank_accounts_controller.rb +587 -0
- data/lib/pay_quicker_sdk/controllers/base_controller.rb +60 -0
- data/lib/pay_quicker_sdk/controllers/client_side_controller.rb +237 -0
- data/lib/pay_quicker_sdk/controllers/compliance_controller.rb +77 -0
- data/lib/pay_quicker_sdk/controllers/documents_controller.rb +233 -0
- data/lib/pay_quicker_sdk/controllers/electronic_wallets_controller.rb +280 -0
- data/lib/pay_quicker_sdk/controllers/events_controller.rb +75 -0
- data/lib/pay_quicker_sdk/controllers/invitations_controller.rb +179 -0
- data/lib/pay_quicker_sdk/controllers/jobs_controller.rb +154 -0
- data/lib/pay_quicker_sdk/controllers/o_auth_authorization_controller.rb +43 -0
- data/lib/pay_quicker_sdk/controllers/payments_controller.rb +217 -0
- data/lib/pay_quicker_sdk/controllers/prepaid_cards_controller.rb +262 -0
- data/lib/pay_quicker_sdk/controllers/program_controller.rb +88 -0
- data/lib/pay_quicker_sdk/controllers/receipts_controller.rb +287 -0
- data/lib/pay_quicker_sdk/controllers/spendback_controller.rb +201 -0
- data/lib/pay_quicker_sdk/controllers/spendback_refunds_controller.rb +232 -0
- data/lib/pay_quicker_sdk/controllers/statements_controller.rb +197 -0
- data/lib/pay_quicker_sdk/controllers/transfers_controller.rb +259 -0
- data/lib/pay_quicker_sdk/controllers/users_controller.rb +151 -0
- data/lib/pay_quicker_sdk/controllers/webhooks_controller.rb +173 -0
- data/lib/pay_quicker_sdk/exceptions/api_error_result_exception.rb +80 -0
- data/lib/pay_quicker_sdk/exceptions/api_exception.rb +21 -0
- data/lib/pay_quicker_sdk/exceptions/o_auth_provider_exception.rb +64 -0
- data/lib/pay_quicker_sdk/http/auth/clientside.rb +53 -0
- data/lib/pay_quicker_sdk/http/auth/server.rb +156 -0
- data/lib/pay_quicker_sdk/http/http_call_back.rb +10 -0
- data/lib/pay_quicker_sdk/http/http_method_enum.rb +10 -0
- data/lib/pay_quicker_sdk/http/http_request.rb +10 -0
- data/lib/pay_quicker_sdk/http/http_response.rb +10 -0
- data/lib/pay_quicker_sdk/http/proxy_settings.rb +22 -0
- data/lib/pay_quicker_sdk/logging/configuration/api_logging_configuration.rb +186 -0
- data/lib/pay_quicker_sdk/logging/sdk_logger.rb +17 -0
- data/lib/pay_quicker_sdk/models/addresses.rb +45 -0
- data/lib/pay_quicker_sdk/models/agreement_list_result_json.rb +106 -0
- data/lib/pay_quicker_sdk/models/agreement_object.rb +120 -0
- data/lib/pay_quicker_sdk/models/agreement_result.rb +130 -0
- data/lib/pay_quicker_sdk/models/agreement_types.rb +64 -0
- data/lib/pay_quicker_sdk/models/authorization_list_result.rb +106 -0
- data/lib/pay_quicker_sdk/models/authorization_object.rb +194 -0
- data/lib/pay_quicker_sdk/models/balance_list_result.rb +106 -0
- data/lib/pay_quicker_sdk/models/balance_object.rb +118 -0
- data/lib/pay_quicker_sdk/models/balance_result.rb +128 -0
- data/lib/pay_quicker_sdk/models/bank_account_address.rb +132 -0
- data/lib/pay_quicker_sdk/models/bank_account_field.rb +83 -0
- data/lib/pay_quicker_sdk/models/bank_account_fields.rb +195 -0
- data/lib/pay_quicker_sdk/models/bank_account_list_result.rb +106 -0
- data/lib/pay_quicker_sdk/models/bank_account_object.rb +226 -0
- data/lib/pay_quicker_sdk/models/bank_account_ownership.rb +36 -0
- data/lib/pay_quicker_sdk/models/bank_account_required_fields.rb +125 -0
- data/lib/pay_quicker_sdk/models/bank_account_requirement.rb +142 -0
- data/lib/pay_quicker_sdk/models/bank_account_requirement_format.rb +93 -0
- data/lib/pay_quicker_sdk/models/bank_account_requirement_format_legend.rb +93 -0
- data/lib/pay_quicker_sdk/models/bank_account_requirement_list_result.rb +110 -0
- data/lib/pay_quicker_sdk/models/bank_account_requirement_validator.rb +86 -0
- data/lib/pay_quicker_sdk/models/bank_account_result.rb +234 -0
- data/lib/pay_quicker_sdk/models/bank_account_statuses.rb +49 -0
- data/lib/pay_quicker_sdk/models/bank_account_types.rb +47 -0
- data/lib/pay_quicker_sdk/models/bank_types.rb +68 -0
- data/lib/pay_quicker_sdk/models/base_model.rb +122 -0
- data/lib/pay_quicker_sdk/models/business_contact_roles.rb +44 -0
- data/lib/pay_quicker_sdk/models/card_networks.rb +36 -0
- data/lib/pay_quicker_sdk/models/card_processors.rb +52 -0
- data/lib/pay_quicker_sdk/models/category_types.rb +36 -0
- data/lib/pay_quicker_sdk/models/countries.rb +1031 -0
- data/lib/pay_quicker_sdk/models/countries_alpha_code3.rb +1028 -0
- data/lib/pay_quicker_sdk/models/create_invitation.rb +614 -0
- data/lib/pay_quicker_sdk/models/create_or_update_bank_account.rb +163 -0
- data/lib/pay_quicker_sdk/models/create_or_update_document.rb +82 -0
- data/lib/pay_quicker_sdk/models/create_or_update_document_fields.rb +81 -0
- data/lib/pay_quicker_sdk/models/create_or_update_electronic_wallet.rb +126 -0
- data/lib/pay_quicker_sdk/models/create_or_update_user.rb +614 -0
- data/lib/pay_quicker_sdk/models/create_spendback_refund_quote.rb +173 -0
- data/lib/pay_quicker_sdk/models/create_webhook_request.rb +82 -0
- data/lib/pay_quicker_sdk/models/currencies.rb +700 -0
- data/lib/pay_quicker_sdk/models/delivery_details.rb +119 -0
- data/lib/pay_quicker_sdk/models/document_details.rb +81 -0
- data/lib/pay_quicker_sdk/models/document_list_result.rb +108 -0
- data/lib/pay_quicker_sdk/models/document_object.rb +147 -0
- data/lib/pay_quicker_sdk/models/document_requirements_list_result.rb +91 -0
- data/lib/pay_quicker_sdk/models/document_result.rb +157 -0
- data/lib/pay_quicker_sdk/models/document_status_types.rb +48 -0
- data/lib/pay_quicker_sdk/models/document_types.rb +264 -0
- data/lib/pay_quicker_sdk/models/electronic_funds_transfer_types.rb +36 -0
- data/lib/pay_quicker_sdk/models/electronic_transfer_failure_types.rb +97 -0
- data/lib/pay_quicker_sdk/models/electronic_transfer_status_types.rb +46 -0
- data/lib/pay_quicker_sdk/models/electronic_wallet_field.rb +83 -0
- data/lib/pay_quicker_sdk/models/electronic_wallet_fields.rb +41 -0
- data/lib/pay_quicker_sdk/models/electronic_wallet_list_result.rb +106 -0
- data/lib/pay_quicker_sdk/models/electronic_wallet_object.rb +186 -0
- data/lib/pay_quicker_sdk/models/electronic_wallet_required_fields.rb +125 -0
- data/lib/pay_quicker_sdk/models/electronic_wallet_requirement.rb +166 -0
- data/lib/pay_quicker_sdk/models/electronic_wallet_requirement_format.rb +93 -0
- data/lib/pay_quicker_sdk/models/electronic_wallet_requirement_format_legend.rb +93 -0
- data/lib/pay_quicker_sdk/models/electronic_wallet_requirement_list_result.rb +110 -0
- data/lib/pay_quicker_sdk/models/electronic_wallet_requirement_validator.rb +86 -0
- data/lib/pay_quicker_sdk/models/electronic_wallet_result.rb +195 -0
- data/lib/pay_quicker_sdk/models/electronic_wallet_statuses.rb +48 -0
- data/lib/pay_quicker_sdk/models/electronic_wallet_type.rb +99 -0
- data/lib/pay_quicker_sdk/models/electronic_wallet_types.rb +368 -0
- data/lib/pay_quicker_sdk/models/event_category_types.rb +40 -0
- data/lib/pay_quicker_sdk/models/event_list_result.rb +106 -0
- data/lib/pay_quicker_sdk/models/event_object.rb +191 -0
- data/lib/pay_quicker_sdk/models/event_requirement_categories.rb +56 -0
- data/lib/pay_quicker_sdk/models/event_requirements.rb +105 -0
- data/lib/pay_quicker_sdk/models/event_statuses.rb +52 -0
- data/lib/pay_quicker_sdk/models/event_types.rb +36 -0
- data/lib/pay_quicker_sdk/models/expected_delivery_types.rb +36 -0
- data/lib/pay_quicker_sdk/models/fee_configuration.rb +154 -0
- data/lib/pay_quicker_sdk/models/fee_distribution.rb +159 -0
- data/lib/pay_quicker_sdk/models/fee_responsibility_parties.rb +44 -0
- data/lib/pay_quicker_sdk/models/fee_responsibility_sources.rb +36 -0
- data/lib/pay_quicker_sdk/models/fee_sources.rb +40 -0
- data/lib/pay_quicker_sdk/models/fee_values.rb +36 -0
- data/lib/pay_quicker_sdk/models/fees.rb +222 -0
- data/lib/pay_quicker_sdk/models/fx_rate.rb +144 -0
- data/lib/pay_quicker_sdk/models/gateway_payment_job.rb +131 -0
- data/lib/pay_quicker_sdk/models/gateway_payment_job_quote.rb +167 -0
- data/lib/pay_quicker_sdk/models/gateway_payment_quote.rb +220 -0
- data/lib/pay_quicker_sdk/models/gateway_spendback_quote.rb +167 -0
- data/lib/pay_quicker_sdk/models/gateway_transfer_quote.rb +195 -0
- data/lib/pay_quicker_sdk/models/genders.rb +48 -0
- data/lib/pay_quicker_sdk/models/government_ids.rb +45 -0
- data/lib/pay_quicker_sdk/models/hateoas_relationship.rb +69 -0
- data/lib/pay_quicker_sdk/models/hateoas_self_ref.rb +84 -0
- data/lib/pay_quicker_sdk/models/identity_verification_providers.rb +62 -0
- data/lib/pay_quicker_sdk/models/identity_verification_result_sub_types.rb +38 -0
- data/lib/pay_quicker_sdk/models/identity_verification_result_types.rb +57 -0
- data/lib/pay_quicker_sdk/models/idv_check_list_result.rb +108 -0
- data/lib/pay_quicker_sdk/models/idv_check_object.rb +209 -0
- data/lib/pay_quicker_sdk/models/idv_check_result.rb +221 -0
- data/lib/pay_quicker_sdk/models/invitation_list_result.rb +106 -0
- data/lib/pay_quicker_sdk/models/invitation_object.rb +262 -0
- data/lib/pay_quicker_sdk/models/invitation_result.rb +272 -0
- data/lib/pay_quicker_sdk/models/job_status_types.rb +68 -0
- data/lib/pay_quicker_sdk/models/job_types.rb +36 -0
- data/lib/pay_quicker_sdk/models/languages.rb +101 -0
- data/lib/pay_quicker_sdk/models/list_metadata.rb +116 -0
- data/lib/pay_quicker_sdk/models/lock_side_types.rb +37 -0
- data/lib/pay_quicker_sdk/models/metadata.rb +72 -0
- data/lib/pay_quicker_sdk/models/metadata_items.rb +80 -0
- data/lib/pay_quicker_sdk/models/o_auth_provider_error.rb +62 -0
- data/lib/pay_quicker_sdk/models/o_auth_scope_server.rb +36 -0
- data/lib/pay_quicker_sdk/models/o_auth_token.rb +106 -0
- data/lib/pay_quicker_sdk/models/occupations.rb +100 -0
- data/lib/pay_quicker_sdk/models/operation_result.rb +72 -0
- data/lib/pay_quicker_sdk/models/order_prepaid_card.rb +97 -0
- data/lib/pay_quicker_sdk/models/payment_job_list_result.rb +106 -0
- data/lib/pay_quicker_sdk/models/payment_job_object.rb +211 -0
- data/lib/pay_quicker_sdk/models/payment_job_result.rb +220 -0
- data/lib/pay_quicker_sdk/models/payment_list_result.rb +106 -0
- data/lib/pay_quicker_sdk/models/payment_object.rb +263 -0
- data/lib/pay_quicker_sdk/models/payment_purposes.rb +58 -0
- data/lib/pay_quicker_sdk/models/payment_result.rb +272 -0
- data/lib/pay_quicker_sdk/models/portal_payment_job.rb +131 -0
- data/lib/pay_quicker_sdk/models/portal_payment_job_quote.rb +176 -0
- data/lib/pay_quicker_sdk/models/portal_payment_quote.rb +228 -0
- data/lib/pay_quicker_sdk/models/portal_spendback_quote.rb +177 -0
- data/lib/pay_quicker_sdk/models/portal_transfer_quote.rb +204 -0
- data/lib/pay_quicker_sdk/models/prepaid_card_authorizations.rb +129 -0
- data/lib/pay_quicker_sdk/models/prepaid_card_capabilities.rb +69 -0
- data/lib/pay_quicker_sdk/models/prepaid_card_data_object.rb +136 -0
- data/lib/pay_quicker_sdk/models/prepaid_card_data_result.rb +146 -0
- data/lib/pay_quicker_sdk/models/prepaid_card_data_token_object.rb +134 -0
- data/lib/pay_quicker_sdk/models/prepaid_card_data_token_result.rb +145 -0
- data/lib/pay_quicker_sdk/models/prepaid_card_data_type.rb +36 -0
- data/lib/pay_quicker_sdk/models/prepaid_card_image_side.rb +36 -0
- data/lib/pay_quicker_sdk/models/prepaid_card_list_result.rb +106 -0
- data/lib/pay_quicker_sdk/models/prepaid_card_object.rb +243 -0
- data/lib/pay_quicker_sdk/models/prepaid_card_pin_object.rb +108 -0
- data/lib/pay_quicker_sdk/models/prepaid_card_pin_result.rb +121 -0
- data/lib/pay_quicker_sdk/models/prepaid_card_pin_token_object.rb +128 -0
- data/lib/pay_quicker_sdk/models/prepaid_card_pin_token_result.rb +139 -0
- data/lib/pay_quicker_sdk/models/prepaid_card_replacement_reasons.rb +48 -0
- data/lib/pay_quicker_sdk/models/prepaid_card_result.rb +254 -0
- data/lib/pay_quicker_sdk/models/prepaid_card_statuses.rb +71 -0
- data/lib/pay_quicker_sdk/models/program_list_result.rb +106 -0
- data/lib/pay_quicker_sdk/models/program_object.rb +138 -0
- data/lib/pay_quicker_sdk/models/program_result.rb +147 -0
- data/lib/pay_quicker_sdk/models/program_types.rb +44 -0
- data/lib/pay_quicker_sdk/models/receipt_descriptions.rb +84 -0
- data/lib/pay_quicker_sdk/models/receipt_details.rb +439 -0
- data/lib/pay_quicker_sdk/models/receipt_list_result.rb +106 -0
- data/lib/pay_quicker_sdk/models/receipt_object.rb +241 -0
- data/lib/pay_quicker_sdk/models/receipt_result.rb +251 -0
- data/lib/pay_quicker_sdk/models/receipt_statuses.rb +76 -0
- data/lib/pay_quicker_sdk/models/replace_prepaid_card.rb +85 -0
- data/lib/pay_quicker_sdk/models/retrieve_card_data.rb +73 -0
- data/lib/pay_quicker_sdk/models/retrieve_card_pin.rb +76 -0
- data/lib/pay_quicker_sdk/models/sandbox_instance.rb +76 -0
- data/lib/pay_quicker_sdk/models/signs.rb +40 -0
- data/lib/pay_quicker_sdk/models/spendback_list_result.rb +106 -0
- data/lib/pay_quicker_sdk/models/spendback_object.rb +291 -0
- data/lib/pay_quicker_sdk/models/spendback_quote_accept_result.rb +301 -0
- data/lib/pay_quicker_sdk/models/spendback_refund_list_result.rb +106 -0
- data/lib/pay_quicker_sdk/models/spendback_refund_object.rb +251 -0
- data/lib/pay_quicker_sdk/models/spendback_refund_result.rb +262 -0
- data/lib/pay_quicker_sdk/models/spendback_result.rb +301 -0
- data/lib/pay_quicker_sdk/models/statement_list_result.rb +106 -0
- data/lib/pay_quicker_sdk/models/statement_object.rb +183 -0
- data/lib/pay_quicker_sdk/models/statement_result.rb +192 -0
- data/lib/pay_quicker_sdk/models/tax_resident_statuses.rb +40 -0
- data/lib/pay_quicker_sdk/models/token_purposes.rb +36 -0
- data/lib/pay_quicker_sdk/models/transfer_list_result.rb +106 -0
- data/lib/pay_quicker_sdk/models/transfer_method_types.rb +48 -0
- data/lib/pay_quicker_sdk/models/transfer_object.rb +309 -0
- data/lib/pay_quicker_sdk/models/transfer_result.rb +318 -0
- data/lib/pay_quicker_sdk/models/transfer_statuses.rb +76 -0
- data/lib/pay_quicker_sdk/models/transfer_types.rb +112 -0
- data/lib/pay_quicker_sdk/models/translation.rb +85 -0
- data/lib/pay_quicker_sdk/models/uat_instance.rb +48 -0
- data/lib/pay_quicker_sdk/models/update_card_pin.rb +87 -0
- data/lib/pay_quicker_sdk/models/update_prepaid_card.rb +85 -0
- data/lib/pay_quicker_sdk/models/upload_fields.rb +40 -0
- data/lib/pay_quicker_sdk/models/user_action.rb +40 -0
- data/lib/pay_quicker_sdk/models/user_doc_req_item_docs_items_metadata_items.rb +101 -0
- data/lib/pay_quicker_sdk/models/user_doc_req_item_docs_items_metadata_items_name_items.rb +83 -0
- data/lib/pay_quicker_sdk/models/user_doc_req_item_docs_items_supplemental_docs_items.rb +92 -0
- data/lib/pay_quicker_sdk/models/user_document_requirement_item.rb +105 -0
- data/lib/pay_quicker_sdk/models/user_document_requirement_item_documents_items.rb +132 -0
- data/lib/pay_quicker_sdk/models/user_event_result.rb +201 -0
- data/lib/pay_quicker_sdk/models/user_impact.rb +48 -0
- data/lib/pay_quicker_sdk/models/user_list_result.rb +106 -0
- data/lib/pay_quicker_sdk/models/user_object.rb +676 -0
- data/lib/pay_quicker_sdk/models/user_result.rb +686 -0
- data/lib/pay_quicker_sdk/models/user_statuses.rb +40 -0
- data/lib/pay_quicker_sdk/models/user_types.rb +36 -0
- data/lib/pay_quicker_sdk/models/validator_types.rb +50 -0
- data/lib/pay_quicker_sdk/models/webhook_namespaces.rb +307 -0
- data/lib/pay_quicker_sdk/models/webhook_subscription_list_result.rb +106 -0
- data/lib/pay_quicker_sdk/models/webhook_subscription_object.rb +158 -0
- data/lib/pay_quicker_sdk/models/webhook_subscription_result.rb +167 -0
- data/lib/pay_quicker_sdk/models/webhook_subscription_statuses.rb +44 -0
- data/lib/pay_quicker_sdk/utilities/date_time_helper.rb +11 -0
- data/lib/pay_quicker_sdk/utilities/file_wrapper.rb +28 -0
- data/lib/pay_quicker_sdk/utilities/union_type_lookup.rb +62 -0
- data/lib/pay_quicker_sdk.rb +274 -0
- data/test/controllers/controller_test_base.rb +24 -0
- data/test/controllers/test_agreements_controller.rb +108 -0
- data/test/controllers/test_balances_controller.rb +132 -0
- data/test/controllers/test_bank_accounts_controller.rb +645 -0
- data/test/controllers/test_client_side_controller.rb +295 -0
- data/test/controllers/test_compliance_controller.rb +86 -0
- data/test/controllers/test_documents_controller.rb +212 -0
- data/test/controllers/test_electronic_wallets_controller.rb +292 -0
- data/test/controllers/test_events_controller.rb +138 -0
- data/test/controllers/test_invitations_controller.rb +162 -0
- data/test/controllers/test_jobs_controller.rb +114 -0
- data/test/controllers/test_payments_controller.rb +323 -0
- data/test/controllers/test_prepaid_cards_controller.rb +351 -0
- data/test/controllers/test_program_controller.rb +134 -0
- data/test/controllers/test_receipts_controller.rb +813 -0
- data/test/controllers/test_spendback_controller.rb +302 -0
- data/test/controllers/test_spendback_refunds_controller.rb +128 -0
- data/test/controllers/test_statements_controller.rb +192 -0
- data/test/controllers/test_transfers_controller.rb +613 -0
- data/test/controllers/test_users_controller.rb +483 -0
- data/test/controllers/test_webhooks_controller.rb +402 -0
- data/test/http_response_catcher.rb +19 -0
- metadata +379 -0
checksums.yaml
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
---
|
|
2
|
+
SHA256:
|
|
3
|
+
metadata.gz: 971c24d9b86ec722646c3ad4f85fe1f67570fca40da5168cd581c4dde7b07381
|
|
4
|
+
data.tar.gz: 3fd46f87a0e676b9dafa3500f8c2b70a7601141354351a984e5fd406734e151a
|
|
5
|
+
SHA512:
|
|
6
|
+
metadata.gz: 780623db68b5aea49561a03ec2ccbd9c19ccc52f39646344bc237bf7b27a8c4cc722a4c00373fd5f8f19324ae5466782e3c25a14f38ba5052a93221e25a6e5e2
|
|
7
|
+
data.tar.gz: eb9f24d33c6e5cf5f7dcdf196d6c53d908057db6dc812d0a8519e0f350150ce084c2c17de8a74a44b793c3ad1ed782d5e4816eabdd0ef5128ceda8ce684937bf
|
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,208 @@
|
|
|
1
|
+
|
|
2
|
+
# Getting Started with PQ API v2
|
|
3
|
+
|
|
4
|
+
## Introduction
|
|
5
|
+
|
|
6
|
+
PayQuicker offers a secure and instant payout platform that delivers payment to a payee-owned and insured bank account linked to a debit card, similar to a standard checking account.
|
|
7
|
+
|
|
8
|
+
As soon as the payment is made, funds are available in the insured account and available to spend instantly online through a virtual card, at retail with a plastic prepaid debit card, or by loading the card to a mobile wallet.
|
|
9
|
+
|
|
10
|
+
PayQuicker provides a RESTful API that allows authorized clients to send and receive payments, debit user's accounts for spendback, retrieve user account balance, retrieve user reports, and retrieve transaction reports.
|
|
11
|
+
|
|
12
|
+
## Install the Package
|
|
13
|
+
|
|
14
|
+
Install the gem from the command line:
|
|
15
|
+
|
|
16
|
+
```bash
|
|
17
|
+
gem install pq-api-matic-sdk -v 1.0.0
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
Or add the gem to your Gemfile and run `bundle`:
|
|
21
|
+
|
|
22
|
+
```ruby
|
|
23
|
+
gem 'pq-api-matic-sdk', '1.0.0'
|
|
24
|
+
```
|
|
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.0).
|
|
27
|
+
|
|
28
|
+
## IRB Console Usage
|
|
29
|
+
|
|
30
|
+
You can explore the SDK interactively using IRB in two ways
|
|
31
|
+
|
|
32
|
+
### 1. Use IRB with Installed Gem
|
|
33
|
+
|
|
34
|
+
Open your system terminal (Command Prompt, Git Bash or macOS Terminal) and type the following command to start the irb console.
|
|
35
|
+
|
|
36
|
+
```bash
|
|
37
|
+
irb
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
Now you can load the SDK in the IRB
|
|
41
|
+
|
|
42
|
+
```ruby
|
|
43
|
+
require 'pay_quicker_sdk'
|
|
44
|
+
include PayQuickerSdk
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
### 2. Use IRB within SDK
|
|
48
|
+
|
|
49
|
+
Open your system terminal (Command Prompt, Git Bash or macOS Terminal) and navigate to the root folder of SDK.
|
|
50
|
+
|
|
51
|
+
```
|
|
52
|
+
cd path/to/pay_quicker_sdk
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
Now you can start the preconfigured irb console by running the following command
|
|
56
|
+
|
|
57
|
+
```bash
|
|
58
|
+
ruby bin/console
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
**_Note:_** This automatically loads the SDK from lib/
|
|
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
|
+
## Initialize the API Client
|
|
72
|
+
|
|
73
|
+
**_Note:_** Documentation for the client can be found [here.](https://www.github.com/sdks-io/pq-api-matic-ruby-sdk/tree/1.0.0/doc/client.md)
|
|
74
|
+
|
|
75
|
+
The following parameters are configurable for the API Client:
|
|
76
|
+
|
|
77
|
+
| Parameter | Type | Description |
|
|
78
|
+
| --- | --- | --- |
|
|
79
|
+
| x_my_pay_quicker_version | `String` | Date-based API Version specified in the header *required* on all calls.<br>*Default*: `'2026.02.01'` |
|
|
80
|
+
| sandbox_instance | `SandboxInstance` | Sandbox Environments<br>*Default*: `SandboxInstance::SANDBOX` |
|
|
81
|
+
| 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.0/README.md#environments) | The API environment. <br> **Default: `Environment.SANDBOX`** |
|
|
83
|
+
| connection | `Faraday::Connection` | The Faraday connection object passed by the SDK user for making requests |
|
|
84
|
+
| adapter | `Faraday::Adapter` | The Faraday adapter object passed by the SDK user for performing http requests |
|
|
85
|
+
| timeout | `Float` | The value to use for connection timeout. <br> **Default: 60** |
|
|
86
|
+
| max_retries | `Integer` | The number of times to retry an endpoint call if it fails. <br> **Default: 0** |
|
|
87
|
+
| retry_interval | `Float` | Pause in seconds between retries. <br> **Default: 1** |
|
|
88
|
+
| backoff_factor | `Float` | The amount to multiply each successive retry's interval amount by in order to provide backoff. <br> **Default: 2** |
|
|
89
|
+
| retry_statuses | `Array` | A list of HTTP statuses to retry. <br> **Default: [408, 413, 429, 500, 502, 503, 504, 521, 522, 524]** |
|
|
90
|
+
| retry_methods | `Array` | A list of HTTP methods to retry. <br> **Default: %i[get put]** |
|
|
91
|
+
| 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.0/doc/proxy-settings.md) | Optional proxy configuration to route HTTP requests through a proxy server. |
|
|
93
|
+
| logging_configuration | [`LoggingConfiguration`](https://www.github.com/sdks-io/pq-api-matic-ruby-sdk/tree/1.0.0/doc/logging-configuration.md) | The SDK logging configuration for API calls |
|
|
94
|
+
| server_credentials | [`ServerCredentials`](https://www.github.com/sdks-io/pq-api-matic-ruby-sdk/tree/1.0.0/doc/auth/oauth-2-client-credentials-grant.md) | The credential object for OAuth 2 Client Credentials Grant |
|
|
95
|
+
| clientside_credentials | [`ClientsideCredentials`](https://www.github.com/sdks-io/pq-api-matic-ruby-sdk/tree/1.0.0/doc/auth/oauth-2-bearer-token.md) | The credential object for OAuth 2 Bearer token |
|
|
96
|
+
|
|
97
|
+
The API client can be initialized as follows:
|
|
98
|
+
|
|
99
|
+
### Code-Based Client Initialization
|
|
100
|
+
|
|
101
|
+
```ruby
|
|
102
|
+
require 'pay_quicker_sdk'
|
|
103
|
+
include PayQuickerSdk
|
|
104
|
+
|
|
105
|
+
client = Client.new(
|
|
106
|
+
x_my_pay_quicker_version: '2026.02.01',
|
|
107
|
+
server_credentials: ServerCredentials.new(
|
|
108
|
+
o_auth_client_id: 'OAuthClientId',
|
|
109
|
+
o_auth_client_secret: 'OAuthClientSecret',
|
|
110
|
+
o_auth_scopes: [
|
|
111
|
+
OAuthScopeServer::READONLY,
|
|
112
|
+
OAuthScopeServer::MODIFY
|
|
113
|
+
]
|
|
114
|
+
),
|
|
115
|
+
clientside_credentials: ClientsideCredentials.new(
|
|
116
|
+
access_token: 'AccessToken'
|
|
117
|
+
),
|
|
118
|
+
environment: Environment::SANDBOX,
|
|
119
|
+
sandbox_instance: SandboxInstance::SANDBOX,
|
|
120
|
+
uat_instance: UatInstance::UAT1,
|
|
121
|
+
logging_configuration: LoggingConfiguration.new(
|
|
122
|
+
log_level: Logger::INFO,
|
|
123
|
+
request_logging_config: RequestLoggingConfiguration.new(
|
|
124
|
+
log_body: true
|
|
125
|
+
),
|
|
126
|
+
response_logging_config: ResponseLoggingConfiguration.new(
|
|
127
|
+
log_headers: true
|
|
128
|
+
)
|
|
129
|
+
)
|
|
130
|
+
)
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
### Environment-Based Client Initialization
|
|
134
|
+
|
|
135
|
+
```ruby
|
|
136
|
+
require 'pay_quicker_sdk'
|
|
137
|
+
include PayQuickerSdk
|
|
138
|
+
|
|
139
|
+
# Create client from environment
|
|
140
|
+
client = Client.from_env
|
|
141
|
+
```
|
|
142
|
+
|
|
143
|
+
See the [`Environment-Based Client Initialization`](https://www.github.com/sdks-io/pq-api-matic-ruby-sdk/tree/1.0.0/doc/environment-based-client-initialization.md) section for details.
|
|
144
|
+
|
|
145
|
+
## Environments
|
|
146
|
+
|
|
147
|
+
The SDK can be configured to use a different environment for making API calls. Available environments are:
|
|
148
|
+
|
|
149
|
+
### Fields
|
|
150
|
+
|
|
151
|
+
| Name | Description |
|
|
152
|
+
| --- | --- |
|
|
153
|
+
| PRODUCTION | Production |
|
|
154
|
+
| SANDBOX | **Default** Sandbox is used for both sandbox testing and customer UAT. |
|
|
155
|
+
| UAT | UAT is used for both sandbox testing and customer UAT. |
|
|
156
|
+
| DEVELOPMENT | Development is used for local development testing. |
|
|
157
|
+
|
|
158
|
+
## Authorization
|
|
159
|
+
|
|
160
|
+
This API uses the following authentication schemes.
|
|
161
|
+
|
|
162
|
+
* [`server (OAuth 2 Client Credentials Grant)`](https://www.github.com/sdks-io/pq-api-matic-ruby-sdk/tree/1.0.0/doc/auth/oauth-2-client-credentials-grant.md)
|
|
163
|
+
* [`clientside (OAuth 2 Bearer token)`](https://www.github.com/sdks-io/pq-api-matic-ruby-sdk/tree/1.0.0/doc/auth/oauth-2-bearer-token.md)
|
|
164
|
+
|
|
165
|
+
## List of APIs
|
|
166
|
+
|
|
167
|
+
* [Agreements](https://www.github.com/sdks-io/pq-api-matic-ruby-sdk/tree/1.0.0/doc/controllers/agreements.md)
|
|
168
|
+
* [Balances](https://www.github.com/sdks-io/pq-api-matic-ruby-sdk/tree/1.0.0/doc/controllers/balances.md)
|
|
169
|
+
* [Bank Accounts](https://www.github.com/sdks-io/pq-api-matic-ruby-sdk/tree/1.0.0/doc/controllers/bank-accounts.md)
|
|
170
|
+
* [Client Side](https://www.github.com/sdks-io/pq-api-matic-ruby-sdk/tree/1.0.0/doc/controllers/client-side.md)
|
|
171
|
+
* [Compliance](https://www.github.com/sdks-io/pq-api-matic-ruby-sdk/tree/1.0.0/doc/controllers/compliance.md)
|
|
172
|
+
* [Documents](https://www.github.com/sdks-io/pq-api-matic-ruby-sdk/tree/1.0.0/doc/controllers/documents.md)
|
|
173
|
+
* [Electronic Wallets](https://www.github.com/sdks-io/pq-api-matic-ruby-sdk/tree/1.0.0/doc/controllers/electronic-wallets.md)
|
|
174
|
+
* [Events](https://www.github.com/sdks-io/pq-api-matic-ruby-sdk/tree/1.0.0/doc/controllers/events.md)
|
|
175
|
+
* [Invitations](https://www.github.com/sdks-io/pq-api-matic-ruby-sdk/tree/1.0.0/doc/controllers/invitations.md)
|
|
176
|
+
* [Jobs](https://www.github.com/sdks-io/pq-api-matic-ruby-sdk/tree/1.0.0/doc/controllers/jobs.md)
|
|
177
|
+
* [Payments](https://www.github.com/sdks-io/pq-api-matic-ruby-sdk/tree/1.0.0/doc/controllers/payments.md)
|
|
178
|
+
* [Prepaid Cards](https://www.github.com/sdks-io/pq-api-matic-ruby-sdk/tree/1.0.0/doc/controllers/prepaid-cards.md)
|
|
179
|
+
* [Program](https://www.github.com/sdks-io/pq-api-matic-ruby-sdk/tree/1.0.0/doc/controllers/program.md)
|
|
180
|
+
* [Receipts](https://www.github.com/sdks-io/pq-api-matic-ruby-sdk/tree/1.0.0/doc/controllers/receipts.md)
|
|
181
|
+
* [Spendback](https://www.github.com/sdks-io/pq-api-matic-ruby-sdk/tree/1.0.0/doc/controllers/spendback.md)
|
|
182
|
+
* [Spendback Refunds](https://www.github.com/sdks-io/pq-api-matic-ruby-sdk/tree/1.0.0/doc/controllers/spendback-refunds.md)
|
|
183
|
+
* [Statements](https://www.github.com/sdks-io/pq-api-matic-ruby-sdk/tree/1.0.0/doc/controllers/statements.md)
|
|
184
|
+
* [Transfers](https://www.github.com/sdks-io/pq-api-matic-ruby-sdk/tree/1.0.0/doc/controllers/transfers.md)
|
|
185
|
+
* [Users](https://www.github.com/sdks-io/pq-api-matic-ruby-sdk/tree/1.0.0/doc/controllers/users.md)
|
|
186
|
+
* [Webhooks](https://www.github.com/sdks-io/pq-api-matic-ruby-sdk/tree/1.0.0/doc/controllers/webhooks.md)
|
|
187
|
+
|
|
188
|
+
## SDK Infrastructure
|
|
189
|
+
|
|
190
|
+
### Configuration
|
|
191
|
+
|
|
192
|
+
* [ProxySettings](https://www.github.com/sdks-io/pq-api-matic-ruby-sdk/tree/1.0.0/doc/proxy-settings.md)
|
|
193
|
+
* [Environment-Based Client Initialization](https://www.github.com/sdks-io/pq-api-matic-ruby-sdk/tree/1.0.0/doc/environment-based-client-initialization.md)
|
|
194
|
+
* [AbstractLogger](https://www.github.com/sdks-io/pq-api-matic-ruby-sdk/tree/1.0.0/doc/abstract-logger.md)
|
|
195
|
+
* [LoggingConfiguration](https://www.github.com/sdks-io/pq-api-matic-ruby-sdk/tree/1.0.0/doc/logging-configuration.md)
|
|
196
|
+
* [RequestLoggingConfiguration](https://www.github.com/sdks-io/pq-api-matic-ruby-sdk/tree/1.0.0/doc/request-logging-configuration.md)
|
|
197
|
+
* [ResponseLoggingConfiguration](https://www.github.com/sdks-io/pq-api-matic-ruby-sdk/tree/1.0.0/doc/response-logging-configuration.md)
|
|
198
|
+
|
|
199
|
+
### HTTP
|
|
200
|
+
|
|
201
|
+
* [HttpResponse](https://www.github.com/sdks-io/pq-api-matic-ruby-sdk/tree/1.0.0/doc/http-response.md)
|
|
202
|
+
* [HttpRequest](https://www.github.com/sdks-io/pq-api-matic-ruby-sdk/tree/1.0.0/doc/http-request.md)
|
|
203
|
+
|
|
204
|
+
### Utilities
|
|
205
|
+
|
|
206
|
+
* [ApiHelper](https://www.github.com/sdks-io/pq-api-matic-ruby-sdk/tree/1.0.0/doc/api-helper.md)
|
|
207
|
+
* [DateTimeHelper](https://www.github.com/sdks-io/pq-api-matic-ruby-sdk/tree/1.0.0/doc/date-time-helper.md)
|
|
208
|
+
|
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 'pay_quicker_sdk'
|
|
8
|
+
|
|
9
|
+
puts 'PayQuickerSdk SDK loaded!'
|
|
10
|
+
puts 'You can now create a client with: client = PayQuickerSdk::Client.new'
|
|
11
|
+
puts 'Or use from_env: client = PayQuickerSdk::Client.from_env'
|
|
12
|
+
|
|
13
|
+
# Start an interactive IRB session
|
|
14
|
+
require 'irb'
|
|
15
|
+
IRB.start
|
|
@@ -0,0 +1,205 @@
|
|
|
1
|
+
# pay_quicker_sdk
|
|
2
|
+
#
|
|
3
|
+
# This file was automatically generated for PayQuicker by
|
|
4
|
+
# APIMATIC v3.0 ( https://www.apimatic.io ).
|
|
5
|
+
|
|
6
|
+
module PayQuickerSdk
|
|
7
|
+
# pay_quicker_sdk client class.
|
|
8
|
+
class Client
|
|
9
|
+
include CoreLibrary
|
|
10
|
+
attr_reader :config, :auth_managers
|
|
11
|
+
|
|
12
|
+
def user_agent_detail
|
|
13
|
+
config.user_agent_detail
|
|
14
|
+
end
|
|
15
|
+
|
|
16
|
+
# Returns the configured authentication server instance.
|
|
17
|
+
def server
|
|
18
|
+
@auth_managers['server']
|
|
19
|
+
end
|
|
20
|
+
|
|
21
|
+
# Access to agreements controller.
|
|
22
|
+
# @return [AgreementsController] Returns the controller instance.
|
|
23
|
+
def agreements
|
|
24
|
+
@agreements ||= AgreementsController.new @global_configuration
|
|
25
|
+
end
|
|
26
|
+
|
|
27
|
+
# Access to balances controller.
|
|
28
|
+
# @return [BalancesController] Returns the controller instance.
|
|
29
|
+
def balances
|
|
30
|
+
@balances ||= BalancesController.new @global_configuration
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
# Access to bank_accounts controller.
|
|
34
|
+
# @return [BankAccountsController] Returns the controller instance.
|
|
35
|
+
def bank_accounts
|
|
36
|
+
@bank_accounts ||= BankAccountsController.new @global_configuration
|
|
37
|
+
end
|
|
38
|
+
|
|
39
|
+
# Access to client_side controller.
|
|
40
|
+
# @return [ClientSideController] Returns the controller instance.
|
|
41
|
+
def client_side
|
|
42
|
+
@client_side ||= ClientSideController.new @global_configuration
|
|
43
|
+
end
|
|
44
|
+
|
|
45
|
+
# Access to compliance controller.
|
|
46
|
+
# @return [ComplianceController] Returns the controller instance.
|
|
47
|
+
def compliance
|
|
48
|
+
@compliance ||= ComplianceController.new @global_configuration
|
|
49
|
+
end
|
|
50
|
+
|
|
51
|
+
# Access to documents controller.
|
|
52
|
+
# @return [DocumentsController] Returns the controller instance.
|
|
53
|
+
def documents
|
|
54
|
+
@documents ||= DocumentsController.new @global_configuration
|
|
55
|
+
end
|
|
56
|
+
|
|
57
|
+
# Access to electronic_wallets controller.
|
|
58
|
+
# @return [ElectronicWalletsController] Returns the controller instance.
|
|
59
|
+
def electronic_wallets
|
|
60
|
+
@electronic_wallets ||= ElectronicWalletsController.new @global_configuration
|
|
61
|
+
end
|
|
62
|
+
|
|
63
|
+
# Access to events controller.
|
|
64
|
+
# @return [EventsController] Returns the controller instance.
|
|
65
|
+
def events
|
|
66
|
+
@events ||= EventsController.new @global_configuration
|
|
67
|
+
end
|
|
68
|
+
|
|
69
|
+
# Access to payments controller.
|
|
70
|
+
# @return [PaymentsController] Returns the controller instance.
|
|
71
|
+
def payments
|
|
72
|
+
@payments ||= PaymentsController.new @global_configuration
|
|
73
|
+
end
|
|
74
|
+
|
|
75
|
+
# Access to prepaid_cards controller.
|
|
76
|
+
# @return [PrepaidCardsController] Returns the controller instance.
|
|
77
|
+
def prepaid_cards
|
|
78
|
+
@prepaid_cards ||= PrepaidCardsController.new @global_configuration
|
|
79
|
+
end
|
|
80
|
+
|
|
81
|
+
# Access to program controller.
|
|
82
|
+
# @return [ProgramController] Returns the controller instance.
|
|
83
|
+
def program
|
|
84
|
+
@program ||= ProgramController.new @global_configuration
|
|
85
|
+
end
|
|
86
|
+
|
|
87
|
+
# Access to receipts controller.
|
|
88
|
+
# @return [ReceiptsController] Returns the controller instance.
|
|
89
|
+
def receipts
|
|
90
|
+
@receipts ||= ReceiptsController.new @global_configuration
|
|
91
|
+
end
|
|
92
|
+
|
|
93
|
+
# Access to spendback controller.
|
|
94
|
+
# @return [SpendbackController] Returns the controller instance.
|
|
95
|
+
def spendback
|
|
96
|
+
@spendback ||= SpendbackController.new @global_configuration
|
|
97
|
+
end
|
|
98
|
+
|
|
99
|
+
# Access to spendback_refunds controller.
|
|
100
|
+
# @return [SpendbackRefundsController] Returns the controller instance.
|
|
101
|
+
def spendback_refunds
|
|
102
|
+
@spendback_refunds ||= SpendbackRefundsController.new @global_configuration
|
|
103
|
+
end
|
|
104
|
+
|
|
105
|
+
# Access to statements controller.
|
|
106
|
+
# @return [StatementsController] Returns the controller instance.
|
|
107
|
+
def statements
|
|
108
|
+
@statements ||= StatementsController.new @global_configuration
|
|
109
|
+
end
|
|
110
|
+
|
|
111
|
+
# Access to transfers controller.
|
|
112
|
+
# @return [TransfersController] Returns the controller instance.
|
|
113
|
+
def transfers
|
|
114
|
+
@transfers ||= TransfersController.new @global_configuration
|
|
115
|
+
end
|
|
116
|
+
|
|
117
|
+
# Access to users controller.
|
|
118
|
+
# @return [UsersController] Returns the controller instance.
|
|
119
|
+
def users
|
|
120
|
+
@users ||= UsersController.new @global_configuration
|
|
121
|
+
end
|
|
122
|
+
|
|
123
|
+
# Access to webhooks controller.
|
|
124
|
+
# @return [WebhooksController] Returns the controller instance.
|
|
125
|
+
def webhooks
|
|
126
|
+
@webhooks ||= WebhooksController.new @global_configuration
|
|
127
|
+
end
|
|
128
|
+
|
|
129
|
+
# Access to jobs controller.
|
|
130
|
+
# @return [JobsController] Returns the controller instance.
|
|
131
|
+
def jobs
|
|
132
|
+
@jobs ||= JobsController.new @global_configuration
|
|
133
|
+
end
|
|
134
|
+
|
|
135
|
+
# Access to invitations controller.
|
|
136
|
+
# @return [InvitationsController] Returns the controller instance.
|
|
137
|
+
def invitations
|
|
138
|
+
@invitations ||= InvitationsController.new @global_configuration
|
|
139
|
+
end
|
|
140
|
+
|
|
141
|
+
# Access to o_auth_authorization controller.
|
|
142
|
+
# @return [OAuthAuthorizationController] Returns the controller instance.
|
|
143
|
+
def o_auth_authorization
|
|
144
|
+
@o_auth_authorization ||= OAuthAuthorizationController.new @global_configuration
|
|
145
|
+
end
|
|
146
|
+
|
|
147
|
+
def initialize(
|
|
148
|
+
connection: nil, adapter: :net_http_persistent, timeout: 60,
|
|
149
|
+
max_retries: 0, retry_interval: 1, backoff_factor: 2,
|
|
150
|
+
retry_statuses: [408, 413, 429, 500, 502, 503, 504, 521, 522, 524],
|
|
151
|
+
retry_methods: %i[get put], http_callback: nil, proxy_settings: nil,
|
|
152
|
+
logging_configuration: nil, environment: Environment::SANDBOX,
|
|
153
|
+
sandbox_instance: SandboxInstance::SANDBOX,
|
|
154
|
+
uat_instance: UatInstance::UAT1, server_credentials: nil,
|
|
155
|
+
clientside_credentials: nil, x_my_pay_quicker_version: '2026.02.01',
|
|
156
|
+
config: nil
|
|
157
|
+
)
|
|
158
|
+
@config = if config.nil?
|
|
159
|
+
Configuration.new(
|
|
160
|
+
connection: connection, adapter: adapter, timeout: timeout,
|
|
161
|
+
max_retries: max_retries, retry_interval: retry_interval,
|
|
162
|
+
backoff_factor: backoff_factor,
|
|
163
|
+
retry_statuses: retry_statuses,
|
|
164
|
+
retry_methods: retry_methods, http_callback: http_callback,
|
|
165
|
+
proxy_settings: proxy_settings,
|
|
166
|
+
logging_configuration: logging_configuration,
|
|
167
|
+
environment: environment,
|
|
168
|
+
sandbox_instance: sandbox_instance,
|
|
169
|
+
uat_instance: uat_instance,
|
|
170
|
+
server_credentials: server_credentials,
|
|
171
|
+
clientside_credentials: clientside_credentials,
|
|
172
|
+
x_my_pay_quicker_version: x_my_pay_quicker_version
|
|
173
|
+
)
|
|
174
|
+
else
|
|
175
|
+
config
|
|
176
|
+
end
|
|
177
|
+
|
|
178
|
+
@global_configuration = GlobalConfiguration.new(client_configuration: @config)
|
|
179
|
+
.base_uri_executor(@config.method(:get_base_uri))
|
|
180
|
+
.global_errors(BaseController::GLOBAL_ERRORS)
|
|
181
|
+
.user_agent(BaseController.user_agent)
|
|
182
|
+
.global_header('X-MyPayQuicker-Version', @config.x_my_pay_quicker_version)
|
|
183
|
+
|
|
184
|
+
initialize_auth_managers(@global_configuration)
|
|
185
|
+
@global_configuration = @global_configuration.auth_managers(@auth_managers)
|
|
186
|
+
end
|
|
187
|
+
|
|
188
|
+
# Initializes the auth managers hash used for authenticating API calls.
|
|
189
|
+
# @param [GlobalConfiguration] global_config The global configuration of the SDK)
|
|
190
|
+
def initialize_auth_managers(global_config)
|
|
191
|
+
@auth_managers = {}
|
|
192
|
+
http_client_config = global_config.client_configuration
|
|
193
|
+
%w[server clientside].each { |auth| @auth_managers[auth] = nil }
|
|
194
|
+
@auth_managers['server'] = Server.new(http_client_config.server_credentials, global_config)
|
|
195
|
+
@auth_managers['clientside'] = Clientside.new(http_client_config.clientside_credentials)
|
|
196
|
+
end
|
|
197
|
+
|
|
198
|
+
# Creates a client directly from environment variables.
|
|
199
|
+
def self.from_env(**overrides)
|
|
200
|
+
default_config = Configuration.build_default_config_from_env
|
|
201
|
+
new_config = default_config.clone_with(**overrides)
|
|
202
|
+
new(config: new_config)
|
|
203
|
+
end
|
|
204
|
+
end
|
|
205
|
+
end
|