masspay_ruby_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.
Files changed (119) hide show
  1. checksums.yaml +7 -0
  2. data/CHANGELOG.md +8 -0
  3. data/CONTRIBUTING.md +13 -0
  4. data/Gemfile +9 -0
  5. data/README.md +197 -0
  6. data/Rakefile +10 -0
  7. data/docs/AccountApi.md +150 -0
  8. data/docs/ApiResponse.md +22 -0
  9. data/docs/AttrTxn.md +20 -0
  10. data/docs/AttrValue.md +20 -0
  11. data/docs/AttrVelocityRequestInner.md +20 -0
  12. data/docs/AttributeApi.md +168 -0
  13. data/docs/AttrsRequirement.md +36 -0
  14. data/docs/AutopayResp.md +22 -0
  15. data/docs/AutopayRule.md +20 -0
  16. data/docs/AvailableBalanceTxnResp.md +22 -0
  17. data/docs/CardApi.md +160 -0
  18. data/docs/CatalogApi.md +469 -0
  19. data/docs/CompaniesResp.md +18 -0
  20. data/docs/Company.md +26 -0
  21. data/docs/Country.md +22 -0
  22. data/docs/Exception.md +20 -0
  23. data/docs/FoundUser.md +24 -0
  24. data/docs/GetAccountStatement200Response.md +18 -0
  25. data/docs/GetTransactionConfirmationDetails200Response.md +18 -0
  26. data/docs/GetUserAgreement200Response.md +26 -0
  27. data/docs/GetUserAgreementsNames200ResponseInner.md +24 -0
  28. data/docs/GetUserUserTokenKycAu10tix200Response.md +18 -0
  29. data/docs/GetUserUserTokenKycVeriff200Response.md +18 -0
  30. data/docs/GetWalletCardInfo200Response.md +30 -0
  31. data/docs/IDUpload.md +20 -0
  32. data/docs/KYCApi.md +305 -0
  33. data/docs/LoadApi.md +621 -0
  34. data/docs/LoadTxn.md +32 -0
  35. data/docs/LoadTxnResp.md +20 -0
  36. data/docs/Loads.md +36 -0
  37. data/docs/PayoutApi.md +403 -0
  38. data/docs/PayoutTxn.md +36 -0
  39. data/docs/PayoutTxnCommitResp.md +24 -0
  40. data/docs/PayoutTxnResp.md +60 -0
  41. data/docs/ResendBalanceNotification200Response.md +18 -0
  42. data/docs/Service.md +22 -0
  43. data/docs/ServicePayersInner.md +38 -0
  44. data/docs/ServicePayersInnerExchangeRateInner.md +20 -0
  45. data/docs/SpendBackApi.md +161 -0
  46. data/docs/SpendBackTxn.md +28 -0
  47. data/docs/SpendBackTxnResp.md +22 -0
  48. data/docs/SpendBacks.md +34 -0
  49. data/docs/StoredUser.md +56 -0
  50. data/docs/TaxApi.md +81 -0
  51. data/docs/TaxYearUserResp.md +48 -0
  52. data/docs/TxnHistoryResp.md +52 -0
  53. data/docs/UpdateUser.md +52 -0
  54. data/docs/User.md +50 -0
  55. data/docs/UserApi.md +403 -0
  56. data/docs/WalletApi.md +463 -0
  57. data/docs/WalletTxnResp.md +34 -0
  58. data/docs/logo.webp +0 -0
  59. data/lib/masspay_ruby_sdk/api/account_api.rb +149 -0
  60. data/lib/masspay_ruby_sdk/api/attribute_api.rb +214 -0
  61. data/lib/masspay_ruby_sdk/api/card_api.rb +174 -0
  62. data/lib/masspay_ruby_sdk/api/catalog_api.rb +443 -0
  63. data/lib/masspay_ruby_sdk/api/kyc_api.rb +290 -0
  64. data/lib/masspay_ruby_sdk/api/load_api.rb +598 -0
  65. data/lib/masspay_ruby_sdk/api/payout_api.rb +397 -0
  66. data/lib/masspay_ruby_sdk/api/spend_back_api.rb +160 -0
  67. data/lib/masspay_ruby_sdk/api/tax_api.rb +82 -0
  68. data/lib/masspay_ruby_sdk/api/user_api.rb +418 -0
  69. data/lib/masspay_ruby_sdk/api/wallet_api.rb +461 -0
  70. data/lib/masspay_ruby_sdk/api_client.rb +391 -0
  71. data/lib/masspay_ruby_sdk/api_error.rb +57 -0
  72. data/lib/masspay_ruby_sdk/configuration.rb +315 -0
  73. data/lib/masspay_ruby_sdk/models/api_response.rb +236 -0
  74. data/lib/masspay_ruby_sdk/models/attr_txn.rb +235 -0
  75. data/lib/masspay_ruby_sdk/models/attr_value.rb +239 -0
  76. data/lib/masspay_ruby_sdk/models/attr_velocity_request_inner.rb +273 -0
  77. data/lib/masspay_ruby_sdk/models/attrs_requirement.rb +372 -0
  78. data/lib/masspay_ruby_sdk/models/autopay_resp.rb +256 -0
  79. data/lib/masspay_ruby_sdk/models/autopay_rule.rb +241 -0
  80. data/lib/masspay_ruby_sdk/models/available_balance_txn_resp.rb +254 -0
  81. data/lib/masspay_ruby_sdk/models/companies_resp.rb +225 -0
  82. data/lib/masspay_ruby_sdk/models/company.rb +285 -0
  83. data/lib/masspay_ruby_sdk/models/country.rb +296 -0
  84. data/lib/masspay_ruby_sdk/models/exception.rb +241 -0
  85. data/lib/masspay_ruby_sdk/models/found_user.rb +270 -0
  86. data/lib/masspay_ruby_sdk/models/get_account_statement200_response.rb +225 -0
  87. data/lib/masspay_ruby_sdk/models/get_transaction_confirmation_details200_response.rb +218 -0
  88. data/lib/masspay_ruby_sdk/models/get_user_agreement200_response.rb +280 -0
  89. data/lib/masspay_ruby_sdk/models/get_user_agreements_names200_response_inner.rb +270 -0
  90. data/lib/masspay_ruby_sdk/models/get_user_user_token_kyc_au10tix200_response.rb +224 -0
  91. data/lib/masspay_ruby_sdk/models/get_user_user_token_kyc_veriff200_response.rb +224 -0
  92. data/lib/masspay_ruby_sdk/models/get_wallet_card_info200_response.rb +460 -0
  93. data/lib/masspay_ruby_sdk/models/id_upload.rb +273 -0
  94. data/lib/masspay_ruby_sdk/models/load_txn.rb +321 -0
  95. data/lib/masspay_ruby_sdk/models/load_txn_resp.rb +273 -0
  96. data/lib/masspay_ruby_sdk/models/loads.rb +388 -0
  97. data/lib/masspay_ruby_sdk/models/payout_txn.rb +328 -0
  98. data/lib/masspay_ruby_sdk/models/payout_txn_commit_resp.rb +293 -0
  99. data/lib/masspay_ruby_sdk/models/payout_txn_resp.rb +613 -0
  100. data/lib/masspay_ruby_sdk/models/resend_balance_notification200_response.rb +225 -0
  101. data/lib/masspay_ruby_sdk/models/service.rb +318 -0
  102. data/lib/masspay_ruby_sdk/models/service_payers_inner.rb +373 -0
  103. data/lib/masspay_ruby_sdk/models/service_payers_inner_exchange_rate_inner.rb +239 -0
  104. data/lib/masspay_ruby_sdk/models/spend_back_txn.rb +325 -0
  105. data/lib/masspay_ruby_sdk/models/spend_back_txn_resp.rb +307 -0
  106. data/lib/masspay_ruby_sdk/models/spend_backs.rb +340 -0
  107. data/lib/masspay_ruby_sdk/models/stored_user.rb +500 -0
  108. data/lib/masspay_ruby_sdk/models/tax_year_user_resp.rb +388 -0
  109. data/lib/masspay_ruby_sdk/models/txn_history_resp.rb +571 -0
  110. data/lib/masspay_ruby_sdk/models/update_user.rb +490 -0
  111. data/lib/masspay_ruby_sdk/models/user.rb +423 -0
  112. data/lib/masspay_ruby_sdk/models/wallet_txn_resp.rb +375 -0
  113. data/lib/masspay_ruby_sdk/version.rb +14 -0
  114. data/lib/masspay_ruby_sdk.rb +89 -0
  115. data/masspay_ruby_sdk.gemspec +37 -0
  116. data/spec/api_client_spec.rb +227 -0
  117. data/spec/configuration_spec.rb +41 -0
  118. data/spec/spec_helper.rb +110 -0
  119. metadata +203 -0
@@ -0,0 +1,443 @@
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\&quot;
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. &lt;br&gt; 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. &lt;br&gt; To use this endpoint, you need to provide the &#x60;country_code&#x60; as a required parameter in the URL Path. &lt;br&gt; 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\&quot;
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. &lt;br&gt; You can use this endpoint to obtain a list of countries where MassPay services are offered. &lt;br&gt; There are no required parameters for this endpoint. &lt;br&gt; The response will include a JSON array containing details for each country, including the country code, name, and &#x60;three_letter_code&#x60;.
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\&quot;
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. &lt;br&gt; You can use this endpoint to obtain information about available services and pricing for each respected company in the provided country. &lt;br&gt; To use this endpoint, you need to provide the &#x60;country_code&#x60; in the URL Path. &lt;br&gt; 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\&quot;
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. &lt;br&gt; You can use this endpoint to obtain information about other available services and pricing offered by different companies for a particular destination. &lt;br&gt; To use this endpoint, you need to provide the &#x60;destination_token&#x60; as a required parameter in the URL Path. &lt;br&gt; 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. &lt;br&gt; You can use this endpoint to obtain information about the available user agreements for payout services offered by MassPay. &lt;br&gt; To use this endpoint, you need to provide the &#x60;ID&#x60; representing the user agreement as a required parameter in the URL Path. &lt;br&gt; 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. &lt;br&gt; You can use this endpoint to obtain the names of available user agreements. &lt;br&gt; There are no required parameters needed to use this endpoint. &lt;br&gt; 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