masspay_ruby_sdk 1.0.0 → 2.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 +4 -4
- data/CHANGELOG.md +16 -0
- data/CODE_OF_CONDUCT.md +43 -0
- data/CONTRIBUTING.md +48 -9
- data/LICENSE.md +21 -0
- data/README.md +141 -176
- data/assets/logo.webp +0 -0
- data/lib/masspay_ruby_sdk/api/account_service.rb +35 -0
- data/lib/masspay_ruby_sdk/api/attribute_service.rb +41 -0
- data/lib/masspay_ruby_sdk/api/card_service.rb +35 -0
- data/lib/masspay_ruby_sdk/api/catalog_service.rb +74 -0
- data/lib/masspay_ruby_sdk/api/kyc_service.rb +56 -0
- data/lib/masspay_ruby_sdk/api/load_service.rb +62 -0
- data/lib/masspay_ruby_sdk/api/payout_service.rb +61 -0
- data/lib/masspay_ruby_sdk/api/spend_back_service.rb +35 -0
- data/lib/masspay_ruby_sdk/api/subaccount_service.rb +47 -0
- data/lib/masspay_ruby_sdk/api/tax_service.rb +38 -0
- data/lib/masspay_ruby_sdk/api/user_service.rb +71 -0
- data/lib/masspay_ruby_sdk/api/wallet_service.rb +50 -0
- data/lib/masspay_ruby_sdk/client.rb +93 -0
- data/lib/masspay_ruby_sdk/constants.rb +20 -0
- data/lib/masspay_ruby_sdk/version.rb +6 -8
- data/lib/masspay_ruby_sdk.rb +23 -75
- data/masspay_ruby_sdk.gemspec +9 -13
- metadata +24 -120
- data/Rakefile +0 -10
- data/docs/AccountApi.md +0 -150
- data/docs/ApiResponse.md +0 -22
- data/docs/AttrTxn.md +0 -20
- data/docs/AttrValue.md +0 -20
- data/docs/AttrVelocityRequestInner.md +0 -20
- data/docs/AttributeApi.md +0 -168
- data/docs/AttrsRequirement.md +0 -36
- data/docs/AutopayResp.md +0 -22
- data/docs/AutopayRule.md +0 -20
- data/docs/AvailableBalanceTxnResp.md +0 -22
- data/docs/CardApi.md +0 -160
- data/docs/CatalogApi.md +0 -469
- data/docs/CompaniesResp.md +0 -18
- data/docs/Company.md +0 -26
- data/docs/Country.md +0 -22
- data/docs/Exception.md +0 -20
- data/docs/FoundUser.md +0 -24
- data/docs/GetAccountStatement200Response.md +0 -18
- data/docs/GetTransactionConfirmationDetails200Response.md +0 -18
- data/docs/GetUserAgreement200Response.md +0 -26
- data/docs/GetUserAgreementsNames200ResponseInner.md +0 -24
- data/docs/GetUserUserTokenKycAu10tix200Response.md +0 -18
- data/docs/GetUserUserTokenKycVeriff200Response.md +0 -18
- data/docs/GetWalletCardInfo200Response.md +0 -30
- data/docs/IDUpload.md +0 -20
- data/docs/KYCApi.md +0 -305
- data/docs/LoadApi.md +0 -621
- data/docs/LoadTxn.md +0 -32
- data/docs/LoadTxnResp.md +0 -20
- data/docs/Loads.md +0 -36
- data/docs/PayoutApi.md +0 -403
- data/docs/PayoutTxn.md +0 -36
- data/docs/PayoutTxnCommitResp.md +0 -24
- data/docs/PayoutTxnResp.md +0 -60
- data/docs/ResendBalanceNotification200Response.md +0 -18
- data/docs/Service.md +0 -22
- data/docs/ServicePayersInner.md +0 -38
- data/docs/ServicePayersInnerExchangeRateInner.md +0 -20
- data/docs/SpendBackApi.md +0 -161
- data/docs/SpendBackTxn.md +0 -28
- data/docs/SpendBackTxnResp.md +0 -22
- data/docs/SpendBacks.md +0 -34
- data/docs/StoredUser.md +0 -56
- data/docs/TaxApi.md +0 -81
- data/docs/TaxYearUserResp.md +0 -48
- data/docs/TxnHistoryResp.md +0 -52
- data/docs/UpdateUser.md +0 -52
- data/docs/User.md +0 -50
- data/docs/UserApi.md +0 -403
- data/docs/WalletApi.md +0 -463
- data/docs/WalletTxnResp.md +0 -34
- data/docs/logo.webp +0 -0
- data/lib/masspay_ruby_sdk/api/account_api.rb +0 -149
- data/lib/masspay_ruby_sdk/api/attribute_api.rb +0 -214
- data/lib/masspay_ruby_sdk/api/card_api.rb +0 -174
- data/lib/masspay_ruby_sdk/api/catalog_api.rb +0 -443
- data/lib/masspay_ruby_sdk/api/kyc_api.rb +0 -290
- data/lib/masspay_ruby_sdk/api/load_api.rb +0 -598
- data/lib/masspay_ruby_sdk/api/payout_api.rb +0 -397
- data/lib/masspay_ruby_sdk/api/spend_back_api.rb +0 -160
- data/lib/masspay_ruby_sdk/api/tax_api.rb +0 -82
- data/lib/masspay_ruby_sdk/api/user_api.rb +0 -418
- data/lib/masspay_ruby_sdk/api/wallet_api.rb +0 -461
- data/lib/masspay_ruby_sdk/api_client.rb +0 -391
- data/lib/masspay_ruby_sdk/api_error.rb +0 -57
- data/lib/masspay_ruby_sdk/configuration.rb +0 -315
- data/lib/masspay_ruby_sdk/models/api_response.rb +0 -236
- data/lib/masspay_ruby_sdk/models/attr_txn.rb +0 -235
- data/lib/masspay_ruby_sdk/models/attr_value.rb +0 -239
- data/lib/masspay_ruby_sdk/models/attr_velocity_request_inner.rb +0 -273
- data/lib/masspay_ruby_sdk/models/attrs_requirement.rb +0 -372
- data/lib/masspay_ruby_sdk/models/autopay_resp.rb +0 -256
- data/lib/masspay_ruby_sdk/models/autopay_rule.rb +0 -241
- data/lib/masspay_ruby_sdk/models/available_balance_txn_resp.rb +0 -254
- data/lib/masspay_ruby_sdk/models/companies_resp.rb +0 -225
- data/lib/masspay_ruby_sdk/models/company.rb +0 -285
- data/lib/masspay_ruby_sdk/models/country.rb +0 -296
- data/lib/masspay_ruby_sdk/models/exception.rb +0 -241
- data/lib/masspay_ruby_sdk/models/found_user.rb +0 -270
- data/lib/masspay_ruby_sdk/models/get_account_statement200_response.rb +0 -225
- data/lib/masspay_ruby_sdk/models/get_transaction_confirmation_details200_response.rb +0 -218
- data/lib/masspay_ruby_sdk/models/get_user_agreement200_response.rb +0 -280
- data/lib/masspay_ruby_sdk/models/get_user_agreements_names200_response_inner.rb +0 -270
- data/lib/masspay_ruby_sdk/models/get_user_user_token_kyc_au10tix200_response.rb +0 -224
- data/lib/masspay_ruby_sdk/models/get_user_user_token_kyc_veriff200_response.rb +0 -224
- data/lib/masspay_ruby_sdk/models/get_wallet_card_info200_response.rb +0 -460
- data/lib/masspay_ruby_sdk/models/id_upload.rb +0 -273
- data/lib/masspay_ruby_sdk/models/load_txn.rb +0 -321
- data/lib/masspay_ruby_sdk/models/load_txn_resp.rb +0 -273
- data/lib/masspay_ruby_sdk/models/loads.rb +0 -388
- data/lib/masspay_ruby_sdk/models/payout_txn.rb +0 -328
- data/lib/masspay_ruby_sdk/models/payout_txn_commit_resp.rb +0 -293
- data/lib/masspay_ruby_sdk/models/payout_txn_resp.rb +0 -613
- data/lib/masspay_ruby_sdk/models/resend_balance_notification200_response.rb +0 -225
- data/lib/masspay_ruby_sdk/models/service.rb +0 -318
- data/lib/masspay_ruby_sdk/models/service_payers_inner.rb +0 -373
- data/lib/masspay_ruby_sdk/models/service_payers_inner_exchange_rate_inner.rb +0 -239
- data/lib/masspay_ruby_sdk/models/spend_back_txn.rb +0 -325
- data/lib/masspay_ruby_sdk/models/spend_back_txn_resp.rb +0 -307
- data/lib/masspay_ruby_sdk/models/spend_backs.rb +0 -340
- data/lib/masspay_ruby_sdk/models/stored_user.rb +0 -500
- data/lib/masspay_ruby_sdk/models/tax_year_user_resp.rb +0 -388
- data/lib/masspay_ruby_sdk/models/txn_history_resp.rb +0 -571
- data/lib/masspay_ruby_sdk/models/update_user.rb +0 -490
- data/lib/masspay_ruby_sdk/models/user.rb +0 -423
- data/lib/masspay_ruby_sdk/models/wallet_txn_resp.rb +0 -375
- data/spec/api_client_spec.rb +0 -227
- data/spec/configuration_spec.rb +0 -41
- data/spec/spec_helper.rb +0 -110
@@ -1,443 +0,0 @@
|
|
1
|
-
=begin
|
2
|
-
#MassPay API
|
3
|
-
|
4
|
-
#MassPay API
|
5
|
-
|
6
|
-
The version of the OpenAPI document: 0.1.4
|
7
|
-
Contact: support@masspay.io
|
8
|
-
Generated by: MassPay Inc.
|
9
|
-
OpenAPI Generator version: 6.5.0
|
10
|
-
=end
|
11
|
-
|
12
|
-
require 'cgi'
|
13
|
-
|
14
|
-
module MassPayRubySdk
|
15
|
-
class CatalogApi
|
16
|
-
attr_accessor :api_client
|
17
|
-
|
18
|
-
def initialize(api_client = ApiClient.default)
|
19
|
-
@api_client = api_client
|
20
|
-
end
|
21
|
-
# Gets a list of Companies and their cheapest service offerings for the given country code.
|
22
|
-
# This **GET** endpoint is used to retrieve a list of companies and their cheapest service offerings for a specific country. <br> You can use this endpoint to obtain information about available services and pricing for each respected company in the provided country. If two providers offer similar services, only the cheapest option will be displayed. <br> To use this endpoint, you need to provide the `country_code` as a required parameter in the URL Path. <br> The response will include a JSON array containing details for each company, including the company name, cheapest service offerings, and pricing.
|
23
|
-
# @param country_code [String] Country code searching services for. 3 letters [ISO_3166](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-3) code\"
|
24
|
-
# @param [Hash] opts the optional parameters
|
25
|
-
# @option opts [String] :amount Returns the results fee based on the given amount, defaults to $200 (default to '200')
|
26
|
-
# @option opts [Float] :limit Limit amount for transaction amount + fee. If fee + amount are higher than the limit, the output will automatically adjust to maximize the possible amount sent
|
27
|
-
# @option opts [String] :idempotency_key Unique key to prevent duplicate processing
|
28
|
-
# @option opts [String] :wallet_token Token representing the wallet used. If provided, the results would be custom-tailored to this user.
|
29
|
-
# @option opts [Boolean] :include_payer_logos Whether to include the payers logo in base64 format. (default to false)
|
30
|
-
# @option opts [String] :user_token Token representing the user for which we fetch the catalog. If provided, the results would be custom-tailored to this user. Not necessary if wallet_token is provided
|
31
|
-
# @option opts [String] :source_currency Required if amount is provided. The currency associated with the amount
|
32
|
-
# @return [CompaniesResp]
|
33
|
-
def get_cheapest_country_services(country_code, opts = {})
|
34
|
-
data, _status_code, _headers = get_cheapest_country_services_with_http_info(country_code, opts)
|
35
|
-
data
|
36
|
-
end
|
37
|
-
|
38
|
-
# Gets a list of Companies and their cheapest service offerings for the given country code.
|
39
|
-
# This **GET** endpoint is used to retrieve a list of companies and their cheapest service offerings for a specific country. <br> You can use this endpoint to obtain information about available services and pricing for each respected company in the provided country. If two providers offer similar services, only the cheapest option will be displayed. <br> To use this endpoint, you need to provide the `country_code` as a required parameter in the URL Path. <br> The response will include a JSON array containing details for each company, including the company name, cheapest service offerings, and pricing.
|
40
|
-
# @param country_code [String] Country code searching services for. 3 letters [ISO_3166](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-3) code\"
|
41
|
-
# @param [Hash] opts the optional parameters
|
42
|
-
# @option opts [String] :amount Returns the results fee based on the given amount, defaults to $200 (default to '200')
|
43
|
-
# @option opts [Float] :limit Limit amount for transaction amount + fee. If fee + amount are higher than the limit, the output will automatically adjust to maximize the possible amount sent
|
44
|
-
# @option opts [String] :idempotency_key Unique key to prevent duplicate processing
|
45
|
-
# @option opts [String] :wallet_token Token representing the wallet used. If provided, the results would be custom-tailored to this user.
|
46
|
-
# @option opts [Boolean] :include_payer_logos Whether to include the payers logo in base64 format. (default to false)
|
47
|
-
# @option opts [String] :user_token Token representing the user for which we fetch the catalog. If provided, the results would be custom-tailored to this user. Not necessary if wallet_token is provided
|
48
|
-
# @option opts [String] :source_currency Required if amount is provided. The currency associated with the amount
|
49
|
-
# @return [Array<(CompaniesResp, Integer, Hash)>] CompaniesResp data, response status code and response headers
|
50
|
-
def get_cheapest_country_services_with_http_info(country_code, opts = {})
|
51
|
-
if @api_client.config.debugging
|
52
|
-
@api_client.config.logger.debug 'Calling API: CatalogApi.get_cheapest_country_services ...'
|
53
|
-
end
|
54
|
-
# verify the required parameter 'country_code' is set
|
55
|
-
if @api_client.config.client_side_validation && country_code.nil?
|
56
|
-
fail ArgumentError, "Missing the required parameter 'country_code' when calling CatalogApi.get_cheapest_country_services"
|
57
|
-
end
|
58
|
-
pattern = Regexp.new(/^[\d.]+$/)
|
59
|
-
if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] !~ pattern
|
60
|
-
fail ArgumentError, "invalid value for 'opts[:\"limit\"]' when calling CatalogApi.get_cheapest_country_services, must conform to the pattern #{pattern}."
|
61
|
-
end
|
62
|
-
|
63
|
-
# resource path
|
64
|
-
local_var_path = '/country/{country_code}/cheapest'.sub('{' + 'country_code' + '}', CGI.escape(country_code.to_s))
|
65
|
-
|
66
|
-
# query parameters
|
67
|
-
query_params = opts[:query_params] || {}
|
68
|
-
query_params[:'amount'] = opts[:'amount'] if !opts[:'amount'].nil?
|
69
|
-
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
70
|
-
query_params[:'wallet_token'] = opts[:'wallet_token'] if !opts[:'wallet_token'].nil?
|
71
|
-
query_params[:'include_payer_logos'] = opts[:'include_payer_logos'] if !opts[:'include_payer_logos'].nil?
|
72
|
-
query_params[:'user_token'] = opts[:'user_token'] if !opts[:'user_token'].nil?
|
73
|
-
query_params[:'source_currency'] = opts[:'source_currency'] if !opts[:'source_currency'].nil?
|
74
|
-
|
75
|
-
# header parameters
|
76
|
-
header_params = opts[:header_params] || {}
|
77
|
-
# HTTP header 'Accept' (if needed)
|
78
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
79
|
-
header_params[:'Idempotency-Key'] = opts[:'idempotency_key'] if !opts[:'idempotency_key'].nil?
|
80
|
-
|
81
|
-
# form parameters
|
82
|
-
form_params = opts[:form_params] || {}
|
83
|
-
|
84
|
-
# http body (model)
|
85
|
-
post_body = opts[:debug_body]
|
86
|
-
|
87
|
-
# return_type
|
88
|
-
return_type = opts[:debug_return_type] || 'CompaniesResp'
|
89
|
-
|
90
|
-
# auth_names
|
91
|
-
auth_names = opts[:debug_auth_names] || ['AUTHORIZER_NAME']
|
92
|
-
|
93
|
-
new_options = opts.merge(
|
94
|
-
:operation => :"CatalogApi.get_cheapest_country_services",
|
95
|
-
:header_params => header_params,
|
96
|
-
:query_params => query_params,
|
97
|
-
:form_params => form_params,
|
98
|
-
:body => post_body,
|
99
|
-
:auth_names => auth_names,
|
100
|
-
:return_type => return_type
|
101
|
-
)
|
102
|
-
|
103
|
-
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
104
|
-
if @api_client.config.debugging
|
105
|
-
@api_client.config.logger.debug "API called: CatalogApi#get_cheapest_country_services\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
106
|
-
end
|
107
|
-
return data, status_code, headers
|
108
|
-
end
|
109
|
-
|
110
|
-
# Gets a list of countries where services offered.
|
111
|
-
# This **GET** endpoint is used to retrieve a list of all currently available countries of service. <br> You can use this endpoint to obtain a list of countries where MassPay services are offered. <br> There are no required parameters for this endpoint. <br> The response will include a JSON array containing details for each country, including the country code, name, and `three_letter_code`.
|
112
|
-
# @param [Hash] opts the optional parameters
|
113
|
-
# @return [Array<Country>]
|
114
|
-
def get_country_list(opts = {})
|
115
|
-
data, _status_code, _headers = get_country_list_with_http_info(opts)
|
116
|
-
data
|
117
|
-
end
|
118
|
-
|
119
|
-
# Gets a list of countries where services offered.
|
120
|
-
# This **GET** endpoint is used to retrieve a list of all currently available countries of service. <br> You can use this endpoint to obtain a list of countries where MassPay services are offered. <br> There are no required parameters for this endpoint. <br> The response will include a JSON array containing details for each country, including the country code, name, and `three_letter_code`.
|
121
|
-
# @param [Hash] opts the optional parameters
|
122
|
-
# @return [Array<(Array<Country>, Integer, Hash)>] Array<Country> data, response status code and response headers
|
123
|
-
def get_country_list_with_http_info(opts = {})
|
124
|
-
if @api_client.config.debugging
|
125
|
-
@api_client.config.logger.debug 'Calling API: CatalogApi.get_country_list ...'
|
126
|
-
end
|
127
|
-
# resource path
|
128
|
-
local_var_path = '/country/list'
|
129
|
-
|
130
|
-
# query parameters
|
131
|
-
query_params = opts[:query_params] || {}
|
132
|
-
|
133
|
-
# header parameters
|
134
|
-
header_params = opts[:header_params] || {}
|
135
|
-
# HTTP header 'Accept' (if needed)
|
136
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
137
|
-
|
138
|
-
# form parameters
|
139
|
-
form_params = opts[:form_params] || {}
|
140
|
-
|
141
|
-
# http body (model)
|
142
|
-
post_body = opts[:debug_body]
|
143
|
-
|
144
|
-
# return_type
|
145
|
-
return_type = opts[:debug_return_type] || 'Array<Country>'
|
146
|
-
|
147
|
-
# auth_names
|
148
|
-
auth_names = opts[:debug_auth_names] || ['AUTHORIZER_NAME']
|
149
|
-
|
150
|
-
new_options = opts.merge(
|
151
|
-
:operation => :"CatalogApi.get_country_list",
|
152
|
-
:header_params => header_params,
|
153
|
-
:query_params => query_params,
|
154
|
-
:form_params => form_params,
|
155
|
-
:body => post_body,
|
156
|
-
:auth_names => auth_names,
|
157
|
-
:return_type => return_type
|
158
|
-
)
|
159
|
-
|
160
|
-
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
161
|
-
if @api_client.config.debugging
|
162
|
-
@api_client.config.logger.debug "API called: CatalogApi#get_country_list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
163
|
-
end
|
164
|
-
return data, status_code, headers
|
165
|
-
end
|
166
|
-
|
167
|
-
# Gets a list of Companies and their service offerings for the given country code.
|
168
|
-
# This **GET** endpoint is used to retrieve a list of companies and their service offerings for a specific country. <br> You can use this endpoint to obtain information about available services and pricing for each respected company in the provided country. <br> To use this endpoint, you need to provide the `country_code` in the URL Path. <br> The response will include a JSON array containing details for each company, including the company name, service offerings, and pricing.
|
169
|
-
# @param country_code [String] Country code searching services for. 3 letters [ISO_3166](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-3) code\"
|
170
|
-
# @param [Hash] opts the optional parameters
|
171
|
-
# @option opts [String] :amount Returns the results fee based on the given amount, defaults to $200 (default to '200')
|
172
|
-
# @option opts [Float] :limit Limit amount for transaction amount + fee. If fee + amount are higher than the limit, the output will automatically adjust to maximize the possible amount sent
|
173
|
-
# @option opts [String] :idempotency_key Unique key to prevent duplicate processing
|
174
|
-
# @option opts [String] :wallet_token Token representing the wallet used. If provided, the results would be custom-tailored to this user. Not necessary if user_token is provided
|
175
|
-
# @option opts [Boolean] :include_payer_logos Whether to include the payers logo in base64 format. (default to false)
|
176
|
-
# @option opts [String] :user_token Token representing the user for which we fetch the catalog. If provided, the results would be custom-tailored to this user. Not necessary if wallet_token is provided
|
177
|
-
# @option opts [String] :source_currency Required if amount is provided. The currency associated with the amount
|
178
|
-
# @return [CompaniesResp]
|
179
|
-
def get_country_services(country_code, opts = {})
|
180
|
-
data, _status_code, _headers = get_country_services_with_http_info(country_code, opts)
|
181
|
-
data
|
182
|
-
end
|
183
|
-
|
184
|
-
# Gets a list of Companies and their service offerings for the given country code.
|
185
|
-
# This **GET** endpoint is used to retrieve a list of companies and their service offerings for a specific country. <br> You can use this endpoint to obtain information about available services and pricing for each respected company in the provided country. <br> To use this endpoint, you need to provide the `country_code` in the URL Path. <br> The response will include a JSON array containing details for each company, including the company name, service offerings, and pricing.
|
186
|
-
# @param country_code [String] Country code searching services for. 3 letters [ISO_3166](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-3) code\"
|
187
|
-
# @param [Hash] opts the optional parameters
|
188
|
-
# @option opts [String] :amount Returns the results fee based on the given amount, defaults to $200 (default to '200')
|
189
|
-
# @option opts [Float] :limit Limit amount for transaction amount + fee. If fee + amount are higher than the limit, the output will automatically adjust to maximize the possible amount sent
|
190
|
-
# @option opts [String] :idempotency_key Unique key to prevent duplicate processing
|
191
|
-
# @option opts [String] :wallet_token Token representing the wallet used. If provided, the results would be custom-tailored to this user. Not necessary if user_token is provided
|
192
|
-
# @option opts [Boolean] :include_payer_logos Whether to include the payers logo in base64 format. (default to false)
|
193
|
-
# @option opts [String] :user_token Token representing the user for which we fetch the catalog. If provided, the results would be custom-tailored to this user. Not necessary if wallet_token is provided
|
194
|
-
# @option opts [String] :source_currency Required if amount is provided. The currency associated with the amount
|
195
|
-
# @return [Array<(CompaniesResp, Integer, Hash)>] CompaniesResp data, response status code and response headers
|
196
|
-
def get_country_services_with_http_info(country_code, opts = {})
|
197
|
-
if @api_client.config.debugging
|
198
|
-
@api_client.config.logger.debug 'Calling API: CatalogApi.get_country_services ...'
|
199
|
-
end
|
200
|
-
# verify the required parameter 'country_code' is set
|
201
|
-
if @api_client.config.client_side_validation && country_code.nil?
|
202
|
-
fail ArgumentError, "Missing the required parameter 'country_code' when calling CatalogApi.get_country_services"
|
203
|
-
end
|
204
|
-
pattern = Regexp.new(/^[\d.]+$/)
|
205
|
-
if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] !~ pattern
|
206
|
-
fail ArgumentError, "invalid value for 'opts[:\"limit\"]' when calling CatalogApi.get_country_services, must conform to the pattern #{pattern}."
|
207
|
-
end
|
208
|
-
|
209
|
-
# resource path
|
210
|
-
local_var_path = '/country/{country_code}'.sub('{' + 'country_code' + '}', CGI.escape(country_code.to_s))
|
211
|
-
|
212
|
-
# query parameters
|
213
|
-
query_params = opts[:query_params] || {}
|
214
|
-
query_params[:'amount'] = opts[:'amount'] if !opts[:'amount'].nil?
|
215
|
-
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
216
|
-
query_params[:'wallet_token'] = opts[:'wallet_token'] if !opts[:'wallet_token'].nil?
|
217
|
-
query_params[:'include_payer_logos'] = opts[:'include_payer_logos'] if !opts[:'include_payer_logos'].nil?
|
218
|
-
query_params[:'user_token'] = opts[:'user_token'] if !opts[:'user_token'].nil?
|
219
|
-
query_params[:'source_currency'] = opts[:'source_currency'] if !opts[:'source_currency'].nil?
|
220
|
-
|
221
|
-
# header parameters
|
222
|
-
header_params = opts[:header_params] || {}
|
223
|
-
# HTTP header 'Accept' (if needed)
|
224
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
225
|
-
header_params[:'Idempotency-Key'] = opts[:'idempotency_key'] if !opts[:'idempotency_key'].nil?
|
226
|
-
|
227
|
-
# form parameters
|
228
|
-
form_params = opts[:form_params] || {}
|
229
|
-
|
230
|
-
# http body (model)
|
231
|
-
post_body = opts[:debug_body]
|
232
|
-
|
233
|
-
# return_type
|
234
|
-
return_type = opts[:debug_return_type] || 'CompaniesResp'
|
235
|
-
|
236
|
-
# auth_names
|
237
|
-
auth_names = opts[:debug_auth_names] || ['AUTHORIZER_NAME']
|
238
|
-
|
239
|
-
new_options = opts.merge(
|
240
|
-
:operation => :"CatalogApi.get_country_services",
|
241
|
-
:header_params => header_params,
|
242
|
-
:query_params => query_params,
|
243
|
-
:form_params => form_params,
|
244
|
-
:body => post_body,
|
245
|
-
:auth_names => auth_names,
|
246
|
-
:return_type => return_type
|
247
|
-
)
|
248
|
-
|
249
|
-
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
250
|
-
if @api_client.config.debugging
|
251
|
-
@api_client.config.logger.debug "API called: CatalogApi#get_country_services\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
252
|
-
end
|
253
|
-
return data, status_code, headers
|
254
|
-
end
|
255
|
-
|
256
|
-
# Returns list of alternative service to a provided service
|
257
|
-
# This **GET** endpoint is used to retrieve a list of alternative services to a provided service. <br> You can use this endpoint to obtain information about other available services and pricing offered by different companies for a particular destination. <br> To use this endpoint, you need to provide the `destination_token` as a required parameter in the URL Path. <br> The response will include a JSON array containing details for each company, including the company name, available alternative services, and pricing.
|
258
|
-
# @param destination_token [String] Destination token
|
259
|
-
# @param [Hash] opts the optional parameters
|
260
|
-
# @option opts [String] :idempotency_key Unique key to prevent duplicate processing
|
261
|
-
# @return [Service]
|
262
|
-
def get_destination_token_alternatives(destination_token, opts = {})
|
263
|
-
data, _status_code, _headers = get_destination_token_alternatives_with_http_info(destination_token, opts)
|
264
|
-
data
|
265
|
-
end
|
266
|
-
|
267
|
-
# Returns list of alternative service to a provided service
|
268
|
-
# This **GET** endpoint is used to retrieve a list of alternative services to a provided service. <br> You can use this endpoint to obtain information about other available services and pricing offered by different companies for a particular destination. <br> To use this endpoint, you need to provide the `destination_token` as a required parameter in the URL Path. <br> The response will include a JSON array containing details for each company, including the company name, available alternative services, and pricing.
|
269
|
-
# @param destination_token [String] Destination token
|
270
|
-
# @param [Hash] opts the optional parameters
|
271
|
-
# @option opts [String] :idempotency_key Unique key to prevent duplicate processing
|
272
|
-
# @return [Array<(Service, Integer, Hash)>] Service data, response status code and response headers
|
273
|
-
def get_destination_token_alternatives_with_http_info(destination_token, opts = {})
|
274
|
-
if @api_client.config.debugging
|
275
|
-
@api_client.config.logger.debug 'Calling API: CatalogApi.get_destination_token_alternatives ...'
|
276
|
-
end
|
277
|
-
# verify the required parameter 'destination_token' is set
|
278
|
-
if @api_client.config.client_side_validation && destination_token.nil?
|
279
|
-
fail ArgumentError, "Missing the required parameter 'destination_token' when calling CatalogApi.get_destination_token_alternatives"
|
280
|
-
end
|
281
|
-
# resource path
|
282
|
-
local_var_path = '/service/{destination_token}/alternatives'.sub('{' + 'destination_token' + '}', CGI.escape(destination_token.to_s))
|
283
|
-
|
284
|
-
# query parameters
|
285
|
-
query_params = opts[:query_params] || {}
|
286
|
-
|
287
|
-
# header parameters
|
288
|
-
header_params = opts[:header_params] || {}
|
289
|
-
# HTTP header 'Accept' (if needed)
|
290
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
291
|
-
header_params[:'Idempotency-Key'] = opts[:'idempotency_key'] if !opts[:'idempotency_key'].nil?
|
292
|
-
|
293
|
-
# form parameters
|
294
|
-
form_params = opts[:form_params] || {}
|
295
|
-
|
296
|
-
# http body (model)
|
297
|
-
post_body = opts[:debug_body]
|
298
|
-
|
299
|
-
# return_type
|
300
|
-
return_type = opts[:debug_return_type] || 'Service'
|
301
|
-
|
302
|
-
# auth_names
|
303
|
-
auth_names = opts[:debug_auth_names] || ['AUTHORIZER_NAME']
|
304
|
-
|
305
|
-
new_options = opts.merge(
|
306
|
-
:operation => :"CatalogApi.get_destination_token_alternatives",
|
307
|
-
:header_params => header_params,
|
308
|
-
:query_params => query_params,
|
309
|
-
:form_params => form_params,
|
310
|
-
:body => post_body,
|
311
|
-
:auth_names => auth_names,
|
312
|
-
:return_type => return_type
|
313
|
-
)
|
314
|
-
|
315
|
-
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
316
|
-
if @api_client.config.debugging
|
317
|
-
@api_client.config.logger.debug "API called: CatalogApi#get_destination_token_alternatives\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
318
|
-
end
|
319
|
-
return data, status_code, headers
|
320
|
-
end
|
321
|
-
|
322
|
-
# Get User Agreement
|
323
|
-
# This **GET** endpoint is used to retrieve the user agreement for payout services. <br> You can use this endpoint to obtain information about the available user agreements for payout services offered by MassPay. <br> To use this endpoint, you need to provide the `ID` representing the user agreement as a required parameter in the URL Path. <br> The response will include the user agreement details.
|
324
|
-
# @param id [Integer] Id representing user agreement (retrieved from OPTIONS call)
|
325
|
-
# @param [Hash] opts the optional parameters
|
326
|
-
# @return [GetUserAgreement200Response]
|
327
|
-
def get_user_agreement(id, opts = {})
|
328
|
-
data, _status_code, _headers = get_user_agreement_with_http_info(id, opts)
|
329
|
-
data
|
330
|
-
end
|
331
|
-
|
332
|
-
# Get User Agreement
|
333
|
-
# This **GET** endpoint is used to retrieve the user agreement for payout services. <br> You can use this endpoint to obtain information about the available user agreements for payout services offered by MassPay. <br> To use this endpoint, you need to provide the `ID` representing the user agreement as a required parameter in the URL Path. <br> The response will include the user agreement details.
|
334
|
-
# @param id [Integer] Id representing user agreement (retrieved from OPTIONS call)
|
335
|
-
# @param [Hash] opts the optional parameters
|
336
|
-
# @return [Array<(GetUserAgreement200Response, Integer, Hash)>] GetUserAgreement200Response data, response status code and response headers
|
337
|
-
def get_user_agreement_with_http_info(id, opts = {})
|
338
|
-
if @api_client.config.debugging
|
339
|
-
@api_client.config.logger.debug 'Calling API: CatalogApi.get_user_agreement ...'
|
340
|
-
end
|
341
|
-
# verify the required parameter 'id' is set
|
342
|
-
if @api_client.config.client_side_validation && id.nil?
|
343
|
-
fail ArgumentError, "Missing the required parameter 'id' when calling CatalogApi.get_user_agreement"
|
344
|
-
end
|
345
|
-
# resource path
|
346
|
-
local_var_path = '/user-agreements'
|
347
|
-
|
348
|
-
# query parameters
|
349
|
-
query_params = opts[:query_params] || {}
|
350
|
-
query_params[:'id'] = id
|
351
|
-
|
352
|
-
# header parameters
|
353
|
-
header_params = opts[:header_params] || {}
|
354
|
-
# HTTP header 'Accept' (if needed)
|
355
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
356
|
-
|
357
|
-
# form parameters
|
358
|
-
form_params = opts[:form_params] || {}
|
359
|
-
|
360
|
-
# http body (model)
|
361
|
-
post_body = opts[:debug_body]
|
362
|
-
|
363
|
-
# return_type
|
364
|
-
return_type = opts[:debug_return_type] || 'GetUserAgreement200Response'
|
365
|
-
|
366
|
-
# auth_names
|
367
|
-
auth_names = opts[:debug_auth_names] || ['AUTHORIZER_NAME']
|
368
|
-
|
369
|
-
new_options = opts.merge(
|
370
|
-
:operation => :"CatalogApi.get_user_agreement",
|
371
|
-
:header_params => header_params,
|
372
|
-
:query_params => query_params,
|
373
|
-
:form_params => form_params,
|
374
|
-
:body => post_body,
|
375
|
-
:auth_names => auth_names,
|
376
|
-
:return_type => return_type
|
377
|
-
)
|
378
|
-
|
379
|
-
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
380
|
-
if @api_client.config.debugging
|
381
|
-
@api_client.config.logger.debug "API called: CatalogApi#get_user_agreement\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
382
|
-
end
|
383
|
-
return data, status_code, headers
|
384
|
-
end
|
385
|
-
|
386
|
-
# Get Available User Agreements
|
387
|
-
# This OPTIONS endpoint is used to retrieve a list of available user agreements for payout services offered by MassPay without the content. <br> You can use this endpoint to obtain the names of available user agreements. <br> There are no required parameters needed to use this endpoint. <br> The response will include a list of user agreement names
|
388
|
-
# @param [Hash] opts the optional parameters
|
389
|
-
# @return [Array<GetUserAgreementsNames200ResponseInner>]
|
390
|
-
def get_user_agreements_names(opts = {})
|
391
|
-
data, _status_code, _headers = get_user_agreements_names_with_http_info(opts)
|
392
|
-
data
|
393
|
-
end
|
394
|
-
|
395
|
-
# Get Available User Agreements
|
396
|
-
# This OPTIONS endpoint is used to retrieve a list of available user agreements for payout services offered by MassPay without the content. <br> You can use this endpoint to obtain the names of available user agreements. <br> There are no required parameters needed to use this endpoint. <br> The response will include a list of user agreement names
|
397
|
-
# @param [Hash] opts the optional parameters
|
398
|
-
# @return [Array<(Array<GetUserAgreementsNames200ResponseInner>, Integer, Hash)>] Array<GetUserAgreementsNames200ResponseInner> data, response status code and response headers
|
399
|
-
def get_user_agreements_names_with_http_info(opts = {})
|
400
|
-
if @api_client.config.debugging
|
401
|
-
@api_client.config.logger.debug 'Calling API: CatalogApi.get_user_agreements_names ...'
|
402
|
-
end
|
403
|
-
# resource path
|
404
|
-
local_var_path = '/user-agreements'
|
405
|
-
|
406
|
-
# query parameters
|
407
|
-
query_params = opts[:query_params] || {}
|
408
|
-
|
409
|
-
# header parameters
|
410
|
-
header_params = opts[:header_params] || {}
|
411
|
-
# HTTP header 'Accept' (if needed)
|
412
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
413
|
-
|
414
|
-
# form parameters
|
415
|
-
form_params = opts[:form_params] || {}
|
416
|
-
|
417
|
-
# http body (model)
|
418
|
-
post_body = opts[:debug_body]
|
419
|
-
|
420
|
-
# return_type
|
421
|
-
return_type = opts[:debug_return_type] || 'Array<GetUserAgreementsNames200ResponseInner>'
|
422
|
-
|
423
|
-
# auth_names
|
424
|
-
auth_names = opts[:debug_auth_names] || ['AUTHORIZER_NAME']
|
425
|
-
|
426
|
-
new_options = opts.merge(
|
427
|
-
:operation => :"CatalogApi.get_user_agreements_names",
|
428
|
-
:header_params => header_params,
|
429
|
-
:query_params => query_params,
|
430
|
-
:form_params => form_params,
|
431
|
-
:body => post_body,
|
432
|
-
:auth_names => auth_names,
|
433
|
-
:return_type => return_type
|
434
|
-
)
|
435
|
-
|
436
|
-
data, status_code, headers = @api_client.call_api(:OPTIONS, local_var_path, new_options)
|
437
|
-
if @api_client.config.debugging
|
438
|
-
@api_client.config.logger.debug "API called: CatalogApi#get_user_agreements_names\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
439
|
-
end
|
440
|
-
return data, status_code, headers
|
441
|
-
end
|
442
|
-
end
|
443
|
-
end
|