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.
Files changed (135) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +16 -0
  3. data/CODE_OF_CONDUCT.md +43 -0
  4. data/CONTRIBUTING.md +48 -9
  5. data/LICENSE.md +21 -0
  6. data/README.md +141 -176
  7. data/assets/logo.webp +0 -0
  8. data/lib/masspay_ruby_sdk/api/account_service.rb +35 -0
  9. data/lib/masspay_ruby_sdk/api/attribute_service.rb +41 -0
  10. data/lib/masspay_ruby_sdk/api/card_service.rb +35 -0
  11. data/lib/masspay_ruby_sdk/api/catalog_service.rb +74 -0
  12. data/lib/masspay_ruby_sdk/api/kyc_service.rb +56 -0
  13. data/lib/masspay_ruby_sdk/api/load_service.rb +62 -0
  14. data/lib/masspay_ruby_sdk/api/payout_service.rb +61 -0
  15. data/lib/masspay_ruby_sdk/api/spend_back_service.rb +35 -0
  16. data/lib/masspay_ruby_sdk/api/subaccount_service.rb +47 -0
  17. data/lib/masspay_ruby_sdk/api/tax_service.rb +38 -0
  18. data/lib/masspay_ruby_sdk/api/user_service.rb +71 -0
  19. data/lib/masspay_ruby_sdk/api/wallet_service.rb +50 -0
  20. data/lib/masspay_ruby_sdk/client.rb +93 -0
  21. data/lib/masspay_ruby_sdk/constants.rb +20 -0
  22. data/lib/masspay_ruby_sdk/version.rb +6 -8
  23. data/lib/masspay_ruby_sdk.rb +23 -75
  24. data/masspay_ruby_sdk.gemspec +9 -13
  25. metadata +24 -120
  26. data/Rakefile +0 -10
  27. data/docs/AccountApi.md +0 -150
  28. data/docs/ApiResponse.md +0 -22
  29. data/docs/AttrTxn.md +0 -20
  30. data/docs/AttrValue.md +0 -20
  31. data/docs/AttrVelocityRequestInner.md +0 -20
  32. data/docs/AttributeApi.md +0 -168
  33. data/docs/AttrsRequirement.md +0 -36
  34. data/docs/AutopayResp.md +0 -22
  35. data/docs/AutopayRule.md +0 -20
  36. data/docs/AvailableBalanceTxnResp.md +0 -22
  37. data/docs/CardApi.md +0 -160
  38. data/docs/CatalogApi.md +0 -469
  39. data/docs/CompaniesResp.md +0 -18
  40. data/docs/Company.md +0 -26
  41. data/docs/Country.md +0 -22
  42. data/docs/Exception.md +0 -20
  43. data/docs/FoundUser.md +0 -24
  44. data/docs/GetAccountStatement200Response.md +0 -18
  45. data/docs/GetTransactionConfirmationDetails200Response.md +0 -18
  46. data/docs/GetUserAgreement200Response.md +0 -26
  47. data/docs/GetUserAgreementsNames200ResponseInner.md +0 -24
  48. data/docs/GetUserUserTokenKycAu10tix200Response.md +0 -18
  49. data/docs/GetUserUserTokenKycVeriff200Response.md +0 -18
  50. data/docs/GetWalletCardInfo200Response.md +0 -30
  51. data/docs/IDUpload.md +0 -20
  52. data/docs/KYCApi.md +0 -305
  53. data/docs/LoadApi.md +0 -621
  54. data/docs/LoadTxn.md +0 -32
  55. data/docs/LoadTxnResp.md +0 -20
  56. data/docs/Loads.md +0 -36
  57. data/docs/PayoutApi.md +0 -403
  58. data/docs/PayoutTxn.md +0 -36
  59. data/docs/PayoutTxnCommitResp.md +0 -24
  60. data/docs/PayoutTxnResp.md +0 -60
  61. data/docs/ResendBalanceNotification200Response.md +0 -18
  62. data/docs/Service.md +0 -22
  63. data/docs/ServicePayersInner.md +0 -38
  64. data/docs/ServicePayersInnerExchangeRateInner.md +0 -20
  65. data/docs/SpendBackApi.md +0 -161
  66. data/docs/SpendBackTxn.md +0 -28
  67. data/docs/SpendBackTxnResp.md +0 -22
  68. data/docs/SpendBacks.md +0 -34
  69. data/docs/StoredUser.md +0 -56
  70. data/docs/TaxApi.md +0 -81
  71. data/docs/TaxYearUserResp.md +0 -48
  72. data/docs/TxnHistoryResp.md +0 -52
  73. data/docs/UpdateUser.md +0 -52
  74. data/docs/User.md +0 -50
  75. data/docs/UserApi.md +0 -403
  76. data/docs/WalletApi.md +0 -463
  77. data/docs/WalletTxnResp.md +0 -34
  78. data/docs/logo.webp +0 -0
  79. data/lib/masspay_ruby_sdk/api/account_api.rb +0 -149
  80. data/lib/masspay_ruby_sdk/api/attribute_api.rb +0 -214
  81. data/lib/masspay_ruby_sdk/api/card_api.rb +0 -174
  82. data/lib/masspay_ruby_sdk/api/catalog_api.rb +0 -443
  83. data/lib/masspay_ruby_sdk/api/kyc_api.rb +0 -290
  84. data/lib/masspay_ruby_sdk/api/load_api.rb +0 -598
  85. data/lib/masspay_ruby_sdk/api/payout_api.rb +0 -397
  86. data/lib/masspay_ruby_sdk/api/spend_back_api.rb +0 -160
  87. data/lib/masspay_ruby_sdk/api/tax_api.rb +0 -82
  88. data/lib/masspay_ruby_sdk/api/user_api.rb +0 -418
  89. data/lib/masspay_ruby_sdk/api/wallet_api.rb +0 -461
  90. data/lib/masspay_ruby_sdk/api_client.rb +0 -391
  91. data/lib/masspay_ruby_sdk/api_error.rb +0 -57
  92. data/lib/masspay_ruby_sdk/configuration.rb +0 -315
  93. data/lib/masspay_ruby_sdk/models/api_response.rb +0 -236
  94. data/lib/masspay_ruby_sdk/models/attr_txn.rb +0 -235
  95. data/lib/masspay_ruby_sdk/models/attr_value.rb +0 -239
  96. data/lib/masspay_ruby_sdk/models/attr_velocity_request_inner.rb +0 -273
  97. data/lib/masspay_ruby_sdk/models/attrs_requirement.rb +0 -372
  98. data/lib/masspay_ruby_sdk/models/autopay_resp.rb +0 -256
  99. data/lib/masspay_ruby_sdk/models/autopay_rule.rb +0 -241
  100. data/lib/masspay_ruby_sdk/models/available_balance_txn_resp.rb +0 -254
  101. data/lib/masspay_ruby_sdk/models/companies_resp.rb +0 -225
  102. data/lib/masspay_ruby_sdk/models/company.rb +0 -285
  103. data/lib/masspay_ruby_sdk/models/country.rb +0 -296
  104. data/lib/masspay_ruby_sdk/models/exception.rb +0 -241
  105. data/lib/masspay_ruby_sdk/models/found_user.rb +0 -270
  106. data/lib/masspay_ruby_sdk/models/get_account_statement200_response.rb +0 -225
  107. data/lib/masspay_ruby_sdk/models/get_transaction_confirmation_details200_response.rb +0 -218
  108. data/lib/masspay_ruby_sdk/models/get_user_agreement200_response.rb +0 -280
  109. data/lib/masspay_ruby_sdk/models/get_user_agreements_names200_response_inner.rb +0 -270
  110. data/lib/masspay_ruby_sdk/models/get_user_user_token_kyc_au10tix200_response.rb +0 -224
  111. data/lib/masspay_ruby_sdk/models/get_user_user_token_kyc_veriff200_response.rb +0 -224
  112. data/lib/masspay_ruby_sdk/models/get_wallet_card_info200_response.rb +0 -460
  113. data/lib/masspay_ruby_sdk/models/id_upload.rb +0 -273
  114. data/lib/masspay_ruby_sdk/models/load_txn.rb +0 -321
  115. data/lib/masspay_ruby_sdk/models/load_txn_resp.rb +0 -273
  116. data/lib/masspay_ruby_sdk/models/loads.rb +0 -388
  117. data/lib/masspay_ruby_sdk/models/payout_txn.rb +0 -328
  118. data/lib/masspay_ruby_sdk/models/payout_txn_commit_resp.rb +0 -293
  119. data/lib/masspay_ruby_sdk/models/payout_txn_resp.rb +0 -613
  120. data/lib/masspay_ruby_sdk/models/resend_balance_notification200_response.rb +0 -225
  121. data/lib/masspay_ruby_sdk/models/service.rb +0 -318
  122. data/lib/masspay_ruby_sdk/models/service_payers_inner.rb +0 -373
  123. data/lib/masspay_ruby_sdk/models/service_payers_inner_exchange_rate_inner.rb +0 -239
  124. data/lib/masspay_ruby_sdk/models/spend_back_txn.rb +0 -325
  125. data/lib/masspay_ruby_sdk/models/spend_back_txn_resp.rb +0 -307
  126. data/lib/masspay_ruby_sdk/models/spend_backs.rb +0 -340
  127. data/lib/masspay_ruby_sdk/models/stored_user.rb +0 -500
  128. data/lib/masspay_ruby_sdk/models/tax_year_user_resp.rb +0 -388
  129. data/lib/masspay_ruby_sdk/models/txn_history_resp.rb +0 -571
  130. data/lib/masspay_ruby_sdk/models/update_user.rb +0 -490
  131. data/lib/masspay_ruby_sdk/models/user.rb +0 -423
  132. data/lib/masspay_ruby_sdk/models/wallet_txn_resp.rb +0 -375
  133. data/spec/api_client_spec.rb +0 -227
  134. data/spec/configuration_spec.rb +0 -41
  135. data/spec/spec_helper.rb +0 -110
@@ -1,214 +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 AttributeApi
16
- attr_accessor :api_client
17
-
18
- def initialize(api_client = ApiClient.default)
19
- @api_client = api_client
20
- end
21
- # Get user attributes for destination_token
22
- # This **GET** endpoint is used to retrieve user attributes for a specific destination token. <br> You can use this endpoint to retrieve user attributes and provide personalized service to your users based on their preferences, demographic data, or other relevant information. <br> To use this endpoint, you need to provide the `user_token`, `destination_token`, and currency as parameters in the URL Path. <br> The endpoint will then return all the required attributes for the provided user for the specified destination token. If any of the attributes already have a stored value, it will be returned as well.
23
- # @param currency [String] The destination currency sending funds to. Using [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) format.
24
- # @param user_token [String] Token representing the user to retrieve attributes for
25
- # @param destination_token [String] Token that represents the payout destination i.e. Omnex-&gt;Brazil-&gt;Bank Deposit-&gt;Itau. To be retrieved from the #pricing callback.
26
- # @param [Hash] opts the optional parameters
27
- # @option opts [String] :idempotency_key Unique key to prevent duplicate processing
28
- # @return [Array<AttrsRequirement>]
29
- def get_attrs(currency, user_token, destination_token, opts = {})
30
- data, _status_code, _headers = get_attrs_with_http_info(currency, user_token, destination_token, opts)
31
- data
32
- end
33
-
34
- # Get user attributes for destination_token
35
- # This **GET** endpoint is used to retrieve user attributes for a specific destination token. &lt;br&gt; You can use this endpoint to retrieve user attributes and provide personalized service to your users based on their preferences, demographic data, or other relevant information. &lt;br&gt; To use this endpoint, you need to provide the &#x60;user_token&#x60;, &#x60;destination_token&#x60;, and currency as parameters in the URL Path. &lt;br&gt; The endpoint will then return all the required attributes for the provided user for the specified destination token. If any of the attributes already have a stored value, it will be returned as well.
36
- # @param currency [String] The destination currency sending funds to. Using [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) format.
37
- # @param user_token [String] Token representing the user to retrieve attributes for
38
- # @param destination_token [String] Token that represents the payout destination i.e. Omnex-&gt;Brazil-&gt;Bank Deposit-&gt;Itau. To be retrieved from the #pricing callback.
39
- # @param [Hash] opts the optional parameters
40
- # @option opts [String] :idempotency_key Unique key to prevent duplicate processing
41
- # @return [Array<(Array<AttrsRequirement>, Integer, Hash)>] Array<AttrsRequirement> data, response status code and response headers
42
- def get_attrs_with_http_info(currency, user_token, destination_token, opts = {})
43
- if @api_client.config.debugging
44
- @api_client.config.logger.debug 'Calling API: AttributeApi.get_attrs ...'
45
- end
46
- # verify the required parameter 'currency' is set
47
- if @api_client.config.client_side_validation && currency.nil?
48
- fail ArgumentError, "Missing the required parameter 'currency' when calling AttributeApi.get_attrs"
49
- end
50
- if @api_client.config.client_side_validation && currency.to_s.length > 3
51
- fail ArgumentError, 'invalid value for "currency" when calling AttributeApi.get_attrs, the character length must be smaller than or equal to 3.'
52
- end
53
-
54
- if @api_client.config.client_side_validation && currency.to_s.length < 3
55
- fail ArgumentError, 'invalid value for "currency" when calling AttributeApi.get_attrs, the character length must be great than or equal to 3.'
56
- end
57
-
58
- pattern = Regexp.new(/^[A-Z]{3}$/)
59
- if @api_client.config.client_side_validation && currency !~ pattern
60
- fail ArgumentError, "invalid value for 'currency' when calling AttributeApi.get_attrs, must conform to the pattern #{pattern}."
61
- end
62
-
63
- # verify the required parameter 'user_token' is set
64
- if @api_client.config.client_side_validation && user_token.nil?
65
- fail ArgumentError, "Missing the required parameter 'user_token' when calling AttributeApi.get_attrs"
66
- end
67
- # verify the required parameter 'destination_token' is set
68
- if @api_client.config.client_side_validation && destination_token.nil?
69
- fail ArgumentError, "Missing the required parameter 'destination_token' when calling AttributeApi.get_attrs"
70
- end
71
- # resource path
72
- local_var_path = '/attribute/{user_token}/{destination_token}/{currency}'.sub('{' + 'currency' + '}', CGI.escape(currency.to_s)).sub('{' + 'user_token' + '}', CGI.escape(user_token.to_s)).sub('{' + 'destination_token' + '}', CGI.escape(destination_token.to_s))
73
-
74
- # query parameters
75
- query_params = opts[:query_params] || {}
76
-
77
- # header parameters
78
- header_params = opts[:header_params] || {}
79
- # HTTP header 'Accept' (if needed)
80
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
81
- header_params[:'Idempotency-Key'] = opts[:'idempotency_key'] if !opts[:'idempotency_key'].nil?
82
-
83
- # form parameters
84
- form_params = opts[:form_params] || {}
85
-
86
- # http body (model)
87
- post_body = opts[:debug_body]
88
-
89
- # return_type
90
- return_type = opts[:debug_return_type] || 'Array<AttrsRequirement>'
91
-
92
- # auth_names
93
- auth_names = opts[:debug_auth_names] || ['AUTHORIZER_NAME']
94
-
95
- new_options = opts.merge(
96
- :operation => :"AttributeApi.get_attrs",
97
- :header_params => header_params,
98
- :query_params => query_params,
99
- :form_params => form_params,
100
- :body => post_body,
101
- :auth_names => auth_names,
102
- :return_type => return_type
103
- )
104
-
105
- data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
106
- if @api_client.config.debugging
107
- @api_client.config.logger.debug "API called: AttributeApi#get_attrs\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
108
- end
109
- return data, status_code, headers
110
- end
111
-
112
- # Store user attributes
113
- # This **POST** endpoint is used to store user attributes, allowing you to associate additional data with a user token. <br> To use this endpoint, you need to provide the `user_token`, `destination_token`, and currency as parameters in the URL Path. You also need to provide the attribute values as JSON parameters in the Request body. <br> If existing attributes are already stored for the user, this call will override their values.
114
- # @param currency [String] The destination currency sending funds to. Using [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) format.
115
- # @param user_token [String] Token representing the user to store attributes for
116
- # @param destination_token [String] Token that represents the payout destination i.e. Omnex-&gt;Brazil-&gt;Bank Deposit-&gt;Itau. To be retrieved from the #pricing callback.
117
- # @param attr_txn [AttrTxn] Attr parameters to store
118
- # @param [Hash] opts the optional parameters
119
- # @option opts [String] :idempotency_key Unique key to prevent duplicate processing
120
- # @return [nil]
121
- def store_attrs(currency, user_token, destination_token, attr_txn, opts = {})
122
- store_attrs_with_http_info(currency, user_token, destination_token, attr_txn, opts)
123
- nil
124
- end
125
-
126
- # Store user attributes
127
- # This **POST** endpoint is used to store user attributes, allowing you to associate additional data with a user token. &lt;br&gt; To use this endpoint, you need to provide the &#x60;user_token&#x60;, &#x60;destination_token&#x60;, and currency as parameters in the URL Path. You also need to provide the attribute values as JSON parameters in the Request body. &lt;br&gt; If existing attributes are already stored for the user, this call will override their values.
128
- # @param currency [String] The destination currency sending funds to. Using [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) format.
129
- # @param user_token [String] Token representing the user to store attributes for
130
- # @param destination_token [String] Token that represents the payout destination i.e. Omnex-&gt;Brazil-&gt;Bank Deposit-&gt;Itau. To be retrieved from the #pricing callback.
131
- # @param attr_txn [AttrTxn] Attr parameters to store
132
- # @param [Hash] opts the optional parameters
133
- # @option opts [String] :idempotency_key Unique key to prevent duplicate processing
134
- # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
135
- def store_attrs_with_http_info(currency, user_token, destination_token, attr_txn, opts = {})
136
- if @api_client.config.debugging
137
- @api_client.config.logger.debug 'Calling API: AttributeApi.store_attrs ...'
138
- end
139
- # verify the required parameter 'currency' is set
140
- if @api_client.config.client_side_validation && currency.nil?
141
- fail ArgumentError, "Missing the required parameter 'currency' when calling AttributeApi.store_attrs"
142
- end
143
- if @api_client.config.client_side_validation && currency.to_s.length > 3
144
- fail ArgumentError, 'invalid value for "currency" when calling AttributeApi.store_attrs, the character length must be smaller than or equal to 3.'
145
- end
146
-
147
- if @api_client.config.client_side_validation && currency.to_s.length < 3
148
- fail ArgumentError, 'invalid value for "currency" when calling AttributeApi.store_attrs, the character length must be great than or equal to 3.'
149
- end
150
-
151
- pattern = Regexp.new(/^[A-Z]{3}$/)
152
- if @api_client.config.client_side_validation && currency !~ pattern
153
- fail ArgumentError, "invalid value for 'currency' when calling AttributeApi.store_attrs, must conform to the pattern #{pattern}."
154
- end
155
-
156
- # verify the required parameter 'user_token' is set
157
- if @api_client.config.client_side_validation && user_token.nil?
158
- fail ArgumentError, "Missing the required parameter 'user_token' when calling AttributeApi.store_attrs"
159
- end
160
- # verify the required parameter 'destination_token' is set
161
- if @api_client.config.client_side_validation && destination_token.nil?
162
- fail ArgumentError, "Missing the required parameter 'destination_token' when calling AttributeApi.store_attrs"
163
- end
164
- # verify the required parameter 'attr_txn' is set
165
- if @api_client.config.client_side_validation && attr_txn.nil?
166
- fail ArgumentError, "Missing the required parameter 'attr_txn' when calling AttributeApi.store_attrs"
167
- end
168
- # resource path
169
- local_var_path = '/attribute/{user_token}/{destination_token}/{currency}'.sub('{' + 'currency' + '}', CGI.escape(currency.to_s)).sub('{' + 'user_token' + '}', CGI.escape(user_token.to_s)).sub('{' + 'destination_token' + '}', CGI.escape(destination_token.to_s))
170
-
171
- # query parameters
172
- query_params = opts[:query_params] || {}
173
-
174
- # header parameters
175
- header_params = opts[:header_params] || {}
176
- # HTTP header 'Accept' (if needed)
177
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
178
- # HTTP header 'Content-Type'
179
- content_type = @api_client.select_header_content_type(['application/json'])
180
- if !content_type.nil?
181
- header_params['Content-Type'] = content_type
182
- end
183
- header_params[:'Idempotency-Key'] = opts[:'idempotency_key'] if !opts[:'idempotency_key'].nil?
184
-
185
- # form parameters
186
- form_params = opts[:form_params] || {}
187
-
188
- # http body (model)
189
- post_body = opts[:debug_body] || @api_client.object_to_http_body(attr_txn)
190
-
191
- # return_type
192
- return_type = opts[:debug_return_type]
193
-
194
- # auth_names
195
- auth_names = opts[:debug_auth_names] || ['AUTHORIZER_NAME']
196
-
197
- new_options = opts.merge(
198
- :operation => :"AttributeApi.store_attrs",
199
- :header_params => header_params,
200
- :query_params => query_params,
201
- :form_params => form_params,
202
- :body => post_body,
203
- :auth_names => auth_names,
204
- :return_type => return_type
205
- )
206
-
207
- data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
208
- if @api_client.config.debugging
209
- @api_client.config.logger.debug "API called: AttributeApi#store_attrs\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
210
- end
211
- return data, status_code, headers
212
- end
213
- end
214
- end
@@ -1,174 +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 CardApi
16
- attr_accessor :api_client
17
-
18
- def initialize(api_client = ApiClient.default)
19
- @api_client = api_client
20
- end
21
- # Get MassPay Card Information
22
- # This **GET** endpoint is used to retrieve MassPay card information associated with the provided wallet token. <br> You can use this endpoint to obtain information about the MassPay card associated with the wallet. <br> To use this endpoint, you need to provide the `user_token` and `wallet_token` as required parameters in the URL Path. <br> The response will include a JSON object containing details for the MassPay card, including the card number, balance, status.
23
- # @param user_token [String] Token representing the user who owns the wallet
24
- # @param wallet_token [String] Token representing the wallet
25
- # @param [Hash] opts the optional parameters
26
- # @return [GetWalletCardInfo200Response]
27
- def get_wallet_card_info(user_token, wallet_token, opts = {})
28
- data, _status_code, _headers = get_wallet_card_info_with_http_info(user_token, wallet_token, opts)
29
- data
30
- end
31
-
32
- # Get MassPay Card Information
33
- # This **GET** endpoint is used to retrieve MassPay card information associated with the provided wallet token. &lt;br&gt; You can use this endpoint to obtain information about the MassPay card associated with the wallet. &lt;br&gt; To use this endpoint, you need to provide the &#x60;user_token&#x60; and &#x60;wallet_token&#x60; as required parameters in the URL Path. &lt;br&gt; The response will include a JSON object containing details for the MassPay card, including the card number, balance, status.
34
- # @param user_token [String] Token representing the user who owns the wallet
35
- # @param wallet_token [String] Token representing the wallet
36
- # @param [Hash] opts the optional parameters
37
- # @return [Array<(GetWalletCardInfo200Response, Integer, Hash)>] GetWalletCardInfo200Response data, response status code and response headers
38
- def get_wallet_card_info_with_http_info(user_token, wallet_token, opts = {})
39
- if @api_client.config.debugging
40
- @api_client.config.logger.debug 'Calling API: CardApi.get_wallet_card_info ...'
41
- end
42
- # verify the required parameter 'user_token' is set
43
- if @api_client.config.client_side_validation && user_token.nil?
44
- fail ArgumentError, "Missing the required parameter 'user_token' when calling CardApi.get_wallet_card_info"
45
- end
46
- # verify the required parameter 'wallet_token' is set
47
- if @api_client.config.client_side_validation && wallet_token.nil?
48
- fail ArgumentError, "Missing the required parameter 'wallet_token' when calling CardApi.get_wallet_card_info"
49
- end
50
- # resource path
51
- local_var_path = '/wallet/{user_token}/{wallet_token}/card'.sub('{' + 'user_token' + '}', CGI.escape(user_token.to_s)).sub('{' + 'wallet_token' + '}', CGI.escape(wallet_token.to_s))
52
-
53
- # query parameters
54
- query_params = opts[:query_params] || {}
55
-
56
- # header parameters
57
- header_params = opts[:header_params] || {}
58
- # HTTP header 'Accept' (if needed)
59
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
60
-
61
- # form parameters
62
- form_params = opts[:form_params] || {}
63
-
64
- # http body (model)
65
- post_body = opts[:debug_body]
66
-
67
- # return_type
68
- return_type = opts[:debug_return_type] || 'GetWalletCardInfo200Response'
69
-
70
- # auth_names
71
- auth_names = opts[:debug_auth_names] || ['AUTHORIZER_NAME']
72
-
73
- new_options = opts.merge(
74
- :operation => :"CardApi.get_wallet_card_info",
75
- :header_params => header_params,
76
- :query_params => query_params,
77
- :form_params => form_params,
78
- :body => post_body,
79
- :auth_names => auth_names,
80
- :return_type => return_type
81
- )
82
-
83
- data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
84
- if @api_client.config.debugging
85
- @api_client.config.logger.debug "API called: CardApi#get_wallet_card_info\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
86
- end
87
- return data, status_code, headers
88
- end
89
-
90
- # Update MassPay Card Information
91
- # This **PUT** endpoint is used to update the MassPay card information for a provided user token and wallet token. <br> You can use this endpoint to help your users manage their MassPay card information, including updating their card PIN number or status. <br> To use this endpoint, you need to provide the `user_token` and `wallet_token` as parameters in the URL Path, along with the parameters in the request Query, including the card pin number or(and) status. <br> The endpoint will then update the card information for the provided user and wallet token.
92
- # @param user_token [String] Token representing the user who owns the wallet
93
- # @param wallet_token [String] Token representing the wallet
94
- # @param [Hash] opts the optional parameters
95
- # @option opts [String] :pin New 4 digit pin number for the card (To be used in ATM machines)
96
- # @option opts [String] :status New status for the card
97
- # @return [nil]
98
- def update_wallet_card_info(user_token, wallet_token, opts = {})
99
- update_wallet_card_info_with_http_info(user_token, wallet_token, opts)
100
- nil
101
- end
102
-
103
- # Update MassPay Card Information
104
- # This **PUT** endpoint is used to update the MassPay card information for a provided user token and wallet token. &lt;br&gt; You can use this endpoint to help your users manage their MassPay card information, including updating their card PIN number or status. &lt;br&gt; To use this endpoint, you need to provide the &#x60;user_token&#x60; and &#x60;wallet_token&#x60; as parameters in the URL Path, along with the parameters in the request Query, including the card pin number or(and) status. &lt;br&gt; The endpoint will then update the card information for the provided user and wallet token.
105
- # @param user_token [String] Token representing the user who owns the wallet
106
- # @param wallet_token [String] Token representing the wallet
107
- # @param [Hash] opts the optional parameters
108
- # @option opts [String] :pin New 4 digit pin number for the card (To be used in ATM machines)
109
- # @option opts [String] :status New status for the card
110
- # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
111
- def update_wallet_card_info_with_http_info(user_token, wallet_token, opts = {})
112
- if @api_client.config.debugging
113
- @api_client.config.logger.debug 'Calling API: CardApi.update_wallet_card_info ...'
114
- end
115
- # verify the required parameter 'user_token' is set
116
- if @api_client.config.client_side_validation && user_token.nil?
117
- fail ArgumentError, "Missing the required parameter 'user_token' when calling CardApi.update_wallet_card_info"
118
- end
119
- # verify the required parameter 'wallet_token' is set
120
- if @api_client.config.client_side_validation && wallet_token.nil?
121
- fail ArgumentError, "Missing the required parameter 'wallet_token' when calling CardApi.update_wallet_card_info"
122
- end
123
- pattern = Regexp.new(/^[0-9]{4}$/)
124
- if @api_client.config.client_side_validation && !opts[:'pin'].nil? && opts[:'pin'] !~ pattern
125
- fail ArgumentError, "invalid value for 'opts[:\"pin\"]' when calling CardApi.update_wallet_card_info, must conform to the pattern #{pattern}."
126
- end
127
-
128
- allowable_values = ["SUSPEND", "UNSUSPEND", "CLOSE"]
129
- if @api_client.config.client_side_validation && opts[:'status'] && !allowable_values.include?(opts[:'status'])
130
- fail ArgumentError, "invalid value for \"status\", must be one of #{allowable_values}"
131
- end
132
- # resource path
133
- local_var_path = '/wallet/{user_token}/{wallet_token}/card'.sub('{' + 'user_token' + '}', CGI.escape(user_token.to_s)).sub('{' + 'wallet_token' + '}', CGI.escape(wallet_token.to_s))
134
-
135
- # query parameters
136
- query_params = opts[:query_params] || {}
137
- query_params[:'pin'] = opts[:'pin'] if !opts[:'pin'].nil?
138
- query_params[:'status'] = opts[:'status'] if !opts[:'status'].nil?
139
-
140
- # header parameters
141
- header_params = opts[:header_params] || {}
142
- # HTTP header 'Accept' (if needed)
143
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
144
-
145
- # form parameters
146
- form_params = opts[:form_params] || {}
147
-
148
- # http body (model)
149
- post_body = opts[:debug_body]
150
-
151
- # return_type
152
- return_type = opts[:debug_return_type]
153
-
154
- # auth_names
155
- auth_names = opts[:debug_auth_names] || ['AUTHORIZER_NAME']
156
-
157
- new_options = opts.merge(
158
- :operation => :"CardApi.update_wallet_card_info",
159
- :header_params => header_params,
160
- :query_params => query_params,
161
- :form_params => form_params,
162
- :body => post_body,
163
- :auth_names => auth_names,
164
- :return_type => return_type
165
- )
166
-
167
- data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
168
- if @api_client.config.debugging
169
- @api_client.config.logger.debug "API called: CardApi#update_wallet_card_info\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
170
- end
171
- return data, status_code, headers
172
- end
173
- end
174
- end