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
data/docs/LoadApi.md
DELETED
@@ -1,621 +0,0 @@
|
|
1
|
-
# MassPayRubySdk::LoadApi
|
2
|
-
|
3
|
-
All URIs are relative to *https://api.masspay.io/v0.1.4*
|
4
|
-
|
5
|
-
| Method | HTTP request | Description |
|
6
|
-
| ------ | ------------ | ----------- |
|
7
|
-
| [**cancel_user_load**](LoadApi.md#cancel_user_load) | **DELETE** /load/{user_token} | Reverse a user load |
|
8
|
-
| [**create_autopay_rule**](LoadApi.md#create_autopay_rule) | **POST** /wallet/{user_token}/{wallet_token}/autopay | Add autopay rule |
|
9
|
-
| [**delete_autopay_rule**](LoadApi.md#delete_autopay_rule) | **DELETE** /wallet/{user_token}/{wallet_token}/autopay | Delete autopay rule |
|
10
|
-
| [**get_autopay_rules**](LoadApi.md#get_autopay_rules) | **GET** /wallet/{user_token}/{wallet_token}/autopay | Get all autopay rules |
|
11
|
-
| [**get_user_loads_by_token**](LoadApi.md#get_user_loads_by_token) | **GET** /load/{user_token} | Get history of loads by user token |
|
12
|
-
| [**load_user**](LoadApi.md#load_user) | **POST** /load/{user_token} | Initiate a load transaction |
|
13
|
-
| [**load_user_token_put**](LoadApi.md#load_user_token_put) | **PUT** /load/{user_token} | Resend Load Notification |
|
14
|
-
| [**resend_balance_notification**](LoadApi.md#resend_balance_notification) | **PUT** /wallet/{user_token} | Resend Balance Notification |
|
15
|
-
|
16
|
-
|
17
|
-
## cancel_user_load
|
18
|
-
|
19
|
-
> cancel_user_load(user_token, load_token, opts)
|
20
|
-
|
21
|
-
Reverse a user load
|
22
|
-
|
23
|
-
This **DELETE** endpoint is used to reverse a load transaction that was already processed, allowing you to remove funds from a user's wallet. <br> To use this endpoint, you need to provide the `user_token` as a parameter in the URL Path, and the load_token as a parameter in the Query string. <br> The endpoint will then attempt to reverse the specified load transaction. If the load is still in scheduled status, it will be marked as cancelled.
|
24
|
-
|
25
|
-
### Examples
|
26
|
-
|
27
|
-
```ruby
|
28
|
-
require 'time'
|
29
|
-
require 'masspay_ruby_sdk'
|
30
|
-
# setup authorization
|
31
|
-
MassPayRubySdk.configure do |config|
|
32
|
-
# Configure API key authorization: AUTHORIZER_NAME
|
33
|
-
config.api_key['AUTHORIZER_NAME'] = 'YOUR API KEY'
|
34
|
-
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
35
|
-
# config.api_key_prefix['AUTHORIZER_NAME'] = 'Bearer'
|
36
|
-
end
|
37
|
-
|
38
|
-
api_instance = MassPayRubySdk::LoadApi.new
|
39
|
-
user_token = 'user_token_example' # String | Token representing the user to load/fetch loads for
|
40
|
-
load_token = '38400000-8cf0-11bd-b23e-10b96e4ef00d' # String | Load token
|
41
|
-
opts = {
|
42
|
-
idempotency_key: 'idempotency_key_example' # String | Unique key to prevent duplicate processing
|
43
|
-
}
|
44
|
-
|
45
|
-
begin
|
46
|
-
# Reverse a user load
|
47
|
-
api_instance.cancel_user_load(user_token, load_token, opts)
|
48
|
-
rescue MassPayRubySdk::ApiError => e
|
49
|
-
puts "Error when calling LoadApi->cancel_user_load: #{e}"
|
50
|
-
end
|
51
|
-
```
|
52
|
-
|
53
|
-
#### Using the cancel_user_load_with_http_info variant
|
54
|
-
|
55
|
-
This returns an Array which contains the response data (`nil` in this case), status code and headers.
|
56
|
-
|
57
|
-
> <Array(nil, Integer, Hash)> cancel_user_load_with_http_info(user_token, load_token, opts)
|
58
|
-
|
59
|
-
```ruby
|
60
|
-
begin
|
61
|
-
# Reverse a user load
|
62
|
-
data, status_code, headers = api_instance.cancel_user_load_with_http_info(user_token, load_token, opts)
|
63
|
-
p status_code # => 2xx
|
64
|
-
p headers # => { ... }
|
65
|
-
p data # => nil
|
66
|
-
rescue MassPayRubySdk::ApiError => e
|
67
|
-
puts "Error when calling LoadApi->cancel_user_load_with_http_info: #{e}"
|
68
|
-
end
|
69
|
-
```
|
70
|
-
|
71
|
-
### Parameters
|
72
|
-
|
73
|
-
| Name | Type | Description | Notes |
|
74
|
-
| ---- | ---- | ----------- | ----- |
|
75
|
-
| **user_token** | **String** | Token representing the user to load/fetch loads for | |
|
76
|
-
| **load_token** | **String** | Load token | |
|
77
|
-
| **idempotency_key** | **String** | Unique key to prevent duplicate processing | [optional] |
|
78
|
-
|
79
|
-
### Return type
|
80
|
-
|
81
|
-
nil (empty response body)
|
82
|
-
|
83
|
-
### Authorization
|
84
|
-
|
85
|
-
[AUTHORIZER_NAME](../README.md#AUTHORIZER_NAME)
|
86
|
-
|
87
|
-
### HTTP request headers
|
88
|
-
|
89
|
-
- **Content-Type**: Not defined
|
90
|
-
- **Accept**: Not defined
|
91
|
-
|
92
|
-
|
93
|
-
## create_autopay_rule
|
94
|
-
|
95
|
-
> <AutopayResp> create_autopay_rule(user_token, wallet_token, opts)
|
96
|
-
|
97
|
-
Add autopay rule
|
98
|
-
|
99
|
-
This **POST** endpoint is used to add an autopay rule that will initiate a payout whenever the provided wallet token is loaded. <br> You can use this endpoint to create an autopay rule that automatically sends a percentage of incoming load to a specific destination. <br> To use this endpoint, you need to provide the `user_token` and `wallet_token` as required parameters in the URL Path, and the `destination_token` and percentage of incoming load that should be autopaid to the `destination_token` in the request Body. <br> The response will include a JSON object containing the details of the created autopay rule, including the token, `destination_token` and percentage.
|
100
|
-
|
101
|
-
### Examples
|
102
|
-
|
103
|
-
```ruby
|
104
|
-
require 'time'
|
105
|
-
require 'masspay_ruby_sdk'
|
106
|
-
# setup authorization
|
107
|
-
MassPayRubySdk.configure do |config|
|
108
|
-
# Configure API key authorization: AUTHORIZER_NAME
|
109
|
-
config.api_key['AUTHORIZER_NAME'] = 'YOUR API KEY'
|
110
|
-
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
111
|
-
# config.api_key_prefix['AUTHORIZER_NAME'] = 'Bearer'
|
112
|
-
end
|
113
|
-
|
114
|
-
api_instance = MassPayRubySdk::LoadApi.new
|
115
|
-
user_token = 'user_token_example' # String | Token representing the user who owns the wallet
|
116
|
-
wallet_token = 'wallet_token_example' # String | Token representing the wallet
|
117
|
-
opts = {
|
118
|
-
autopay_rule: MassPayRubySdk::AutopayRule.new({destination_token: 'dest_d2138fd0-00be-45a8-985f-4f5bde500962', percentage: 50}) # AutopayRule | Autopay rule configuration
|
119
|
-
}
|
120
|
-
|
121
|
-
begin
|
122
|
-
# Add autopay rule
|
123
|
-
result = api_instance.create_autopay_rule(user_token, wallet_token, opts)
|
124
|
-
p result
|
125
|
-
rescue MassPayRubySdk::ApiError => e
|
126
|
-
puts "Error when calling LoadApi->create_autopay_rule: #{e}"
|
127
|
-
end
|
128
|
-
```
|
129
|
-
|
130
|
-
#### Using the create_autopay_rule_with_http_info variant
|
131
|
-
|
132
|
-
This returns an Array which contains the response data, status code and headers.
|
133
|
-
|
134
|
-
> <Array(<AutopayResp>, Integer, Hash)> create_autopay_rule_with_http_info(user_token, wallet_token, opts)
|
135
|
-
|
136
|
-
```ruby
|
137
|
-
begin
|
138
|
-
# Add autopay rule
|
139
|
-
data, status_code, headers = api_instance.create_autopay_rule_with_http_info(user_token, wallet_token, opts)
|
140
|
-
p status_code # => 2xx
|
141
|
-
p headers # => { ... }
|
142
|
-
p data # => <AutopayResp>
|
143
|
-
rescue MassPayRubySdk::ApiError => e
|
144
|
-
puts "Error when calling LoadApi->create_autopay_rule_with_http_info: #{e}"
|
145
|
-
end
|
146
|
-
```
|
147
|
-
|
148
|
-
### Parameters
|
149
|
-
|
150
|
-
| Name | Type | Description | Notes |
|
151
|
-
| ---- | ---- | ----------- | ----- |
|
152
|
-
| **user_token** | **String** | Token representing the user who owns the wallet | |
|
153
|
-
| **wallet_token** | **String** | Token representing the wallet | |
|
154
|
-
| **autopay_rule** | [**AutopayRule**](AutopayRule.md) | Autopay rule configuration | [optional] |
|
155
|
-
|
156
|
-
### Return type
|
157
|
-
|
158
|
-
[**AutopayResp**](AutopayResp.md)
|
159
|
-
|
160
|
-
### Authorization
|
161
|
-
|
162
|
-
[AUTHORIZER_NAME](../README.md#AUTHORIZER_NAME)
|
163
|
-
|
164
|
-
### HTTP request headers
|
165
|
-
|
166
|
-
- **Content-Type**: application/json
|
167
|
-
- **Accept**: application/json
|
168
|
-
|
169
|
-
|
170
|
-
## delete_autopay_rule
|
171
|
-
|
172
|
-
> delete_autopay_rule(user_token, wallet_token, token)
|
173
|
-
|
174
|
-
Delete autopay rule
|
175
|
-
|
176
|
-
This **DELETE** endpoint is used to delete an existing autopay rule. <br> You can use this endpoint to remove an autopay rule that is no longer needed. <br> To use this endpoint, you need to provide the `user_token` and `wallet_token` as required parameters in the URL Path, and the token of the autopay rule you wish to delete in the request Body. <br> The response will include a message indicating the success of the deletion.
|
177
|
-
|
178
|
-
### Examples
|
179
|
-
|
180
|
-
```ruby
|
181
|
-
require 'time'
|
182
|
-
require 'masspay_ruby_sdk'
|
183
|
-
# setup authorization
|
184
|
-
MassPayRubySdk.configure do |config|
|
185
|
-
# Configure API key authorization: AUTHORIZER_NAME
|
186
|
-
config.api_key['AUTHORIZER_NAME'] = 'YOUR API KEY'
|
187
|
-
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
188
|
-
# config.api_key_prefix['AUTHORIZER_NAME'] = 'Bearer'
|
189
|
-
end
|
190
|
-
|
191
|
-
api_instance = MassPayRubySdk::LoadApi.new
|
192
|
-
user_token = 'user_token_example' # String | Token representing the user who owns the wallet
|
193
|
-
wallet_token = 'wallet_token_example' # String | Token representing the wallet
|
194
|
-
token = 'autopay_3684cc43-fe3b-4994-8ca1-7dc0db94430f' # String | Autopay token to delete
|
195
|
-
|
196
|
-
begin
|
197
|
-
# Delete autopay rule
|
198
|
-
api_instance.delete_autopay_rule(user_token, wallet_token, token)
|
199
|
-
rescue MassPayRubySdk::ApiError => e
|
200
|
-
puts "Error when calling LoadApi->delete_autopay_rule: #{e}"
|
201
|
-
end
|
202
|
-
```
|
203
|
-
|
204
|
-
#### Using the delete_autopay_rule_with_http_info variant
|
205
|
-
|
206
|
-
This returns an Array which contains the response data (`nil` in this case), status code and headers.
|
207
|
-
|
208
|
-
> <Array(nil, Integer, Hash)> delete_autopay_rule_with_http_info(user_token, wallet_token, token)
|
209
|
-
|
210
|
-
```ruby
|
211
|
-
begin
|
212
|
-
# Delete autopay rule
|
213
|
-
data, status_code, headers = api_instance.delete_autopay_rule_with_http_info(user_token, wallet_token, token)
|
214
|
-
p status_code # => 2xx
|
215
|
-
p headers # => { ... }
|
216
|
-
p data # => nil
|
217
|
-
rescue MassPayRubySdk::ApiError => e
|
218
|
-
puts "Error when calling LoadApi->delete_autopay_rule_with_http_info: #{e}"
|
219
|
-
end
|
220
|
-
```
|
221
|
-
|
222
|
-
### Parameters
|
223
|
-
|
224
|
-
| Name | Type | Description | Notes |
|
225
|
-
| ---- | ---- | ----------- | ----- |
|
226
|
-
| **user_token** | **String** | Token representing the user who owns the wallet | |
|
227
|
-
| **wallet_token** | **String** | Token representing the wallet | |
|
228
|
-
| **token** | **String** | Autopay token to delete | |
|
229
|
-
|
230
|
-
### Return type
|
231
|
-
|
232
|
-
nil (empty response body)
|
233
|
-
|
234
|
-
### Authorization
|
235
|
-
|
236
|
-
[AUTHORIZER_NAME](../README.md#AUTHORIZER_NAME)
|
237
|
-
|
238
|
-
### HTTP request headers
|
239
|
-
|
240
|
-
- **Content-Type**: Not defined
|
241
|
-
- **Accept**: application/json
|
242
|
-
|
243
|
-
|
244
|
-
## get_autopay_rules
|
245
|
-
|
246
|
-
> <Array<AutopayResp>> get_autopay_rules(user_token, wallet_token)
|
247
|
-
|
248
|
-
Get all autopay rules
|
249
|
-
|
250
|
-
This **GET** endpoint is used to retrieve all autopay rules currently applied to the provided wallet token. <br> You can use this endpoint to obtain information about the autopay rules 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 array containing details for each autopay rule, including the token, `destination_token` and percentage.
|
251
|
-
|
252
|
-
### Examples
|
253
|
-
|
254
|
-
```ruby
|
255
|
-
require 'time'
|
256
|
-
require 'masspay_ruby_sdk'
|
257
|
-
# setup authorization
|
258
|
-
MassPayRubySdk.configure do |config|
|
259
|
-
# Configure API key authorization: AUTHORIZER_NAME
|
260
|
-
config.api_key['AUTHORIZER_NAME'] = 'YOUR API KEY'
|
261
|
-
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
262
|
-
# config.api_key_prefix['AUTHORIZER_NAME'] = 'Bearer'
|
263
|
-
end
|
264
|
-
|
265
|
-
api_instance = MassPayRubySdk::LoadApi.new
|
266
|
-
user_token = 'user_token_example' # String | Token representing the user who owns the wallet
|
267
|
-
wallet_token = 'wallet_token_example' # String | Token representing the wallet
|
268
|
-
|
269
|
-
begin
|
270
|
-
# Get all autopay rules
|
271
|
-
result = api_instance.get_autopay_rules(user_token, wallet_token)
|
272
|
-
p result
|
273
|
-
rescue MassPayRubySdk::ApiError => e
|
274
|
-
puts "Error when calling LoadApi->get_autopay_rules: #{e}"
|
275
|
-
end
|
276
|
-
```
|
277
|
-
|
278
|
-
#### Using the get_autopay_rules_with_http_info variant
|
279
|
-
|
280
|
-
This returns an Array which contains the response data, status code and headers.
|
281
|
-
|
282
|
-
> <Array(<Array<AutopayResp>>, Integer, Hash)> get_autopay_rules_with_http_info(user_token, wallet_token)
|
283
|
-
|
284
|
-
```ruby
|
285
|
-
begin
|
286
|
-
# Get all autopay rules
|
287
|
-
data, status_code, headers = api_instance.get_autopay_rules_with_http_info(user_token, wallet_token)
|
288
|
-
p status_code # => 2xx
|
289
|
-
p headers # => { ... }
|
290
|
-
p data # => <Array<AutopayResp>>
|
291
|
-
rescue MassPayRubySdk::ApiError => e
|
292
|
-
puts "Error when calling LoadApi->get_autopay_rules_with_http_info: #{e}"
|
293
|
-
end
|
294
|
-
```
|
295
|
-
|
296
|
-
### Parameters
|
297
|
-
|
298
|
-
| Name | Type | Description | Notes |
|
299
|
-
| ---- | ---- | ----------- | ----- |
|
300
|
-
| **user_token** | **String** | Token representing the user who owns the wallet | |
|
301
|
-
| **wallet_token** | **String** | Token representing the wallet | |
|
302
|
-
|
303
|
-
### Return type
|
304
|
-
|
305
|
-
[**Array<AutopayResp>**](AutopayResp.md)
|
306
|
-
|
307
|
-
### Authorization
|
308
|
-
|
309
|
-
[AUTHORIZER_NAME](../README.md#AUTHORIZER_NAME)
|
310
|
-
|
311
|
-
### HTTP request headers
|
312
|
-
|
313
|
-
- **Content-Type**: Not defined
|
314
|
-
- **Accept**: application/json
|
315
|
-
|
316
|
-
|
317
|
-
## get_user_loads_by_token
|
318
|
-
|
319
|
-
> <Array<Loads>> get_user_loads_by_token(user_token, opts)
|
320
|
-
|
321
|
-
Get history of loads by user token
|
322
|
-
|
323
|
-
This **GET** endpoint is used to retrieve a transaction history of all loads that were made to the provided user token, including scheduled loads. <br> You can use this endpoint to obtain a comprehensive history of loads for the user token, allowing you to track and analyze their incoming payments over time. <br> To use this endpoint, you need to provide the `user_token` as a parameter in the URL Path. <br> The endpoint will then return a JSON array of load transactions, each including transactions details.
|
324
|
-
|
325
|
-
### Examples
|
326
|
-
|
327
|
-
```ruby
|
328
|
-
require 'time'
|
329
|
-
require 'masspay_ruby_sdk'
|
330
|
-
# setup authorization
|
331
|
-
MassPayRubySdk.configure do |config|
|
332
|
-
# Configure API key authorization: AUTHORIZER_NAME
|
333
|
-
config.api_key['AUTHORIZER_NAME'] = 'YOUR API KEY'
|
334
|
-
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
335
|
-
# config.api_key_prefix['AUTHORIZER_NAME'] = 'Bearer'
|
336
|
-
end
|
337
|
-
|
338
|
-
api_instance = MassPayRubySdk::LoadApi.new
|
339
|
-
user_token = 'user_token_example' # String | The user token that needs to be fetched.
|
340
|
-
opts = {
|
341
|
-
idempotency_key: 'idempotency_key_example' # String | Unique key to prevent duplicate processing
|
342
|
-
}
|
343
|
-
|
344
|
-
begin
|
345
|
-
# Get history of loads by user token
|
346
|
-
result = api_instance.get_user_loads_by_token(user_token, opts)
|
347
|
-
p result
|
348
|
-
rescue MassPayRubySdk::ApiError => e
|
349
|
-
puts "Error when calling LoadApi->get_user_loads_by_token: #{e}"
|
350
|
-
end
|
351
|
-
```
|
352
|
-
|
353
|
-
#### Using the get_user_loads_by_token_with_http_info variant
|
354
|
-
|
355
|
-
This returns an Array which contains the response data, status code and headers.
|
356
|
-
|
357
|
-
> <Array(<Array<Loads>>, Integer, Hash)> get_user_loads_by_token_with_http_info(user_token, opts)
|
358
|
-
|
359
|
-
```ruby
|
360
|
-
begin
|
361
|
-
# Get history of loads by user token
|
362
|
-
data, status_code, headers = api_instance.get_user_loads_by_token_with_http_info(user_token, opts)
|
363
|
-
p status_code # => 2xx
|
364
|
-
p headers # => { ... }
|
365
|
-
p data # => <Array<Loads>>
|
366
|
-
rescue MassPayRubySdk::ApiError => e
|
367
|
-
puts "Error when calling LoadApi->get_user_loads_by_token_with_http_info: #{e}"
|
368
|
-
end
|
369
|
-
```
|
370
|
-
|
371
|
-
### Parameters
|
372
|
-
|
373
|
-
| Name | Type | Description | Notes |
|
374
|
-
| ---- | ---- | ----------- | ----- |
|
375
|
-
| **user_token** | **String** | The user token that needs to be fetched. | |
|
376
|
-
| **idempotency_key** | **String** | Unique key to prevent duplicate processing | [optional] |
|
377
|
-
|
378
|
-
### Return type
|
379
|
-
|
380
|
-
[**Array<Loads>**](Loads.md)
|
381
|
-
|
382
|
-
### Authorization
|
383
|
-
|
384
|
-
[AUTHORIZER_NAME](../README.md#AUTHORIZER_NAME)
|
385
|
-
|
386
|
-
### HTTP request headers
|
387
|
-
|
388
|
-
- **Content-Type**: Not defined
|
389
|
-
- **Accept**: application/json
|
390
|
-
|
391
|
-
|
392
|
-
## load_user
|
393
|
-
|
394
|
-
> <LoadTxnResp> load_user(user_token, load_txn, opts)
|
395
|
-
|
396
|
-
Initiate a load transaction
|
397
|
-
|
398
|
-
This **POST** endpoint is used to initiate a load transaction, allowing you to add funds to a user token's wallet. <br> To use this endpoint, you need to provide the `user_token` as a parameter in the URL Path. You also need to provide the `client_load_id`, `source_token`, and amount as JSON parameters in the Request Body. The `client_load_id` is a unique identifier for the transaction that you can use to track it, while the `source_token` is the token or account from which the funds will be loaded. The amount parameter specifies the amount of funds to be loaded into the user's wallet. <br> The response will contain a JSON object indicating the status of the load transaction and any relevant details.
|
399
|
-
|
400
|
-
### Examples
|
401
|
-
|
402
|
-
```ruby
|
403
|
-
require 'time'
|
404
|
-
require 'masspay_ruby_sdk'
|
405
|
-
# setup authorization
|
406
|
-
MassPayRubySdk.configure do |config|
|
407
|
-
# Configure API key authorization: AUTHORIZER_NAME
|
408
|
-
config.api_key['AUTHORIZER_NAME'] = 'YOUR API KEY'
|
409
|
-
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
410
|
-
# config.api_key_prefix['AUTHORIZER_NAME'] = 'Bearer'
|
411
|
-
end
|
412
|
-
|
413
|
-
api_instance = MassPayRubySdk::LoadApi.new
|
414
|
-
user_token = 'user_token_example' # String | Token representing the user to load
|
415
|
-
load_txn = MassPayRubySdk::LoadTxn.new({client_load_id: 'aEjn345', source_token: 'ba4275f2-bae1-488d-9d6f-20af1cd83574', amount: 100.5}) # LoadTxn | Load information
|
416
|
-
opts = {
|
417
|
-
idempotency_key: 'idempotency_key_example' # String | Unique key to prevent duplicate processing
|
418
|
-
}
|
419
|
-
|
420
|
-
begin
|
421
|
-
# Initiate a load transaction
|
422
|
-
result = api_instance.load_user(user_token, load_txn, opts)
|
423
|
-
p result
|
424
|
-
rescue MassPayRubySdk::ApiError => e
|
425
|
-
puts "Error when calling LoadApi->load_user: #{e}"
|
426
|
-
end
|
427
|
-
```
|
428
|
-
|
429
|
-
#### Using the load_user_with_http_info variant
|
430
|
-
|
431
|
-
This returns an Array which contains the response data, status code and headers.
|
432
|
-
|
433
|
-
> <Array(<LoadTxnResp>, Integer, Hash)> load_user_with_http_info(user_token, load_txn, opts)
|
434
|
-
|
435
|
-
```ruby
|
436
|
-
begin
|
437
|
-
# Initiate a load transaction
|
438
|
-
data, status_code, headers = api_instance.load_user_with_http_info(user_token, load_txn, opts)
|
439
|
-
p status_code # => 2xx
|
440
|
-
p headers # => { ... }
|
441
|
-
p data # => <LoadTxnResp>
|
442
|
-
rescue MassPayRubySdk::ApiError => e
|
443
|
-
puts "Error when calling LoadApi->load_user_with_http_info: #{e}"
|
444
|
-
end
|
445
|
-
```
|
446
|
-
|
447
|
-
### Parameters
|
448
|
-
|
449
|
-
| Name | Type | Description | Notes |
|
450
|
-
| ---- | ---- | ----------- | ----- |
|
451
|
-
| **user_token** | **String** | Token representing the user to load | |
|
452
|
-
| **load_txn** | [**LoadTxn**](LoadTxn.md) | Load information | |
|
453
|
-
| **idempotency_key** | **String** | Unique key to prevent duplicate processing | [optional] |
|
454
|
-
|
455
|
-
### Return type
|
456
|
-
|
457
|
-
[**LoadTxnResp**](LoadTxnResp.md)
|
458
|
-
|
459
|
-
### Authorization
|
460
|
-
|
461
|
-
[AUTHORIZER_NAME](../README.md#AUTHORIZER_NAME)
|
462
|
-
|
463
|
-
### HTTP request headers
|
464
|
-
|
465
|
-
- **Content-Type**: application/json
|
466
|
-
- **Accept**: application/json
|
467
|
-
|
468
|
-
|
469
|
-
## load_user_token_put
|
470
|
-
|
471
|
-
> <ResendBalanceNotification200Response> load_user_token_put(user_token, load_token, opts)
|
472
|
-
|
473
|
-
Resend Load Notification
|
474
|
-
|
475
|
-
This **PUT** endpoint is used to resend a load notification to the user associated with the provided `user_token` for a specific load transaction. <br> You can use this endpoint to help ensure that users are notified promptly and accurately of any incoming funds or other important payment events. <br> To use this endpoint, you need to provide the `user_token` as a parameter in the URL Path, and the `load_token` as a parameter in the Query string. The endpoint will then resend a notification to the user for the specified load transaction. <br> The response will contain a JSON object indicating the status of the request.
|
476
|
-
|
477
|
-
### Examples
|
478
|
-
|
479
|
-
```ruby
|
480
|
-
require 'time'
|
481
|
-
require 'masspay_ruby_sdk'
|
482
|
-
# setup authorization
|
483
|
-
MassPayRubySdk.configure do |config|
|
484
|
-
# Configure API key authorization: AUTHORIZER_NAME
|
485
|
-
config.api_key['AUTHORIZER_NAME'] = 'YOUR API KEY'
|
486
|
-
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
487
|
-
# config.api_key_prefix['AUTHORIZER_NAME'] = 'Bearer'
|
488
|
-
end
|
489
|
-
|
490
|
-
api_instance = MassPayRubySdk::LoadApi.new
|
491
|
-
user_token = 'user_token_example' # String | Token representing the user to load/fetch loads for
|
492
|
-
load_token = '38400000-8cf0-11bd-b23e-10b96e4ef00d' # String | Load token
|
493
|
-
opts = {
|
494
|
-
idempotency_key: 'idempotency_key_example' # String | Unique key to prevent duplicate processing
|
495
|
-
}
|
496
|
-
|
497
|
-
begin
|
498
|
-
# Resend Load Notification
|
499
|
-
result = api_instance.load_user_token_put(user_token, load_token, opts)
|
500
|
-
p result
|
501
|
-
rescue MassPayRubySdk::ApiError => e
|
502
|
-
puts "Error when calling LoadApi->load_user_token_put: #{e}"
|
503
|
-
end
|
504
|
-
```
|
505
|
-
|
506
|
-
#### Using the load_user_token_put_with_http_info variant
|
507
|
-
|
508
|
-
This returns an Array which contains the response data, status code and headers.
|
509
|
-
|
510
|
-
> <Array(<ResendBalanceNotification200Response>, Integer, Hash)> load_user_token_put_with_http_info(user_token, load_token, opts)
|
511
|
-
|
512
|
-
```ruby
|
513
|
-
begin
|
514
|
-
# Resend Load Notification
|
515
|
-
data, status_code, headers = api_instance.load_user_token_put_with_http_info(user_token, load_token, opts)
|
516
|
-
p status_code # => 2xx
|
517
|
-
p headers # => { ... }
|
518
|
-
p data # => <ResendBalanceNotification200Response>
|
519
|
-
rescue MassPayRubySdk::ApiError => e
|
520
|
-
puts "Error when calling LoadApi->load_user_token_put_with_http_info: #{e}"
|
521
|
-
end
|
522
|
-
```
|
523
|
-
|
524
|
-
### Parameters
|
525
|
-
|
526
|
-
| Name | Type | Description | Notes |
|
527
|
-
| ---- | ---- | ----------- | ----- |
|
528
|
-
| **user_token** | **String** | Token representing the user to load/fetch loads for | |
|
529
|
-
| **load_token** | **String** | Load token | |
|
530
|
-
| **idempotency_key** | **String** | Unique key to prevent duplicate processing | [optional] |
|
531
|
-
|
532
|
-
### Return type
|
533
|
-
|
534
|
-
[**ResendBalanceNotification200Response**](ResendBalanceNotification200Response.md)
|
535
|
-
|
536
|
-
### Authorization
|
537
|
-
|
538
|
-
[AUTHORIZER_NAME](../README.md#AUTHORIZER_NAME)
|
539
|
-
|
540
|
-
### HTTP request headers
|
541
|
-
|
542
|
-
- **Content-Type**: Not defined
|
543
|
-
- **Accept**: application/json
|
544
|
-
|
545
|
-
|
546
|
-
## resend_balance_notification
|
547
|
-
|
548
|
-
> <ResendBalanceNotification200Response> resend_balance_notification(user_token, opts)
|
549
|
-
|
550
|
-
Resend Balance Notification
|
551
|
-
|
552
|
-
|
553
|
-
|
554
|
-
### Examples
|
555
|
-
|
556
|
-
```ruby
|
557
|
-
require 'time'
|
558
|
-
require 'masspay_ruby_sdk'
|
559
|
-
# setup authorization
|
560
|
-
MassPayRubySdk.configure do |config|
|
561
|
-
# Configure API key authorization: AUTHORIZER_NAME
|
562
|
-
config.api_key['AUTHORIZER_NAME'] = 'YOUR API KEY'
|
563
|
-
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
564
|
-
# config.api_key_prefix['AUTHORIZER_NAME'] = 'Bearer'
|
565
|
-
end
|
566
|
-
|
567
|
-
api_instance = MassPayRubySdk::LoadApi.new
|
568
|
-
user_token = '38400000-8cf0-11bd-b23e-10b96e4ef00d' # String | Token representing the user who owns the wallet
|
569
|
-
opts = {
|
570
|
-
idempotency_key: 'idempotency_key_example', # String | Unique key to prevent duplicate processing
|
571
|
-
wallet_token: '38400000-8cf0-11bd-b23e-10b96e4ef00d' # String | Optional wallet token. If none is provided, select the first wallet available
|
572
|
-
}
|
573
|
-
|
574
|
-
begin
|
575
|
-
# Resend Balance Notification
|
576
|
-
result = api_instance.resend_balance_notification(user_token, opts)
|
577
|
-
p result
|
578
|
-
rescue MassPayRubySdk::ApiError => e
|
579
|
-
puts "Error when calling LoadApi->resend_balance_notification: #{e}"
|
580
|
-
end
|
581
|
-
```
|
582
|
-
|
583
|
-
#### Using the resend_balance_notification_with_http_info variant
|
584
|
-
|
585
|
-
This returns an Array which contains the response data, status code and headers.
|
586
|
-
|
587
|
-
> <Array(<ResendBalanceNotification200Response>, Integer, Hash)> resend_balance_notification_with_http_info(user_token, opts)
|
588
|
-
|
589
|
-
```ruby
|
590
|
-
begin
|
591
|
-
# Resend Balance Notification
|
592
|
-
data, status_code, headers = api_instance.resend_balance_notification_with_http_info(user_token, opts)
|
593
|
-
p status_code # => 2xx
|
594
|
-
p headers # => { ... }
|
595
|
-
p data # => <ResendBalanceNotification200Response>
|
596
|
-
rescue MassPayRubySdk::ApiError => e
|
597
|
-
puts "Error when calling LoadApi->resend_balance_notification_with_http_info: #{e}"
|
598
|
-
end
|
599
|
-
```
|
600
|
-
|
601
|
-
### Parameters
|
602
|
-
|
603
|
-
| Name | Type | Description | Notes |
|
604
|
-
| ---- | ---- | ----------- | ----- |
|
605
|
-
| **user_token** | **String** | Token representing the user who owns the wallet | |
|
606
|
-
| **idempotency_key** | **String** | Unique key to prevent duplicate processing | [optional] |
|
607
|
-
| **wallet_token** | **String** | Optional wallet token. If none is provided, select the first wallet available | [optional] |
|
608
|
-
|
609
|
-
### Return type
|
610
|
-
|
611
|
-
[**ResendBalanceNotification200Response**](ResendBalanceNotification200Response.md)
|
612
|
-
|
613
|
-
### Authorization
|
614
|
-
|
615
|
-
[AUTHORIZER_NAME](../README.md#AUTHORIZER_NAME)
|
616
|
-
|
617
|
-
### HTTP request headers
|
618
|
-
|
619
|
-
- **Content-Type**: Not defined
|
620
|
-
- **Accept**: application/json
|
621
|
-
|
data/docs/LoadTxn.md
DELETED
@@ -1,32 +0,0 @@
|
|
1
|
-
# MassPayRubySdk::LoadTxn
|
2
|
-
|
3
|
-
## Properties
|
4
|
-
|
5
|
-
| Name | Type | Description | Notes |
|
6
|
-
| ---- | ---- | ----------- | ----- |
|
7
|
-
| **client_load_id** | **String** | A client defined load identifier. This is the unique ID assigned to the load on your system. Max 50 characters. | |
|
8
|
-
| **source_token** | **String** | Token that represents the funding source i.e. bank account, wallet. 36 characters long | |
|
9
|
-
| **amount** | **Float** | The amount to credit the user's wallet in source currency | |
|
10
|
-
| **source_currency_code** | **String** | The currency originating balance is stored in. Using [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) format. In most cases this value will be USD, and therefore the defaut value if none is provided. There is a special currency case for PNTS - learn more [here] (#Points) | [optional] |
|
11
|
-
| **notes** | **String** | A description for the load. Will be visible to the user receiving the load | [optional] |
|
12
|
-
| **notify_user** | **Boolean** | Should we notify the user via email that they've received a load? If the user has no existing account, they will receive instructions to establish such account. | [optional][default to true] |
|
13
|
-
| **time_to_process** | **String** | Future date/time to process the load on. If none is provided, it is processed right away. Time to be provided in UTC [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) | [optional] |
|
14
|
-
| **metadata** | **Object** | Optional JSON object with attributes that can later be searched to locate this load. Do not include PII as this object is not encrypted. | [optional] |
|
15
|
-
|
16
|
-
## Example
|
17
|
-
|
18
|
-
```ruby
|
19
|
-
require 'masspay_ruby_sdk'
|
20
|
-
|
21
|
-
instance = MassPayRubySdk::LoadTxn.new(
|
22
|
-
client_load_id: aEjn345,
|
23
|
-
source_token: ba4275f2-bae1-488d-9d6f-20af1cd83574,
|
24
|
-
amount: 100.5,
|
25
|
-
source_currency_code: USD,
|
26
|
-
notes: Commission payment for July,
|
27
|
-
notify_user: null,
|
28
|
-
time_to_process: The date/time to process the load. In UTC. 2021-02-25T23:00:00Z,
|
29
|
-
metadata: {"group_id":541}
|
30
|
-
)
|
31
|
-
```
|
32
|
-
|
data/docs/LoadTxnResp.md
DELETED
@@ -1,20 +0,0 @@
|
|
1
|
-
# MassPayRubySdk::LoadTxnResp
|
2
|
-
|
3
|
-
## Properties
|
4
|
-
|
5
|
-
| Name | Type | Description | Notes |
|
6
|
-
| ---- | ---- | ----------- | ----- |
|
7
|
-
| **load_token** | **String** | Token that represents the load that was just created. | |
|
8
|
-
| **status** | **String** | Status that indicates whether the transaction was successfully processed. If `COMPLETED`, the load was successfully processed. `CANCELLED` indicates a generic error. and `SCHEDULED` means the load was successfully scheduled | |
|
9
|
-
|
10
|
-
## Example
|
11
|
-
|
12
|
-
```ruby
|
13
|
-
require 'masspay_ruby_sdk'
|
14
|
-
|
15
|
-
instance = MassPayRubySdk::LoadTxnResp.new(
|
16
|
-
load_token: ba4275f2-bae1-488d-9d6f-20af1cd83574,
|
17
|
-
status: null
|
18
|
-
)
|
19
|
-
```
|
20
|
-
|