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/AttributeApi.md
DELETED
@@ -1,168 +0,0 @@
|
|
1
|
-
# MassPayRubySdk::AttributeApi
|
2
|
-
|
3
|
-
All URIs are relative to *https://api.masspay.io/v0.1.4*
|
4
|
-
|
5
|
-
| Method | HTTP request | Description |
|
6
|
-
| ------ | ------------ | ----------- |
|
7
|
-
| [**get_attrs**](AttributeApi.md#get_attrs) | **GET** /attribute/{user_token}/{destination_token}/{currency} | Get user attributes for destination_token |
|
8
|
-
| [**store_attrs**](AttributeApi.md#store_attrs) | **POST** /attribute/{user_token}/{destination_token}/{currency} | Store user attributes |
|
9
|
-
|
10
|
-
|
11
|
-
## get_attrs
|
12
|
-
|
13
|
-
> <Array<AttrsRequirement>> get_attrs(currency, user_token, destination_token, opts)
|
14
|
-
|
15
|
-
Get user attributes for destination_token
|
16
|
-
|
17
|
-
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.
|
18
|
-
|
19
|
-
### Examples
|
20
|
-
|
21
|
-
```ruby
|
22
|
-
require 'time'
|
23
|
-
require 'masspay_ruby_sdk'
|
24
|
-
# setup authorization
|
25
|
-
MassPayRubySdk.configure do |config|
|
26
|
-
# Configure API key authorization: AUTHORIZER_NAME
|
27
|
-
config.api_key['AUTHORIZER_NAME'] = 'YOUR API KEY'
|
28
|
-
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
29
|
-
# config.api_key_prefix['AUTHORIZER_NAME'] = 'Bearer'
|
30
|
-
end
|
31
|
-
|
32
|
-
api_instance = MassPayRubySdk::AttributeApi.new
|
33
|
-
currency = 'BRL' # String | The destination currency sending funds to. Using [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) format.
|
34
|
-
user_token = 'user_token_example' # String | Token representing the user to retrieve attributes for
|
35
|
-
destination_token = 'destination_token_example' # String | Token that represents the payout destination i.e. Omnex->Brazil->Bank Deposit->Itau. To be retrieved from the #pricing callback.
|
36
|
-
opts = {
|
37
|
-
idempotency_key: 'idempotency_key_example' # String | Unique key to prevent duplicate processing
|
38
|
-
}
|
39
|
-
|
40
|
-
begin
|
41
|
-
# Get user attributes for destination_token
|
42
|
-
result = api_instance.get_attrs(currency, user_token, destination_token, opts)
|
43
|
-
p result
|
44
|
-
rescue MassPayRubySdk::ApiError => e
|
45
|
-
puts "Error when calling AttributeApi->get_attrs: #{e}"
|
46
|
-
end
|
47
|
-
```
|
48
|
-
|
49
|
-
#### Using the get_attrs_with_http_info variant
|
50
|
-
|
51
|
-
This returns an Array which contains the response data, status code and headers.
|
52
|
-
|
53
|
-
> <Array(<Array<AttrsRequirement>>, Integer, Hash)> get_attrs_with_http_info(currency, user_token, destination_token, opts)
|
54
|
-
|
55
|
-
```ruby
|
56
|
-
begin
|
57
|
-
# Get user attributes for destination_token
|
58
|
-
data, status_code, headers = api_instance.get_attrs_with_http_info(currency, user_token, destination_token, opts)
|
59
|
-
p status_code # => 2xx
|
60
|
-
p headers # => { ... }
|
61
|
-
p data # => <Array<AttrsRequirement>>
|
62
|
-
rescue MassPayRubySdk::ApiError => e
|
63
|
-
puts "Error when calling AttributeApi->get_attrs_with_http_info: #{e}"
|
64
|
-
end
|
65
|
-
```
|
66
|
-
|
67
|
-
### Parameters
|
68
|
-
|
69
|
-
| Name | Type | Description | Notes |
|
70
|
-
| ---- | ---- | ----------- | ----- |
|
71
|
-
| **currency** | **String** | The destination currency sending funds to. Using [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) format. | |
|
72
|
-
| **user_token** | **String** | Token representing the user to retrieve attributes for | |
|
73
|
-
| **destination_token** | **String** | Token that represents the payout destination i.e. Omnex->Brazil->Bank Deposit->Itau. To be retrieved from the #pricing callback. | |
|
74
|
-
| **idempotency_key** | **String** | Unique key to prevent duplicate processing | [optional] |
|
75
|
-
|
76
|
-
### Return type
|
77
|
-
|
78
|
-
[**Array<AttrsRequirement>**](AttrsRequirement.md)
|
79
|
-
|
80
|
-
### Authorization
|
81
|
-
|
82
|
-
[AUTHORIZER_NAME](../README.md#AUTHORIZER_NAME)
|
83
|
-
|
84
|
-
### HTTP request headers
|
85
|
-
|
86
|
-
- **Content-Type**: Not defined
|
87
|
-
- **Accept**: application/json
|
88
|
-
|
89
|
-
|
90
|
-
## store_attrs
|
91
|
-
|
92
|
-
> store_attrs(currency, user_token, destination_token, attr_txn, opts)
|
93
|
-
|
94
|
-
Store user attributes
|
95
|
-
|
96
|
-
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.
|
97
|
-
|
98
|
-
### Examples
|
99
|
-
|
100
|
-
```ruby
|
101
|
-
require 'time'
|
102
|
-
require 'masspay_ruby_sdk'
|
103
|
-
# setup authorization
|
104
|
-
MassPayRubySdk.configure do |config|
|
105
|
-
# Configure API key authorization: AUTHORIZER_NAME
|
106
|
-
config.api_key['AUTHORIZER_NAME'] = 'YOUR API KEY'
|
107
|
-
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
108
|
-
# config.api_key_prefix['AUTHORIZER_NAME'] = 'Bearer'
|
109
|
-
end
|
110
|
-
|
111
|
-
api_instance = MassPayRubySdk::AttributeApi.new
|
112
|
-
currency = 'BRL' # String | The destination currency sending funds to. Using [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) format.
|
113
|
-
user_token = 'user_token_example' # String | Token representing the user to store attributes for
|
114
|
-
destination_token = 'destination_token_example' # String | Token that represents the payout destination i.e. Omnex->Brazil->Bank Deposit->Itau. To be retrieved from the #pricing callback.
|
115
|
-
attr_txn = MassPayRubySdk::AttrTxn.new({values: [MassPayRubySdk::AttrValue.new({token: 'e2ca24e9-c546-4c64-90d2-cb8e70e7c9ba', value: '432532532'})]}) # AttrTxn | Attr parameters to store
|
116
|
-
opts = {
|
117
|
-
idempotency_key: 'idempotency_key_example' # String | Unique key to prevent duplicate processing
|
118
|
-
}
|
119
|
-
|
120
|
-
begin
|
121
|
-
# Store user attributes
|
122
|
-
api_instance.store_attrs(currency, user_token, destination_token, attr_txn, opts)
|
123
|
-
rescue MassPayRubySdk::ApiError => e
|
124
|
-
puts "Error when calling AttributeApi->store_attrs: #{e}"
|
125
|
-
end
|
126
|
-
```
|
127
|
-
|
128
|
-
#### Using the store_attrs_with_http_info variant
|
129
|
-
|
130
|
-
This returns an Array which contains the response data (`nil` in this case), status code and headers.
|
131
|
-
|
132
|
-
> <Array(nil, Integer, Hash)> store_attrs_with_http_info(currency, user_token, destination_token, attr_txn, opts)
|
133
|
-
|
134
|
-
```ruby
|
135
|
-
begin
|
136
|
-
# Store user attributes
|
137
|
-
data, status_code, headers = api_instance.store_attrs_with_http_info(currency, user_token, destination_token, attr_txn, opts)
|
138
|
-
p status_code # => 2xx
|
139
|
-
p headers # => { ... }
|
140
|
-
p data # => nil
|
141
|
-
rescue MassPayRubySdk::ApiError => e
|
142
|
-
puts "Error when calling AttributeApi->store_attrs_with_http_info: #{e}"
|
143
|
-
end
|
144
|
-
```
|
145
|
-
|
146
|
-
### Parameters
|
147
|
-
|
148
|
-
| Name | Type | Description | Notes |
|
149
|
-
| ---- | ---- | ----------- | ----- |
|
150
|
-
| **currency** | **String** | The destination currency sending funds to. Using [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) format. | |
|
151
|
-
| **user_token** | **String** | Token representing the user to store attributes for | |
|
152
|
-
| **destination_token** | **String** | Token that represents the payout destination i.e. Omnex->Brazil->Bank Deposit->Itau. To be retrieved from the #pricing callback. | |
|
153
|
-
| **attr_txn** | [**AttrTxn**](AttrTxn.md) | Attr parameters to store | |
|
154
|
-
| **idempotency_key** | **String** | Unique key to prevent duplicate processing | [optional] |
|
155
|
-
|
156
|
-
### Return type
|
157
|
-
|
158
|
-
nil (empty response body)
|
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
|
-
|
data/docs/AttrsRequirement.md
DELETED
@@ -1,36 +0,0 @@
|
|
1
|
-
# MassPayRubySdk::AttrsRequirement
|
2
|
-
|
3
|
-
## Properties
|
4
|
-
|
5
|
-
| Name | Type | Description | Notes |
|
6
|
-
| ---- | ---- | ----------- | ----- |
|
7
|
-
| **token** | **String** | The token that represents the attribute. | |
|
8
|
-
| **attr_set_token** | **String** | The token that represents the stored attributes for this payer. You would use this token in attr_set_token of `initiatePayout` if you have to specify an account number when paying a transaction out. | [optional] |
|
9
|
-
| **label** | **String** | The label that describes that required attribute | [optional] |
|
10
|
-
| **validation** | **String** | RegEx that validates that input | [optional] |
|
11
|
-
| **is_optional** | **Boolean** | Flag to indicate whether this field is required or not | [optional] |
|
12
|
-
| **value** | **String** | The existing value that is stored. 'Null' if no existing value is stored. | |
|
13
|
-
| **expected_value** | **String** | Written explanation of the value that the regex validation requires | [optional] |
|
14
|
-
| **type** | **String** | The type of attribute | [optional] |
|
15
|
-
| **input_type** | **String** | The type of input field that is suggested for this this attribute | [default to 'text'] |
|
16
|
-
| **last_attr_value_used** | **Boolean** | If set to true, it means this was the last value that was used and if no attr_set_token is provided to init payout, this value will be used by default | [optional] |
|
17
|
-
|
18
|
-
## Example
|
19
|
-
|
20
|
-
```ruby
|
21
|
-
require 'masspay_ruby_sdk'
|
22
|
-
|
23
|
-
instance = MassPayRubySdk::AttrsRequirement.new(
|
24
|
-
token: attr_e2ca24e9-c546-4c64-90d2-cb8e70e7c9ba,
|
25
|
-
attr_set_token: attr_set_e2ca24e9-c546-4c64-90d2-cb8e70e7c9ba,
|
26
|
-
label: Checking Account Number,
|
27
|
-
validation: [0-9]{50},
|
28
|
-
is_optional: true,
|
29
|
-
value: 432532532,
|
30
|
-
expected_value: Date format MM/DD/YYYY,
|
31
|
-
type: BankAccountNumber,
|
32
|
-
input_type: text,
|
33
|
-
last_attr_value_used: null
|
34
|
-
)
|
35
|
-
```
|
36
|
-
|
data/docs/AutopayResp.md
DELETED
@@ -1,22 +0,0 @@
|
|
1
|
-
# MassPayRubySdk::AutopayResp
|
2
|
-
|
3
|
-
## Properties
|
4
|
-
|
5
|
-
| Name | Type | Description | Notes |
|
6
|
-
| ---- | ---- | ----------- | ----- |
|
7
|
-
| **token** | **String** | Autopay token | |
|
8
|
-
| **destination_token** | **String** | The destination_token to autopay (send payout to) | |
|
9
|
-
| **percentage** | **Float** | The percent of incoming load that should be autopaid to the destination_token | [default to 100] |
|
10
|
-
|
11
|
-
## Example
|
12
|
-
|
13
|
-
```ruby
|
14
|
-
require 'masspay_ruby_sdk'
|
15
|
-
|
16
|
-
instance = MassPayRubySdk::AutopayResp.new(
|
17
|
-
token: autopay_3684cc43-fe3b-4994-8ca1-7dc0db94430f,
|
18
|
-
destination_token: dest_d2138fd0-00be-45a8-985f-4f5bde500962,
|
19
|
-
percentage: 50
|
20
|
-
)
|
21
|
-
```
|
22
|
-
|
data/docs/AutopayRule.md
DELETED
@@ -1,20 +0,0 @@
|
|
1
|
-
# MassPayRubySdk::AutopayRule
|
2
|
-
|
3
|
-
## Properties
|
4
|
-
|
5
|
-
| Name | Type | Description | Notes |
|
6
|
-
| ---- | ---- | ----------- | ----- |
|
7
|
-
| **destination_token** | **String** | The destination_token to autopay (send payout to) | |
|
8
|
-
| **percentage** | **Float** | The percent of incoming load that should be autopaid to the destination_token | [default to 100] |
|
9
|
-
|
10
|
-
## Example
|
11
|
-
|
12
|
-
```ruby
|
13
|
-
require 'masspay_ruby_sdk'
|
14
|
-
|
15
|
-
instance = MassPayRubySdk::AutopayRule.new(
|
16
|
-
destination_token: dest_d2138fd0-00be-45a8-985f-4f5bde500962,
|
17
|
-
percentage: 50
|
18
|
-
)
|
19
|
-
```
|
20
|
-
|
@@ -1,22 +0,0 @@
|
|
1
|
-
# MassPayRubySdk::AvailableBalanceTxnResp
|
2
|
-
|
3
|
-
## Properties
|
4
|
-
|
5
|
-
| Name | Type | Description | Notes |
|
6
|
-
| ---- | ---- | ----------- | ----- |
|
7
|
-
| **token** | **String** | Token representing your funding account. You should use this as source_token when paying out transactions. | |
|
8
|
-
| **balance** | **Float** | Your account's current available balance in USD | |
|
9
|
-
| **currency_code** | **String** | The currency the balance is stored in. Using [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) format. In most cases this value will be USD | |
|
10
|
-
|
11
|
-
## Example
|
12
|
-
|
13
|
-
```ruby
|
14
|
-
require 'masspay_ruby_sdk'
|
15
|
-
|
16
|
-
instance = MassPayRubySdk::AvailableBalanceTxnResp.new(
|
17
|
-
token: 8bb3693f-2f98-43dd-a990-615b6a21596d,
|
18
|
-
balance: 100.5,
|
19
|
-
currency_code: USD
|
20
|
-
)
|
21
|
-
```
|
22
|
-
|
data/docs/CardApi.md
DELETED
@@ -1,160 +0,0 @@
|
|
1
|
-
# MassPayRubySdk::CardApi
|
2
|
-
|
3
|
-
All URIs are relative to *https://api.masspay.io/v0.1.4*
|
4
|
-
|
5
|
-
| Method | HTTP request | Description |
|
6
|
-
| ------ | ------------ | ----------- |
|
7
|
-
| [**get_wallet_card_info**](CardApi.md#get_wallet_card_info) | **GET** /wallet/{user_token}/{wallet_token}/card | Get MassPay Card Information |
|
8
|
-
| [**update_wallet_card_info**](CardApi.md#update_wallet_card_info) | **PUT** /wallet/{user_token}/{wallet_token}/card | Update MassPay Card Information |
|
9
|
-
|
10
|
-
|
11
|
-
## get_wallet_card_info
|
12
|
-
|
13
|
-
> <GetWalletCardInfo200Response> get_wallet_card_info(user_token, wallet_token)
|
14
|
-
|
15
|
-
Get MassPay Card Information
|
16
|
-
|
17
|
-
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.
|
18
|
-
|
19
|
-
### Examples
|
20
|
-
|
21
|
-
```ruby
|
22
|
-
require 'time'
|
23
|
-
require 'masspay_ruby_sdk'
|
24
|
-
# setup authorization
|
25
|
-
MassPayRubySdk.configure do |config|
|
26
|
-
# Configure API key authorization: AUTHORIZER_NAME
|
27
|
-
config.api_key['AUTHORIZER_NAME'] = 'YOUR API KEY'
|
28
|
-
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
29
|
-
# config.api_key_prefix['AUTHORIZER_NAME'] = 'Bearer'
|
30
|
-
end
|
31
|
-
|
32
|
-
api_instance = MassPayRubySdk::CardApi.new
|
33
|
-
user_token = 'usr_62727c1f-38a3-4a98-b7c9-e84093a106cd' # String | Token representing the user who owns the wallet
|
34
|
-
wallet_token = '38400000-8cf0-11bd-b23e-10b96e4ef00d' # String | Token representing the wallet
|
35
|
-
|
36
|
-
begin
|
37
|
-
# Get MassPay Card Information
|
38
|
-
result = api_instance.get_wallet_card_info(user_token, wallet_token)
|
39
|
-
p result
|
40
|
-
rescue MassPayRubySdk::ApiError => e
|
41
|
-
puts "Error when calling CardApi->get_wallet_card_info: #{e}"
|
42
|
-
end
|
43
|
-
```
|
44
|
-
|
45
|
-
#### Using the get_wallet_card_info_with_http_info variant
|
46
|
-
|
47
|
-
This returns an Array which contains the response data, status code and headers.
|
48
|
-
|
49
|
-
> <Array(<GetWalletCardInfo200Response>, Integer, Hash)> get_wallet_card_info_with_http_info(user_token, wallet_token)
|
50
|
-
|
51
|
-
```ruby
|
52
|
-
begin
|
53
|
-
# Get MassPay Card Information
|
54
|
-
data, status_code, headers = api_instance.get_wallet_card_info_with_http_info(user_token, wallet_token)
|
55
|
-
p status_code # => 2xx
|
56
|
-
p headers # => { ... }
|
57
|
-
p data # => <GetWalletCardInfo200Response>
|
58
|
-
rescue MassPayRubySdk::ApiError => e
|
59
|
-
puts "Error when calling CardApi->get_wallet_card_info_with_http_info: #{e}"
|
60
|
-
end
|
61
|
-
```
|
62
|
-
|
63
|
-
### Parameters
|
64
|
-
|
65
|
-
| Name | Type | Description | Notes |
|
66
|
-
| ---- | ---- | ----------- | ----- |
|
67
|
-
| **user_token** | **String** | Token representing the user who owns the wallet | |
|
68
|
-
| **wallet_token** | **String** | Token representing the wallet | |
|
69
|
-
|
70
|
-
### Return type
|
71
|
-
|
72
|
-
[**GetWalletCardInfo200Response**](GetWalletCardInfo200Response.md)
|
73
|
-
|
74
|
-
### Authorization
|
75
|
-
|
76
|
-
[AUTHORIZER_NAME](../README.md#AUTHORIZER_NAME)
|
77
|
-
|
78
|
-
### HTTP request headers
|
79
|
-
|
80
|
-
- **Content-Type**: Not defined
|
81
|
-
- **Accept**: application/json
|
82
|
-
|
83
|
-
|
84
|
-
## update_wallet_card_info
|
85
|
-
|
86
|
-
> update_wallet_card_info(user_token, wallet_token, opts)
|
87
|
-
|
88
|
-
Update MassPay Card Information
|
89
|
-
|
90
|
-
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.
|
91
|
-
|
92
|
-
### Examples
|
93
|
-
|
94
|
-
```ruby
|
95
|
-
require 'time'
|
96
|
-
require 'masspay_ruby_sdk'
|
97
|
-
# setup authorization
|
98
|
-
MassPayRubySdk.configure do |config|
|
99
|
-
# Configure API key authorization: AUTHORIZER_NAME
|
100
|
-
config.api_key['AUTHORIZER_NAME'] = 'YOUR API KEY'
|
101
|
-
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
102
|
-
# config.api_key_prefix['AUTHORIZER_NAME'] = 'Bearer'
|
103
|
-
end
|
104
|
-
|
105
|
-
api_instance = MassPayRubySdk::CardApi.new
|
106
|
-
user_token = 'usr_62727c1f-38a3-4a98-b7c9-e84093a106cd' # String | Token representing the user who owns the wallet
|
107
|
-
wallet_token = '38400000-8cf0-11bd-b23e-10b96e4ef00d' # String | Token representing the wallet
|
108
|
-
opts = {
|
109
|
-
pin: '0123', # String | New 4 digit pin number for the card (To be used in ATM machines)
|
110
|
-
status: 'SUSPEND' # String | New status for the card
|
111
|
-
}
|
112
|
-
|
113
|
-
begin
|
114
|
-
# Update MassPay Card Information
|
115
|
-
api_instance.update_wallet_card_info(user_token, wallet_token, opts)
|
116
|
-
rescue MassPayRubySdk::ApiError => e
|
117
|
-
puts "Error when calling CardApi->update_wallet_card_info: #{e}"
|
118
|
-
end
|
119
|
-
```
|
120
|
-
|
121
|
-
#### Using the update_wallet_card_info_with_http_info variant
|
122
|
-
|
123
|
-
This returns an Array which contains the response data (`nil` in this case), status code and headers.
|
124
|
-
|
125
|
-
> <Array(nil, Integer, Hash)> update_wallet_card_info_with_http_info(user_token, wallet_token, opts)
|
126
|
-
|
127
|
-
```ruby
|
128
|
-
begin
|
129
|
-
# Update MassPay Card Information
|
130
|
-
data, status_code, headers = api_instance.update_wallet_card_info_with_http_info(user_token, wallet_token, opts)
|
131
|
-
p status_code # => 2xx
|
132
|
-
p headers # => { ... }
|
133
|
-
p data # => nil
|
134
|
-
rescue MassPayRubySdk::ApiError => e
|
135
|
-
puts "Error when calling CardApi->update_wallet_card_info_with_http_info: #{e}"
|
136
|
-
end
|
137
|
-
```
|
138
|
-
|
139
|
-
### Parameters
|
140
|
-
|
141
|
-
| Name | Type | Description | Notes |
|
142
|
-
| ---- | ---- | ----------- | ----- |
|
143
|
-
| **user_token** | **String** | Token representing the user who owns the wallet | |
|
144
|
-
| **wallet_token** | **String** | Token representing the wallet | |
|
145
|
-
| **pin** | **String** | New 4 digit pin number for the card (To be used in ATM machines) | [optional] |
|
146
|
-
| **status** | **String** | New status for the card | [optional] |
|
147
|
-
|
148
|
-
### Return type
|
149
|
-
|
150
|
-
nil (empty response body)
|
151
|
-
|
152
|
-
### Authorization
|
153
|
-
|
154
|
-
[AUTHORIZER_NAME](../README.md#AUTHORIZER_NAME)
|
155
|
-
|
156
|
-
### HTTP request headers
|
157
|
-
|
158
|
-
- **Content-Type**: Not defined
|
159
|
-
- **Accept**: application/json
|
160
|
-
|